Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » TopWindow&PopUp, TrayIcon » Splash Screen
icon5.gif  Splash Screen [message #3319] Fri, 19 May 2006 14:03 Go to next message
andrei-catalin is currently offline  andrei-catalin
Messages: 62
Registered: May 2006
Location: Romania
Member
How to make a splash screen that appears while main window is loading?

Thanks.

[Updated on: Sat, 20 May 2006 00:08] by Moderator

Report message to a moderator

Re: Splash Screen [message #3321 is a reply to message #3319] Fri, 19 May 2006 23:30 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
andrei-catalin wrote on Fri, 19 May 2006 08:03

How to make a splash screen that appears while main window is loading?

Thanks.



Using PopUp...

Well, the simple way to learn it is to study TheIDE code... (ide/Help.cpp around line 90) Wink

Mirek
BugQuestion.gif  Re: Splash Screen [message #3323 is a reply to message #3321] Sat, 20 May 2006 00:08 Go to previous messageGo to next message
fudadmin is currently offline  fudadmin
Messages: 1321
Registered: November 2005
Location: Kaunas, Lithuania
Ultimate Contributor
Administrator
This icon is when you think it's a bug...
Re: Splash Screen [message #3325 is a reply to message #3321] Sat, 20 May 2006 10:35 Go to previous messageGo to next message
andrei-catalin is currently offline  andrei-catalin
Messages: 62
Registered: May 2006
Location: Romania
Member
Thank for suggestion.

I have found the (complex) solution from IDE code and I have simplified it.

The key to show a splash screen is "Ctrl::ProcessEvent();".

This is the code which works:

GUI_APP_MAIN

{
HelloWorld hw;//Examples: AnimatedHello
hw.PopUp(NULL,false,false,true,true);

Ctrl::ProcessEvent();

MyAppWindow app;

Ctrl::EventLoop(); //to run animation

app.Run();
}
Re: Splash Screen [message #3327 is a reply to message #3325] Sat, 20 May 2006 13:29 Go to previous messageGo to next message
forlano is currently offline  forlano
Messages: 1182
Registered: March 2006
Location: Italy
Senior Contributor
Hello Andrei,

thank you for the code snippet. I needed it too. I've modified it slightly to see it in action
GUI_APP_MAIN
{ TopWindow app;

  HelloWorld hw;//Examples: AnimatedHello 
  hw.PopUp(NULL,false,false,true,true);
  hw.Title("Hello world example");
  hw.Text(Nvl(Join(CommandLine(), " "), "Hello world !"));

  Ctrl::ProcessEvent();
  Ctrl::EventLoop(); //to run animation
  app.Run();
} 

where this block should substitude the one in AnimatedHello package.
Now next problem is to let appear some static image for a given amount of time. Have you another code snippet with the solution? Smile

Luigi
Re: Splash Screen [message #3331 is a reply to message #3327] Sat, 20 May 2006 15:51 Go to previous message
andrei-catalin is currently offline  andrei-catalin
Messages: 62
Registered: May 2006
Location: Romania
Member
Hello, Luigi!

In my computer the "freezing" is indistinguishable.
However, between hw.PopUp() and Ctrl::EventLoop() lines is no animation.
Changing the order of lines should attenuate this undesirable effect.
Using a static image is more safe (although this is less spectacular).

GUI_APP_MAIN
{
TopWindow app;
HelloWorld hw;
//hw.Title("Hello world example");//not necessary
hw.Text(Nvl(Join(CommandLine(), " "), "Hello world !"));
hw.PopUp(NULL,false,false,true,true);
//Ctrl::ProcessEvent();//not ncessary
Ctrl::EventLoop();//to run animation

app.Run();

}
Previous Topic: How do you use PopUp
Next Topic: ColorPopUp Problem
Goto Forum:
  


Current Time: Thu Mar 28 20:18:18 CET 2024

Total time taken to generate the page: 0.01352 seconds