Switching between windows...


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 4 of 4

Thread: Switching between windows...

  1. #1
    Join Date
    Jul 2005
    Posts
    55

    Switching between windows...

    Hello,

    When using my program you can open up a new window that overlays over the main window (which is called Form1). When clicking the button to open the new window the code looks like this (Form1.Enabled = False) so the main window is disabled until closing off that overlay window. However when you have the overlay window open and then switch to another window or program then switch back to my program it shows the main window instead of the overlay window which the main window is disabled meaning it's locked up. My question is how do I get that the overlay window popup in front of the main window after switching to something else and then clicking on the program in the taskbar.

    Thanks Jobartley515

  2. #2
    Join Date
    Nov 2003
    Location
    Alameda, CA
    Posts
    1,737
    Can't you just display the second window modal, so you don't even have to disable form1?
    Marco
    "There are two ways to write error-free programs. Only the third one works."
    Unknown

  3. #3
    Join Date
    Nov 2003
    Location
    Portland, OR
    Posts
    8,387
    If you want to display the second window modelessly, you can use the option Owner parameter of the Show method:

    Form2.Show vbModeless, Form1
    Phil Weber
    http://www.philweber.com

    Please post questions to the forums, where others may benefit.
    I do not offer free assistance by e-mail. Thank you!

  4. #4
    Join Date
    Jul 2005
    Posts
    55
    Thanks for the help...!

    Jobartley515

Similar Threads

  1. REAL Software Ships REALbasic 5 for WINDOWS
    By Gwen Smith in forum vb.announcements
    Replies: 0
    Last Post: 04-28-2003, 02:37 PM
  2. Replies: 2
    Last Post: 11-25-2002, 02:54 PM
  3. ?API NT Compatability?
    By Dennis in forum VB Classic
    Replies: 10
    Last Post: 02-15-2001, 03:52 AM
  4. Replies: 8
    Last Post: 01-19-2001, 05:50 PM
  5. Replies: 0
    Last Post: 01-19-2001, 12:54 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center