formclosing

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Pascal

    #1

    formclosing

    Hello

    What are the steps to close properly (being sure that nothing keeps in
    memory) forms opened as vbmodal even if man uses the "red cross" at the top
    right form ?

    thanks

    Ressource pédagogique SC@LPA.



  • Herfried K. Wagner [MVP]

    #2
    Re: formclosing

    "Pascal" <scalpanospm@wa nadoo.rfschrieb :
    What are the steps to close properly (being sure that nothing keeps in
    memory) forms opened as vbmodal even if man uses the "red cross" at the
    top right form ?
    Are you sure your question targets VB.NET/VB 2005? In VB.NET/VB 2005 there
    is no 'vbModal' as in VB6. For VB6-related questions consider posting to an
    appropriate group in the "microsoft.publ ic.vb.*" hierarchy.

    --
    M S Herfried K. Wagner
    M V P <URL:http://dotnet.mvps.org/>
    V B <URL:http://classicvb.org/petition/>

    Comment

    • Pascal

      #3
      Re: formclosing

      oops I wanted to say as "ShowDialog ()" instead of "vbmodal".. ...
      Frm_myst.ShowDi alog()


      sorry...


      Ressource pédagogique SC@LPA.

      "Herfried K. Wagner [MVP]" <hirf-spam-me-here@gmx.ata écrit dans le
      message de news: e6nRE9geHHA.413 6@TK2MSFTNGP02. phx.gbl...
      "Pascal" <scalpanospm@wa nadoo.rfschrieb :
      >What are the steps to close properly (being sure that nothing keeps in
      >memory) forms opened as vbmodal even if man uses the "red cross" at the
      >top right form ?
      >
      Are you sure your question targets VB.NET/VB 2005? In VB.NET/VB 2005
      there is no 'vbModal' as in VB6. For VB6-related questions consider
      posting to an appropriate group in the "microsoft.publ ic.vb.*" hierarchy.
      >
      --
      M S Herfried K. Wagner
      M V P <URL:http://dotnet.mvps.org/>
      V B <URL:http://classicvb.org/petition/>

      Comment

      • rowe_newsgroups

        #4
        Re: formclosing

        On Apr 10, 4:45 am, "Pascal" <scalpano...@wa nadoo.rfwrote:
        oops I wanted to say as "ShowDialog ()" instead of "vbmodal".. ...
        Frm_myst.ShowDi alog()
        >
        sorry...
        >
        Ressource pédagogique SC@LPA.

        "Herfried K. Wagner [MVP]" <hirf-spam-me-h...@gmx.ata écrit dans le
        message denews: e6nRE9geHHA.4__ BEGIN_MASK_n#9g 02mG7!__...__EN D_MASK_i?a63jfA D$z__@TK2MSFTNG P02.phx.gbl...
        >
        "Pascal" <scalpano...@wa nadoo.rfschrieb :
        What are the steps to close properly (being sure that nothing keeps in
        memory) forms opened as vbmodal even if man uses the "red cross" at the
        top right form ?
        >
        Are you sure your question targets VB.NET/VB 2005? In VB.NET/VB 2005
        there is no 'vbModal' as in VB6. For VB6-related questions consider
        posting to an appropriate group in the "microsoft.publ ic.vb.*" hierarchy.
        >
        --
        M S Herfried K. Wagner
        M V P <URL:http://dotnet.mvps.org/>
        V B <URL:http://classicvb.org/petition/>
        You just need to make sure you dispose of the form when you're done
        with it, I usually use a "Using" block to do this:

        Dim Frm_myst as new MyForm();
        Using (Frm_myst)
        Frm_myst.ShowDi alog()
        ' Do something else with the form
        End Using

        Thanks,

        Seth Rowe

        Comment

        • Pascal

          #5
          Re: formclosing

          hello
          It works but is this correct ?
          Private Sub LeNombremystère ToolStripMenuIt em_Click(ByVal sender As
          System.Object, ByVal e As System.EventArg s) Handles
          LeNombremystère ToolStripMenuIt em.Click

          Me.Hide()

          Dim Frm_myst As New Frm_myst()

          Using (Frm_myst)

          Frm_myst.ShowDi alog()

          End Using

          End Sub

          thank you
          pascal

          You just need to make sure you dispose of the form when you're done
          with it, I usually use a "Using" block to do this:

          Dim Frm_myst as new MyForm();
          Using (Frm_myst)
          Frm_myst.ShowDi alog()
          ' Do something else with the form
          End Using

          Thanks,

          Seth Rowe


          Comment

          • rowe_newsgroups

            #6
            Re: formclosing

            On Apr 11, 9:04 am, "Pascal" <scalpano...@wa nadoo.rfwrote:
            hello
            It works but is this correct ?
            Private Sub LeNombremystère ToolStripMenuIt em_Click(ByVal sender As
            System.Object, ByVal e As System.EventArg s) Handles
            LeNombremystère ToolStripMenuIt em.Click
            >
            Me.Hide()
            >
            Dim Frm_myst As New Frm_myst()
            >
            Using (Frm_myst)
            >
            Frm_myst.ShowDi alog()
            >
            End Using
            >
            End Sub
            >
            thank you
            pascal
            >
            You just need to make sure you dispose of the form when you're done
            with it, I usually use a "Using" block to do this:
            >
            Dim Frm_myst as new MyForm();
            Using (Frm_myst)
            Frm_myst.ShowDi alog()
            ' Do something else with the form
            End Using
            >
            Thanks,
            >
            Seth Rowe
            If all you want to do is show Frm_myst then it should be fine. However
            I notice you are calling Me.Hide() and never reshowing it - is this
            intentional?

            Thanks,

            Seth Rowe

            Comment

            • Pascal

              #7
              Re: formclosing

              hello Seth Rowe
              >I notice you are calling Me.Hide() and never reshowing it - is this
              >intentional?
              in fact i have a main_form from which i call other forms like frm_myst (
              where pupils have to guess a mysterious numbers by giving numbers and the
              frm_myst responds too high or too small) when they want to have another
              exercise they close the frm_myst and they return to frm_main.
              i put this
              Private Sub Frm_myst_FormCl osed(ByVal sender As Object, ByVal e As
              System.Windows. Forms.FormClose dEventArgs) Handles Me.FormClosed

              Me.Dispose()

              Frm_main_mdi.Sh ow()

              End Sub

              Private Sub Fermer()

              iTargetNumber = 0

              iTargetNumberDe cim = 0

              iGuessCount = 0

              nbreDePartie = 1

              TxtBxPropositio n.Text = ""

              Label1.Text = ""

              Label2.Text = ""

              message = ""

              GrpBxReglage.En abled = True

              Btn_Genere.Enab led = True

              Me.Close()

              End Sub


              Thanks,
              pascal



              Comment

              Working...