Solved

TreeView and other controlos.

Posted on 2002-04-28
5
148 Views
Last Modified: 2010-05-02
Hello,
A. I would like to use icons instead of the default lines while using the TreeView control ?
B. I need an example for playing WAV files. Need to know what component should be use for it and how to use it in the code ?
Note: please provide code samples for both answers.
Thanks.
0
Comment
Question by:sheavi
5 Comments
 
LVL 22

Accepted Solution

by:
CJ_S earned 100 total points
ID: 6974710
A)
- add a treeview and set the Style to tvwPictureText
- add an imagelist control to the form and set the properties (rightclick, properties). Here add the images you would like to show
- set the treeview's imagelist to the imagelist you just created (Treeview1.imagelist = MyImageList
- when you add a node to the treeview you also set the image variable (index of the image in the imagelist)
TreeView1.Nodes.Add , , , "CHECK", 1

B)
Add the following declare to the top of your form:
Private Declare Function sndPlaySound Lib "WINMM.DLL" Alias "sndPlaySoundA" (ByVal lpszSoundName As String, ByVal uFlags As Long) As Long

Now call it like:
Dim dwRet as long
dwRet = sndPlaySound("c:\windows\media\start.wav", 0)

CJ

0
 
LVL 22

Expert Comment

by:CJ_S
ID: 6974711
In the future, ask only ONE question at a time!!!

CJ
0
 
LVL 75

Expert Comment

by:Anthony Perkins
ID: 6974907
Please maintain your open questions.  For the record:
Questions Asked 4
Last 10 Grades Given B  
Question Grading Record 1 Answers Graded / 1 Answers Received
Database connection ?! Date: 11/10/2001 04:02PM PST
http://www.experts-exchange.com/jsp/qShow.jsp?ta=mfc&qid=20230475
Database connection ?! Date: 11/24/2001 11:27PM PST
http://www.experts-exchange.com/jsp/qShow.jsp?ta=visualbasic&qid=20240013

Thanks,
Anthony
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 7670393
Hi sheavi,
It appears that you have forgotten this question. I will ask Community Support to close it unless you finalize it within 7 days. I will ask a Community Support Moderator to:

    Accept CJ_S's comment(s) as an answer.

sheavi, if you think your question was not answered at all or if you need help, just post a new comment here; Community Support will help you.  DO NOT accept this comment as an answer.

EXPERTS: If you disagree with that recommendation, please post an explanatory comment.
==========
DanRollins -- EE database cleanup volunteer
0
 
LVL 1

Expert Comment

by:Computer101
ID: 8092487
Comment from expert accepted as answer

Computer101
E-E Admin
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

932 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now