Since this is the very first article in this blog, we would like to start it with well known
masking input value technique using Dot Net Factory.
Code
Dim oForm, oTextBox, oCloseButton, oPoint, inX, inY
Set oForm=DotNetFactory.CreateInstance("System.Windows.Forms.Form","System.Windows.Forms")
Set oTextBox=DotNetFactory.CreateInstance("System.Windows.Forms.TextBox","System.Windows.Forms")
Set oCloseButton = DotNetFactory.CreateInstance("System.Windows.Forms.Button", "System.Windows.Forms")
Set oPoint = DotNetFactory.CreateInstance("System.Drawing.Point", "System.Drawing", inX,inY)
With oPoint
.X=180
.Y=33
End with
With oCloseButton
.Location = oPoint
.Text = "Close"
End with
With oPoint
.X=10
.Y=35
End with
With oTextBox
.Location = oPoint
.Width=160
.UseSystemPasswordChar=True
End with
With oForm
.Height=120
.width=275
.text="Masked Inputbox"
.CancelButton = oCloseButton
.Controls.Add oCloseButton
.Controls.Add oTextBox
.MaximizeBox=False
.MinimizeBox=False
End with
oForm.ShowDialog
Msgbox oTextBox.Text
Set oForm=Nothing
Set oTextBox=Nothing
Set oCloseButton=Nothing
Set oPoint=Nothing
Synopsis
After executing the above code, you will get Input Dialog as shown below. Enter value in the textbox control and click on Close button.
Comments(0)