gui graphic
BlitzPlus Forums/BlitzPlus Beginners Area/gui graphic
| ||
I will probably get shot down for this, but...... is it possible to use a picture with a gui? ie to have a graphic sitting on or in the interface? |
| ||
Didn't test, but I estimate it should just work..window=CreateWindow("window",0,0,640,480) canvas=CreateCanvas(0,0,640,480,window) image=LoadImage("c:\image.jpg") SetBuffer CanvasBuffer(canvas) DrawImage image,0,0 FlipCanvas canvas Repeat WaitEvent() If EventID()=$803 End Forever So, the bottomline: draw an image onto a canvas! |
| ||
Actually, I have a question on this topic: Is it possible to change the appearance of standard windows buttons? I.E., could I make an "OK" button, that was an official BUTTON gadget, from an external image? Also, is it possible to change the appearance of the minimize/maximize/close buttons on the title bar? |
| ||
I'm not sure drawing the image works I tried your program and after changing loadimage("C:\image.bmp") to one of my own images it said invalid "image handle" |
| ||
Can't test here atm, I'm remote only carrying my notebook with BMax on it. |
| ||
CS_TBL's code works fine. Make sure you copy the image into the folder where you are running the test code, or use the "full path and file name" for the image you are loading. |
| ||
ye olde imageloader with check:Function LoadImage2(file$) image=LoadImage(file$) If Not image RuntimeError "Image "+file$+" not found." Return image End Function |
| ||
Try this: http://www.f-once.pri.ee/temp/gui.rar It needs API decls in your blitz+! Screenshot: ![]() |