Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

VBÖв¥·ÅWAVÎļþ

http://zhidao.baidu.com/question/33440250.html
ÔÚÄ£¿éÖÐÊäÈëÒÔÏ´úÂë
Public Declare Function sndPlaySound Lib "winmm" Alias _
"sndPlaySoundA" (ByVal lpszSoundName As String, _
ByVal uFlags As Long) As Long
' flag uitzetten
Public Const SND_SYNC = &H0
Public Const SND_ASYNC = &H1
Public Const SND_NODEFAULT = &H2
Public Const SND_MEMORY = &H4
Public Const SND_LOOP = &H8
Public Const SND_NOSTOP = &H10
Public Sub PlaySound(strSound As String)
sndPlaySound strSound, SND_ASYNC Or SND_NODEFAULT
End Sub
ÔÚ´°ÌåÖÐÊäÈëÒÔÏ´úÂë
Private Sub Form_Load()
PlaySound "D:\sound.wav"
End Sub
VBÖв¥·ÅWAVÎļþ
×÷ÕߣºÕÔÅô
ÔÚ¶àýÌåÈí¼þµÄ¿ª·¢Éè¼ÆÖУ¬ÉùÒôÊÇÒ»¸öÏ൱ÖØÒªµÄ¶àýÌåÔªËØ£¬ÓÅÐãµÄÉùÒôÉè¼Æ»áΪ¶àýÌåÈí¼þÔöÉ«²»ÉÙ¡£¶øWAV¸ñʽµÄÉùÒôÎļþÊÇÒ»ÖÖ×î³£ÓõÄÉùÒôÎļþ¸ñʽ£¬Ò²×îÈÝÒ׵õ½£¬±ÈÈçͨ¹ýWin 95Öеē¼Òô»ú”³ÌÐò£¬ÀûÓÃÂó¿Ë·ç¾Í¿ÉÒԷdz£¼òµ¥µØ¼ÖÆWAVÎļþ¡£VBÊÇÒ»¸öÏ൱¾­µäµÄ¶àýÌ忪·¢µÄ¹¤¾ß£¬ÔÚVBÖв¥·ÅWAVÎļþµÄ·½·¨Ö÷ÒªÓÐÕâÑù¼¸ÖÖ¡£
     Ò»¡¢ÀûÓÃOLE¿Ø¼þ
     ½¨Ò»´°Ì壬ÓÃÊó±êÑ¡ÔñOLE¿Ø¼þ£¬ÔÚ´°ÌåÉÏÍϳöOLEÇøÓò£¬ÔÚͼһµÄ´°¿ÚÖÐÑ¡Ôñн¨ºÍÉùÒôÈ»ºó°´È·¶¨¼ü¾ÍÍê³ÉÁËÔÚ´°¿ÚÖÐÌí¼ÓOLE¿Ø¼þ£¬Èçͼ¶þ¡£
     ÕâÑù¾Í¿ÉÒÔÔÚOLE¿Ø¼þµÄResourceDocÊôÐÔÖÐÑ¡ÔñËùÒª²¥·ÅµÄÎļþ£¬³ÌÐòÔËÐÐʱ˫»÷OLE¿Ø¼þ¼´¿É¡£
ÔÚʵ¼ÊµÄ³ÌÐòÉè¼Æµ±ÖУ¬ÍùÍùÐèÒªµ¥»÷ij¸öͼ±ê»ò°´Å¥À´¿ØÖÆÉùÒôµÄ²¥·Å£¬ÆäʵÏÖ·½·¨ÊÇÕâÑùµÄ£ºÊ×ÏȽ«OLE¿Ø¼þµÄVISIBLEÊôÐÔÉèÖÃΪFALSE,È»ºóÔÚͼ±ê»ò°´Å¥µÄµ¥»÷ʼþÖбàдÈçϵijÌÐò£º
Private Sub Contol_Click()
OLE1.Action = 7
End Sub
     ¶þ¡¢ÀûÓÃMMControl¿Ø¼þ
     VB5.0ÌṩÁËÐí¶àÉè¼Æ¶àýÌåµÄ¿Ø¼þ£¬ÔÚPROJECT/COMPENENTS/CONTROLSÖÐÑ¡ÔñMMControls ¿Ø¼þ£¬´°ÌåÉϾͳöÏÖÁ˶àýÌå¿Ø¼þ¶ÔÏó£¬ÔÚÕâ¸ö¶ÔÏóÉÏÓв»Í¬µÄͼÐι¦Äܱêʶ£¬ÆäÃû³Æ´Ó×óµ½ÓÒ·Ö±ðÊÇPre¡¢Next¡¢Play¡¢Pause¡¢Back¡¢Step¡¢Stop¡¢Record ¡¢Eject ÈçͼÈý¡£
     Õâ¸ö¶àýÌå¿Ø¼þ¿ÉÒÔ²¥·Å¶àÖÖ¸ñʽµÄÉùÒô£¬²¥·ÅWAV¸ñʽÉùÒôÎļþµÄ³ÌÐò´úÂë
Private Sub form_load()
MMControl1.DeviceType = "waveaudio"
MMControl1.filen


Ïà¹ØÎĵµ£º

vb½çÃæ×ÔÊÊÓ¦²»Í¬·Ö±æÂÊÖÕ¼«½â¾ö·½°¸

ÏÖÔÚ¿íÆÁ£¬´óÆÁÄ»ÏÔʾÆ÷Ô½À´Ô½Æձ飬ԭÀ´ÔÚ800*600ÏÂÉè¼ÆµÄÈí¼þ½çÃ棬ÔÚ´óÆÁÄ»ÏÔʾÆ÷£¨1680*1050£©ÉϽçÃæ×ÜÊÇËõµ½Ò»½Ç£¬·Ç³£ÄÑ¿´£¬Òª½«ÀϳÌÐòµÄ½çÃæ°´ÕÕ²»Í¬µÄ·Ö±æÂÊÔÚÖØнøÐÐÉè¼Æ±à³Ì£¬Õû¸ö¹ý³Ì±È½Ï¸´ÔÓ¶øÇÒʵÓÃÐÔ²»´ó£¬Èç¹ûÔ­À´³ÌÐò±È½Ï´óÇÒ½çÃæ±È½Ï¶àµÄ»°ÄÇô¹¤×÷Á¿Ò²½«ÊǾ޴óµÄ£¬¶øÇÒ»¹¿ÉÄܳöÏÖÆäËû´íÎó£¬ÓÐûÓÐÒ»ÖÖÖØ ......

VB ±à³ÌÖÐÈçºÎʹ´°¿ÚÓÒÉϽǵĹرհ´Å¥(X)ʧЧ

1¡¢Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As
Integer)
        Cancel = True
       End Sub
    2¡¢Private Sub
Form_Unload(Cancel As Integer)
        Cancel = ......

VBÉèÖýø³ÌÓÅÏȼ¶

http://topic.csdn.net/t/20060401/19/4656391.html
Private Declare Function GetCurrentProcess Lib "kernel32" () As Long
Private Declare Function SetPriorityClass Lib "kernel32" (ByVal hProcess As Long, ByVal dwPriorityClass As Long) As Long
Const IDLE_PRIORITY_CLASS = &H40 'нø³ÌÓ¦¸ÃÓзdz£µÍµÄ ......

VB¶Áȡע²á±í

Private Type SECURITY_ATTRIBUTES
   nLength As Long
   lpSecurityDescriptor As Long
   bInheritHandle As Boolean
End Type
Dim lang As String
Private Declare Function RegOpenKeyEx Lib "advapi32.dll" Alias "RegOpenKeyExA" (ByVal hkey As Long, ByV ......

VBʵÏÖÅúÁ¿Ãû³ÆÐÞ¸Ä

Ç°Õó×ÓдÁËÒ»¸öĿ¼Ãû/ÎļþÃûµÄ»ñȡС³ÌÐò£¬ÕâÁ½Ìì¾ÓÈ»ÓÖ±»Ãû³ÆÅúÁ¿ÐÞ¸ÄÂé·³ÁËһϣ¬ËùÒÔÔÙдһ¸ö°É¡£
×¢Ò⣺ÄãÒªÊÇÖ»Ïëдһ´ÎµÄ»°£¬ÓÃÅú´¦Àí¸ü·½±ã¡£Ö»Óжà´ÎʹÓõÄÇé¿öÏ£¬×Ô¼ºÐ´³ÌÐò²ÅÓÐÒâÒå¡£
VBÖнøÐÐÃû³ÆÐ޸ĺÜÈÝÒ×,Óõ½µÄ¾ÍÊÇNameÕâ¸öº¯Êý£¬Ó÷¨ÈçÏ£º
Name OldName As NewName£¬Ëü²»½ö¿ÉÒÔ¸ÄдÃû³Æ£¬¶øÇÒ¿ÉÒÔ¸ü¸ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ