vb.net - Cant create 2nd textbox -


I have problems with this code and I do not know why it works properly for the first time but together Accidents "Parameters are not valid" error on this line 2 times through:

  Dim TBX text box = New Windows.Forms.TextBox  
< P> The full code is as follows:

  Dim TBX text box = New Windows.Forms.TextBox tbx.Name = tbxName tbx.Size = As New System.Drawing. Size (as 55, 12) tbx.BorderStyle = BorderStyle.None tbx.TextAlign = HorizontalAlignment.Center font = tbx.Font tbx.Font = new Font (f.FontFamily, 8, FontStyle.Bold) tbx.Location end use select using f = new System.Drawing.Point (xCords, 44) Case tbx.Name episode "tbxBulk01": tbx.Text = Bulk01Label episode "tbxBulk02": tbx.Text = Bulk02Label end select Me.Controls. Add (TBX)  

here is the stack trace:

System.Drawing.Font.GetHeight (graphics) on System.Drawing.Font.GetHeight ( ) On System.Drawing on. System.Windows.Forms.Control.get_FontHeight (Font.get_Hyight (on System.Windows.Forms.Te on)) xtBoxBase.get_PreferredHeight () (on System.Windows.Forms.TextBoxBase.get_DefaultSize) System.Windows on System.Windows. On Forms.TextBoxBase..ctor, on System.Windows.Forms.Control..ctor (Boolean autoInstallSyncContext) (). Form. Textbox..text ()

Any help is appreciated.

I know this is an old question but my answer is.

I

is using .... Finally the usage section too.

I have just read that even in the feedback, oh well, no problem.

  Public class form 1 private all form 1_load (Sub-sender as a system, Object in the form of system, e-agent in the form of system). MyBase.Load Dim xCoords As Integer = 80 Dim myTextBox as textbox 2 myTextBox = index = 1 = index new text box myTextBox.Name = "MyTextBox" & amp; Index.ToString myTextBox.Size = New System Dropping Sizes (55, 12) myTextBox.BorderStyle = BorderStyle.None myTextBox.TextAlign = HorizontalAlignment.Center myTextBox.Font = new Prnalikdaulingkfont (myTextBox.Font.FontFamily, 8, FontStyle.Bold) myTextBox.Location = new system. Drawing Select Point Index (xCoords, 44) Case Index Episode 1: myTextBox.Text = "Bulk01Label" Episode 2: myTextBox.Text = "Bulk02Label" End Choose Me Control . Add (MyTextbox) Next End Sub End Class  

Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -