Used LoadImage to make SplashScr but no work

Just starting out? Need help? Post your questions and find answers here.
Hot Pockets
User
User
Posts: 51
Joined: Mon Jun 01, 2009 3:56 am

Used LoadImage to make SplashScr but no work

Post 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
User avatar
Kwai chang caine
Always Here
Always Here
Posts: 5530
Joined: Sun Nov 05, 2006 11:42 pm
Location: Lyon - France

Re: Used LoadImage to make SplashScr but no work

Post 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:
ImageThe happiness is a road...
Not a destination
Post Reply