Pada VB 6.0
Di bagian '(Declarations)' dari Form ketikkan
Di bagian '(Declarations)' dari Form ketikkan
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
Di bagian 'Text1_MouseDown'.
If Button = vbRightButton ThenSendMessage Me.hwnd, &H204, 0, 0 End If
Pada VB.NET
Di bagian '(Declarations)' dari Form ketikkan
Di bagian '(Declarations)' dari Form ketikkan
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Integer, ByVal wMsg As Integer, ByVal wParam As Integer, ByVal lParam As Integer) As Integer
Di bagian 'TextBox1_MouseDown'.
If e.Button = Windows.Forms.MouseButtons.Right Then SendMessage(Me.Handle.ToInt32, &H204, 0, 0)End IfSemoga Bermanfaat :)
No comments:
Post a Comment