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:

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"!

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.

What file? This is Windows.... :S

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 :P

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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.