Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. one form at a time

one form at a time

Scheduled Pinned Locked Moved Visual Basic
question
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    charchabil03
    wrote on last edited by
    #1

    How can I dissallow the user of running more then 1 form in the same time without using the frm.showdialog() ?? I m asking this question coz i want to maximize my forms,and having them inserted within a main form EX : dim fr as new form1 frm.mdirparent=me frm.show and not allowint the User to open any new form.without closing the 1 he is in thx

    Regards Ramy

    D 1 Reply Last reply
    0
    • C charchabil03

      How can I dissallow the user of running more then 1 form in the same time without using the frm.showdialog() ?? I m asking this question coz i want to maximize my forms,and having them inserted within a main form EX : dim fr as new form1 frm.mdirparent=me frm.show and not allowint the User to open any new form.without closing the 1 he is in thx

      Regards Ramy

      D Offline
      D Offline
      Dave Kreskowiak
      wrote on last edited by
      #2

      There's nothing that will do this for you. No special collection or anything like that. Your application design and coding must control the users ability to open only one form at a time. When the user picks an option to create a new instance of a form (hopefully, this option will be DISABLED by your code when the user successfully opens a new form!!), you check a flag to see if a form is already open. If the flag is set don't create a new isntance of the form, otherwise, create the new instance and set this flag. On closing the form, you clear that flag and enable the option to create a new form.

      Dave Kreskowiak Microsoft MVP - Visual Basic

      C 1 Reply Last reply
      0
      • D Dave Kreskowiak

        There's nothing that will do this for you. No special collection or anything like that. Your application design and coding must control the users ability to open only one form at a time. When the user picks an option to create a new instance of a form (hopefully, this option will be DISABLED by your code when the user successfully opens a new form!!), you check a flag to see if a form is already open. If the flag is set don't create a new isntance of the form, otherwise, create the new instance and set this flag. On closing the form, you clear that flag and enable the option to create a new form.

        Dave Kreskowiak Microsoft MVP - Visual Basic

        C Offline
        C Offline
        charchabil03
        wrote on last edited by
        #3

        ah this sounds goood... will try it thx

        Regards Ramy

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups