advertisement

Find Code  Advanced Search   

browse free vb code
Submit Code
ASP,  HTML, and XML
Database
Dates  and Math
Files  and Directories
Forms  and Controls
Lists,  Collections, and Arrays
Miscellaneous
Multimedia/Games
Office/VBA
Network/Internet
Registry
Screen/Graphics
String  Manipulation
System/API
Windows  2000/XP
VB.NET/ASP.NET



advertisement
Drag and Dock a Form to the Screen

Author: Arvind Bhambhani
Category: Forms and Controls
Type: Snippets
Difficulty: Intermediate

Version Compatibility:  Visual Basic 6  

More information: This is code to drag a form with mouse. It docks itself when you try to move it to the edges of the screen. The code will work even if you set the BorderStyle property of the form to 0, i.e. no border.

This code works when you drag the form by clicking down on its active area, not on its title bar.

This code has been viewed 56586 times.

Instructions: Copy the declarations and code below and paste directly into your VB project.


Declarations:

Code:

No Text Boxes

Sponsored Links


The Network for Technology Professionals

Search:

About Internet.com

Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | E-mail Offers