Click here to Skip to main content
15,898,036 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionTableLayoutPanel Pin
JR21219-Dec-10 3:18
JR21219-Dec-10 3:18 
AnswerRe: TableLayoutPanel Pin
Dave Kreskowiak19-Dec-10 4:28
mveDave Kreskowiak19-Dec-10 4:28 
GeneralRe: TableLayoutPanel Pin
JR21219-Dec-10 7:48
JR21219-Dec-10 7:48 
AnswerRe: TableLayoutPanel Pin
Luc Pattyn19-Dec-10 4:38
sitebuilderLuc Pattyn19-Dec-10 4:38 
GeneralRe: TableLayoutPanel Pin
JR21219-Dec-10 7:47
JR21219-Dec-10 7:47 
AnswerRe: TableLayoutPanel Pin
Alan N19-Dec-10 23:55
Alan N19-Dec-10 23:55 
GeneralRe: TableLayoutPanel Pin
JR21220-Dec-10 23:40
JR21220-Dec-10 23:40 
QuestionSpeeding up creating controls Pin
JR21219-Dec-10 0:04
JR21219-Dec-10 0:04 
Hi,

I wrote a competition program. It need a lot of controls that the program create at runtime.
For 10 players it is 10*10=100. That works fast enough but when it is for 50 players 50*50=2500 it is slow.

Any idees of fasting it up.

here is some of the code:
For n As Integer = 1 To nAantalSpelers
  For m As Integer = 1 To nAantalSpelers
    P(n, m) = New TextBox
    With P(n, m)
      .Height = nAfstand
      .Name = Format(n, "0000") & "_" & Format(m, "0000")
      .CharacterCasing = CharacterCasing.Upper
      .MaxLength = 1
      .Visible = True
      .Tag = Convert.ToString(n) & "_" & m.ToString("000")
    End With
    Me.pPunten.Controls.Add(P(n, m))
    AddHandler P(n, m).MouseDown, AddressOf Punten_MouseDown
    AddHandler P(n, m).LostFocus, AddressOf Punten_LostFocus
    AddHandler P(n, m).GotFocus, AddressOf Punten_GotFocus
    AddHandler P(n, m).TextChanged, AddressOf Punten_Change
    AddHandler P(n, m).KeyPress, AddressOf Punten_KeyPress
    AddHandler P(n, m).KeyDown, AddressOf Punten_KeyDown
  Next
Next

There are also 1 aditional Textbox,1 UserControl(vertLabel) and 6 other labels for each player.

Each type of these controls are on differant panels. and these 4 panels are on a tablelayoutcontrol

I'm thinking of changing it all into a grid but that have to wait!


Jan
AnswerRe: Speeding up creating controls Pin
Eddy Vluggen19-Dec-10 0:54
professionalEddy Vluggen19-Dec-10 0:54 
GeneralRe: Speeding up creating controls Pin
JR21219-Dec-10 3:04
JR21219-Dec-10 3:04 
AnswerRe: Speeding up creating controls Pin
Luc Pattyn19-Dec-10 2:36
sitebuilderLuc Pattyn19-Dec-10 2:36 
GeneralRe: Speeding up creating controls Pin
JR21219-Dec-10 3:03
JR21219-Dec-10 3:03 
AnswerRe: Speeding up creating controls Pin
Luc Pattyn19-Dec-10 3:09
sitebuilderLuc Pattyn19-Dec-10 3:09 
GeneralRe: Speeding up creating controls Pin
JR21220-Dec-10 23:47
JR21220-Dec-10 23:47 
QuestionProblem with Binding a database to a datagridview Pin
crain198118-Dec-10 12:13
crain198118-Dec-10 12:13 
AnswerRe: Problem with Binding a database to a datagridview Pin
crain198118-Dec-10 13:04
crain198118-Dec-10 13:04 
AnswerRe: Problem with Binding a database to a datagridview Pin
crain198119-Dec-10 11:25
crain198119-Dec-10 11:25 
QuestionMSChart on Win 7 64 bits ? Pin
gbessis18-Dec-10 6:43
professionalgbessis18-Dec-10 6:43 
AnswerRe: MSChart on Win 7 64 bits ? Pin
Dave Kreskowiak18-Dec-10 15:34
mveDave Kreskowiak18-Dec-10 15:34 
QuestionWhat is the equivalent code in vb? [modified] Pin
Milad.Biroonvand17-Dec-10 21:57
Milad.Biroonvand17-Dec-10 21:57 
AnswerRe: What is the equivalent code in vb? Pin
Eddy Vluggen18-Dec-10 0:15
professionalEddy Vluggen18-Dec-10 0:15 
GeneralRe: What is the equivalent code in vb? Pin
Milad.Biroonvand18-Dec-10 1:43
Milad.Biroonvand18-Dec-10 1:43 
GeneralRe: What is the equivalent code in vb? Pin
Eddy Vluggen18-Dec-10 11:44
professionalEddy Vluggen18-Dec-10 11:44 
GeneralRe: What is the equivalent code in vb? Pin
Milad.Biroonvand18-Dec-10 2:14
Milad.Biroonvand18-Dec-10 2:14 
QuestionNeed help loading a background image from the registry Pin
Garrett Crawford17-Dec-10 18:18
Garrett Crawford17-Dec-10 18:18 

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.