Guidance
指路人
g.yi.org
software / rapidq / Examples / Audio & Video / QDXSound.bas

Register 
注册
Search 搜索
首页 
Home Home
Software
Upload

  
     DECLARE SUB PlayMe
     DECLARE SUB StopMe
     DEFSTR a$

     CREATE Form AS QFORM
      CAPTION = "Click form to stop current sound"
      Width = 320
      Height = 240
      Center
      OnClick = StopMe
      CREATE Sounds AS QDXSound
      END CREATE
      CREATE Button AS QBUTTON
       CAPTION = "Click me"
       Left = 116
       Top = 95
       OnClick = PlayMe
      END CREATE
     END CREATE

     SUB PlayMe
      RESTORE
      DATA tada,ding,chord,chimes,logoff
      DO
       READ a$
       Sounds.Filename = "c:\windows\media\" + a$ + ".wav"
       Sounds.Play
       WHILE Sounds.Playing
        DOEVENTS
       WEND
      LOOP UNTIL a$ = "logoff"
     END SUB

     SUB StopMe
      Sounds.Stop
      a$ = "logoff"
     END SUB

     Form.SHOWMODAL
掌柜推荐
 
 
 
 
 
 
 
 
 
 
 
 
© Thu 2024-5-30  Guidance Laboratory Inc.
Email:webmaster1g.yi.org Hits:0 Last modified:2002-06-15 21:49:18