Overview
  Next

I think that B4PPC could be useful on the desktop as well as on the device as a simpler and cheaper, albeit lower performance, development environment than Visual Studio or SharpDevelop. I owe a debt to Dimitris Zacharakis who provided his dzForm object in his zHWdesktop library and sparked my interest in providing something more complete.

I have taken that as inspiration and implemented a FormExDesktop library to make Basic4PPC more usable on the desktop. I have given an extended form the ability to "inherit" a normal Basic4PPC form so that the IDE can be used to lay out forms and menus. It is modeled as far as possible on the Form control in Basic4PPC with extra properties and methods appropriate for a desktop application. Using this library, together with my RichTextDesktop printer formatting library, should greatly increase the quality and capability of Basic4PPC desktop applications.

All the background Form drawing methods except GetPixel have been implemented. The names have had to be prefixed as the original names get special treatment in Basic4PPC so that methods that have the same names are not invoked in a library. Because, unlike Basic4PPC, drawings on an extended form are not persistent a Paint event has been provided. Drawing commands should be placed in this event if the drawings are required to persist after resizing. Experiment will indicate where this is going to be necessary.

This form can be used with both the ControlsEx and Formlib libraries with one important caveat. Do NOT attach a Formlib object to one of these forms. This is because a Formlib object expects to be associated with a Basic4PPC form and does some drawing command related things on a window resize that are not compatible with a normal Windows form. You lose nothing by not being able to do this as a more complete set of resizing events is available in this library. If you need a Formlib object place it on a Basic4PPC donor form. I would expect all present and future libraries to be usable alongside this library.

In Basic4PPC a function that expects a Control object can receive a string (or any expression that evaluates to a string) with the name of a Basic4ppc control (Basic4ppc will convert it to the required reference) or a Control object (which can only come from an external library). Using this fact controls can be added to an extended form at runtime. Basic4PPC controls may be added to a donor form and then transferred to an extended form by the forms' AddControl("namestring") method. Controls from the ControlsEx, or other control libraries, can be added by specifiying the extended forms' ControlRef property -  ThisForm.ControlRef - rather than a string "Formname" in the controls' New constructor.

You will notice the reference to commercial use in the string returned from the About property. While I freely give permission, and indeed encourage, use of this library for personal non-profit use I feel that it is reasonable to prohibit its' use in any non-personal or commercial application without previous discussion with myself as to the conditions under which it may be used. I hope that the reasons for this are obvious as a substantial amount of my time and a lot of effort has gone into producing and testing this library, its' helpfile and the accompanying demonstration program.

This help file documents version 1.4 of FormExDesktop.dll

Andrew Graham

[email protected]