Thread: Some questions

  1. #1
    Registered User
    Join Date
    Sep 2006
    Posts
    98

    Some questions

    First question: If I have two forms, form1 and form2, how do I after displaying form2 from form1, stop all activity on form1 while a certain variable in form2 is set to false? I tried a while loop, but that just freezes the program.
    Second question: How do I hide the start-up/main form? When I try to hide it using this.hide(), nothing happens.

  2. #2
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    To stop activity on a field in a form, you need to apply the "disable" function to it [or set enabled to false].

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  3. #3
    Registered User VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,607
    You need to set form2 as a modal window. This means it requires a response and no other forms may be clicked until the modal window is no longer active.

    This is basically a modal dialog box but I'm not sure that's what you want.

  4. #4
    Registered User
    Join Date
    Sep 2006
    Posts
    98
    How do I set it as a modal window?

  5. #5
    Registered User VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,607
    Form.ShowDialog();

  6. #6
    Registered User
    Join Date
    Sep 2006
    Posts
    98
    Thanks thats exactly what I was looking for!

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. questions....so many questions about random numbers....
    By face_master in forum C++ Programming
    Replies: 2
    Last Post: 07-30-2009, 08:47 AM
  2. A very long list of questions... maybe to long...
    By Ravens'sWrath in forum C Programming
    Replies: 16
    Last Post: 05-16-2007, 05:36 AM
  3. Several Questions, main one is about protected memory
    By Tron 9000 in forum C Programming
    Replies: 3
    Last Post: 06-02-2005, 07:42 AM
  4. Trivial questions - what to do?
    By Aerie in forum A Brief History of Cprogramming.com
    Replies: 23
    Last Post: 12-26-2004, 09:44 AM
  5. questions questions questions.....
    By mfc2themax in forum A Brief History of Cprogramming.com
    Replies: 1
    Last Post: 08-14-2001, 07:22 AM