|
Hi,
I have this segment of code, which is supposed to show a form (lf), and then when the user is done with that, show a loading form (load) until the main form is done loading (mf). This is what I have for my main function right now.
static void Main()
{
LoginForm lf = new LoginForm();
LoadingMainForm load = new LoadingMainForm();
load.Show();
load.Hide();
lf.ShowDialog();
if (lf.loggedin == true)
{
load.Show();
MainForm mf = new MainForm(lf.sessid,lf.loginform_username.Text);
load.Hide();
Application.Run(mf);
}
else
{
Application.Exit();
}
}
My problem is that when the loading form shows up, it looks incomplete. The title and stuff are still there, but in the place where a label and a button are supposed to be, it just looks incomplete, like the loading form didn't have enough time to load.
Can anyone help?
Thanks,
Jimmy Sawczuk
www.McJournal.org
|
|
|
|
|
sniper506th wrote:
it just looks incomplete, like the loading form didn't have enough time to load.
Or receive a paint event - which is what I suspect is the real reason.
If a window is damaged (and in its initial state a window is damaged because it has yet to draw itself) a paint event gets put on the message queue. When the application is running the Application object processes the queue whenever the application is idle (and I guess that the modal dialogs process the message pump also which is why that would have worked). Since you have not yet told your application object to Run there is no processing of any events.
After showing the form, you could attempt a Refresh()[^] on it. The Refresh() method on the Form class should force an immediate repaint of the form area (including child controls, such as buttons and labels).
My: Blog | Photos | Next SQL Presentation
WDevs.com - Open Source Code Hosting, Blogs, FTP, Mail and More
|
|
|
|
|
|
You need to call Application.Run if you want to display a form.....it doesn't apply to a dialog. In your case you can pass the LoadingMainForm as a parameter to the Main form and display it in the constructor...hope this helps!
Shardool Karnik
Lead Software Engineer
Compass Technologies, Inc.
http://www.compasstec.com
|
|
|
|
|
There are several excellent examples here on how to define a collection property for your control and edit it with the collection editor in design time.
I've been trying to do the same with a dictionary collection (value and a key) but with no success. Any thoughts or ideas on how to edit a dictionary in design time without creating a completley costume designer?
is a good thing
|
|
|
|
|
Hello , can any one help me PLEASE , how can I convert a series of images to any video format can be played by WindowsMediaPlayer?
|
|
|
|
|
Try the DirectVedio in the DirectX redistrputable
|
|
|
|
|
Several graphics packages offer software tools, such as Jasc Software's Paint Shop Pro - Animation Shop that can build animations, .avi, etc. from still images.
|
|
|
|
|
Hello, Does any one know how can I track mouse movements on other pc desktop connected with mine ?
|
|
|
|
|
Recently I wanted to port a CListCtrl -derived class (no offense please, it really was that poll-misused control[^] ).
I discovered that two notifications I subscribed to inside my MFC control were unavailable in the .NET ListView control: LVN_DELETEITEM and LVN_INSERTITEM .
Searching Google and CodeProject and even disassembling the BCL with Reflector, I found no example code that implemented (at least) those two notifications in .NET.
Questions:
- Have I looked at the wrong places and there are actually already events in the current .NET 1.1 implementation for those notifications?
- If not, is there some sample code available?
Thanks for your help!
[Update]
OK, I actually found some hints[^], which I already tried out, but I failed to map the index passed in that messages to the ListViewItem s in the ListView.Items collection. Whenever I tried to access the Items[index] from inside the handler of the notifications, the collection was empty. Probably I handled the event too early, before the list view had a chance to fill its Items property properly...
--
Affordable Windows-based CMS for only 99 €: try www.zeta-producer.com for free!
|
|
|
|
|
Is there anyone who has any experience with programming .NET applications for Windows NT 4.0? I have to make a network enabled application and I know that the server atleast runs NT 4.
Basically the server will have to be able to handle networking with sockets, threads for dealing with multiple clients and ADO.NET for dealing with a database. So if you have any experience at all about these parts or anything else on NT 4 please let me know if I have got myself into a lot of trouble by saying I could do this.
When I check the MSDN documentation for some of the classes I'm gonna need they all say they are supported on NT 4 so maybe I have just got scared totally unnecessary but I really need to know about problems that may arise.
Isn't the idea with the CLR and IL that an assembly would run on all supported operating systems with a working .NET framework, right? So basically there shouldnt be any problems?
|
|
|
|
|
Each .NET Framework class has a list of systems it's available on in the documentation. Usually, NT4.0 (with SP6a of course) is on the list, some classes are not supported on 9x systems. I didn't have any problems with my programs running on NT4, as long as I used only the framework classes.
You have to be careful when you use p/invoke, though.
In my application framework I needed to get the long filename for an executable and since there's no .NET way to get this information I P/Invoked GetLongPathName(). Sadly, this didn't work with NT.
mav
|
|
|
|
|
hi,
i have enabled visual style on my applicaion but numericupdown controls do not apply the visual style,how can i force them to apply visual stles?
thanks
|
|
|
|
|
I believe I read somewhere that it's a bug and the NumericUpDown control doesn't paint in XP visual styles, even if enabled. But I can't find the source.
[EDIT: see this page[^]]
-- LuisR
Luis Alonso Ramos
Intelectix - Chihuahua, Mexico
Not much here: My CP Blog!
|
|
|
|
|
i have made an application in C# and then created a setup file out of it. When i try to install the application on a computer running Windows Home Ed., it gives an error saying 'unable to load file from assesmbly c:\program files\teas\mis\mis.exe' what could be the error? i have reinstalled the mdac components, IE 6.0 SP1, and the .NET framework but it didnt yeild any results.
|
|
|
|
|
I need to work with WebForm Controls which im trying to do it in global.asax.cs file.So that i can acess all requesting Forms.If I have to do in Page load of all Forms there is no difficulty but i have to copy the code in all Forms Page Load.
If I can acces Form Instance of Requesting WebForm in Global.asax.cs file i have to code in global.asax.cs file only which is simple.
Can anyone help me on this how to get Form instance of Requesting WebForm.
Thanks in Advance
Rajesh Thomas
|
|
|
|
|
Hi all,
Is there a way to disable a treenode ?, by 'disable' i mean mean that the node a should not be able to perform any kind of operation on the tree node.
Thanks in advance,
Gokul.
|
|
|
|
|
In the event handler for the "AfterSelect" event of the treeview, you can ensure that for that particular node (which you want to disable), no action is taken by your code, i.e., have an empty handler when that node is selected. This may perhaps solve your problem.
|
|
|
|
|
This[^] event will allow you to cancel the selection of a node before it is selected.
-- LuisR
Luis Alonso Ramos
Intelectix - Chihuahua, Mexico
Not much here: My CP Blog!
|
|
|
|
|
how to prorammed or what type of algorithm are involved in ICR/OCR.
According to C# how this programme managed.
eeee
|
|
|
|
|
As far as I know shape recognition is based (for best results) on neural networks, which are the most complex algorithms I know. Good luck.
I hope you understand...
By the way... visit http://nehe.gamedev.net[^]
|
|
|
|
|
i would like to tell you that OCR on a printed charachters can be done but what you need as a ofline handwritting recongnition can't be don in an aceptable quality because online on takes the writting pen movement in the recongnition process which could not be done with the offline recognition so you can forget it .....
Mhmoud Rawas
------------
Software Eng.
|
|
|
|
|
Hi there ,
if anyone have idea or implemented I/O Completion ports with sockets than please help me ,
i have done work with it but getting problem i.e unable to recieve n send
data................
looking forward ...........
babur.saeed@gmail.com
Babar
|
|
|
|
|
can explaint your problem in more deatails to help you ...?
|
|
|
|
|
d
modified 22-Dec-14 16:56pm.
|
|
|
|