PROGRAMMING HELP | 2017/10/05 02:27
To prevent users from entering incorrect data in Windows form application, set restriction to allow only specific characters to be entered in the text box.This example uses KeyPress event to monitor the users input and to apply the restriction required.To avoid code duplication in Windows multiform applications for example, a separate class file is created “CommonFunctions.cs”.
The function to allow only numbers in textbox control is named InputNumbers.
For each Windows form, create a single KeyPress event and call the InputNumbers function inside it.
PROGRAMMING HELP | 2017/10/05 02:07
public partial class Form1 : Form // this is the main form public partial class Form2 : Form // this is the second formTo pass variables (values, data) from Form1 to Form2
Case: public variables in Form2
public string input_variable; // put this in Form2 as global variable public string output_variable; // put this in Form2 as global variable
in Form1 inside the function that run (call) Form2
PROGRAMMING HELP | 2017/10/05 01:56
Coordinates in C#The value of x is the location of the point along the x-axis, the 0 is at the extreme left. The value of y is the location of the point along the y-axis, the 0 is at the extreme top.
PROGRAMMING HELP | 2017/10/05 00:51
The creation of custom control using Visual Studio involves the following steps:
- Start Visual Studio;
- Create new “Windows Control Library” project;
- In the created project delete “User Control” file;
- Go to “Project” > “Add User Control” and give it a name;
- Change the inherited class to this that you want your control to be;
- Create you custom properties for the control;
PROGRAMMING HELP | 2017/10/05 00:37
3) In the “Choose Toolbox Items” window click on the “Browse…” button.Navigate to the location where your Dynamic Link Library (DLL) file is.Click “OK”. Now your custom control is included into the Visual Studio toolbox.
PROGRAMMING HELP | 2015/11/19 10:16
CAD/CAM | 2011/10/16 21:35
Some simple SQL queries that can help new users start faster.
Applicable to: SmartPlant 3D , SmartMarine 3D and Smart 3D design systems.
Create equipment list including equimpment description. The information is stored in two different tables in projects' (plants' ) database - XXXX_MDB. The table view JNamedItem contain all items names and their IDs - oid. The equipment data is read from JEquipment. Table view JEquipment has information for the equipment ID but not for its name.
CAD/CAM | 2011/10/16 21:15
The scope of this document is to provide a simplified comparison based on PDMS Draft and Tribon Drafting.
The purpose of this document is to give an overview of two 3D- drafting systems and underline the differences between them.
TUTORIALS | 2017/10/05 05:45
CompilationWhen compiling, VS.NET automatically creates the required assemblies and resource files.