Click here to Skip to main content
15,895,777 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi all,

I want to hide my application when it started, and I add:
C++
this->Hide();
into OnLoad event, but it cannot be hidden. I can add
C++
this->Hide();
into Activate event, but I don't want add this code into Activate event. So, Do you know how to add
C++
this->Hide();
into Load event?

Thank you
Posted
Updated 24-Dec-11 23:25pm
v2
Comments
Emilio Garavaglia 25-Dec-11 5:26am    
removed the C++ tag

You could put it into the "Shown" event handler
 
Share this answer
 
Comments
SVPro 24-Dec-11 0:45am    
But it will be hidden every it shown? I don't want, I want it just hidden once time when form is loaded, thank you
LanFanNinja 24-Dec-11 0:49am    
That doesn't make any sense !?! Please explain more about what you want to do.

EDIT:
Perhaps your are misunderstanding? The Shown event only fires once when the form is first shown.
If its a plain win32 application (non mfc) then just dont use the window style WS_VISIBLE in your CreateWindow function.

if it is an MFC application then follow the link[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900