S
steve
Hi,
I have the following very annoying problem:
Form1 gets user's choices to construct an SQL string and when Button Extract
gets hit a new form, Form2, is supposed to open with the results of the
querry.
Now, I overloaded the New() of Form2 so that i can pass the SQL string
generated by Form1 to Form2.
Sub New(ByVal SQLstring As String)
InitializeComponent( )
rtbSQL.Text = SQLstring ' <-- This just puts the SQL string as text in a
textbox of FORM2 for visual inspection
End Sub
Then, I create the DataSet etc... to fill up a datagrid with the results.
This is done by calling FillGrid( ) from
Form2's Load( ) event.
Private Sub Form2_Load(ByVal sender As Object, ByVal e As System.EventArgs)
Handles MyBase.Load
'While (Not Me.Visible)
'End While
'Delay - 1 sec
' Fill the Scenario DataGrid
FillGrid()
End Sub
Very Simple!! and straightforward.
HOWEVER! the follwoing happens: Depending on how long it takes from the
server to respond and fill the DataGrid, I see an hourglass and ...I wait.
I want to SHOW first Form2, with the textbox filled, and THEN call
FillGrid( ). It's more visually pleasing.
But no matter what i try, nothing works. (look at the commented-out While
loop above), Delays, etc..
If insted of Form2_Load( ), I use Form2_Activated ( ) , I "begin to see
the borders of the form, but its still the same idea, same delay. I do not
see the form completely unless the Datagrid is Filled.
Any suggestions would be greately appreciated.
I have the following very annoying problem:
Form1 gets user's choices to construct an SQL string and when Button Extract
gets hit a new form, Form2, is supposed to open with the results of the
querry.
Now, I overloaded the New() of Form2 so that i can pass the SQL string
generated by Form1 to Form2.
Sub New(ByVal SQLstring As String)
InitializeComponent( )
rtbSQL.Text = SQLstring ' <-- This just puts the SQL string as text in a
textbox of FORM2 for visual inspection
End Sub
Then, I create the DataSet etc... to fill up a datagrid with the results.
This is done by calling FillGrid( ) from
Form2's Load( ) event.
Private Sub Form2_Load(ByVal sender As Object, ByVal e As System.EventArgs)
Handles MyBase.Load
'While (Not Me.Visible)
'End While
'Delay - 1 sec
' Fill the Scenario DataGrid
FillGrid()
End Sub
Very Simple!! and straightforward.
HOWEVER! the follwoing happens: Depending on how long it takes from the
server to respond and fill the DataGrid, I see an hourglass and ...I wait.
I want to SHOW first Form2, with the textbox filled, and THEN call
FillGrid( ). It's more visually pleasing.
But no matter what i try, nothing works. (look at the commented-out While
loop above), Delays, etc..
If insted of Form2_Load( ), I use Form2_Activated ( ) , I "begin to see
the borders of the form, but its still the same idea, same delay. I do not
see the form completely unless the Datagrid is Filled.
Any suggestions would be greately appreciated.