|
-
Sep 2nd, 2003, 11:43 PM
#1
Thread Starter
Lively Member
Help
Hi, i got 2 forms, form 1 & form 2 using vb.net.
When i run e pj, it should be form 1 running first. But form 2 is running in e 1st place, not form 1. Wat should i do to let form 1 to run first?
Then if form 1 got a button, when clicked it should go to form 2, wat code should i add in?
Private Sub btn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn.Click
form2.show()
End Sub
But got error lei?
Pls help me...
-
Sep 3rd, 2003, 02:29 AM
#2
Fanatic Member
VB Code:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim frm2 As New Form2()
frm2.Show()
End Sub
- Use the thread tools to Mark your Thread as Resolved when your question is answered.
- Please Rate my answers if they where helpful.
-
Sep 3rd, 2003, 02:30 AM
#3
Fanatic Member
Goto the Project properties --> Set "startup Obect" to "Form1"
- Use the thread tools to Mark your Thread as Resolved when your question is answered.
- Please Rate my answers if they where helpful.
-
Sep 3rd, 2003, 03:19 AM
#4
Thread Starter
Lively Member
Hello, but under e properties page, i dun have e startup object lei, only got startup position.
Please help me..
-
Sep 3rd, 2003, 03:42 AM
#5
Fanatic Member
Menu -> Project -> Properties
then a windows pops up, Then you choose
common properties -> General -> en then you should have a combobox with the startup object.
I think you're looking at the properties of your form, not your project
- Use the thread tools to Mark your Thread as Resolved when your question is answered.
- Please Rate my answers if they where helpful.
-
Sep 3rd, 2003, 04:31 AM
#6
Thread Starter
Lively Member
Thanks for it, i got it e startup form liao.
But e show when clicked, still got prob lei, dun noe y. I doing in vb.net, not much different fr vb hor?
Sorrie ah, cos i a newbie in vb.net, didnt use b4.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|