•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the VB.NET section within the Software Development category of DaniWeb, a massive community of 427,410 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,440 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our VB.NET advertiser: Programming Forums
Views: 993 | Replies: 11
![]() |
•
•
Join Date: Feb 2008
Posts: 2
Reputation:
Rep Power: 0
Solved Threads: 0
Hi guys,
Im pretty new to vb .net. What im trying to do it I have 2 forms.
First of all I have created a Module with the code:
Module Module1
Public Start As New Form1
Public Input As New Form2
Public Sub main()
Application.Run(Input)
End Sub
Form1 has a button which when pressed opens Form2 which is ok but it just doesnt close down Form1. I have also tried using Form1.hide(), same results with this too.
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Form2.Show()
Form1.Close()
I've tried searching the net but I cant find anyone else who has this problem...
Im pretty new to vb .net. What im trying to do it I have 2 forms.
First of all I have created a Module with the code:
Module Module1
Public Start As New Form1
Public Input As New Form2
Public Sub main()
Application.Run(Input)
End Sub
Form1 has a button which when pressed opens Form2 which is ok but it just doesnt close down Form1. I have also tried using Form1.hide(), same results with this too.
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Form2.Show()
Form1.Close()
I've tried searching the net but I cant find anyone else who has this problem...
•
•
Join Date: Nov 2007
Location: � Jogja �
Posts: 2,585
Reputation:
Rep Power: 11
Solved Threads: 235
try this recovery :
vb Syntax (Toggle Plain Text)
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Form2.Show() Me.Dispose(False) End Sub
Never tried = Never Know
So, Please do something before post your thread.
* PM Asking will be ignored *
So, Please do something before post your thread.
* PM Asking will be ignored *
•
•
Join Date: Nov 2007
Location: � Jogja �
Posts: 2,585
Reputation:
Rep Power: 11
Solved Threads: 235
why u didn't use start and input?that it work when you used form1.show or form2.close?
i think it did not worked.
i think it did not worked.
Never tried = Never Know
So, Please do something before post your thread.
* PM Asking will be ignored *
So, Please do something before post your thread.
* PM Asking will be ignored *
•
•
Join Date: Nov 2007
Location: � Jogja �
Posts: 2,585
Reputation:
Rep Power: 11
Solved Threads: 235
he was tried it suganzeni...
Never tried = Never Know
So, Please do something before post your thread.
* PM Asking will be ignored *
So, Please do something before post your thread.
* PM Asking will be ignored *
•
•
Join Date: Nov 2007
Location: � Jogja �
Posts: 2,585
Reputation:
Rep Power: 11
Solved Threads: 235
i just confused when see his code, he declare input and start but didn't used it to call form.
Never tried = Never Know
So, Please do something before post your thread.
* PM Asking will be ignored *
So, Please do something before post your thread.
* PM Asking will be ignored *
•
•
Join Date: Nov 2007
Location: � Jogja �
Posts: 2,585
Reputation:
Rep Power: 11
Solved Threads: 235
nope..i m using .net 2003. i didn't know in higher version.
Never tried = Never Know
So, Please do something before post your thread.
* PM Asking will be ignored *
So, Please do something before post your thread.
* PM Asking will be ignored *
![]() |
•
•
•
•
•
•
•
•
DaniWeb VB.NET Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
- Previous Thread: Desktop Short cuts to application
- Next Thread: I need help (Newbie to Vb.net)



Linear Mode