|
Dock Your Forms
|
Total Hit (2725) |
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.
|
Rating
|
|
|
|
|
An explorer like composite developed with VB.Net
|
Total Hit (3060) |
This composite implements an explorer "light" developed in VB.Net. The explorer provides for automatic resizing. The example provides for an explorer contained in a resizable panel on a resizeable form
|
Rating
|
|
|
|
|
CamelCase - Convert a string to camel case
|
Total Hit (9009) |
«Code LangId=1»
' convert a string to camel case
' for example: CamelCase("new file name") => "NewFileName"
'
Function CamelCase(ByVal Text As String) As String
Dim i As Long
' convert all non-alphanumeric chars to spaces
For i = Len(Text) To 1 Step -1
If InStr(1,
....Read More |
Rating
|
|
|
A VarPtr substitute function for VB4
|
Total Hit (3449) |
Both VB5 and VB6 include a hidden function, named VarPtr, that returns the address of a variable. Many advanced tricks and routines, on VB2TheMax or other site, use this function. However, VB4 doesn't directly support VarPtr, so it seems that you can't use such routines with those older versions of
....Read More |
Rating
|
|
|
Count substrings with the Replace function
|
Total Hit (3261) |
You can often use the Replace function in a smewhat unorthodox ways to simplify (and sometimes optimize) your code. For example, in order to count the number of occurrences of a substring inside another string you usually need a loop based on the InStr function:
«Code LangId=1»
Dim i As Long, cou
....Read More |
Rating
|
|
|
Cross-midnight time measurements
|
Total Hit (3045) |
Any time the behavior of your code depends on the Timer function you should take into account the (more or less) remote possibility that your code is executed just before midnight. Take for example the following code:
«Code LangId=1»
Sub Pause(seconds as Single)
Dim initTime as Single
....Read More |
Rating
|
|
|
|
Determine whether the client program is in break mode
|
Total Hit (3672) |
When an interpreted client running in the IDE enters debug (break) mode, all the ActiveX DLL it's using continue to be in run mode as usual, even though you won't notice it because the DLL will be inactive until the program invokes one of its methods. There are times, however, when the DLL is able t
....Read More |
Rating
|
|
|
Don't use = operator on Date values
|
Total Hit (3108) |
Date variables store values in floating point format, much like Double variables, with the integer part for dates and the fractional part for the time portion. Being floating point values, Data values may be subject to rounding problems, and for this reason you shouldn't test two Date variables for
....Read More |
Rating
|
|
|
Determining Memory Statistics and System Resources
|
Total Hit (3092) |
Retrieve the current state of the system's memory using the GlobalMemoryStatus function. On Windows 9x machines you can determine the system resource values displayed in Explorer's Help About dialog by using the Resource Meter's Rsrc32.dll. Use this info to determine to if there are enough reources
....Read More |
Rating
|
|
|
|
System Metrics Information
|
Total Hit (2864) |
The GetSystemMetrics function returns a wealth of information including the width and height of the screen, window, icon, border, caption, scroll bar elements and more.
|
Rating
|
|
|
System Parameters Information
|
Total Hit (2899) |
The SystemParametersInfo function queries systemwide parameters and provides information about the mouse, keyboard, desktop, icons size, screen saver,... This example also demonstrates how to get the Window's version using GetVersionEx.
|
Rating
|
|
|
Add Your Application's Icon to the System Tray
|
Total Hit (2904) |
Add your application's icon to the System Tray and respond to mouse events occurring on your system tray icon. Work with ActiveX components from the system tray. Normally this is not possible due to the way Windows handles Remote Procedure Calls.
|
Rating
|
|
|
Locale Aware Date Format
|
Total Hit (2721) |
Get the Locale specific Date and Number formats. If your regional settings are set to German, the standard date looks like "dd.mm.yy". Convert to the proper date format based on the locale.
|
Rating
|
|
|
|
|
|
|
|
Animate How Forms are Displayed and Hidden,
|
Total Hit (2948) |
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.
|
Rating
|
|
|
Create a Scrollable Form
|
Total Hit (2786) |
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.
|
Rating
|
|
|
Dynamically Add Controls and Create a Scrollable Form
|
Total Hit (2770) |
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.
|
Rating
|
|
|
Move A Form Without A Title Bar/Resize Controls
|
Total Hit (3011) |
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.
|
Rating
|
|
|
Change a Control's Style / Owner Drawn Controls
|
Total Hit (2714) |
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.
|
Rating
|
|
|
Create a Dockable, AutoHide AppBar
|
Total Hit (4113) |
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.
|
Rating
|
|