Add Background Image to VFP desktop

The code below shows how to add a background image to the VFP desktop using the VFP Image control.

This is sample code. Add error handling and adjust to your requirements as necessary.

lcImage = "Whatever.jpg"
&& Center Image
lcBgType = "CENTER"
&& Stretch image
&&lcBgType = "STRETCH"
&& Stretch image while maintaining its original proportions
&&lcBgType = "ISOMETRIC"
 
IF NOT PEMSTATUS(_Screen, "oImg", 5)
	_Screen.AddObject("oImg", "Image")
ENDIF
 
WITH _Screen.oImg
	.Visible = .F.
	.Stretch = 0
	.Picture = lcImage 
	DO CASE
	CASE lcBgType == "STRETCH"
		.Top     = 0
		.Left    = 0
		.Stretch = 2
		.Height	 = _Screen.Height
		.Width	 = _Screen.Width
	CASE lcBgType == "ISOMETRIC"
		.Stretch = 1
		.Height	 = _Screen.Height
		.Width	 = _Screen.Width
		.Top  = (_Screen.Height - .Height) / 2
		.Left = (_Screen.Width - .Width) / 2
	CASE lcBgType == "CENTER"
		.Stretch = 0
		.Top  = (_Screen.Height - .Height) / 2
		.Left = (_Screen.Width - .Width) / 2
	OTHERWISE	
		.Top  = 0
		.Left = 0
		.Stretch = 0
	ENDCASE
	.Visible = .T.
ENDWITH

An image has a .jpg file as the picture. How can this picture be put into window's clipboard so it can be pasted to other applications.

Try GDI+ image class Download #18584 It has ToClipboard() method.

You may also check GdiPlusX library from VFPx

Is it possible to use a HTML-file as the VFP-background ?

I would like to create a different background (based on text) every time i start my application...

Calvin Hsia shows how to put Web Browser control on VFP desktopp at http://blogs.msdn.com/calvin_hsia/archive/2004/08/20/217915.aspx
Basicly, you create AlwaysOnBottom form with Web Browser control on it and use BindEvent() to bind to Screen.Resize() to make sure that it covers VFP desktop if it ever resized.