Me.Hide()

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

    #1

    Me.Hide()


    I have a dialog form, frmDetails, that is opened from the main form:

    frmDetails.Show Dialog()

    The only way I have provided to close this dialog is via the "X" button.

    If frmDetails is just closed as normal, there is no visual problem (no repainting) with the main
    form.

    Now, I add this code to the the FormClosing event in the dialog, frmDetails:

    If e.CloseReason = CloseReason.Use rClosing Then
    e.Cancel = True
    Me.Hide()

    End If

    In this case, the dialog hides, but in the process there is unacceptable amount of repainting on the
    main form. A portion of the top right client area on the main form turns transparent for an instant
    showing portions of any underlying app that may be present. I gather that this transparency
    business is probably causing the repainting.

    Does anyone know if the Hide method has a bug? Better method? Workaround?

    Gene
  • Miro

    #2
    Re: Me.Hide()

    Im new to vb.. but have you tried instead of doing the Me.Hide() to just try
    to set the Opacity of the form to 0 first?

    see if that work around solves ur display issue - then close the form?

    -I have not had that happen to me at all with my Dialog forms. ( vb2003 )

    Miro


    "gene kelley" <okay@by.mewrot e in message
    news:jluid2pm9s 89nkv5hsfn9jp4i 7ciajen40@4ax.c om...
    >
    I have a dialog form, frmDetails, that is opened from the main form:
    >
    frmDetails.Show Dialog()
    >
    The only way I have provided to close this dialog is via the "X" button.
    >
    If frmDetails is just closed as normal, there is no visual problem (no
    repainting) with the main
    form.
    >
    Now, I add this code to the the FormClosing event in the dialog,
    frmDetails:
    >
    If e.CloseReason = CloseReason.Use rClosing Then
    e.Cancel = True
    Me.Hide()
    >
    End If
    >
    In this case, the dialog hides, but in the process there is unacceptable
    amount of repainting on the
    main form. A portion of the top right client area on the main form turns
    transparent for an instant
    showing portions of any underlying app that may be present. I gather that
    this transparency
    business is probably causing the repainting.
    >
    Does anyone know if the Hide method has a bug? Better method?
    Workaround?
    >
    Gene

    Comment

    • gene kelley

      #3
      Re: Me.Hide()

      On Wed, 9 Aug 2006 11:29:55 -0400, "Miro" <mironagy@golde n.netwrote:
      >Im new to vb.. but have you tried instead of doing the Me.Hide() to just try
      >to set the Opacity of the form to 0 first?
      >
      >see if that work around solves ur display issue - then close the form?
      >
      >-I have not had that happen to me at all with my Dialog forms. ( vb2003 )
      >
      >Miro
      >
      >
      The Opacity value of the dialog has no effect with regards to the problem. It's the actual call to
      Hide versus Close that triggers the problem.

      It now appears that the problem is being caused by a 3rd party control in use in this particular
      app. If I temporarily remove it, the problem goes away, so I'm now checking with the control vendor
      on this issue.

      Gene






      >"gene kelley" <okay@by.mewrot e in message
      >news:jluid2pm9 s89nkv5hsfn9jp4 i7ciajen40@4ax. com...
      >>
      >I have a dialog form, frmDetails, that is opened from the main form:
      >>
      >frmDetails.Sho wDialog()
      >>
      >The only way I have provided to close this dialog is via the "X" button.
      >>
      >If frmDetails is just closed as normal, there is no visual problem (no
      >repainting) with the main
      >form.
      >>
      >Now, I add this code to the the FormClosing event in the dialog,
      >frmDetails:
      >>
      > If e.CloseReason = CloseReason.Use rClosing Then
      > e.Cancel = True
      > Me.Hide()
      >>
      > End If
      >>
      >In this case, the dialog hides, but in the process there is unacceptable
      >amount of repainting on the
      >main form. A portion of the top right client area on the main form turns
      >transparent for an instant
      >showing portions of any underlying app that may be present. I gather that
      >this transparency
      >business is probably causing the repainting.
      >>
      >Does anyone know if the Hide method has a bug? Better method?
      >Workaround?
      >>
      >Gene
      >

      Comment

      Working...