Click here to Skip to main content
12,886,393 members (43,411 online)
Rate this:
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:
into OnLoad event, but it cannot be hidden. I can add
into Activate event, but I don't want add this code into Activate event. So, Do you know how to add
into Load event?

Thank you
Posted 23-Dec-11 18:02pm
Updated 24-Dec-11 23:25pm
Emilio Garavaglia 25-Dec-11 5:26am
removed the C++ tag
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

You could put it into the "Shown" event handler
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.

Perhaps your are misunderstanding? The Shown event only fires once when the form is first shown.
Rate this: bad
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[^]

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

    Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170424.1 | Last Updated 25 Dec 2011
Copyright © CodeProject, 1999-2017
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