====== jForm ====== The [[https://api.comfiletech.com/csharp/api/ComfileTech.jControls.jForm.html|jForm]] control is analogous to the .NET Framework's [[https://learn.microsoft.com/en-us/dotnet/api/system.windows.forms.form|Form]], but has a much more rich appearance, an serves as the primary [[jcontrols:hosting_jcontrols:index|host]] (i.e. container) for all other jControls. ===== Creating a New jForm ===== A new ''jForm'' is created when [[jcontrols:new_project:index|creating a new project]] or by using Visual Studio's //Add// --> //New Item// menu to open the //Add New Item// dialog. {{ https://downloads.comfiletech.com/jControls/videos/new_form.webm?1335x566 |}} jControls can then be dragged and dropped from the toolbox exactly as can be done with any other Winforms controls. {{ https://downloads.comfiletech.com/jControls/videos/empty_demo.mp4?900x641 }} ===== Fill Property ===== The Fill property can be used to set the background appearance using solid colors, and 2-color gradients. It is described in detail at [[jcontrols_nf4:fills_and_borders:index|Fills and Borders]]. |{{ .:jformfill.png?nolink&500 |}}|{{ .:jformfillproperties.png?nolink |}}| ===== Hiding the Mouse Cursor ===== On touch screens, it is often desirable to not display a mouse cursor. WinForms has a ''Cursor.Hide'' method, but it is not cross-platform and has the side effect of keeping the mouse cursor hidden even after the application has exited. To workaround those limitations, jControls has an Invisible cursor which you can use to hide the mouse cursor at runtime. You may want to show the mouse cursor during development on your Windows PC, but then hide the mouse cursor on your target Linux machine. To do that, use the following code: // Hide the mouse cursor at runtime on Linux if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) { Cursor = ComfileTech.jControls.Cursors.Invisible; }