My question is:
I have to change status of controls, i.e text of a textbox, on the startup form of my application. I just don't know how to make a reference to the form to do that. As you
may know, the form is created automatically when application starts and creating a new instance of the form is obviously not the way.

How to reference an active form in design time
R Hearn
curiousEngine
Public Class AppEntryPoint
Private Shared m_MainForm As MyForm
<STAThread()> _
Public Shared Sub Main()
Application.Run(MainForm)
End Sub
Public Shared ReadOnly Property MainForm() As MyForm
Get
If m_MainForm Is Nothing Then
m_MainForm = New MyForm()
End If
End Get
End Property
End Class
Set the startup object of your app to be this sub Main. And, at any point throughout the execution of the app, you can acquire a reference to the startup form by accessing the shared property.
khaley
1- Add a module to your project
2- In the module add code similar to the following:
Public Sub Main()
Dim f As New Form1()
'Modify here...
Application.Run(f)
End Sub
3- Change the startup object of your project to be Sub Main.
If this isn't what you are looking for, could you elaborate a bit
gharryh
Sub Form2_Closing...
dim myForm as form1=
myForm.text=somethingelse
----
End Sub
What should I put in the place of " " to make a reference to form1
AmitG
Scottaroberts99
Hello, I have basically the exact same question, but for C#. What I have is a form that pops up when the user wants to add/edit an issue.
editIssue newWindow = new editIssue();newWindow.Show();
This is how I open the new form. The problem I am having is that on the main form, I have a text area that displays the file that this form is accessing and editing. When the "editIssue" form closes, i would like to refresh the text box on the main form containing the text file so that it shows the modifications done in "editIssue." Could someone help me out with getting this problem fixed I am new to C# so I do not have a lot of knowledge on how to fix this. Thanks.
Manena
JasonReis
codrakon
Tom_In_Dallas
editIssue newWindow = new editIssue();
newWindow.Showdialog();
textarea.refresh;
remco