immediate input box launch

  • Thread starter Thread starter portroe
  • Start date Start date
P

portroe

Hi,

when my forms program starts, I want it to immeduately lauch two input
boxes, without the user having to do anything,

how do I do this?

thanks

Portroe
 
* portroe said:
when my forms program starts, I want it to immeduately lauch two
input boxes, without the user having to do anything,

Create your own inputbox and show it twice...
 
portroe said:
when my forms program starts, I want it to immeduately lauch two
input boxes, without the user having to do anything,

how do I do this?


Shared Sub Main()
Dim a, b As String
a = InputBox("a")
b = InputBox("b")
'optionally:
Application.Run(New Form1)
End Sub

If in a Module, drop the 'shared' keyword.
 
* "Armin Zingler said:
Shared Sub Main()
Dim a, b As String
a = InputBox("a")
b = InputBox("b")
'optionally:
Application.Run(New Form1)
End Sub

If in a Module, drop the 'shared' keyword.

This will launch 2 inputboxes -- one after the other...
 
Hi portroe,

I think you can make something like this

\\\form1
Private WithEvents frm3 As New Form3
Private WithEvents frm2 As New Form2
Private Sub frm2_VisibleChanged(ByVal sender As Object, _
ByVal e As System.EventArgs) Handles frm2.VisibleChanged
If frm2.inputfield <> "" Then
Me.Show()
Me.Label1.Text = frm2.inputfield
frm2.Dispose()
End If
End Sub
Private Sub frm3_VisibleChanged(ByVal sender As Object, _
ByVal e As System.EventArgs) Handles frm3.VisibleChanged
If frm3.inputfield <> "" Then
Me.Show()
Me.Label1.Text = frm3.inputfield
frm3.Dispose()
End If
End Sub

Private Sub Form1_Load(ByVal sender As Object, _
ByVal e As System.EventArgs) Handles MyBase.Load
frm3.Show()
frm3.TopLevel = True
frm2.Show()
frm2.TopLevel = True
End Sub
///
\\\form2 and 3 the same
Public inputfield As String
Private Sub Button1_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles Button1.Click

inputfield = "sometext"
Me.Hide()
End Sub
///


I hope this helps a little bit?

Cor
 
Herfried K. Wagner said:
This will launch 2 inputboxes -- one after the other...

Yes, why not? I focused on "immediatelly" and "withouth..do anything". Let's
wait what the poster will tell us.
 
Back
Top