Blogs

Move Form without Titlebar

The code below shows how a form without titlebar can be moved with a mouse. It uses ReleaseCapture and SendMessage Windows API functions and based on How to Move a Form that Has No Titlebar or Caption.

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

PUBLIC oform1
 
oForm1 = NEWOBJECT("form1")
oForm1.Show()
RETURN
 
DEFINE CLASS form1 AS form
 
	Autocenter = .T.
	Height = 250
	Width = 375

Loading XML into a WEB Browser Control from Variable

The code below uses default Internet Explorer XSLT to convert XML into HTML.

How to pass parameters to VFP EXE

Passing command-line parameters from Windows to VFP created EXE is different from passing parameters to VFP programs or functions in VFP application:

  • All parameters are passed to EXE as strings
  • Parameters should not be enclosed in single quotes because quotes will be treated as part of parameter
  • Parameters with spaces can be enclosed in double quotes
  • Parameters are separated by spaces not commas

Fit to Page in Excel and Word

File date and time

Code below shows how to retrieve file date and time using native VFP commands or WSH. For Windows API based solution that also allows to set file date and time, see George Tasker's Windows Time hosted on UT

MSDN links:

Enumerating Windows on Taskbar

Syndicate content