Is the question how do I change the user's "wallpaper"? If so the answer is - you shouldn't! Windows settings should be up to the user - whether it's Wallpaper, colors, font sizes, screen resolution, etc. - your application should adapt.
If it's how do I add an image to my VFP application window, then this code works for me:
Sorry for not been especific. I'm working on a image viewer and I want to have the option "full screen" I mean, to show an image that use the entire screen,without task bar nor tittle bar or anything but the image itself. ¿It`s it possible?
Create a new form and set the non default properties to be:-
WITH THIS
[tab].AlwaysOnTop = .T.
[tab].Borderstyle = 0
[tab].ShowWindow = 2
[tab].Titlebar = 0
[tab].WindowState = 2
ENDW
Add an .Image control, size and position are immaterial.
In the .Init event of the form put:-
WITH THIS
[tab].Image1.Left = 0
[tab].Image1.Height = .Height
[tab].Image1.Top = 0
[tab].Image1.Width = .Width
[tab].Image1.Stretch = 1
[tab].Image1.Picture = [C:\Images\Image1.jpg]
ENDW
In the .Click event of .Image1 put:-
WITH THISFORM
[tab].Visible = .F.
[tab].Release()
ENDW
You will need to pass [C:\Images\Image1.jpg] as a parameter to the form and change the .Image1.Picture property accordingly.
Clicking on the .Image control will release the form.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.