Saturday, 6 August 2011

(Dot net factory) Now we are having a form having textbox ,button and what ever the value we will give in the text box will display in the msgbox


Set Form = DotNetFactory.CreateInstance("System.Windows.Forms.Form", "System.Windows.Forms")
Set Text = DotNetFactory.CreateInstance("System.Windows.Forms.TextBox", "System.Windows.Forms")
Set Button = DotNetFactory.CreateInstance("System.Windows.Forms.Button", "System.Windows.Forms")
Set Pos = DotNetFactory.CreateInstance("System.Drawing.Point","System.Drawing",x,y)
Pos.X = 90
Pos.Y = 100
Text.Location = Pos
Text.Width = 100
Pos.X = 100
Pos.Y = 130
Button.Location = Pos
Button.Text = "Close"
Form.Controls.Add Text
Form.Controls.Add Button
Form.CancelButton = Button
Form.ShowDialog
Msgbox Text.Text
Set Text = Nothing
Set Button = Nothing
Set Pos = Nothing
Set Form = Nothing

Msgbox display will be


No comments:

Post a Comment