How would you attach pictures in Treeview Control?
Answer / Ziaur Rahman
To attach a picture (icon) to a node in a TreeView control, set the ImageKey property of the TreeNode object to an image list key. First, create an ImageList object and add images to it, then assign the ImageList object to the TreeView's ImageList property. Finally, set the ImageKey property of the TreeNode to the desired image key.n`vbnetnDim myImageList As New ImageList()nmyImageList.Images.Add(Image.FromFile("path_to_image_file"))nmyTreeView.ImageList = myImageListnDim newNode As New TreeNode("New Node", myImageList.Images(0))nmyTreeView.Nodes.Add(newNode)
| Is This Answer Correct ? | 0 Yes | 0 No |
What is VB ShellScripting?
How does a DCOM component know where to instantiate itself?
How do I use GetPrivateProfileString to read from INI files?
Name some date functions?
How do I access C style strings?
What are the different types of Dialog Box?
Explain the types of Views in Listview Control?
What is the difference between a property a method and an event? Give an example of each.
What is a thread pool and how are the threads within a thread pool managed?
Which language is used in visual basic?
What is the difference between Msgbox Statement and MsgboxQ function?
How do I make an animated icon for my program?
Visual Basic (800)
C Sharp (3816)
ASP.NET (3180)
VB.NET (461)
COM+ (79)
ADO.NET (717)
IIS (369)
MTS (11)
Crystal Reports (81)
BizTalk (89)
Dot Net (2435)
Exchange Server (362)
SharePoint (720)
WCF (340)
MS Office Microsoft (6963)
LINQ Language-Integrated Query (317)
WPF (371)
TypeScript (144)
Microsoft Related AllOther (311)