Click here to Skip to main content
15,892,005 members
Home / Discussions / Windows Forms
   

Windows Forms

 
Generalweb services in windows application Pin
caradri10-Jan-08 0:45
caradri10-Jan-08 0:45 
GeneralRe: web services in windows application Pin
Kschuler10-Jan-08 9:56
Kschuler10-Jan-08 9:56 
Generalplug to check spilling mistake the commnt in Source Code project Pin
dark-Slayer828-Jan-08 17:16
dark-Slayer828-Jan-08 17:16 
QuestionHiding & restoring all open forms -- problem Pin
Jabes8-Jan-08 4:27
Jabes8-Jan-08 4:27 
GeneralRe: Hiding & restoring all open forms -- problem Pin
Luc Pattyn8-Jan-08 6:00
sitebuilderLuc Pattyn8-Jan-08 6:00 
GeneralRe: Hiding & restoring all open forms -- problem Pin
Jabes8-Jan-08 6:12
Jabes8-Jan-08 6:12 
GeneralRe: Hiding & restoring all open forms -- problem Pin
Luc Pattyn8-Jan-08 6:37
sitebuilderLuc Pattyn8-Jan-08 6:37 
GeneralRe: Hiding & restoring all open forms -- problem Pin
Jabes9-Jan-08 2:23
Jabes9-Jan-08 2:23 
I have made some progress with this, but have hit a barrier. My win32 knowledge is probably not good enough Smile | :)

Since hiding a dialog box closes the dialog box, which doesn't allow me to restore state I have looked at moving the windows.

I enumerate through the windows with EnumThreadWindows to get the window handles.
Foreach window:
1. call GetWindowPlacement to get the current details (and store them)
2. change the normal position to off screen
3. call SetWindowPlacement with the showcommand set to SW_RESTORE twice

I have to call SetWindowPlacement to get the window to move properly if it is in a maximised state.


On restore:
I call SetWindowPlacement with the stored details



This is all fine, except the window remains in the taskbar. A user can just right click and move, maximise etc then window to bring it back.

So I need to get it off the task bar - or at very least disable all of these functions.

To remove it from the task bar, I have tried this code to remove the WS_EX_APPWINDOW style and set the WS_EX_TOOLWINDOW style. However, whilst the window changes its style it does not get removed from the taskbar. Any clues?

int istyle = GetWindowLongW(hWnd, GWL_EXSTYLE);

istyle = istyle & (~WS_EX_APPWINDOW);
int lResult = SetWindowLongW(hWnd, GWL_EXSTYLE, istyle);

//istyle = GetWindowLongW(hWnd, GWL_EXSTYLE);
istyle = istyle | WS_EX_TOOLWINDOW;
SetWindowLongW(hWnd, GWL_EXSTYLE, istyle);




Best wishes
James
GeneralRe: Hiding & restoring all open forms -- problem Pin
Luc Pattyn10-Jan-08 12:10
sitebuilderLuc Pattyn10-Jan-08 12:10 
GeneralRe: Hiding & restoring all open forms -- problem Pin
Jabes10-Jan-08 22:21
Jabes10-Jan-08 22:21 
GeneralRe: Hiding & restoring all open forms -- problem Pin
Luc Pattyn10-Jan-08 23:46
sitebuilderLuc Pattyn10-Jan-08 23:46 
QuestionHow to restore a form Pin
niradhip8-Jan-08 3:58
niradhip8-Jan-08 3:58 
AnswerRe: How to restore a form Pin
John_Adams10-Jan-08 11:36
John_Adams10-Jan-08 11:36 
QuestionDatagrid Pin
Member 47502137-Jan-08 10:58
Member 47502137-Jan-08 10:58 
GeneralRe: Datagrid Pin
DotNetXenon9-Jan-08 10:50
DotNetXenon9-Jan-08 10:50 
QuestionMDI app with Database access Pin
Gymnast7-Jan-08 8:26
Gymnast7-Jan-08 8:26 
GeneralRe: MDI app with Database access Pin
Kschuler10-Jan-08 10:05
Kschuler10-Jan-08 10:05 
QuestionHow maintain advertisement on kiosk machine [modified] Pin
Prashant kr Yadav (MEC)7-Jan-08 3:36
Prashant kr Yadav (MEC)7-Jan-08 3:36 
AnswerRe: How maintain advertisement on kiosk machine Pin
Christian Graus8-Jan-08 9:18
protectorChristian Graus8-Jan-08 9:18 
GeneralRe: How maintain advertisement on kiosk machine Pin
Prashant kr Yadav (MEC)9-Jan-08 3:13
Prashant kr Yadav (MEC)9-Jan-08 3:13 
GeneralRe: How maintain advertisement on kiosk machine Pin
Pete O'Hanlon10-Jan-08 10:02
mvePete O'Hanlon10-Jan-08 10:02 
Generalusing shellexecuteex to register a dll Pin
iancarter7-Jan-08 0:26
iancarter7-Jan-08 0:26 
QuestionFinding the menu item the mouse is over for help request Pin
earlgraham4-Jan-08 13:03
earlgraham4-Jan-08 13:03 
GeneralRe: Finding the menu item the mouse is over for help request Pin
Kschuler10-Jan-08 9:59
Kschuler10-Jan-08 9:59 
GeneralRe: Finding the menu item the mouse is over for help request Pin
earlgraham10-Jan-08 10:05
earlgraham10-Jan-08 10:05 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.