TForm - Usage tutorial
Working with TForm
The first thing we’re going to do with the created project is to substitute the form that Visual Studio created for us (Form1) with TForm which is also part of TransparentControls (although it did not appear in the toolbox which is correct).
- Right-click the Form1.cs in solution explorer and select Delete from the context menu that appeared.
- Right-click the project in solution explorer and choose Add->Windows Form… from the context menu that appeared.
- Add New Item dialog box appeared. Choose “Windows Forms” from categories on the left and “Inherited Form” from Templates on the right and click Add button:
- Inheritence Picker dialog box appears. Just click on “Browse” button and browse to the folder you installed Bee Mobile iPack into (by default: c:\program files (x86)\Bee Mobile\iPack\). Navigate to either ‘Bee Mobile Controls CF20′ or ‘Bee Mobile Controls CF35′ folder (depending on which platform you chose to develop for, in our case CF35) and double click the “BeeMobile.TransparentControls.CF3.dll” file (or “BeeMobile.TransparentControls.CF2.dll” if you chose to develop for .NET CF 2.0).
- The inheritance picker now contains the “TForm” componet:
Click on it and then click OK.
The TForm should now be added to solution explorer. Its name is Form1 (make sure that its name is Form1 or else you would have to edit the Program.cs file so that it loads your TForm instance at application’s start-up). At first the TForm looks exactly as the standard form. However, if you display its properties (right-click the form in the designer and choose properties) you will find out that it contains a property called “BackgroundImage” found in Appearance category:
As the name suggests it is used to set a background image for the form. Let’s set the following image as background:
Change the “Menu” property of TForm to (none) and “WindowState” property to Maximized. Now the upper and lower stripes of the form disappeared and the image can take the advantage of the whole display.
This concludes the tutorial on TransparentControls. You are welcome to leave us a feedback by writing to: firstname.lastname@example.org. Thank you.