|
|
|
|
|
|
|
|
|
DragControl - Drag any control using the mouse
|
Total Hit (3020) |
«Code LangId=1»
Private Type POINTAPI
X As Long
Y As Long
End Type
Private Type RECT
Left As Long
Top As Long
Right As Long
Bottom As Long
End Type
Private Declare Function ClipCursor Lib "user32" (lpRect As RECT) As Long
Private Declare Function Cli
....Read More |
Rating
|
|
|
|
GetRoshHashanah - Get the date of Rosh Hashanah (Jewish calendar)
|
Total Hit (2807) |
«Code LangId=1»' Returns the date that Rosh Hashanah begins
' for the requested year. It is important to note that
' Rosh Hashanah is based on the Lunar cycle so the Holiday
' actually begins at sunset of the day before the date
' returned by this function.
' Note: Many dates in the Jewish
....Read More |
Rating
|
|
|
ReplaceMulti - Multiple string replacements
|
Total Hit (1857) |
«Code LangId=1»' Perform multiple substitutions in a string
' The first argument is the string to be searched
' The second argument is vbBinaryCompare or vbTextCompare
' and tells whether the search is case sensitive or not
' The following arguments are pairs of (find, replace) strings
'
....Read More |
Rating
|
|
|
Display the Windows Shortcut Wizard
|
Total Hit (2586) |
You can programmatically start the Shortcut Wizard from your code, to give the end user the capability to create a new shortcut:
«Code LangId=1»
Shell "rundll32.exe AppWiz.Cpl, NewLinkHere " & App.Path, 1
«/Code»
|
Rating
|
|
|
Get the list of ODBC drivers
|
Total Hit (4233) |
The ODBCTOOL.DLL library contains three functions that make it easier to manage DSNs. To run the following code you must add a reference to the "ODBC Driver & Data Source Name Functions" library to your References dialog box. If you don't find this library listed in the References list, use the Star
....Read More |
Rating
|
|
|
Creating help string for Enum constants
|
Total Hit (3008) |
I've been trying to find a way to assign helpstrings for Enums in Visual Basic. The Class builder utility does that only for methods, events, and properties, but not for Enums.
The IDL source code that corresponds to an Enum in a type library looks something like follws, and you can run the MIDL
....Read More |
Rating
|
|
|
Updating records in DataList and ADO Data Controls
|
Total Hit (3918) |
If you use a DataList control linked to an ADO Data Control and if you want to add a record, you have to create a command button with this code:
«Code LangId=1»
Private Sub cmdAdd_Click()
On Error GoTo AddErr
datPrimaryRS.Recordset.AddNew
txtNew.SetFocus
Exit Sub
AddErr:
MsgBox
....Read More |
Rating
|
|
|
Selecting an entire row in a ListView
|
Total Hit (3645) |
The ListView control that comes with VB6 lets you select an entire row by setting its FullRowSelect property to True. If you are working with VB5 or you're using VB6 with the old version of the Microsoft Windows Controls this capability isn't avaible, but if you have installed the comctl32.dll versi
....Read More |
Rating
|
|
|
|
Count Sort, a special case of indexed sort
|
Total Hit (2869) |
CountSort is yet another sort algorithm, which can be applied only under very particular conditions but that, when such conditions are met, turns to be the fastest of the lot. Count Sort can be used when the key is of Integer type, or when it is of Long type but the range of values is not too large.
....Read More |
Rating
|
|
|
|
How to enumerate available monitor on your system ?
|
Total Hit (4004) |
If you are working with multiple monitors then this example will show you how to enumerate available monitors on your sytem and retrive properties of monitor.
«b»Step-By-Step Example«/b»
- Create a standard exe project
- Add one Module to project
- Place one textbox on form1, set MultiLine=T
....Read More |
Rating
|
|
|
|
How to display balloon style tooltip (Updated)
|
Total Hit (16545) |
Using api you can create ballon style tooltip. You can also set varous parameter for tooltip i.e. Delay time, Style, Color, font etc...
I have used IFont to get font handle from StdFont but IFont may create problem sometimes. Check the following article to convert StdFont to APIFont
«a href='h
....Read More |
Rating
|
|
|
How to shutdown remote machine on a network using API.
|
Total Hit (4804) |
This demo will show you how to shutdown remote machine in a specified interval. When you shutdown machine you will see following warning message.
«BR»«P Align=center»«img src='/Main/Articles/Lang1/Cat3/Code3580/image3580_1.gif'/»«/P»«BR»
«b»For Quick Demo«/b»
1. Start a new project in Vis
....Read More |
Rating
|
|
|
Tutorial - ListView Control Introduction
|
Total Hit (1694) |
The list view control is basically and advanced ListBox. This control allows you to add rows of data, but it also supports large and small icons, multiple columns, automatic label edit, column re-order, hot-tracking, the four main modes that you see in explorer:
Icon - Displays items with large i
....Read More |
Rating
|
|
|
Simulating a TopIndex Property for a ListView
|
Total Hit (693) |
A listview control's EnsureVisible method provides a means to bring a referenced item into view. Ditto, the LVM_ENSUREVISIBLE message simply "ensures that a list-view item is either entirely or partially visible, scrolling the list-view control if necessary."
If the item of interest is back up t
....Read More |
Rating
|
|
|
How to Select the Entire Row in a ListView
|
Total Hit (1503) |
By setting a ListView style bit using the Windows API SendMessage with the message LVS_EX_FULLROWSELECT, selecting an item will cause the selection rectangle to highlight and span the entire row. Removing this bit restores the default selection style.
....Read More |
Rating
|
|
|
Show and Hide a Form's Titlebar at run-time
|
Total Hit (2305) |
This tip shows you how to show and hide the title bar of a window at run-time. To make a window's title bar disappear, you have to remove the control box, the maximise box and the minimise box as well as set the caption of the form to blank. Unfortunately, VB's ControlBox, MinButton and MaxButton pr
....Read More |
Rating
|
|
|
Sending files inside e-mail messages
|
Total Hit (2062) |
We have published the introduction to UUCode algorithm and tutorial that shows how to add new feature of dealing with attachments to our sample applications Simple MailSender and MailChecker.
|
Rating
|
|
|
Tutorial : Retrieving FTP directory listing
|
Total Hit (2225) |
This tutorial will show you how to use the CFtpClient class in order to retrieve FTP directory listing and navigate between FTP directories. We'll improve the sample application that we're creating in the previous tutorials by adding the ListView control that will display content of the current FTP
....Read More |
Rating
|
|