Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

eVB 3.0 - Beep 1

Status
Not open for further replies.

tmryan

Programmer
Dec 22, 2000
73
US
Not sure if this is the right forum. I'm using eMbedded Visual Basic 3.0 to write apps for an iPaq. How the heck do you get the system beep to run? I have a Scan object that I want to beep when I read a barcode label. The label is read - but no beep. On desktop versions of VB you just put a Beep command out. No such luck with this.
Any Ideas?

Thanks
Tim Ryan
PROGRESS Developer
 
Try this !

Public SND_FILENAME As Long
Public Declare Function PlaySound Lib "Coredll" Alias "PlaySoundW" (ByVal lpszName As String, ByVal hModule As Long, ByVal dwFlags As Long) As Long

Private Sub Command1_Click()
Dim MySound As Long
MySound = PlaySound("\windows\Critical.wav", 0, SND_FILENAME)
End Sub
 
Hi Tim and Hagge,

Please tell me where can I find the object to scan barcode on PocketPC on WindowsCE. It will be nice of you and of great help to me if you can also send some sample script to work with that object.

Please help...

Ketan
 
Ok, I can see we all have same kind of problems.

In the "Option Explicit" section of your form's code, add this line ...

Declare Function MessageBeep Lib "Coredll" (ByVal wType As Long) As Long

Then in your code:


Dim bip As Long
bip = MessageBeep(64) 'this is the sound
If bip = 0 Then
MsgBox ("Error")
Else
For bip = 1 To 45
MessageBeep (64) 'I use this because volume problems
Next

End If

I hope this can help you.
Pd. you can change the 64 for 16,32,64,and -1

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top