how to display/maximized a window ?

  • Thread starter Thread starter Lloyd Dupont
  • Start date Start date
L

Lloyd Dupont

randomly, when I ShowDialog() on some modal window, the main window goes to
background.
and it didn't revert to formost window when the dialog is closed.

I try to call:
WindowState = FormWindowState.Normal;
BringToFront();
Show();

nothing work, my windows is still miniaturized, I have to look for the list
of running program and click activate o bring my window back.

is there any workaround that ?
 
look at the FindWindow & SetForeGroundWindow API calls. This is the only way
that I have found to "really" bring a window to the foreground.
 
I though so but SetForeGroundWindow() failed... I think I don't have a
correct window number, how could I find it.
FindWindow() has a window class name has 1st argument, what could I use ?
 
Hi Lloyd,

We've looked at this issue for our next release...sorry you're running into
this. In the meantime I can think of a couple of things that might help
you out here:
1. Make sure your forms arn't set to 'BorderStyleNone'. This can cause
z-order issues.
2. Try using Hide() before using Show().
3. The 'WindowState' property is only used to designate forms to be
fullscreen [maximized] (without the caption bar on the top) or not
fullscreen [normal].
4. Lastly, PInvoking to SetForegroundWindow or SetActiveWindow should work
for you.

Hope that helps you out,
-Katie

--------------------
| From: "Lloyd Dupont" <net.galador@ld>
| Subject: how to display/maximized a window ?
| Date: Fri, 26 Sep 2003 12:01:43 +1000
| Lines: 15
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
| Message-ID: <e2S#[email protected]>
| Newsgroups: microsoft.public.dotnet.framework.compactframework
| NNTP-Posting-Host: 61.95.54.83
| Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP12.phx.gbl
| Xref: cpmsftngxa06.phx.gbl
microsoft.public.dotnet.framework.compactframework:34482
| X-Tomcat-NG: microsoft.public.dotnet.framework.compactframework
|
| randomly, when I ShowDialog() on some modal window, the main window goes
to
| background.
| and it didn't revert to formost window when the dialog is closed.
|
| I try to call:
| WindowState = FormWindowState.Normal;
| BringToFront();
| Show();
|
| nothing work, my windows is still miniaturized, I have to look for the
list
| of running program and click activate o bring my window back.
|
| is there any workaround that ?
|
|
|

This posting is provided "AS IS" with no warranties, and confers no rights.
 
Back
Top