Click here to Skip to main content
15,925,399 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Quicktime & VB.Net! Pin
Dave Kreskowiak10-Dec-07 2:10
mveDave Kreskowiak10-Dec-07 2:10 
Generaltext file Pin
bapu28898-Dec-07 8:16
bapu28898-Dec-07 8:16 
GeneralRe: text file Pin
Christian Graus8-Dec-07 9:21
protectorChristian Graus8-Dec-07 9:21 
GeneralMPEG encryption Pin
zeeshi_247-Dec-07 23:31
zeeshi_247-Dec-07 23:31 
GeneralRe: MPEG encryption Pin
Christian Graus7-Dec-07 23:46
protectorChristian Graus7-Dec-07 23:46 
GeneralAbout TabPane Pin
Meenge7-Dec-07 23:02
Meenge7-Dec-07 23:02 
GeneralRe: About TabPane Pin
pmarfleet7-Dec-07 23:43
pmarfleet7-Dec-07 23:43 
GeneralRe: About TabPane Pin
Paul Conrad9-Dec-07 8:57
professionalPaul Conrad9-Dec-07 8:57 
GeneralRe: About TabPane Pin
John_Adams9-Dec-07 23:46
John_Adams9-Dec-07 23:46 
QuestionHow many records afected by this code Pin
Vimalsoft(Pty) Ltd7-Dec-07 22:45
professionalVimalsoft(Pty) Ltd7-Dec-07 22:45 
AnswerRe: How many records afected by this code Pin
pmarfleet7-Dec-07 23:40
pmarfleet7-Dec-07 23:40 
AnswerRe: How many records afected by this code Pin
Vimalsoft(Pty) Ltd8-Dec-07 1:25
professionalVimalsoft(Pty) Ltd8-Dec-07 1:25 
GeneralError handling in TAPI3.0 by vb.net Pin
Sumit Prakash Sharma7-Dec-07 19:56
professionalSumit Prakash Sharma7-Dec-07 19:56 
GeneralRe: Error handling in TAPI3.0 by vb.net Pin
Dave Kreskowiak8-Dec-07 4:18
mveDave Kreskowiak8-Dec-07 4:18 
GeneralRe: Error handling in TAPI3.0 by vb.net Pin
Paul Conrad9-Dec-07 9:00
professionalPaul Conrad9-Dec-07 9:00 
GeneralRe: Error handling in TAPI3.0 by vb.net Pin
Paul Conrad9-Dec-07 8:58
professionalPaul Conrad9-Dec-07 8:58 
Generalfra tab Pin
Meenge7-Dec-07 18:13
Meenge7-Dec-07 18:13 
GeneralRe: fra tab Pin
Ray Cassick7-Dec-07 20:16
Ray Cassick7-Dec-07 20:16 
GeneralRe: fra tab Pin
Meenge7-Dec-07 23:19
Meenge7-Dec-07 23:19 
GeneralRe: fra tab Pin
Christian Graus7-Dec-07 23:46
protectorChristian Graus7-Dec-07 23:46 
GeneralRe: fra tab Pin
Ray Cassick8-Dec-07 7:01
Ray Cassick8-Dec-07 7:01 
GeneralFinding Available DB2 Servers Pin
Bob Bonser7-Dec-07 14:25
Bob Bonser7-Dec-07 14:25 
Generaladding multiple textboxes at runtime Pin
craigmg787-Dec-07 10:32
craigmg787-Dec-07 10:32 
I have found alot online about how to add a control at runtime. Unfortunately, I haven't yet found anything that explains how to add multiple controls at once from one event.

I will post what I tried to use to add three textboxes. When I run it, only the third textbox is visible and I'm not entirely sure if the first two were created. (I'm thinking that they were created but replaced by the latest new textbox.) Anyway below is my code. Thanks to anyone who can see what I am doing wrong here:

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

        Dim NewTB As New TextBox
        Dim TBName As String
        Dim TBindex As Integer = 1

        For TBindex = 1 To 3
           
            TBName = "Textbox" & TBindex
            Me.Controls.Add(NewTB)
            NewTB.Name = TBName
            NewTB.Enabled = True
            NewTB.Visible = True
            NewTB.Height = 20
            NewTB.Width = 100
            NewTB.Top = 130 + ((TBindex - 1) * 25)
            NewTB.Left = 20

        Next TBindex

End Sub


"That rug really tied the room together."

GeneralRe: adding multiple textboxes at runtime Pin
Christian Graus7-Dec-07 10:51
protectorChristian Graus7-Dec-07 10:51 
GeneralRe: adding multiple textboxes at runtime Pin
craigmg787-Dec-07 10:57
craigmg787-Dec-07 10:57 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.