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? 10 4386
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?
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?
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?
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? > >
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? > >
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? > >
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? > >
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? >> > >> > >> >> > >
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? >> > >> > >> >> > >
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? >> > >> > >> >> > >
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Carolina |
last post by:
Hi.
I have a MDIchild form called Form1.
In Form1_Load code, the form populates a Listview control based on a
datareader, but I want to close the form inmediately and return to the
parent form,...
|
by: Marc Bogaard |
last post by:
Hello together!
Is there any event avaible in Javascript that raises
when the site or in my case a text is completely loaded?
Is need this because the visitor should only be allowed
to press a...
|
by: Edward |
last post by:
I have the following function to determine if a form is loaded:
Public Function modIsloaded(ByVal vstrFormName As String) As Boolean
' Error handling removed for concision
' Determine if...
|
by: David N |
last post by:
Hi All,
The OnLoad() event is invoked automatically when a form is being loaded. Do
we have another event that is invoked automatically after a form has
completed loading?
Thanks.
|
by: Aung Thu |
last post by:
Hi, there!
I want to set focus on a control, of which TabIndex is not the first, when a
form is loaded. In the form's load event, I have used Control.Focus() but it
doesn't not work. The focus...
|
by: sumuka |
last post by:
Hello,
I'm doing a vb6 project in which i've a flexgrid and when the user clicks on the 3rd column 1st row a new form (frm.edit) will open and this form displays some data now when i want click...
|
by: muddasirmunir |
last post by:
how can we know that the form is loaded or not.
just like other control like recorset we can check by this code
whether the recorset is open or not
if recordset.state= 1 then (do some work)...
|
by: emtang |
last post by:
How to refresh to original when form is loaded after the user right click sort
Steps:
1. Form is loaded.
2. User right click on sort A-Z in Contributor.
3. User wants to get back the...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
| |