Ahmadal_najjar2003
asked on
Can I Close The Current Form and Open in it again
Can I close the Form , the Open it again automatically
The form, or the whole application?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Just the Form which I'm Using .
BillMaster.VB
BillMaster.VB
ASKER
The Goal is , to refresh all text , Comboboxes ,, so on. As I loaded for first time.
Why dont you create some Reset() procedure that will set all controls to default values?
Goran
Goran
ASKER
Thats Right , I always do that. But I wish to find another easy way. Otherwise I will use Old way.
Try this:
<asp:Button Text="Reset Form" id="btnReset" runat="server" />
In your code behind page write this:
Private Sub btnReset_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnReset.Click
Me.Server.Transfer("myPage .aspx")
End Sub
<asp:Button Text="Reset Form" id="btnReset" runat="server" />
In your code behind page write this:
Private Sub btnReset_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnReset.Click
Me.Server.Transfer("myPage
End Sub
ASKER
Sorry , I'm working with WIndows Application
There isnt any other way.
Goran
Goran
Other than this:
Dim bm As New BillMaster
bm.Show()
Me.Close()
There isn't any other way to do it...
Dim bm As New BillMaster
bm.Show()
Me.Close()
There isn't any other way to do it...
Even if it's possibl,e is not nice to do it because it takes more time then a refresh (it as to dispose the form and load it) and it's not nice to the user (that see the flash closing and openning).
ASKER
like this it works
Dim bm As New BillMaster
Me.Close()
bm.ShowDialog()
it seems as you open new bill , as manual do.
Dim bm As New BillMaster
Me.Close()
bm.ShowDialog()
it seems as you open new bill , as manual do.
What version VB you using?
ASKER
vb 2008
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I also want to thank jpaulino because he give me new info (Application.Restart())