Page 1 of 1

Used LoadImage to make SplashScr but no work

Posted: Mon Nov 22, 2010 4:57 am
by Hot Pockets
Use the code below to Load full Screen Night time Image. When I try to load it, it sat incorrect parameter or some to that effect. Could some one please tell me how I can
make It work. Its a beautiful Image.
Kotpockets say thanks in advance!! :)

If OpenWindow(0, 0, 0, 1024,728, #PB_Window_ScreenCentered)
If LoadImage(0, "StarMap.bmp") ; change 2nd parameter to the path/filename of your image
;ImageGadget(0, 10, 10, 100, 83, ImageID(0)) ; imagegadget standard
;ImageGadget(1, 130, 10, 100, 83, ImageID(0), #PB_Image_Border) ; imagegadget with border
EndIf
Repeat : Until WaitWindowEvent() = #PB_Event_CloseWindow
EndIf

Re: Used LoadImage to make SplashScr but no work

Posted: Mon Nov 22, 2010 8:46 am
by Kwai chang caine
Hello HotPockets

First when you put some code in this forum, you must use the "code and /code" markers, before and after your code :wink:

Your code is good, you have just forgotten the name of the window
It's the 6e parameter of this line

Code: Select all

If OpenWindow(0, 0, 0, 1024,728, "Name of the window", #PB_Window_ScreenCentered)

Code: Select all

If OpenWindow(0, 0, 0, 1024,728, "Name of the window", #PB_Window_ScreenCentered)
 
 If LoadImage(0, #PB_Compiler_Home + "..\Examples\#Commun\bmp.bmp") ; change 2nd parameter to the path/filename of your image
  
  ImageGadget(0, 10, 10, 100, 83, ImageID(0)) ; imagegadget standard
  ;ImageGadget(1, 130, 10, 100, 83, ImageID(0), #PB_Image_Border) ; imagegadget with border
 EndIf
 
 Repeat : Until WaitWindowEvent() = #PB_Event_CloseWindow
 
EndIf
For learn about splashscreen, you have several code who talk about it
Just use the search option of this forum :wink: