PSU_Justin
Newcomer
I've been trying to get some functions between multiple forms to work for 2 weeks now (Not non-stop) and have been largely unsucessful.
Here is some new code I am trying out, it doesn't work at all yet and I'm not sure why.
This is for Form 1
This is for form2
Right now I'm getting an error saying that Class1.f1... in the second form is not accessible b/c it is private. This is alo one of my first attempts at using classes and I don't know if I am using them right or if I am using the application.run command in the proper context (that command isn't even in my VB.net book, I got it from a suggestion here).
Is I suck a bad way to get people to look at my post??
Any help is greatly appreciated.
Justin
Here is some new code I am trying out, it doesn't work at all yet and I'm not sure why.
This is for Form 1
Visual Basic:
Public Class Class1
Dim f1 As New Form1()
Public Sub main()
Application.Run()
f1.Show()
End Sub
End Class
Public Class Form1
Inherits System.Windows.Forms.Form
#Region " Windows Form Designer generated code "
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim f2 As New Form2()
f2.Show()
Me.Hide()
End Sub
End Class
This is for form2
Visual Basic:
Public Class Form2
Inherits System.Windows.Forms.Form
#Region " Windows Form Designer generated code "
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim n As Single
n = TextBox1.Text
Class1.f1.textbox1.text = n
Me.Hide()
End Sub
End Class
Right now I'm getting an error saying that Class1.f1... in the second form is not accessible b/c it is private. This is alo one of my first attempts at using classes and I don't know if I am using them right or if I am using the application.run command in the proper context (that command isn't even in my VB.net book, I got it from a suggestion here).
Is I suck a bad way to get people to look at my post??
Any help is greatly appreciated.
Justin