Click here to Skip to main content
15,912,504 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionReading listboxes: Pin
mlesh21-Oct-05 21:39
mlesh21-Oct-05 21:39 
AnswerRe: Reading listboxes: Pin
Greeky23-Oct-05 20:46
Greeky23-Oct-05 20:46 
GeneralRe: Reading listboxes: Pin
mlesh23-Oct-05 21:12
mlesh23-Oct-05 21:12 
GeneralRe: Reading listboxes: Pin
Greeky23-Oct-05 21:31
Greeky23-Oct-05 21:31 
GeneralRe: Reading listboxes: Pin
Greeky23-Oct-05 21:32
Greeky23-Oct-05 21:32 
QuestionHighlight individual item within Combobox Pin
camelsaq21-Oct-05 15:25
camelsaq21-Oct-05 15:25 
AnswerRe: Highlight individual item within Combobox Pin
Greeky23-Oct-05 21:19
Greeky23-Oct-05 21:19 
QuestionTableLayoutPanel in VB.Net 2005 Pin
watagal21-Oct-05 13:28
watagal21-Oct-05 13:28 
I am trying to add a TableLayoutPanel (programatically). Here's what I have so far:
Private Sub drawTableLayoutPanel()
        Dim iColumns As Integer = uxColumnsTbar.Maximum  ' Horizontal Trackbar
        Dim iRows As Integer = uxRowsTbar.Maximum        ' Vertical Trackbar
'
        Dim oTLP As New TableLayoutPanel
        oTLP.Location = New Point(0, 0)
        oTLP.Size = New Size(500, 200)
        oTLP.AutoScroll = True
        oTLP.AutoSizeMode = Windows.Forms.AutoSizeMode.GrowAndShrink
        oTLP.GrowStyle = TableLayoutPanelGrowStyle.AddRows
        oTLP.CellBorderStyle = TableLayoutPanelCellBorderStyle.Inset
        '
        oTLP.ColumnCount = iColumns
        For c As Integer = 0 To (iColumns - 1)
            oTLP.ColumnStyles(c).SizeType = SizeType.Absolute  ' Errors HERE with c=0
            oTLP.ColumnStyles(c).Width = (1 / iColumns)
        Next
        '
        oTLP.RowCount = iRows
        For r As Integer = 0 To (iRows - 1)
            oTLP.RowStyles(r).SizeType = SizeType.Absolute
            oTLP.RowStyles(r).Height = (1 / iRows)
        Next
        '
        oTLP.Update()
    End Sub

The error I get is:
System.ArgumentOutOfRangeException was unhandled
  Message="Index was out of range. Must be non-negative and less than the size of the collection.  Parameter name: index"

Which collection are they referring to? iColumns=6 and iRows=4 - this has been verified.

Thanks,
Karen

Nooobie to OOP and VB.Net 2005
AnswerRe: TableLayoutPanel in VB.Net 2005 Pin
Dave Kreskowiak23-Oct-05 6:39
mveDave Kreskowiak23-Oct-05 6:39 
AnswerRe: TableLayoutPanel in VB.Net 2005 Pin
watagal24-Oct-05 8:11
watagal24-Oct-05 8:11 
QuestionMinimum Permission? Pin
Richard_Wolf21-Oct-05 9:31
Richard_Wolf21-Oct-05 9:31 
Questionvb. net Pin
rejefaso21-Oct-05 6:58
sussrejefaso21-Oct-05 6:58 
AnswerRe: vb. net Pin
Richard_Wolf21-Oct-05 9:35
Richard_Wolf21-Oct-05 9:35 
AnswerRe: vb. net Pin
watagal21-Oct-05 14:03
watagal21-Oct-05 14:03 
QuestionHow do add dates in a combobox Pin
mlesh21-Oct-05 6:00
mlesh21-Oct-05 6:00 
AnswerRe: How do add dates in a combobox Pin
Richard_Wolf21-Oct-05 9:28
Richard_Wolf21-Oct-05 9:28 
GeneralRe: How do add dates in a combobox Pin
mlesh21-Oct-05 21:27
mlesh21-Oct-05 21:27 
AnswerRe: How do add dates in a combobox Pin
dundealing23-Oct-05 7:44
dundealing23-Oct-05 7:44 
AnswerRe: How do add dates in a combobox Pin
Greeky23-Oct-05 21:08
Greeky23-Oct-05 21:08 
QuestionHow to find MAC address Pin
Darryl Borden21-Oct-05 5:40
Darryl Borden21-Oct-05 5:40 
AnswerRe: How to find MAC address Pin
Richard_Wolf21-Oct-05 9:37
Richard_Wolf21-Oct-05 9:37 
GeneralRe: How to find MAC address Pin
abhinish21-Oct-05 22:06
abhinish21-Oct-05 22:06 
QuestionDetection Problems Pin
Anonymous21-Oct-05 4:34
Anonymous21-Oct-05 4:34 
Questionhow to store values from database into array Pin
sai_sailendra21-Oct-05 1:46
sai_sailendra21-Oct-05 1:46 
AnswerRe: how to store values from database into array Pin
KaptinKrunch21-Oct-05 2:55
KaptinKrunch21-Oct-05 2:55 

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.