This is my situation.
In a procedure,
I load a form which has around 5 text boxes and a grid.
Next I load a data into that grid with around 1000 records !
Then I load another form which has around 5 text boxes and a grid.
Next I load a data into that grid with around 1000 records !
Like wise I load 5 form and each has text boxes and grids.
My problem is that the form loads but that text boxes are not properly visible till the data is loaded.
I tried System.Threading.Thread.Sleep(2000) which gives a delay in between the form load and data loading.
i.e
Form1 Load
Delay for 2 sec
Load data
Form2 Load
Delay for 2 sec
Load data
Form3 Load
Delay for 2 sec
Load data
Form4 Load
Delay for 2 sec
Load data
Form5 Load
Delay for 2 sec
Load data
Still the text boxes are not visible properly till the data loads.
I tried both
System.Threading.Thread.Sleep(2000)
as well as
DeclareSub Sleep Lib "kernel32" (ByVal dwMilliseconds AsLong)
Sleep(2000)
Still they don't work.
Since I have 5 such forms which will load consecutively and load 1000's of record I don't like to use separate timer for all these operations.
I want one function which can be called from anywhere and can give a delay and then continue.
Thanks in Advance.
In a procedure,
I load a form which has around 5 text boxes and a grid.
Next I load a data into that grid with around 1000 records !
Then I load another form which has around 5 text boxes and a grid.
Next I load a data into that grid with around 1000 records !
Like wise I load 5 form and each has text boxes and grids.
My problem is that the form loads but that text boxes are not properly visible till the data is loaded.
I tried System.Threading.Thread.Sleep(2000) which gives a delay in between the form load and data loading.
i.e
Form1 Load
Delay for 2 sec
Load data
Form2 Load
Delay for 2 sec
Load data
Form3 Load
Delay for 2 sec
Load data
Form4 Load
Delay for 2 sec
Load data
Form5 Load
Delay for 2 sec
Load data
Still the text boxes are not visible properly till the data loads.
I tried both
System.Threading.Thread.Sleep(2000)
as well as
DeclareSub Sleep Lib "kernel32" (ByVal dwMilliseconds AsLong)
Sleep(2000)
Still they don't work.
Since I have 5 such forms which will load consecutively and load 1000's of record I don't like to use separate timer for all these operations.
I want one function which can be called from anywhere and can give a delay and then continue.
Thanks in Advance.