Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C++/CLI
Hi all,
 
I want to hide my application when it started, and I add:
this->Hide();
into OnLoad event, but it cannot be hidden. I can add
this->Hide();
into Activate event, but I don't want add this code into Activate event. So, Do you know how to add
this->Hide();
into Load event?
 
Thank you
Posted 23-Dec-11 18:02pm
SVPro230
Edited 24-Dec-11 23:25pm
v2
Comments
Emilio Garavaglia at 25-Dec-11 5:26am
   
removed the C++ tag
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

You could put it into the "Shown" event handler
  Permalink  
Comments
SVPro at 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 at 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.
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

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[^]
  Permalink  

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

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 458
1 OriginalGriff 384
2 George Jonsson 233
3 Animesh Datta 130
4 Shemeemsha RA 128
0 OriginalGriff 6,179
1 Sergey Alexandrovich Kryukov 5,616
2 CPallini 4,770
3 George Jonsson 3,400
4 Gihan Liyanage 2,522


Advertise | Privacy | Mobile
Web03 | 2.8.140916.1 | Last Updated 25 Dec 2011
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100