|
How to sort string Array using CompareString API
|
Total Hit (3173) |
CompareString compares two strings and determines which one would come first in an alphabetic sort. Although this function can use a number of different comparisons, by default it conducts a case-sensitive word sort. In a word sort, all symbols except hyphens and apostrophes come before the letter "
....Read More |
Rating
|
|
|
|
Example of rectangle APIs
|
Total Hit (2524) |
This sample code will show you how to work with basic Rectangle manipulation APIs to do some math operations with Rectangles.
«b»Step-By-Step Example«/b»
- Create a standard exe project
- Add one timer control on the form1
- Add the following code in form1
«code LangId=1»Option Explicit
....Read More |
Rating
|
|
|
Working with GDI Brush Object
|
Total Hit (5485) |
A brush is a graphics tool that applications use to paint the interior of polygons, ellipses, and paths. Drawing applications use brushes to paint shapes; word processing applications use brushes to paint rules; computer-aided design (CAD) applications use brushes to paint the interiors of cross-sec
....Read More |
Rating
|
|
|
|
|
|
|
How to enumerate available monitor on your system ?
|
Total Hit (4099) |
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
|
|
|
|
Working with string APIs
|
Total Hit (2420) |
«code LangId=1»Private Declare Function lstrcat Lib "kernel32" Alias "lstrcatA" ( _
ByVal lpString1 As String, _
ByVal lpString2 As String) As Long
Private Declare Function lstrcmp Lib "kernel32" Alias "lstrcmpA" ( _
ByVal lpString1 As String, _
ByVal lpString2
....Read More |
Rating
|
|
|
How to convert all accent char to normal char (Only for win2k)?
|
Total Hit (2347) |
This example will show you how to convert all accent characters to normal character.
«b»Step-By-Step Example«/b»
- Create a standard exe project
- Add the following code in form1
«code LangId=1»Private Declare Function FoldString _
Lib "kernel32" Alias "FoldStringA" ( _
ByVal dwMapFlags
....Read More |
Rating
|
|
|
How to show/hide taskbar, desktop icons and start button ?
|
Total Hit (16563) |
This sample code will show you how to use FindWindow api to get handle to various window by window title. If you have window handle then you can use APIs like ShowWindow, SetWindowPos and many more to perform various operations (e.g. hide/show, resize etc.) to that window.
«b»Step-By-Step Exampl
....Read More |
Rating
|
|
|
|
How to display shortcut PopupMenu generated at runtime ?
|
Total Hit (5394) |
This article will show you simple demo of creating and displaying popup menu using TrackPopupMenu api. You will learn the following items from this sample code.
«UL»«LI»How to create PopupMenu, MenuItems and Submenu at runtime using CreatePopupMenu and AppendMenu APIs
«LI»How to display popupmen
....Read More |
Rating
|
|
|
How to add your own menu item in System menu ?
|
Total Hit (4753) |
This sample code will show you
- How to add a new menuitem in the system menu using InsertMenuItem API
- How to respond to the events generated by new menuitem with the subclassing technique
- How to get/set item state using GetMenuState and SetMenuItemInfo APIs
- How to remove menuitem from
....Read More |
Rating
|
|
|
|
|
|
Show ChooseFont dialogbox using API
|
Total Hit (5564) |
You can use ChooseFont API to show Font selection common dialogbox. This API will eliminate the need of Common Dialog ActiveX control which comes with Visual Basic.
«b»Step-By-Step Example«/b»
- Create a standard exe project
- Add one commandbutton on the form1
- Add the following code in fo
....Read More |
Rating
|
|
|
Drawing Chord using API
|
Total Hit (2527) |
«b»About Chords«/b»
A chord is a region bounded by the intersection of an ellipse and a line segment called a secant. The following illustration shows a chord drawn by using the Chord function.
When calling Chord, an application supplies the coordinates of the upper-left and lower-right corne
....Read More |
Rating
|
|
|
Working with LZ (Lempel-Ziv) compression APIs
|
Total Hit (6599) |
«b»Lempel-Ziv compression«/b» is a lossless compression algorithm, which means that no data is lost when compressing and decompressing the file, as opposed to lossy compression algorithms such as JPEG, where some data is lost each time data compression and decompression occur. NTFS volumes support f
....Read More |
Rating
|
|
|
|
|
How to block/unblock keyboard and mouse input ?
|
Total Hit (5404) |
You can use BlockInput to block keyboard and mouse. Pass true to block and false to unblock keyboard and mouse.
«b»Step-By-Step Example«/b»
- Create a standard exe project
- Place the following code in form1
«code LangId=1»Private Declare Function BlockInput Lib "user32" (ByVal fBlock As Long)
....Read More |
Rating
|
|
|
How to send a specific windows message to all windows ?
|
Total Hit (3426) |
Many times we need to send a specific message to other applications or windows itself to notify regarding some event. Windows provides a function called BroadcastSystemMessage. The BroadcastSystemMessage function sends a message to the specified recipients. The recipients can be applications, instal
....Read More |
Rating
|
|
|
How to Write Multiple String to Windows NT EventLog ?
|
Total Hit (3347) |
This example code will show you how to write to EventLog. If you have defined Message with multiple parameter substitutions then you have to pass pointer to array of string pointers....!!! Sounds little complicate huhhhhh.. Lets see actual code to clear this confusion.
Note : Before you write to
....Read More |
Rating
|
|
|
|
|