Page 1 of 1

refresh my data didn't work

Posted: Mon Aug 06, 2012 10:18 am
by Dummy1912
Hello,

i got stuck and i don't know what to do else.
seems with a user control my data didn't refresh after closing
Code: Select all
            If Frm1.IsDisposed Then Frm1 = New Frm1
            If Not Frm1.IsDisposed Then Frm1.BringToFront()
            If Frm1.ShowDialog(Me) = DialogResult.OK Then
                Frm2.Restore()
            End If

'Frm2
Code: Select all
Public Sub Restore
'here i go back to the sub to reload the data
End Sub
Frm1
Code: Select all
    Private Sub BtnClose_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnClose.Click
        Me.DialogResult = DialogResult.OK
        Me.Close()
    End Sub

but after the BtnClose it does nothing it don't refresh the data :(


Second problem that a user control don't allow me.close
'ERROR
'close' is not a member

Re: refresh my data didn't work

Posted: Mon Aug 06, 2012 2:50 pm
by MrAksel
You can't close an UserControl. You could call Dispose() instead though.
For the first problem, I don't have any clues at all. It might help if you show how you restore the data ;)

Re: refresh my data didn't work

Posted: Mon Aug 06, 2012 3:53 pm
by Dummy1912
hey #MrAksel,
it doesn't any matter what data it just he don't accept the sub i ask for
thats why he don't refresh the data.