stopping a window from appearing in the taskbar

Forums for specific tips, techniques and example code
ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

stopping a window from appearing in the taskbar

Postby ConvertFromOldNGs » Fri Aug 07, 2009 2:52 pm

by johnmunro >> Tue, 24 Aug 2004 16:35:43 GMT

It's possible I'm being really stupid here, but how do you stop a window from appearing in the taskbar? I have the minimize and maximize buttons switched off, control box switched off, no caption and I've tried every border style, and there's always an entry for the window on the taskbar with the jade icon and no caption. Isn't there a way to get rid of it?


John Munro

FileVision UK Ltd.
The Bioscience Innovation Centre
Cowley Road, Cambridge, UK
CB4 0DS

Telephone: +44 (0) 1223 478200
Fax: +44 (0) 1223 477969
Email: john.munro@filevision.com
Web: http://www.filevision.com

The contents of this communication are confidential and are only intended to be read by the addressee. We apologize if you receive this communication in error and ask that you contact FileVision UK Ltd. immediately to arrange for its return. The use of any information contained in this communication by an unauthorized person is strictly prohibited. FileVision UK Ltd. cannot accept responsibility for the accuracy or completeness of this communication as it is being transmitted over a public network. If you suspect this message may have been intercepted or amended, please inform FileVision UK Ltd.

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: stopping a window from appearing in the taskbar

Postby ConvertFromOldNGs » Fri Aug 07, 2009 2:52 pm

by Jade Support >> Tue, 24 Aug 2004 21:39:19 GMT

Define the following external function:

setWindowLong(hwnd, nIndex, dwNewLong : Integer) : Integer is SetWindowLongA in user32;

In the Form::load() event method code the following...

constants
GWL_EXSTYLE = -20;
WS_EX_TOOLWINDOW = #80;begin

// self.alwaysOnTop(true);
call setWindowLong(self.hwnd, GWL_EXSTYLE, WS_EX_TOOLWINDOW);
end;

From MSDN:
"WS_EX_TOOLWINDOW Creates a tool window, which is a window intended to be used as a floating toolbar. A tool window has a title bar that is shorter than a normal title bar, and the window title is drawn using a smaller font. A tool window does not appear in the task bar or in the window that appears when the user presses ALT+TAB."

From seaching the web this appears to be the best approach to hiding the taskbar button. The downside is the inablility to ALT+Tab to the window. Perhaps best suited to a modal form?

Aaron.

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: stopping a window from appearing in the taskbar

Postby ConvertFromOldNGs » Fri Aug 07, 2009 2:52 pm

by johnmunro >> Wed, 25 Aug 2004 8:36:54 GMT

OK thanks, the inability to alt-tab isn't a problem in this case as it's an on-top window displaying node statistics - since it's always on top neither the taskbar button or alt-tab are needed because it's always accessible

I'm just surprised that this isn't a built-in feature of the Form class or something, same with on-top actually


John Munro

FileVision UK Ltd.
The Bioscience Innovation Centre
Cowley Road, Cambridge, UK
CB4 0DS

Telephone: +44 (0) 1223 478200
Fax: +44 (0) 1223 477969
Email: john.munro@filevision.com
Web: http://www.filevision.com

The contents of this communication are confidential and are only intended to be read by the addressee. We apologize if you receive this communication in error and ask that you contact FileVision UK Ltd. immediately to arrange for its return. The use of any information contained in this communication by an unauthorized person is strictly prohibited. FileVision UK Ltd. cannot accept responsibility for the accuracy or completeness of this communication as it is being transmitted over a public network. If you suspect this message may have been intercepted or amended, please inform FileVision UK Ltd.


Return to “Tips and Techniques”

Who is online

Users browsing this forum: No registered users and 12 guests