473,378 Members | 1,142 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

on load isn't executed

I've got a WinForm MDI application. A little while ago (probably after I
made some changes) my Load method for the form stopped being executed. I had
some initialization done there and I suddenly noticed that this wasn't done
anymore. I haven't been able to get it to work again and have had to move my
code to OnShown instead. Does anyone have an idea why this is happening? All
I've got there now is a MessageBox.Show but this doesn't show.
The application has been written using VS 2008, C#

Thanks in advance,
Håvard

Mar 17 '08 #1
2 1011
Havard,

You know that On Load fires only one time?

Cor
"Håvard Olerud Eriksen" <ho*******@SPAMMENOTgmail.comschreef in bericht
news:%2****************@TK2MSFTNGP06.phx.gbl...
I've got a WinForm MDI application. A little while ago (probably after I
made some changes) my Load method for the form stopped being executed. I
had some initialization done there and I suddenly noticed that this wasn't
done anymore. I haven't been able to get it to work again and have had to
move my code to OnShown instead. Does anyone have an idea why this is
happening? All I've got there now is a MessageBox.Show but this doesn't
show.
The application has been written using VS 2008, C#

Thanks in advance,
Håvard
Mar 18 '08 #2

"Cor Ligthert[MVP]" <no************@planet.nlwrote in message
news:93**********************************@microsof t.com...
Havard,

You know that On Load fires only one time?
Yes, I know that but it doesn't seem to be fired at all. If it had my single
MessageBox.Show() would be shown wouldn't it? What I'm doing is that I'm
showing a login window in the constructor of the mdi form (main form). If
invalid login credentials are entered or the user clicks cancel I want to
shut down the application. This worked previously when my Load fired
properly but now that I'm using the same code in OnShown there's a "flash"
of the main window before it closes (for obvious reasons) and I want to
avoid that. If you have any other, better ideas on how to solve this, I'm
all ears :)

Håvard
>
Cor
"Håvard Olerud Eriksen" <ho*******@SPAMMENOTgmail.comschreef in bericht
news:%2****************@TK2MSFTNGP06.phx.gbl...
>I've got a WinForm MDI application. A little while ago (probably after I
made some changes) my Load method for the form stopped being executed. I
had some initialization done there and I suddenly noticed that this
wasn't done anymore. I haven't been able to get it to work again and have
had to move my code to OnShown instead. Does anyone have an idea why this
is happening? All I've got there now is a MessageBox.Show but this
doesn't show.
The application has been written using VS 2008, C#

Thanks in advance,
Håvard
Mar 18 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Carlos Ribeiro | last post by:
I'm looking for ways to load new class definitions at runtime (I'm not talking about object instances here, so a persistent object database isn't what I am looking for ). I'm aware of a few...
3
by: claus.hirth | last post by:
When I execute the following statment using the Command Center it works: LOAD CLIENT FROM 'Y:\\TheFixedWidthData.txt' OF ASC METHOD L ( 1 1,2 11,12 17) REPLACE INTO S00.TheTargetTable...
2
by: EH Eisenberger | last post by:
It seems a bug in access. When you open any form in MS Access XP and move to another record from where the form started, and then close the Access application, the FormLoad event will be executed...
2
by: Thomas Huber | last post by:
I´m working on an access aplication for a while now and at least 3 times changed wheather the load() of a form or of it´s subform ist executed first. I checked this fact in the debuging mode...
3
by: feng | last post by:
We have a windows form project that has multiple child forms inherit from one base form. In our base form's form load event handler, we have some common logic in there. These common logic is...
1
by: Jason Richmeier | last post by:
I am experiencing some unexpected behavior with the Form Load event in a Windows application. Hopefully, someone can explain why this behavior is occurring. In my application, I have a form...
4
by: nemesis.saurabh | last post by:
hi, i am stuck up on this problem. In a load balanced scenario the post back is not happening i.e. when a control on the web form is clicked, the post back does not occur at the server and...
2
by: Franky | last post by:
Threre is a Form containing a usercontrol In the form's Load event it references a usercontrol property, say, zz The first showdialog(formx) causes 1 usercontrol_load event 2 form_load event...
9
by: RvGrah | last post by:
I'm completely new to using background threading, though I have downloaded and run through several samples and understood how they worked. My question is: I have an app whose primary form...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
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...
0
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
0
BarryA
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
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 using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.