i have 2 form and 1 dialog... the problem is when i select form2 as startup form i'm not able to copy text from combobox1 on dialog1 to textbox1 which is on form1 ... if i select form1 as startup form its working fine... i 'm not getting whats the problem....
i have placed code with form design as following ...
plz help
Public Class Form2
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim fo As New Form1
fo.Show()
End Sub
End Class
'Code for form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim dialog As New Dialog1
dialog.Show()
End Sub
'Code for dialog1
Imports System.Windows.Forms
Public Class Dialog1
Private Sub OK_Button_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OK_Button.Click
Form1.TextBox1.Text = Me.ComboBox1.Text
Me.DialogResult = System.Windows.Forms.DialogResult.OK
Me.Close()
End Sub
Private Sub Cancel_Button_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Cancel_Button.Click
Me.DialogResult = System.Windows.Forms.DialogResult.Cancel
Me.Close()
End Sub
End Class