list box and play sound wave


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3

Thread: list box and play sound wave

  1. #1
    Join Date
    May 2005
    Posts
    6

    Cool list box and play sound wave

    can anyone help me in these:
    how to make the listbox keep on scollled at the bottom after many items have been added on it? the srcoll bar is by default at its current position...

    how to make a soundwave play by clicking on a command button?

  2. #2
    Join Date
    Dec 2004
    Location
    México DF
    Posts
    127

    Run file in default application

    Hi!

    About the scrollbar I don't know.

    About the soundwave, maybe you can use ShellExecute. This is a windows function that runs a file with the default application for its extension.

    First you need to declare the function:
    Code:
    Public Declare Function ShellExecute Lib "shell32.dll" Alias _
               "ShellExecuteA" (ByVal hWnd As Long, ByVal lpOperation As String, _
               ByVal lpFile As String, ByVal lpParameters As String, _
               ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
    Then, you can invoke it from your click event:

    Code:
    Call ShellExecute(0, vbNullString, sFile, vbNullString, sFilePath, 1)
    Both sFile and sFilePath are variables you'll need to initialize with you file and its path.

    HTH,

    mc

  3. #3
    Join Date
    Nov 2003
    Location
    Alameda, CA
    Posts
    1,737
    Use the TopIndex property to set the index of the first visible item
    Marco
    "There are two ways to write error-free programs. Only the third one works."
    Unknown

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center