Doing Cool Tricks w/ Visual Basic... 
Author Message
 Doing Cool Tricks w/ Visual Basic...

I've got a brother named Dave Arnold!

To answer one of your questions, and get you started on the right path, you MUST get Daniel Appelman's VB guide to the Win32 API.  You can do soooo much with that tool!

Randy

    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



Fri, 02 Nov 2001 03:00:00 GMT  
 Doing Cool Tricks w/ Visual Basic...

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



Sat, 03 Nov 2001 03:00:00 GMT  
 Doing Cool Tricks w/ Visual Basic...
To make a window 'Stay on top':

Place the following code in a module

'Constants for topmost.
Public Const HWND_TOPMOST = -1
Public Const HWND_NOTOPMOST = -2
Public Const SWP_NOMOVE = &H2
Public Const SWP_NOSIZE = &H1
Public Const SWP_NOACTIVATE = &H10
Public Const SWP_SHOWWINDOW = &H40
Public Const FLAGS = SWP_NOMOVE Or SWP_NOSIZE

Public 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 wFlags As Long) As Long

When you want a form to be topmost, call this:

    Call SetWindowPos(Me.hWnd, HWND_TOPMOST, 0, 0, 0, 0, FLAGS)

For a great registry access class, head over to http://vbaccelerator.com for
a great class module as well as a lot of other really great stuff.

Books, Dan Appleman's book or Dave McKinney's book.  Both are available from
my website (it's available, but under construction!)

--

-George Handlin
Microsoft Certified Professional
http://members.xoom.com/hhcs
ICQ# 26463302
http://www.countdown9199.com
IBO# 587968


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



Sun, 04 Nov 2001 03:00:00 GMT  
 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



Sun, 04 Nov 2001 03:00:00 GMT  
 Doing Cool Tricks w/ Visual Basic...

    The easiest way to control a CD is using the multimedia control.  It wraps the multimedia API for you.  Of course, this is probably one of the easiest API's to use, since you really only need one function:  mciSendString.

--
Paul Parkhurst
Software Engineer


    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



Sun, 04 Nov 2001 03:00:00 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Doing Cool Tricks w/ Visual Basic...

2. Visual Basic Corner: Free tips, tricks, tools, links,.......

3. Visual Basic : Tips and tricks

4. Visual Basic Tips und Tricks auf Deutsch!

5. Visual Basic Corner: Free tips, tricks, tools, links,.......

6. Visual Basic : Tips and Tricks

7. Visual Basic Corner: Free tips, tricks, tools, links,.......

8. ---{ Here...some really cool tricks and secrets about VBasic }---

9. a cool trick

10. Cool CD Trick

11. ---{ Here...some really cool tricks and secrets about VBasic }---

12. Cool interface trick

 

 
Powered by phpBB® Forum Software