Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm General / February 2006

Tip: Looking for answers? Try searching our database.

trouble with events (Paint event) question - please help

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Philip - 23 Feb 2006 12:09 GMT
Hi,

I have a Splash form in my Windows Forms app. It has a label on it, and in
the Paint event of the label, I draw some text on the label.

But I also want the Splash form to load my MDI form and carry out the
initialisation of the application...

Trouble is, it only paints the Splash form with the label and text, then it
does nothing else, even though I have code in the splash form Paint event
like this:

       Me.Cursor = Cursors.WaitCursor

       If m_blnPaintOnce = False Then
           Call DrawStringFloatFormat(e)
       Else
           If m_blnAppReady = False Then
               Label3.Text = "load management form"
               ManagementForm = New frmManagement
               m_blnAppReady = True
           Else
               Cursor = Cursors.Default
               Label3.Text = "finished, hide and show"
               Me.Dispose()
               ManagementForm.Visible = True
           End If
       End If

I don't know what is wrong, it never shows the MDI form, just shows the
Splash form then stops.

I just want it to paint the slash form once, write the text on it, then laod
the main form, wait while it does it's work, then hide itself, but it never
does it.

Please help, this is really a strange problem.

thanks, Philip
Stoitcho Goutsev (100) - 23 Feb 2006 14:23 GMT
Philip,

I don't quite get your problem, but it could be because either you don't
have yet started the message pump (Application.Start) and there is no
WM_PAINT to fire your Paint events or because the application is too busy
with the initialization that it never goes back to the message loop to pull
out the WM_PAINT events.

Is your MDI form loads evenetually?

Signature

Stoitcho Goutsev (100)

> Hi,
>
[quoted text clipped - 38 lines]
>
> thanks, Philip
Philip - 23 Feb 2006 15:31 GMT
Hi,

It's ok, I was calling MDIForm.visible in the wrong place ...

thanks anyway

> Philip,
>
[quoted text clipped - 48 lines]
> >
> > thanks, Philip

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.