944,205 Members | Top Members by Rank

Ad:
Apr 5th, 2007
0

VB 1.0 Toolbar

Expand Post »
Hi everyone,

I'm writing a little app for myself in VB1.0 (I like the language, please don't knock it) and it more or less adds buttons into the top-right corner of whatever window is active, like NVidia does.

My problem is that these buttons are on a form. In an application. Which means that I set focus to this toolbar when I click the buttons on it. Which means that... when I click my toolbar's buttons the window the toolbar has locked onto suddenly goes "inactive". Eww!

I've been told to use CreateWindowEx to make a WS_EX_TOOLWINDOW (but wasn't given an example), and although there is a 16-bit call for it (stated below, because the 16-bit call is different from the 32-bit one), I'm not sure if I can create the aforementioned window style, and how/where to start if this actually is possible.

Could anyone please help me? I just want to get the window running and even possibly know how to add controls to it using standard VB methods (now that would be nice).

Thanks
--asmqb

16-Bit CreateWindowEx:
vb Syntax (Toggle Plain Text)
  1. Declare Function CreateWindowEx% Lib "User" (ByVal dwExStyle&, ByVal lpClassName$, ByVal lpWindowName$, ByVal dwStyle&, ByVal X%, ByVal Y%, ByVal nWidth%, ByVal nHeight%, ByVal hWndParent%, ByVal hMenu%, ByVal hInstance%, ByVal lpParam$)
Note the use of the "User" library - not "User32"!
Last edited by asmqb; Apr 5th, 2007 at 2:12 am.
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
asmqb is offline Offline
9 posts
since Jan 2007
May 28th, 2007
0

Re: VB 1.0 Toolbar

To add a button to a window, you have to modify the file that defines that window. You can't just paste something on top of the window.
Reputation Points: 730
Solved Threads: 181
Nearly a Senior Poster
MidiMagic is offline Offline
3,314 posts
since Jan 2007
May 30th, 2007
0

Re: VB 1.0 Toolbar

What file? This is Windows....

Also, I'm getting Linux soon, so modifying the core of eg fluxbox or changing a couple of config items in KDE or GNOME would probably do that for me... but having those buttons has kinda worn off now anyway

But again... what file?! 0.o

Thanks for your reply.

-asmqb/asmqb7/dav7/I-have-too-many-nicks-they-need-to-make-an-openid-for-nicks
Reputation Points: 10
Solved Threads: 0
Newbie Poster
asmqb is offline Offline
9 posts
since Jan 2007

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Legacy and Other Languages Forum Timeline: Family Tree scheme function
Next Thread in Legacy and Other Languages Forum Timeline: to convert string to integer value





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC