View previous topic :: View next topic |
Author |
Message |
92Garfield I'm a spammer
Reputation: 57
Joined: 20 Dec 2007 Posts: 5871 Location: Banana Republic Germany
|
Posted: Sat May 24, 2008 6:01 am Post subject: problem with beep |
|
|
in declarations i used this:
Code: | Private Declare Function Beep Lib "kernel32" (ByVal dwFreq As Long, ByVal dwDuration As Long) As Long |
now i made this on a button
i got error..
i tried this
now he wants a "="
_________________
|
|
Back to top |
|
 |
Estx Expert Cheater
Reputation: 0
Joined: 04 Mar 2008 Posts: 172
|
Posted: Sat May 24, 2008 6:53 am Post subject: |
|
|
Code: | Private Declare Function Beep Lib "kernel32" (ByVal dwFreq As Long, ByVal dwDuration As Long) As Long
Private Sub Command1_Click()
Beep 400, 1000
'Call Beep(400, 1000)
End Sub
|
If that's how you had your code, it should work fine.
What is the Error?
|
|
Back to top |
|
 |
tombana Master Cheater
Reputation: 2
Joined: 14 Jun 2007 Posts: 456 Location: The Netherlands
|
Posted: Sat May 24, 2008 7:03 am Post subject: |
|
|
I think the declaration is wrong... shouldn't it contain something like
Alias "Beep"
|
|
Back to top |
|
 |
AtheistCrusader Grandmaster Cheater
Reputation: 6
Joined: 23 Sep 2006 Posts: 681
|
Posted: Sat May 24, 2008 7:07 am Post subject: |
|
|
Why won't you go and learn the SYNTAX of vb6??????
WHYYYYYYYYYYYYYYYYYYYYYYYYYYYY
Call is needed when you are using: "beep(400,1000)"
Call is NOT needed when you are using: "beep 400,1000"
|
|
Back to top |
|
 |
Estx Expert Cheater
Reputation: 0
Joined: 04 Mar 2008 Posts: 172
|
Posted: Sat May 24, 2008 7:19 am Post subject: |
|
|
tombana wrote: | I think the declaration is wrong... shouldn't it contain something like
Alias "Beep" |
Alias "Beep" just creates an alias for you to use in your code.
For example:
Code: | Public Declare Function Beep Lib "kernel32" Alias "Banana" (ByVal dwFreq As Long, ByVal dwDuration As Long) As Long |
From that piece of code, you would write: Banana 400, 1000 instead of Beep 400, 1000.
|
|
Back to top |
|
 |
92Garfield I'm a spammer
Reputation: 57
Joined: 20 Dec 2007 Posts: 5871 Location: Banana Republic Germany
|
Posted: Sat May 24, 2008 7:25 am Post subject: |
|
|
masterkert3 wrote: | Why won't you go and learn the SYNTAX of vb6??????
WHYYYYYYYYYYYYYYYYYYYYYYYYYYYY
Call is needed when you are using: "beep(400,1000)"
Call is NOT needed when you are using: "beep 400,1000" |
lets cut down to
masterkert3 wrote: |
Call is needed when you are using: "beep(400,1000)"
Call is NOT needed when you are using: "beep 400,1000" |
thanks is working now
_________________
|
|
Back to top |
|
 |
AtheistCrusader Grandmaster Cheater
Reputation: 6
Joined: 23 Sep 2006 Posts: 681
|
Posted: Sat May 24, 2008 7:44 am Post subject: |
|
|
Just go learn the basics/syntax of VB6 ok?
|
|
Back to top |
|
 |
benlue Moderator
Reputation: 0
Joined: 09 Oct 2006 Posts: 2142
|
Posted: Sat May 24, 2008 7:50 am Post subject: |
|
|
Requested to be locked by thread started, therefore locked.
|
|
Back to top |
|
 |
|