Advertisement

Results for "Category: Custom Controls/ Forms/ Menus"

7_2009-2012 #217265
Create multi-Colored forms without using the API

Although using the API is a nice way to create multi-colored forms, there might be a reason why you would wish to create one without using the API.

7_2009-2012 #217276
control subclassing switchboard

The Switchboard:A method for handling subclassing in ActiveX controls f you develop ActiveX controls and intend to subclass or hook a window, you'll very quickly discover a problem when you attempt to site multiple instances of your control. The subclassing, which worked fine with a single instance of your control, now no longer works and is, in fact, most likely is causing a GPF. Why is this happening? The AddressOf operator requires you to place the callback routine in a module. This module is shared between all instances of your control and the variables and subroutines that the module provide are not unique to each instance. The easiest way to visualize the problem is to imagine a shared phoneline (or a partyline as we hicks call it) where multiple parties are trying to dial a number, talk, and hangup, all at the same time. What's needed is an operator, a routine that controls the dialing (hooking), the talking (the callback routine), and who routes information to the instance of the control that requested it. The Switchboard subroutine (see below) and it's supporting code provides a method for subclassing from multiple instances of your ActiveX control. It is not memory intensive, nor is it slow. It's biggest weakness is that it is hardcoded to intercept particular messages (in this case, WM_SIZE, to trap resize events) and will require some minor modification on your part to use.

7_2009-2012 #217280
Lost Focus / Got Focus Event--text box validation

These events are usually ignored or inconsistent amongst programs. For the users benefit, highlighting the current textbox, or tab control will aid in their navigation of your forms. But how to keep all these events consistent? Here is the answer. (Well our answer anyhow... until full-inheritance in VB 5.0)

7_2009-2012 #217298
Getting a Reference to a VB 5.0 UserControl

Visual Basic 5.0 allows you to use UserControls to create ActiveX controls in your projects. The following code snippet does two things: It gets a reference to the form in which a UserControl is placed, and it gets a reference to that control on the form. by David Mendlen

7_2009-2012 #217299
Full example of Drag and Drop within a application

Suppose you have a listbox with some elements and want to drag&drop a selected one into a textbox. http://137.56.41.168:2080/VisualBasicSource/vbdraganddrop.txt

7_2009-2012 #217300
Clear all textboxes on a form at run-time

handy code for clearing all text box controls at run-time so you don't have to bother doing it at design time. http://137.56.41.168:2080/VisualBasicSource/vbworkingwithtextbox.txt

7_2009-2012 #217301
How to use the common dialog control

Use of 3 types of common dialog boxes:1: choose printer, 2: choose font, 3: choose color. http://137.56.41.168:2080/VisualBasicSource/vb4usecommondialog.txt

7_2009-2012 #217305
StayOnTop

Keep a form always on top (topmost floating form) in windows 95. Albetski, Allan"

7_2009-2012 #217306
Use of the Toolbar Control

Short tutorial on how to use the toolbar in VB4/5 32 bit. http://137.56.41.168:2080/VisualBasicSource/vb4toolbar.txt

7_2009-2012 #217308
DegreesToXYsubroutine

The DegreesToXYsubroutine, calculates the X (horizontal) and Y (vertical) coordinates of any point, measured in degrees, on the circumference of a circle or ellipse.

7_2009-2012 #217325
Exclusive Mode (Updated)

This function allows the application to enter and exit exclusive mode. In this mode any message boxes or prompts from Windows and other applications will not show up infront of the program. This is useful when you don't want anything to come up infront of your application window.

7_2009-2012 #217326
IsLoadedForm

Tells whether a form is loaded or not

7_2009-2012 #217327
Change Form Shape

Can Change The Shape of any form

7_2009-2012 #217329
Make Form Transparent.

Makes a Form Trans Parent

7_2009-2012 #217330
ComboBox on Toolbar

This subroutine shows how to Really put a ComboBox (or any control with a hWnd) onto a ToolBar (or any other control/window with a hWnd).

7_2009-2012 #217334
Easy tiled-image form backgrounds

This code, which was inspired by a similar snippet of code by Ian Ippolito, permits tiling an image onto a form's background. This variant, though, resides in a module and is called by a form instead of residing within the form's code itself. This permits using the feature project-wide without redundant code all over the place.

7_2009-2012 #217335
Tiled backgrounds on an MDI parent form? Yep!

This code, which was inspired by a similar snippet of code by Ian Ippolito, permits tiling an image onto an MDI parent form's background. Getting an image onto an MDI parent is easy. Getting a tiled one is another story. We could try using a Clipboard operation, or build a big tiled background and save it and then laod it into the MDI parent's Picture property, but these are nasty, anal-retentive, and likely to simply not work. This code, however, works...

7_2009-2012 #217348
Center a form, relative to the available workspace

Centers a form, relative to the available workspace. This means that if your users have high, or wide taskbars, or other apps which restrict the workspace, your forms will still center properly.

7_2009-2012 #217350
Coolbutton

It's a coolbutton. :) Those flat things that MS uses now. This one supports setting images for mouse over, mouse down, mouse up, drawing bevels for those 3 states, setting the colours of the bevel, automatically generating the mousedown and mouseup images by varying the brightness of the original, setting text positioning... lots of stuff.

7_2009-2012 #217358
Sliding Divider (slider bar)

Resizes two text boxes AS a divider is dragged left or right. Maintains full bounds checking. The methods used can be applied to other controls as well. This is a form of splitter bar.

Languages
Top Categories
Global Discovery