Click here to Skip to main content
15,908,015 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: Can not set the name property of a timer at runtime - VB.NET Pin
Wayne Gaylard3-Feb-10 3:03
professionalWayne Gaylard3-Feb-10 3:03 
AnswerRe: Can not set the name property of a timer at runtime - VB.NET Pin
Dave Kreskowiak3-Feb-10 3:29
mveDave Kreskowiak3-Feb-10 3:29 
GeneralRe: Can not set the name property of a timer at runtime - VB.NET Pin
castingflame3-Feb-10 7:01
castingflame3-Feb-10 7:01 
GeneralRe: Can not set the name property of a timer at runtime - VB.NET Pin
Paul Roseby3-Feb-10 10:25
Paul Roseby3-Feb-10 10:25 
GeneralRe: Can not set the name property of a timer at runtime - VB.NET Pin
Paul Roseby3-Feb-10 10:28
Paul Roseby3-Feb-10 10:28 
QuestionListView: How to link columnheader into subitem Pin
jtpaa2-Feb-10 23:44
jtpaa2-Feb-10 23:44 
AnswerRe: ListView: How to link columnheader into subitem Pin
DaveAuld3-Feb-10 0:41
professionalDaveAuld3-Feb-10 0:41 
AnswerRe: ListView: How to link columnheader into subitem Pin
DaveAuld3-Feb-10 1:06
professionalDaveAuld3-Feb-10 1:06 
Further to my original response, i just did a quick test and can confirm that if you insert a column at the appropriate index, the subitems remain correctly with the columns;

e.g. lv.removeat(2), lv.insert(2, "Col 3")

As a quick demo, create a form, add a listview in details view, add three pushbuttons, drop in the following code and run the app;

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    'Add some columns
    ListView1.Columns.Add("Col 1")
    ListView1.Columns.Add("Col 2")
    ListView1.Columns.Add("Col 3")
    ListView1.Columns.Add("Col 4")

    'Add some test data
    Dim x As New ListViewItem
    x.Text = "1"
    x.SubItems.Add("2")
    x.SubItems.Add("3")
    x.SubItems.Add("4")
    ListView1.Items.Add(x)
End Sub

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
    ListView1.Columns.RemoveAt(2)
End Sub

Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
    ListView1.Columns.Insert(2, "col 3")
End Sub


And you will see the test data remains in the 1,2,3,4 sequence before and after the remove and insert operations.

Dave

Don't forget to vote on messages!
Find Me On: Web|Facebook|Twitter|LinkedIn
Waving? dave.m.auld[at]googlewave.com

GeneralRe: ListView: How to link columnheader into subitem Pin
jtpaa3-Feb-10 1:29
jtpaa3-Feb-10 1:29 
AnswerRe: ListView: How to link columnheader into subitem Pin
DaveAuld3-Feb-10 2:31
professionalDaveAuld3-Feb-10 2:31 
GeneralRe: ListView: How to link columnheader into subitem Pin
jtpaa3-Feb-10 2:54
jtpaa3-Feb-10 2:54 
GeneralRe: ListView: How to link columnheader into subitem Pin
DaveAuld3-Feb-10 3:00
professionalDaveAuld3-Feb-10 3:00 
GeneralRe: ListView: How to link columnheader into subitem Pin
JR2124-Feb-10 1:00
JR2124-Feb-10 1:00 
QuestionVB SendKeys -Done- Pin
εїзεїзεїз2-Feb-10 23:18
εїзεїзεїз2-Feb-10 23:18 
AnswerRe: VB SendKeys Pin
DaveAuld3-Feb-10 0:35
professionalDaveAuld3-Feb-10 0:35 
GeneralRe: VB SendKeys Pin
εїзεїзεїз3-Feb-10 1:07
εїзεїзεїз3-Feb-10 1:07 
GeneralRe: VB SendKeys Pin
DaveAuld3-Feb-10 1:23
professionalDaveAuld3-Feb-10 1:23 
AnswerRe: VB SendKeys Pin
Luc Pattyn3-Feb-10 1:57
sitebuilderLuc Pattyn3-Feb-10 1:57 
AnswerRe: VB SendKeys Pin
Anubhava Dimri3-Feb-10 18:31
Anubhava Dimri3-Feb-10 18:31 
QuestionWindows 7 registry error Pin
Gagan.202-Feb-10 22:16
Gagan.202-Feb-10 22:16 
AnswerRe: Windows 7 registry error Pin
Dave Kreskowiak3-Feb-10 2:06
mveDave Kreskowiak3-Feb-10 2:06 
QuestionAutomation error - issue with word Pin
Bad Programmer2-Feb-10 10:12
Bad Programmer2-Feb-10 10:12 
AnswerRe: Automation error - issue with word Pin
David Mujica2-Feb-10 10:22
David Mujica2-Feb-10 10:22 
AnswerRe: Automation error - issue with word Pin
Dave Kreskowiak2-Feb-10 10:54
mveDave Kreskowiak2-Feb-10 10:54 
AnswerRe: Automation error - issue with word Pin
koolprasad20033-Feb-10 18:18
professionalkoolprasad20033-Feb-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.