Working with VB 6.0 Forms and Controls

Tile and Center Images on the Background of MDI Forms.
Learn how to tile an image across the background of an MDI form or how to center an image on the background or even tile one image then center another image over it.

Irregularly Shaped Forms
Develop elliptically shaped forms and controls, forms with rounded corners, forms with see through holes in them or forms that spell out words such as "THE SCARMS". Use flashing title bars and gradient background colors that change.

Create an Active Skin (Irregular Shaped Form Based on Any Image)
Create an active skin resembling any image that you can change by dragging a new image onto it. Likewise, add and remove skin shaped buttons with a simple drag operation.

Forms with Transparent or Gradient Backgrounds
Add Bitmaps to Your Menus
Remove/Disable the Close ("X") Button

Make a form's background fade from light to dark or make it completely transparent.

Also, see how add bitmap images to your menus and how to disable the Close ("X"), Minimize and Maximize buttons in the title bar.

Toggle and Change the TitleBar and Border Style at Run Time
Toggle the TitleBar on and off and change the border style of your form at run time. Add and remove the Minimize, Maximize and WhatsThisHelp buttons and System Menu at runtime.

Animate How Forms are Displayed and Hidden,
Make Translucent Forms or Tile an Image Across your Form

Windows 98 and later provides the ability to slide your form in or out of view. See how to tile an image across the entire background of your form.

Windows 2000 introduced layered windows which let you make windows with varying degrees of translucency from invisible windows to fully opaque using the SetLayeredWindowAttributes function.

Prevent the Cursor From Moving Off Your Form
The ClipCursor API lets you define a region of the screen and restrict the cursor to within that region.

Copy the Desktop Wallpaper to a Form's Background
Set your form's background to the desktop wallpaper.

Create a Scrollable Form
Add more controls than can fit on the visible portion of a form and scroll though the form moving the controls into and out of view.

Dynamically Add Controls and Create a Scrollable Form
Dynamically add and remove controls at runtime using the controls collection, add controls to any container control and not the form itself, detect events from the new controls and create a scrollable form.

Move A Form Without A Title Bar/Resize Controls
Method one retrieves the X and Y coordinates of the cursor and then moves the form to that locatoin. Method two calls ReleaseCapture and SendMessage to move the form.

Let users resize a form's controls at runtime.

Change a Control's Style / Owner Drawn Controls
See how to change the font of individual ListBox items by changing the Style of the control. Creating Owner Drawn controls lets you customize VB's intrinsic controls to look the way you want.

Read a discussion of hooks and how to use them in Visual Basic.

ListBox Functions Galore
Customize ListBoxes and ComboBoxes to add Tab Stops and align data in columns. Right Justify columns, automatically locate items as you type, and speed up operations such as adding, deleting, selecting and locating items.

Create a Dockable, AutoHide AppBar
The Window's taskbar and IE4+ toolbars are called Appbars. Create an Appbar which can float or be docked to a screen edge and can be set to AutoHide.

Dock Your Forms
Create child forms that you can dock to the edges of your main form. Child forms used are Toolbar type windows. See how to create toolbar and ToolTip windows.

Edit Data in a Read Only Grid
Use a floating textbox to edit data in the read only Microsoft FlexGrid control.

Create 3 Dimensional Text
Create 3 Dimensional text effects.

Use Manifests for Windows XP Look and Feel

Use a Manifest file to tell Windows XP's theme manager to use version 6 of comctl32.dll to give your application's controls the look and feel of XP.

Create Multi-Line ToolTip Windows
Create popup ToolTip windows containing more than one line and control characters such as TABs.




About TheScarms
About TheScarms


Sample code
version info

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

Email this page


© Copyright 2024 TheScarms
Goto top of page