Hi! i need a program that displays a splash screen until its process gets terminated. can you help me?
I found some c# projects but i don't have any experience with that language so i have no idea how to compile them.
thanks in advance for your help
Printable View
Hi! i need a program that displays a splash screen until its process gets terminated. can you help me?
I found some c# projects but i don't have any experience with that language so i have no idea how to compile them.
thanks in advance for your help
A splashscreen is nothing more than a borderless window. Create a window, show it from your main function, start the thread and wait for it until it's done. Close the splash window, and show the main window.Quote:
I found some c# projects but i don't have any experience with that language
Are you writing in MFC ? If not, what project type are you using ?
my project is written in java. i need a program that shows a splash screen and waits until it gets terminated. the splash screen will be executed by a c++ app that just starts up the jre. i don't know what MFC means unfortunately because i'm a real newbie to c++
check the attachment.. it will serves your purpose properly.. use SplashClient.Cpp to show splash and put ur initialization code in place of Sleep() fn.
This files are written in MFC.
uhm... what's the visual c++ version of execl?
visual c++ version of execl ????
I think you are looking for ShellExecute.
I dont think so.. Can u understand his words "version of execl" ??
c++ version of execL. A execute command... hence the shellexecute.
okay..
sorry for my bad english. shellexecute works fine!
thanks a lot!
I too would like to create a splash screen (non mfc). I was just wondering what the standard size is for a splash screen(width/height) and how I can show it in the very center of the screen (in a nutshell, how calculate x,y based on the screen resolution)
thanks
I don't think there is any standard for a splash screen size. Personally, I do everything I can to avoid the need for one. If I'm doing so much initialization that the user might be concerned that the program hasn't started, then something is wrong with my design.
If you must, I'd keep it as unobtrusive as possible. Perhaps no more than 320x240 (in case you're users are like my Mom and still run in 640x480). As for centering, that's just arithmetic; do you not know how to calculate that?
First I'd need to know how to retrieve screen size. then I would I would divede width / 2 and height / 2. If my sreensplash window is 320x240 then I shoule place it (screen width / 2) - (window size / 2) the same goes for height...is that ok?
That's correct. You can get the desktop window rectangle for the screen size. You can call GetDesktopWindow() to get a HWND to the desktop window, and call GetWindowRect() on that handle, or just combine them:
Code:RECT r;
::GetWindowRect(::GetDesktopWindow(),&r);
See.. If you want to show a splash screen then just use my attached file. though its written in mfc you would not have to put so much effort. Just use SplashClient.cpp file to show your bitmap as splash. And about center of screen:: this is also implemented in that piece of code so u dont need to worry about it. Finally, if you have a strong hold determination that you personally have to write a code for Splash screen in Win32API then I can't help you.
Actually, I am forced to use regular win32 API instead of MFC.
Forced by whom (or what)? Just say the word and we can send in the black helicopters.
By the way, this works great as a splash screen:
Code://
// Splash Screen
//
IDD_SPLASH DIALOG 0, 0, 300, 200
STYLE DS_3DLOOK | DS_ABSALIGN | DS_CENTER | DS_FIXEDSYS | WS_VISIBLE | WS_POPUP
FONT 8, "Ms Shell Dlg 2"
BEGIN
LTEXT "Splash Screen", IDC_STATIC, 127, 96, 46, 8, SS_LEFT
END