내가 이 vb.net에 VB6에서 사용자 정의 컨트롤을 업그레이드하고이 포함 된 사용자 정의 컨트롤을로드합니다.
vb6 응용 프로그램에서 레이블 컨트롤 배열을 사용하여 3000 개의 레이블을로드하고 있습니다.
vb.net에서 동일한 작업을하고 있지만로드하는 데 너무 많은 시간이 걸립니다.
vb6에서는 1 ~ 2 초가 소요되지만 vb.net에서는 30 ~ 40 초가 소요됩니다.
무엇이 문제입니까? 같은 작업을 위해 vb.net에서 너무 많은 시간이 걸리는 이유는 무엇입니까?vb.net는 레이블 컨트롤 배열
코드는 아래와 같습니다 여기 Led
는 레이블 컨트롤의 배열입니다.
For l = 1 To 3000
Led.Load(ledCounter)
ColLed.Add(Led(ledCounter))
Led(ledCounter).BackColor = System.Drawing.ColorTranslator.FromOle(LedColor)
Led(ledCounter).Top = VB6.TwipsToPixelsY(15)
Led(ledCounter).Left = VB6.TwipsToPixelsX(15)
Led(ledCounter).Height = VB6.TwipsToPixelsY(LedHeight)
Led(ledCounter).Width = VB6.TwipsToPixelsX(LedWidth)
Led(ledCounter).BorderStyle = Windows.Forms.BorderStyle.None
Led(ledCounter).BackColor = System.Drawing.ColorTranslator.FromOle(LedColor)
Led(ledCounter).Visible = True
Next
그러면 3000 개의 라벨이 필요한 이유는 무엇입니까? –