By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,846 Members | 1,709 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,846 IT Pros & Developers. It's quick & easy.

Form Completely loaded and drawn?

P: n/a
I want to run something once my form in completely loaded and drawn but
running at the end of form load doesn't do I guess cause of the large
dataset fill and the form isn't fully loaded. Where can I stick some code
so that I can run it after the form in fully drawn and loaded? I was told
there is no real way to know when it is "completely" loaded?
Nov 21 '05 #1
Share this Question
Share on Google+
10 Replies


P: n/a
You could put it in tne form Activated Event.

'-- Use this only if you want to run it only one time
Dim run_once As Boolean
Private Sub Form1_Activated(ByVal sender As Object, ByVal e As
System.EventArgs) Handles MyBase.Activated
If Not run_once Then
'--- Do whatever you want
run_once = True
End If
End Sub

"B-Dog" <bd***@hotmail.com> wrote in message
news:%2***************@TK2MSFTNGP10.phx.gbl...
I want to run something once my form in completely loaded and drawn but
running at the end of form load doesn't do I guess cause of the large
dataset fill and the form isn't fully loaded. Where can I stick some code
so that I can run it after the form in fully drawn and loaded? I was told
there is no real way to know when it is "completely" loaded?

Nov 21 '05 #2

P: n/a
I tried that and in my project the on activated was firing before my form
load was complete. I may be doing something wrong. Thanks

"Think_Fast" <nospam@haha> wrote in message
news:10*************@corp.supernews.com...
You could put it in tne form Activated Event.

'-- Use this only if you want to run it only one time
Dim run_once As Boolean
Private Sub Form1_Activated(ByVal sender As Object, ByVal e As
System.EventArgs) Handles MyBase.Activated
If Not run_once Then
'--- Do whatever you want
run_once = True
End If
End Sub

"B-Dog" <bd***@hotmail.com> wrote in message
news:%2***************@TK2MSFTNGP10.phx.gbl...
I want to run something once my form in completely loaded and drawn but
running at the end of form load doesn't do I guess cause of the large
dataset fill and the form isn't fully loaded. Where can I stick some code so that I can run it after the form in fully drawn and loaded? I was told there is no real way to know when it is "completely" loaded?


Nov 21 '05 #3

P: n/a
Yes, just tried it again and put a debug at the end of my load and a debug
on activated with activated being debugged first then load?

"Think_Fast" <nospam@haha> wrote in message
news:10*************@corp.supernews.com...
You could put it in tne form Activated Event.

'-- Use this only if you want to run it only one time
Dim run_once As Boolean
Private Sub Form1_Activated(ByVal sender As Object, ByVal e As
System.EventArgs) Handles MyBase.Activated
If Not run_once Then
'--- Do whatever you want
run_once = True
End If
End Sub

"B-Dog" <bd***@hotmail.com> wrote in message
news:%2***************@TK2MSFTNGP10.phx.gbl...
I want to run something once my form in completely loaded and drawn but
running at the end of form load doesn't do I guess cause of the large
dataset fill and the form isn't fully loaded. Where can I stick some code so that I can run it after the form in fully drawn and loaded? I was told there is no real way to know when it is "completely" loaded?


Nov 21 '05 #4

P: n/a
Strange, I just tried and Load got debugged first then Activate...

(Haven't played around enough to see if the form was finished drawing yet
though...)

Greg

"B-Dog" <bd***@hotmail.com> wrote in message
news:OW**************@TK2MSFTNGP15.phx.gbl...
Yes, just tried it again and put a debug at the end of my load and a debug
on activated with activated being debugged first then load?

"Think_Fast" <nospam@haha> wrote in message
news:10*************@corp.supernews.com...
You could put it in tne form Activated Event.

'-- Use this only if you want to run it only one time
Dim run_once As Boolean
Private Sub Form1_Activated(ByVal sender As Object, ByVal e As
System.EventArgs) Handles MyBase.Activated
If Not run_once Then
'--- Do whatever you want
run_once = True
End If
End Sub

"B-Dog" <bd***@hotmail.com> wrote in message
news:%2***************@TK2MSFTNGP10.phx.gbl...
>I want to run something once my form in completely loaded and drawn but
> running at the end of form load doesn't do I guess cause of the large
> dataset fill and the form isn't fully loaded. Where can I stick some code > so that I can run it after the form in fully drawn and loaded? I was told > there is no real way to know when it is "completely" loaded?
>
>



Nov 21 '05 #5

P: n/a
The Load Event should fire before the Activated Event. What code are you
running in the load event? If you are loading a dataset as you say then you
should use a seperate thread to do that instead of the load event.
"B-Dog" <bd***@hotmail.com> wrote in message
news:%2***************@TK2MSFTNGP15.phx.gbl...
I tried that and in my project the on activated was firing before my form
load was complete. I may be doing something wrong. Thanks

"Think_Fast" <nospam@haha> wrote in message
news:10*************@corp.supernews.com...
You could put it in tne form Activated Event.

'-- Use this only if you want to run it only one time
Dim run_once As Boolean
Private Sub Form1_Activated(ByVal sender As Object, ByVal e As
System.EventArgs) Handles MyBase.Activated
If Not run_once Then
'--- Do whatever you want
run_once = True
End If
End Sub

"B-Dog" <bd***@hotmail.com> wrote in message
news:%2***************@TK2MSFTNGP10.phx.gbl...
>I want to run something once my form in completely loaded and drawn but
> running at the end of form load doesn't do I guess cause of the large
> dataset fill and the form isn't fully loaded. Where can I stick some code > so that I can run it after the form in fully drawn and loaded? I was told > there is no real way to know when it is "completely" loaded?
>
>



Nov 21 '05 #6

P: n/a
I get the username and the fill a dataset.

"Think_Fast" <nospam@haha> wrote in message
news:10*************@corp.supernews.com...
The Load Event should fire before the Activated Event. What code are you
running in the load event? If you are loading a dataset as you say then you should use a seperate thread to do that instead of the load event.
"B-Dog" <bd***@hotmail.com> wrote in message
news:%2***************@TK2MSFTNGP15.phx.gbl...
I tried that and in my project the on activated was firing before my form
load was complete. I may be doing something wrong. Thanks

"Think_Fast" <nospam@haha> wrote in message
news:10*************@corp.supernews.com...
You could put it in tne form Activated Event.

'-- Use this only if you want to run it only one time
Dim run_once As Boolean
Private Sub Form1_Activated(ByVal sender As Object, ByVal e As
System.EventArgs) Handles MyBase.Activated
If Not run_once Then
'--- Do whatever you want
run_once = True
End If
End Sub

"B-Dog" <bd***@hotmail.com> wrote in message
news:%2***************@TK2MSFTNGP10.phx.gbl...
>I want to run something once my form in completely loaded and drawn but > running at the end of form load doesn't do I guess cause of the large
> dataset fill and the form isn't fully loaded. Where can I stick some

code
> so that I can run it after the form in fully drawn and loaded? I was

told
> there is no real way to know when it is "completely" loaded?
>
>



Nov 21 '05 #7

P: n/a
It's probably right but I'm putting it at then end of my form load, which
fills my dataset which must be why the activated is firing first? Don't
know but it is doing it.

"Greg Burns" <greg_burns@DONT_SPAM_ME_hotmail.com> wrote in message
news:eW**************@TK2MSFTNGP09.phx.gbl...
Strange, I just tried and Load got debugged first then Activate...

(Haven't played around enough to see if the form was finished drawing yet
though...)

Greg

"B-Dog" <bd***@hotmail.com> wrote in message
news:OW**************@TK2MSFTNGP15.phx.gbl...
Yes, just tried it again and put a debug at the end of my load and a debug on activated with activated being debugged first then load?

"Think_Fast" <nospam@haha> wrote in message
news:10*************@corp.supernews.com...
You could put it in tne form Activated Event.

'-- Use this only if you want to run it only one time
Dim run_once As Boolean
Private Sub Form1_Activated(ByVal sender As Object, ByVal e As
System.EventArgs) Handles MyBase.Activated
If Not run_once Then
'--- Do whatever you want
run_once = True
End If
End Sub

"B-Dog" <bd***@hotmail.com> wrote in message
news:%2***************@TK2MSFTNGP10.phx.gbl...
>I want to run something once my form in completely loaded and drawn but > running at the end of form load doesn't do I guess cause of the large
> dataset fill and the form isn't fully loaded. Where can I stick some

code
> so that I can run it after the form in fully drawn and loaded? I was

told
> there is no real way to know when it is "completely" loaded?
>
>



Nov 21 '05 #8

P: n/a
I didn't think it was multi-threaded like that (is that even the term?)

I didn't think Active event could be called prior to the Load event
finishing...

Greg

"B-Dog" <bd***@hotmail.com> wrote in message
news:Os****************@TK2MSFTNGP10.phx.gbl...
It's probably right but I'm putting it at then end of my form load, which
fills my dataset which must be why the activated is firing first? Don't
know but it is doing it.

"Greg Burns" <greg_burns@DONT_SPAM_ME_hotmail.com> wrote in message
news:eW**************@TK2MSFTNGP09.phx.gbl...
Strange, I just tried and Load got debugged first then Activate...

(Haven't played around enough to see if the form was finished drawing yet
though...)

Greg

"B-Dog" <bd***@hotmail.com> wrote in message
news:OW**************@TK2MSFTNGP15.phx.gbl...
> Yes, just tried it again and put a debug at the end of my load and a debug > on activated with activated being debugged first then load?
>
> "Think_Fast" <nospam@haha> wrote in message
> news:10*************@corp.supernews.com...
>> You could put it in tne form Activated Event.
>>
>> '-- Use this only if you want to run it only one time
>> Dim run_once As Boolean
>> Private Sub Form1_Activated(ByVal sender As Object, ByVal e As
>> System.EventArgs) Handles MyBase.Activated
>> If Not run_once Then
>> '--- Do whatever you want
>> run_once = True
>> End If
>> End Sub
>>
>>
>>
>> "B-Dog" <bd***@hotmail.com> wrote in message
>> news:%2***************@TK2MSFTNGP10.phx.gbl...
>> >I want to run something once my form in completely loaded and drawn but >> > running at the end of form load doesn't do I guess cause of the
>> > large
>> > dataset fill and the form isn't fully loaded. Where can I stick
>> > some
> code
>> > so that I can run it after the form in fully drawn and loaded? I
>> > was
> told
>> > there is no real way to know when it is "completely" loaded?
>> >
>> >
>>
>>
>
>



Nov 21 '05 #9

P: n/a
But I think dataset fills command are sent as a separate thread so it
continues on but in reality, depending on the size of the data it is filling
it still processing. Can't do anything on my form till it is done filling
and the form thinks it is done.

"Greg Burns" <greg_burns@DONT_SPAM_ME_hotmail.com> wrote in message
news:u2**************@TK2MSFTNGP10.phx.gbl...
I didn't think it was multi-threaded like that (is that even the term?)

I didn't think Active event could be called prior to the Load event
finishing...

Greg

"B-Dog" <bd***@hotmail.com> wrote in message
news:Os****************@TK2MSFTNGP10.phx.gbl...
It's probably right but I'm putting it at then end of my form load, which fills my dataset which must be why the activated is firing first? Don't
know but it is doing it.

"Greg Burns" <greg_burns@DONT_SPAM_ME_hotmail.com> wrote in message
news:eW**************@TK2MSFTNGP09.phx.gbl...
Strange, I just tried and Load got debugged first then Activate...

(Haven't played around enough to see if the form was finished drawing yet though...)

Greg

"B-Dog" <bd***@hotmail.com> wrote in message
news:OW**************@TK2MSFTNGP15.phx.gbl...
> Yes, just tried it again and put a debug at the end of my load and a

debug
> on activated with activated being debugged first then load?
>
> "Think_Fast" <nospam@haha> wrote in message
> news:10*************@corp.supernews.com...
>> You could put it in tne form Activated Event.
>>
>> '-- Use this only if you want to run it only one time
>> Dim run_once As Boolean
>> Private Sub Form1_Activated(ByVal sender As Object, ByVal e As
>> System.EventArgs) Handles MyBase.Activated
>> If Not run_once Then
>> '--- Do whatever you want
>> run_once = True
>> End If
>> End Sub
>>
>>
>>
>> "B-Dog" <bd***@hotmail.com> wrote in message
>> news:%2***************@TK2MSFTNGP10.phx.gbl...
>> >I want to run something once my form in completely loaded and drawn

but
>> > running at the end of form load doesn't do I guess cause of the
>> > large
>> > dataset fill and the form isn't fully loaded. Where can I stick
>> > some
> code
>> > so that I can run it after the form in fully drawn and loaded? I
>> > was
> told
>> > there is no real way to know when it is "completely" loaded?
>> >
>> >
>>
>>
>
>



Nov 21 '05 #10

P: n/a
PS: But I'm no expert at all, I'm probably blowing smoke, that is why I'm
posting.... I'm a rookie.

"Greg Burns" <greg_burns@DONT_SPAM_ME_hotmail.com> wrote in message
news:u2**************@TK2MSFTNGP10.phx.gbl...
I didn't think it was multi-threaded like that (is that even the term?)

I didn't think Active event could be called prior to the Load event
finishing...

Greg

"B-Dog" <bd***@hotmail.com> wrote in message
news:Os****************@TK2MSFTNGP10.phx.gbl...
It's probably right but I'm putting it at then end of my form load, which fills my dataset which must be why the activated is firing first? Don't
know but it is doing it.

"Greg Burns" <greg_burns@DONT_SPAM_ME_hotmail.com> wrote in message
news:eW**************@TK2MSFTNGP09.phx.gbl...
Strange, I just tried and Load got debugged first then Activate...

(Haven't played around enough to see if the form was finished drawing yet though...)

Greg

"B-Dog" <bd***@hotmail.com> wrote in message
news:OW**************@TK2MSFTNGP15.phx.gbl...
> Yes, just tried it again and put a debug at the end of my load and a

debug
> on activated with activated being debugged first then load?
>
> "Think_Fast" <nospam@haha> wrote in message
> news:10*************@corp.supernews.com...
>> You could put it in tne form Activated Event.
>>
>> '-- Use this only if you want to run it only one time
>> Dim run_once As Boolean
>> Private Sub Form1_Activated(ByVal sender As Object, ByVal e As
>> System.EventArgs) Handles MyBase.Activated
>> If Not run_once Then
>> '--- Do whatever you want
>> run_once = True
>> End If
>> End Sub
>>
>>
>>
>> "B-Dog" <bd***@hotmail.com> wrote in message
>> news:%2***************@TK2MSFTNGP10.phx.gbl...
>> >I want to run something once my form in completely loaded and drawn
but
>> > running at the end of form load doesn't do I guess cause of the
>> > large
>> > dataset fill and the form isn't fully loaded. Where can I stick
>> > some
> code
>> > so that I can run it after the form in fully drawn and loaded? I
>> > was
> told
>> > there is no real way to know when it is "completely" loaded?
>> >
>> >
>>
>>
>
>



Nov 21 '05 #11

This discussion thread is closed

Replies have been disabled for this discussion.