Visit our new web pagesWe have launched a new extended set of web pages at www.alvechurchdata.co.uk. These old pages will stay on the server because people still have links to them but they will not be updated. The new version of this page is at www.alvechurchdata.co.uk/hints-and-tips/foxbuildproj.html. |
||
Home About us Development Training Support |
A button to build a projectThe Visual FoxPro desktop is an object itself and is represented by the _screen keyword. It has properties such as _screen.backcolor and _screen.caption to alter its appearance but you can also treat the desktop as a container and add objects to it. A button on the desktop can be a very useful shortcut:
The code below puts a button on the desktop and binds its Click event to code that will build the executable.
Public oHandler
*-- We don't want to see progress reports as the *-- button object is created. Set Talk Off oHandler = Newobject ("ClickHandler") With _Screen .AddObject ('cmdBuild', 'commandbutton') Bindevent (_Screen.cmdBuild,"Click",oHandler,"Build") With .cmdBuild *-- Set the appearance of the button first ... .Caption = "Build" .Top = 10 .Left = 10 .Height = 27 *-- ... then make it visible. .Visible = .T. Endwith Endwith Set Talk On Return *---------------------------------------- Define Class ClickHandler As Session Procedure Build Build Exe webadmin.exe From webadmin Recompile Return Enddefine The button saves the four or five mouse-clicks needed to build an executable from the Project Manager. It might not save much time on a single build but the savings build up during the day. Use the startup technique described here to add this button as Visual FoxPro loads. Back to FoxPro Developers' page |
Hints & tips
The textbox class in Visual FoxPro 9 has a new Autocomplete
property which shows the user the previous values that have
been entered in that textbox.
More...
|