Visual Basic 2010: How to make window/form become active foreground?
Posted
by hervard
on Stack Overflow
See other posts from Stack Overflow
or by hervard
Published on 2010-04-21T11:26:59Z
Indexed on
2010/04/21
11:33 UTC
Read the original article
Hit count: 582
I'm using Visual Basic 2010 Express. I have a form that can be minimized. There's also a tray icon. I've coded it so that if you double-click on the tray icon, the form's FormWindowState becomes set to Normal; this restores the form to where it to where it was before it became minimized, but the form does not become the active window on my desktop.
How can I make the form become the active most foreground window? I've tried various functions that I can think of but no luck yet. Tried searching with various queries to try and find the right wording but no luck.
I'm new to Visual Basic - only started a couple hours ago.
Probably something simple but I can't seem to find the correct function or anything... Please enlighten me! Thanks.
© Stack Overflow or respective owner