Search Amazon:

Dock Your Forms

This sample shows how to dock your forms to the edges of your main form. The child form can float or be docked to any of the four edges. It also shows how to create ToolBar windows and ToolTip windows.

Create toolbar forms that can be docked to your main form Create toolbar forms that can be docked to your main form
Download Source Code

Description

This sample gets a bit involved and I'll leave most of the details to the code. In general,  A ToolBar Window is created to display images representing a controls menu. Tooltip windows are created to display tooltips denoting the names of the controls the cursor is hovering over. In real life you want real controls and not images but the docking concept is the same. The window displaying the forms is set to be a child of the main window and is subclassed to receive and handle various Window's messages. The child window is positioned and sized corresponding to the edge it is docked to.

Instructions

Download the source code and run it. Right click on the child forms caption to display its menu. Dock the form to the desired edge. Then you can use its title bar to drag it to the center of the form to make it float.

Sign In
  User Id 
  Password 


Submit Your Own Code and Articles




About TheScarms
About TheScarms

Ask me your programming questions

I read every email and answer all I can.

User Feedback: Be the first to add a comment! Items to Show:     

     
You must log in to post feedback.
Comment:    
 

If you use this code, please mention "www.TheScarms.com"

Email this page


TheScarms AppSentinel lets you securely copy protect and create evaluation versions of your software

TheScarms(tm) AppSentinel lets you quickly and easily create evaluation versions of your software and stop unauthorized copying and unregistered use of your programs!

Get your free
trial copy today!


      The World's Number 1 Web Host

© Copyright 2008 TheScarms