Urgent !!! --- Windows Handling

L

Leonardo Castillo

Hello to everyone.

I have an application in VB.NET for Pocket PC. It's start with Form1, which
call a form2. Form2 has a menu for the user. The user select an option and
this form call another form (Form3.Show or Form3.ShowDialog).

At the end of the process in the Form3, is closed, but the Form2 not appear
again. It's still in memory but is not visible. How can i do to activate
this form again ? (Using VB.NET). In something place in this forum mencioned
"pinvoke" ... this is a solution for this problem?... can send me an
example?

Thanks,

Leonardo Castillo
 
G

Guest

Try:

public BringWindowToFront(Control ctl)
{
//Get control's window handle
ctl.Capture = true;
IntPtr handle = GetCapture();
ctl.Capture = false;
SetForegroundWindow(handle );
}

[DllImport("coredll.dll")]
private static extern IntPtr GetCapture();

[DllImport("coredll.dll")]
private static extern bool SetForegroundWindow(int hwnd);
 
A

Alex Feinman [MVP]

Let me impress this once again. DO NOT START YOUR MESSAGES WITH "URGENT"
You can apologize and ask the group to take a look at your question as soon
as possible citing some dire emergency, but do not show your arrogance by
putting extra exclamation marks in the subject. Nobody gives a flying donut
about this being urgent for you. All you can do is politely ask.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top