Results 1 to 5 of 5

Thread: Little problem with function

  1. #1

    Thread Starter
    New Member
    Join Date
    Mar 2013
    Posts
    5

    Little problem with function

    Hi I have 2 forms and I want to do this.

    If form1 (is open/loaded) Then
    form2.enabled = false
    end if


    I don't know how to write in VB that from1 is open or something.

    I think that I wrote everything clearly.

  2. #2
    .NUT jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    104,952

    Re: Little problem with function

    Where exactly would this code be located and under what circumstances would it be executed?

  3. #3

    Thread Starter
    New Member
    Join Date
    Mar 2013
    Posts
    5

    Re: Little problem with function

    When Form1 is open and the value of progressbar will be 98, then Form2 shows. I want that If Form2 is open, you can't close Form1 and If you close Form2 you can close Form1 too.

  4. #4
    PowerPoster dunfiddlin's Avatar
    Join Date
    Jun 2012
    Posts
    8,242

    Re: Little problem with function

    Then show Form2 as a dialog (Form2.ShowDialog). No other part of the application will then be accessible until Form2 closes.
    As the 6-dimensional mathematics professor said to the brain surgeon, "It ain't Rocket Science!"

    Reviews: "dunfiddlin likes his DataTables" - jmcilhinney

    Please be aware that whilst I will read private messages (one day!) I am unlikely to reply to anything that does not contain offers of cash, fame or marriage!

  5. #5

    Thread Starter
    New Member
    Join Date
    Mar 2013
    Posts
    5

    Re: Little problem with function

    Oh man this is exactly what I was looking for. Thanks a lot for really quick response. It was so simple, now I feel like a fool.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width