(v2008) I need to pass a new string value (and other data) from a second instance to a form that is already open. I'm setting a new string value as the command line in StartupNextInstance. Here is my code in ApplicationEvents:
Here is my code in the startup form (frmStartup):Code:Private Sub MyApplication_StartupNextInstance(ByVal sender As Object, ByVal e As Microsoft.VisualBasic.ApplicationServices.StartupNextInstanceEventArgs) _ Handles Me.StartupNextInstance strCommandLine = e.CommandLine.Item(0) frmStartup.MainText = strCommandLine e.BringToForeground = True End Sub
During debug, it appears as though TextBox1 does in fact get set to the command line string as expected, but it doesn't display on the form.Code:Public Property MainText() Get Return TextBox1.Text End Get Set(ByVal value) TextBox1.Text = value TextBox1.Update() End Set End Property
Help!




Reply With Quote