why is that
Public Sub Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
works fine, but
Public Sub Form1_Unload(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
seems not to work at all ? what is a valid function name during
unloading (through clicking "X" in right corner of the Form1 window).
Note Form1 is my main window.
Thanks 11 3812
Joe,
I believe the 2nd one needs to say "Handles MyBase.Unload", in any case not
"MyBase.Load".
hth,
Doug
"Joe" <jo*****@tlen.plwrote in message
news:11**********************@z35g2000cwz.googlegr oups.com...
why is that
Public Sub Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
works fine, but
Public Sub Form1_Unload(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
seems not to work at all ? what is a valid function name during
unloading (through clicking "X" in right corner of the Form1 window).
Note Form1 is my main window.
Thanks
On Feb 26, 11:32 am, "Doug Glancy" <nobodyh...@replytogroup.com>
wrote:
Joe,
I believe the 2nd one needs to say "Handles MyBase.Unload", in any case not
"MyBase.Load".
unfortunately, MyBase.Unload does not exist, neither "Close", "Exit",
"Quit" or "CloseThreat"
:(
The second one assigned the load event to the unload routine.
If you are trying to capture the unload event, look at Form_Closing, not
Form_Unload.
Robin S.
-------------------------
"Joe" <jo*****@tlen.plwrote in message
news:11**********************@z35g2000cwz.googlegr oups.com...
why is that
Public Sub Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
works fine, but
Public Sub Form1_Unload(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
seems not to work at all ? what is a valid function name during
unloading (through clicking "X" in right corner of the Form1 window).
Note Form1 is my main window.
Thanks
Public Sub Form1_Closing(ByVal sender As System.Object, ByVal e As
System.EventArgs)
MsgBox("g-bye!")
End Sub
does not show this message.
note that my main form is "Form1"
Form1_Load works however
On Feb 26, 2:32 pm, "RobinS" <Rob...@NoSpam.yah.nonewrote:
The second one assigned the load event to the unload routine.
If you are trying to capture the unload event, look at Form_Closing, not
Form_Unload.
Robin S.
-------------------------"Joe" <joe1...@tlen.plwrote in message
news:11**********************@z35g2000cwz.googlegr oups.com...
why is that
Public Sub Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
works fine, but
Public Sub Form1_Unload(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
seems not to work at all ? what is a valid function name during
unloading (through clicking "X" in right corner of the Form1 window).
Note Form1 is my main window.
Thanks- Hide quoted text -
- Show quoted text -
"Joe" <jo*****@tlen.plschrieb
Public Sub Form1_Closing(ByVal sender As System.Object, ByVal e As
System.EventArgs)
MsgBox("g-bye!")
End Sub
does not show this message.
note that my main form is "Form1"
Form1_Load works however
"Handles" is missing.
Armin
wel.. handles what? MyBase.Unload? not exist...MyBase.Closing? not
exist... MyBase.Quit? not exist...
MyBase.Load will work just on loading form not on unloading...
On Feb 26, 3:55 pm, "Armin Zingler" <az.nos...@freenet.dewrote:
"Joe" <joe1...@tlen.plschrieb
Public Sub Form1_Closing(ByVal sender As System.Object, ByVal e As
System.EventArgs)
MsgBox("g-bye!")
End Sub
does not show this message.
note that my main form is "Form1"
Form1_Load works however
"Handles" is missing.
Armin
On Feb 26, 5:03 pm, "Joe" <joe1...@tlen.plwrote:
wel.. handles what? MyBase.Unload? not exist...MyBase.Closing? not
exist... MyBase.Quit? not exist...
MyBase.Load will work just on loading form not on unloading...
Maybe the events you are looking for are FormClosing or FormClosed?
ok, finally the answer is:
Private Sub Form1_FormClosed(ByVal sender As System.Object, ByVal
e As System.Windows.Forms.FormClosedEventArgs) Handles
MyBase.FormClosed
thanks anyone!
On Feb 26, 5:28 pm, lord.zol...@gmail.com wrote:
On Feb 26, 5:03 pm, "Joe" <joe1...@tlen.plwrote:
wel.. handles what? MyBase.Unload? not exist...MyBase.Closing? not
exist... MyBase.Quit? not exist...
MyBase.Load will work just on loading form not on unloading...
Maybe the events you are looking for are FormClosing or FormClosed?
"Joe" <jo*****@tlen.plschrieb
wel.. handles what? MyBase.Unload? not exist...MyBase.Closing? not
exist... MyBase.Quit? not exist...
MyBase.Load will work just on loading form not on unloading...
...Handles mybase.formclosing
Armin
Joe,
As was told to you already by Armin Zingler some rows before, where you gave
the nice answer.
"wel.. handles what?"
It is strange that Armin and Lord Zoltar were going on helping you.
You are completely helped to come to your answer and did not even thank
Cor
"Joe" <jo*****@tlen.plschreef in bericht
news:11**********************@8g2000cwh.googlegrou ps.com...
ok, finally the answer is:
Private Sub Form1_FormClosed(ByVal sender As System.Object, ByVal
e As System.Windows.Forms.FormClosedEventArgs) Handles
MyBase.FormClosed
thanks anyone!
On Feb 26, 5:28 pm, lord.zol...@gmail.com wrote:
>On Feb 26, 5:03 pm, "Joe" <joe1...@tlen.plwrote:
wel.. handles what? MyBase.Unload? not exist...MyBase.Closing? not
exist... MyBase.Quit? not exist...
MyBase.Load will work just on loading form not on unloading...
Maybe the events you are looking for are FormClosing or FormClosed?
Just FYI, there are two events -- Form_Closing and Form_Closed.
Form_Closing fires before you close the form, and can be cancelled.
Form_Closed fires *after* the form hasclosed.
Robin S.
-----------------------------------
"Joe" <jo*****@tlen.plwrote in message
news:11**********************@8g2000cwh.googlegrou ps.com...
ok, finally the answer is:
Private Sub Form1_FormClosed(ByVal sender As System.Object, ByVal
e As System.Windows.Forms.FormClosedEventArgs) Handles
MyBase.FormClosed
thanks anyone!
On Feb 26, 5:28 pm, lord.zol...@gmail.com wrote:
>On Feb 26, 5:03 pm, "Joe" <joe1...@tlen.plwrote:
wel.. handles what? MyBase.Unload? not exist...MyBase.Closing? not
exist... MyBase.Quit? not exist...
MyBase.Load will work just on loading form not on unloading...
Maybe the events you are looking for are FormClosing or FormClosed?
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: salo |
last post by:
hi
at visual basic 6
i write this
to the button1_cl1ck
unload form1
form2.show
|
by: V.Boomessh |
last post by:
Hai
can any one help me on this problem.
I am new to VB.NET.
I have 2 forms. (form1 and form2)
On click of a button in form1 i want to show form2 and
unload form1
|
by: Daniel |
last post by:
How do i dynamicaly load and unload a C# dll at runtime
|
by: Claudia Fong |
last post by:
Hi,
I have more than one forms in my program, and I would like to for
example, in form1, I will call form2 and in form2 it will call form3.
But the problem is when I call form2.Show, it does...
|
by: brianbender |
last post by:
I am trying to load and unload assemblies dynamically and call methods
and properties when loaded into an Appdomain
I can load assemblies all day in the current AppDomain without
references and...
|
by: hal |
last post by:
I have an application that includes an activex component
that consumes resources that must be released when the a
page is unloaded.
Toward this end I subscribe to the unload event of the
body...
|
by: Hal |
last post by:
My most sincere gratitude to anyone who can help me work
around this!
I have work that needs to be done in javascript on the
client whenever a page is unloaded.
To this end, I subscribe to...
|
by: Sender |
last post by:
In VB6.0 we use Unload Form1 to unload (close) form1 -
what shall we have to write to unload a form in VB.Net
|
by: Brett Baisley |
last post by:
I am used to VB6 where frmMain.unload, frmNew.load worked.
What replaced this in vb.net?
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
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: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
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: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
| |