Find Code:
All Words
Any of the Words
Exact Phrase
Home
:
Code
:
Forums
:
Submit
:
Mailing List
:
About
:
Contact
Code
All
VB.NET
ASP.NET
C#
VB Classic
ASP Classic
Snippets
Popular
Resources
Submit Code
Forums
Articles
Tips
Links
Books
Contest
Link to us
This is how you can Drag controls even at Runtime....
Author:
Siddharth Srivastava
E-mail:
Click to e-mail author
Submitted:
1/4/2003
Version:
VB4
Compatibility:
VB4, VB5, VB6
Category:
Controls
Views:
10722
This is how you can Drag controls even at Runtime. It's a simple 9 lines of code useful to make sample Demo Applications for Clients. Good for Beginners! Have a look.
Declarations:
Dim z1, z2 Dim down As Boolean
Code:
Private Sub Command1_Click() MsgBox "clicked!" End Sub Private Sub Command1_KeyDown(KeyCode As Integer, Shift As Integer) down = True End Sub Private Sub Form_Activate() Command1.DragMode = vbAutomatic End Sub Private Sub Form_DragDrop(Source As Control, X As Single, Y As Single) If TypeOf Source Is CommandButton Then Command1.Left = X Command1.Top = Y End If End Sub
Home
|
Forums
|
Submit
|
Books
|
Mailing List
|
Advertising
|
About
|
Contact
© 2024 A1VBCode. All rights reserved.
Legal disclaimer & terms of use
Privacy statement