Click here to Skip to main content
15,905,967 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionOk,... need help for properties window Pin
Nadine Schwingler14-Dec-05 2:38
Nadine Schwingler14-Dec-05 2:38 
AnswerRe: Ok,... need help for properties window Pin
toxcct14-Dec-05 2:41
toxcct14-Dec-05 2:41 
AnswerRe: Ok,... need help for properties window Pin
Nadine Schwingler14-Dec-05 2:47
Nadine Schwingler14-Dec-05 2:47 
QuestionPrinting Problem (Urgent) Pin
HemaRawat14-Dec-05 0:55
HemaRawat14-Dec-05 0:55 
AnswerRe: Printing Problem (Urgent) Pin
AminMaredia14-Dec-05 2:44
AminMaredia14-Dec-05 2:44 
Questionvb.net transactions Pin
collo14-Dec-05 0:06
collo14-Dec-05 0:06 
QuestionHow to add an image to ListView ? Pin
litter_learn13-Dec-05 23:24
litter_learn13-Dec-05 23:24 
AnswerRe: How to add an image to ListView ? Pin
Joshua Quick14-Dec-05 7:03
Joshua Quick14-Dec-05 7:03 
You need to create an ImageList object. Add images to this and then pass its reference to your ListView. You can create a large (typically 32x32) and small (typically 16x16) ImageLists and assign them both if you want. It'll use the large ImageList for the Icon view and the small one for the Details/Report view. You can also just use one ImageList for both large and small if you want, and the images won't change size in the list.

lstDSNode_Fill.LargeImageList = myLargeImageList<br />
lstDSNode_Fill.SmallImageList = mySmallImageList


You can then assign an image to your ListViewItem by giving it an image index.
mItem.ImageIndex = 0 'Assigned 1st image in list.

One more thing. The following bit of code that you had is inefficient. There is no point in calling AddRange() if you're always only going to add 1 item. Plus you're allocating an array here every time.
.Items.AddRange(New ListViewItem() {mItem})

I suggest that you change it to the following.
.Items.Add(mItem)
QuestionGrid Points in static variables within private subs Pin
lysis_lysis13-Dec-05 23:19
lysis_lysis13-Dec-05 23:19 
QuestionDatabase Connection Pin
AminMaredia13-Dec-05 21:37
AminMaredia13-Dec-05 21:37 
AnswerRe: Database Connection Pin
Dave Kreskowiak15-Dec-05 5:19
mveDave Kreskowiak15-Dec-05 5:19 
GeneralRe: Database Connection Pin
AminMaredia16-Dec-05 3:47
AminMaredia16-Dec-05 3:47 
QuestionExecute EXE file from VB macro Pin
Analog1913-Dec-05 21:28
Analog1913-Dec-05 21:28 
AnswerRe: Execute EXE file from VB macro Pin
Dave Kreskowiak14-Dec-05 16:24
mveDave Kreskowiak14-Dec-05 16:24 
QuestionRe: Execute EXE file from VB macro Pin
Analog1914-Dec-05 21:37
Analog1914-Dec-05 21:37 
AnswerRe: Execute EXE file from VB macro Pin
Dave Kreskowiak15-Dec-05 5:11
mveDave Kreskowiak15-Dec-05 5:11 
QuestionHello from South Africa! Help needed with Drawlines method Pin
Seejuh13-Dec-05 20:45
Seejuh13-Dec-05 20:45 
Questionpassword keeper..... Pin
eileenpp13-Dec-05 20:44
eileenpp13-Dec-05 20:44 
AnswerRe: password keeper..... Pin
Dave Kreskowiak14-Dec-05 12:24
mveDave Kreskowiak14-Dec-05 12:24 
GeneralRe: password keeper..... Pin
eileenpp14-Dec-05 14:21
eileenpp14-Dec-05 14:21 
GeneralRe: password keeper..... Pin
Dave Kreskowiak14-Dec-05 16:13
mveDave Kreskowiak14-Dec-05 16:13 
GeneralRe: password keeper..... Pin
eileenpp14-Dec-05 16:16
eileenpp14-Dec-05 16:16 
GeneralRe: password keeper..... Pin
Dave Kreskowiak15-Dec-05 4:55
mveDave Kreskowiak15-Dec-05 4:55 
GeneralRe: password keeper..... Pin
eileenpp15-Dec-05 14:13
eileenpp15-Dec-05 14:13 
GeneralRe: password keeper..... Pin
Dave Kreskowiak15-Dec-05 17:02
mveDave Kreskowiak15-Dec-05 17:02 

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.