
Doing Cool Tricks w/ Visual Basic...
Try this to make your form always stay on top even when it loses focus:
Declare the following in a Module (Projects / AddModule from VB menu bar):
Declare Function SetWindowPos Lib "user32" _
(ByVal hwnd As Long, _
ByVal hWndInsertAfter As Long, _
ByVal X As Long, ByVal Y As Long, _
ByVal CX As Long, ByVal CY As Long, _
ByVal Flags As Long) As Long
To make the form stay on top use
SetWindowPos Me.hwnd, -1, 0, 0, 0, 0, &h3
and to stop this action, use
SetWindowPos Me.hwnd, -2, 0, 0, 0, 0, &h3
Rick
Hi,
I have been trying to figure out how to do the following tricks with VB:
* How do you:
* Set a window or dialog to be "Always On Top"
* Place a VB App in the System Tray as an Icon.
* How deep can you:
* make the subtrees in the VB Registry entries using Getsetting()
and Savesetting()?
Can I make a registry entry like this:
VB
+Application Name
+subtree 1
+subtree
1.1
+ subtree 1.2
+ etc...
* What's easiest way to control a CD drive playing audio CD's from VB?
Is there a VB Control I can drop onto a form?
or do I have to use some Windows API call?
* Does anyone know any really good links or books where I can get tips on
cool tricks in VB?
either through the winApi or just through VB Controls, etc.
I couldn't find the answer in the visual studio help, nor the 2 books I
have on VB6.
Please reply to my email as well as the newsgroup,
Thanks a million,
-Dave Arnold