Login | Register   
RSS Feed
Download our iPhone app
Browse DevX
Sign up for e-mail newsletters from DevX

Tip of the Day
Language: Visual Basic
Expertise: Beginner
Apr 5, 1999



Full Text Search: The Key to Better Natural Language Queries for NoSQL in Node.js

Date: 1/31/2018 @ 2 p.m. ET

Don't Duplicate ImageList Controls

A common control, such as a TreeView or a ListView, can use an ImageList control placed on a form different from the current one. This is useful when many forms in your application contain an ImageList control with the same images.

Instead of using multiple ImageList controls, you can gather all your images into one ImageList control placed (if possible) on a form that's always loaded, such as the main form in your application. Assign that ImageList control at run time to the ImageList property of other controls:

Private Sub Form_Load()
	Set TreeView1.ImageList = frmMain.ImageList1
	Set ListView1.ImageList = frmMain.ImageList1
End Sub
This approach lets you save some space in the compiled EXE file and use fewer resources at run time.
Francesco Balena
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



Thanks for your registration, follow us on our social networks to keep up-to-date