Search This Blog

Showing posts with label image. Show all posts
Showing posts with label image. Show all posts

Changing Image or Picture of a Button

You can definitely change the picture of your bitton upon clicking, try these codes and play with the images. But first you have to prepare the image in JPEG.

IF THIS.Picture = "c:\images\edit.jpg"
THIS.Picture = "c:\images\save.jpg"
THISFORM.cmdClose.Picture = "c:\images\cancel.jpg"
ELSE
IF THISFORM.Combo1.Value = 'PESO'
lAnswer = MESSAGEBOX("Save changes?", 4, "Confirmation")
IF lAnswer = 6
THISFORM.cmdClose.Picture = "c:\images\close.jpg"
THISFORM.cmdEdit.Picture = "c:\images\edit.jpg"
ENDIF
ELSE THISFORM.COMBO1.Value = 'DOLLAR'
lAnswer = MESSAGEBOX("Save changes?", 4, "Confirmation")
IF lAnswer = 6
THISFORM.cmdClose.Picture = "c:\images\close.jpg"
THISFORM.cmdEdit.Picture = "c:\images\edit.jpg"
ENDIF
ENDIF
ENDIF

Add Image on FoxPro Background

Are you bored on all white background of your FoxPro Program? Now you can pick or put a background image on your program. Just include this line of code on your main program and specify the locatin of the image.

_screen.picture = "C:\GenLed\Images\background.bmp"