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. VB FORMS DISPALY

VB FORMS DISPALY

Scheduled Pinned Locked Moved Visual Basic
salestutorial
5 Posts 3 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.
  • N Offline
    N Offline
    NAVAF009
    wrote on last edited by
    #1

    Dear All, I have simple project,has many forms.I just need to close all other forms if they active(Ex:Need to close Sales Form automatically When Clicking Invoice Form).I am not using MDI Forms.I just need an idea about Code How to implement this.

    V 1 Reply Last reply
    0
    • N NAVAF009

      Dear All, I have simple project,has many forms.I just need to close all other forms if they active(Ex:Need to close Sales Form automatically When Clicking Invoice Form).I am not using MDI Forms.I just need an idea about Code How to implement this.

      V Offline
      V Offline
      Vozzie2
      wrote on last edited by
      #2

      In visual studio 2008 if you use the "application framework" you can choose the "shutdown mode" in the project properties. (maybe in older versions of visual studio too, i did not check it) Project -> Properties -> Application -> Shutdown mode If you want to write a statement that closes your application you can use

      System.Windows.Forms.Application.Exit()

      I think the "End" keyword still works too in a VB.Net application

      It feels good to learn and achieve

      N 1 Reply Last reply
      0
      • V Vozzie2

        In visual studio 2008 if you use the "application framework" you can choose the "shutdown mode" in the project properties. (maybe in older versions of visual studio too, i did not check it) Project -> Properties -> Application -> Shutdown mode If you want to write a statement that closes your application you can use

        System.Windows.Forms.Application.Exit()

        I think the "End" keyword still works too in a VB.Net application

        It feels good to learn and achieve

        N Offline
        N Offline
        NAVAF009
        wrote on last edited by
        #3

        thanks for reply.you code for Exit the application.But i need a form close automatically while we clicking for another form. Example I am working with Sales form and Also clicked for Invoice form.So we have two forms already opened state.I just need Sales form Close itself when i click for another form.in Clearly I need only two forms(Parent form and one child form)active at time. hope your reply

        L 1 Reply Last reply
        0
        • N NAVAF009

          thanks for reply.you code for Exit the application.But i need a form close automatically while we clicking for another form. Example I am working with Sales form and Also clicked for Invoice form.So we have two forms already opened state.I just need Sales form Close itself when i click for another form.in Clearly I need only two forms(Parent form and one child form)active at time. hope your reply

          L Offline
          L Offline
          Luc 648011
          wrote on last edited by
          #4

          There is no built-in support for this. You can make your own based on Application.OpenForms; enumerate all open forms and close the ones you don't want (e.g. main form, and this form) :)

          N 1 Reply Last reply
          0
          • L Luc 648011

            There is no built-in support for this. You can make your own based on Application.OpenForms; enumerate all open forms and close the ones you don't want (e.g. main form, and this form) :)

            N Offline
            N Offline
            NAVAF009
            wrote on last edited by
            #5

            thank you..Let me try

            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