I am relatively new to Visual Basic; in the sense that I have had it for a while, but haven't used it enough to actual get good and confident with it.
I am trying to create a program for the 3D Space Simulator "Celestia". You can create stars through Notepad on it, but I wanted to see if I can create a 'Star builder'.
So I have 2 forms:
1# Where you put in all the information needed
2# Where it gets automatically copied and saved
I can't seem to get the text to copy though.
I have 7 textbox's on form 1, with a button named 'Build' which has the code 'Form2.Show()' on it's click event.
The 2nd form has a RichTextBox on it, which I have put the code:
I have a feeling the answer will be obvious..but I really can't figure it out for myself.Code:Private Sub Form2_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load Me.RichTextBox1.Text = Form1.TextBox1.Text & vbNewLine & Me.RichTextBox1.Text = "{" & vbNewLine & Me.RichTextBox1.Text = "RA " + Form1.TextBox2.Text & vbNewLine & Me.RichTextBox1.Text = "Dec " + Form1.TextBox3.Text & vbNewLine & Me.RichTextBox1.Text = "Spectral Type " + Form1.TextBox4.Text & vbNewLine & Me.RichTextBox1.Text = "Distance " + Form1.TextBox5.Text & vbNewLine & Me.RichTextBox1.Text = "AppMag " + Form1.TextBox6.Text & vbNewLine If Form1.TextBox7.Text = "" Then Me.RichTextBox1.Text = "}" & vbNewLine End Else Me.RichTextBox1.Text = "Radius " + Form1.TextBox7.Text & vbNewLine & Me.RichTextBox1.Text = "}" End If End Sub
Thanks,
Dryda




Reply With Quote