본문 바로가기

Programing (프로그래밍)/VB.NET

VB.NET - TextBox 가장 끝자리로 포커스 이동하기 ( TextBox / Focus / Cursor ) VB.NET - TextBox 가장 끝자리로 포커스 이동하기 ( TextBox / Focus / Cursor ) 1 2 TextBox.Select() TextBox.Select(TextBox.Text.Length, 0) cs 더보기
VB.NET - 키보드 이벤트를 버튼 클릭 이벤트로 넘기기 ( KeyPreview / KeyDown / Form ) VB.NET - 키보드 이벤트를 버튼 클릭 이벤트로 넘기기 ( KeyPreview / KeyDown / Form ) '키보드이벤트'를 '버튼클릭' 이벤트로 넘기기 1 2 3 4 5 Private Sub frmMain_KeyDown(sender As Object, e As KeyEventArgs) Handles MyBase.KeyDown If e.KeyCode = Keys.F5 Then tsbSet_Click(sender, e) End If End Sub Colored by Color Scripter cs * form 의 경우 폼속성의 'KeyPreview'를 'True' 로 바꿔줘야 한다. 더보기
【 VB.NET 】- 버튼 드래그 이동 하기 ( Dragmove ) 【 VB.NET 】# 버튼 드래그 이동 하기 ( Dragmove ) @ Form.vb 1234567891011121314151617181920Public Class Form1 Dim X, Y As Integer Dim skin As New System.Drawing.Point Private Sub Button1_MouseDown(sender As Object, e As MouseEventArgs) Handles Button1.MouseDown X = Control.MousePosition.X - Button1.Location.X Y = Control.MousePosition.Y - Button1.Location.Y End Sub Private Sub Button1_MouseMove(sender As Ob.. 더보기
VB.NET - 각종 정보 출력하기 【 VB.NET 】 @ 각종 정보 출력하기 # Form1.vb Public Class Form1 Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load If UBound(Diagnostics.Process.GetProcessesByName(Diagnostics.Process.GetCurrentProcess.ProcessName)) > 0 Then MsgBox("프로그램이 이미 실행중입니다!", MsgBoxStyle.Exclamation + MsgBoxStyle.OkOnly, Me.Text) End End If Label1.Text = "해상도 너비" TextBox1.Text = My.Computer.Screen.Bounds.. 더보기