SftTree/DLL 7.5 - Tree Control
SftBox/OCX 5.0 - Combo Box Control
SftButton/OCX 3.0 - Button Control
SftMask/OCX 7.0 - Masked Edit Control
SftTabs/OCX 6.5 - Tab Control (VB6 only)
SftTree/OCX 7.5 - Tree Control
SftPrintPreview/DLL 2.0 - Print Preview Control (discontinued)
SftTree/DLL 7.5 - Tree Control
SftBox/OCX 5.0 - Combo Box Control
SftButton/OCX 3.0 - Button Control
SftDirectory 3.5 - File/Folder Control (discontinued)
SftMask/OCX 7.0 - Masked Edit Control
SftOptions 1.0 - Registry/INI Control (discontinued)
SftPrintPreview/OCX 1.0 - Print Preview Control (discontinued)
SftTabs/OCX 6.5 - Tab Control (VB6 only)
SftTree/OCX 7.5 - Tree Control
SftTabs/NET 6.0 - Tab Control (discontinued)
SftTree/NET 2.0 - Tree Control
This sample illustrates various Masked Edit controls.
The source code is located at C:\Program Files (x86)\Softelvdm\SftMask OCX 7.0\Samples\Visual Studio - CSharp\Sample1\Form1.cs or C:\Program Files\Softelvdm\SftMask OCX 7.0\Samples\Visual Studio - CSharp\Sample1\Form1.cs (on 32-bit Windows versions).
private void Form1_Load(object sender, System.EventArgs e)
{
SftMaskPhone.Text = "9415058600"; // our phone number
SftMaskPhone.EntrySelect = SftMaskEntrySelectConstants.entrySftMaskSelectHome; // set the input location
SftMaskSSN.Text = "444-12-1111"; // a social security number
SftMaskToday.Contents.DateTime = System.DateTime.Now; // set today's date
SftMaskTime.Contents.DateTime = System.DateTime.Now;
SftMaskPercent.Contents.set_Value(0, 50); // start with 50 percent
SftMaskAmount.Text = "199";
SftMaskIPAddr.Text = "209.61.201.49";
}
private void Command1_Click(object sender, System.EventArgs e)
{
Application.Exit();
}
private void SftMaskAmount_UpDownPress(object sender, AxSftMaskLib70._ISftMaskEvents_UpDownPressEvent e)
{
double amount;
double increment;
if (e.counter == 0 || e.counter > 5) {
amount = Convert.ToDouble(e.field);
increment = 0.01;
if (e.counter > 14) increment = 0.1;
if (e.counter > 23) increment = 1;
if (e.counter > 52) increment = 10;
if (e.up)
amount = amount + increment;
else
amount = amount - increment;
if (amount > 99999.99) amount = 99999.99;
if (amount < -99999.99) amount = -99999.99;
e.field = amount.ToString("N2");
}
}