Page 1 of 1
Message Requester beep
Posted: Tue Sep 08, 2009 5:15 pm
by Marvi
There is any way to eliminate the noisy beep that sounds when Message Requester window appears?
I tried the code
SystemParametersInfo_(#SPI_SETBEEP,0,0,0)
but it doesn't work (My OS is Vista)
Thanks in advance
Posted: Tue Sep 08, 2009 6:00 pm
by akj
Just add a flag of $80, thus:
Code: Select all
MessageRequester("Confirm", "Are you sure?", #PB_MessageRequester_YesNo | $80)
Posted: Tue Sep 08, 2009 7:30 pm
by Marvi
Thanks, but it doesn't work! The beep remains.....
Posted: Tue Sep 08, 2009 7:44 pm
by Kaeru Gaman
on XP it works.
that means on Vista (64?) it is another Flag but it should exist.
this is one of the reasons, why it is less useful to memorize some |$80 instead of the name of the bloody constant...

Posted: Tue Sep 08, 2009 8:38 pm
by Marvi
My operative system is Vista 32.
This beep is really annoying........ Anyone else has a good idea?
Posted: Tue Sep 08, 2009 8:51 pm
by Arctic Fox
No beep here with
akj's example (also Vista 32-bit)

Posted: Tue Sep 08, 2009 9:02 pm
by Edwin Knoppert
Posted: Tue Sep 08, 2009 9:06 pm
by Marvi
Ok it works now! Maybe I wrote something wrong......
THANKSSSSSS TO EVERYBODY
Posted: Wed Sep 09, 2009 12:20 am
by akj
I think the constant $80 has the name #MB_USERICON but I am uncertain as this name is not recognised by the PB compiler.
Posted: Wed Sep 09, 2009 11:33 am
by +18
oh, please convert this code for PB
Code: Select all
Function MsgBox2( ByVal sText As String, ByVal dwStyle As Dword, ByVal sTitle As String ) As Long
Local MB As MSGBOXPARAMS
MB.cbSize = SizeOf( MSGBOXPARAMS )
MB.lpszText = StrPtr( sText )
MB.lpszCaption = StrPtr( sTitle )
If ( dwStyle And %MB_ICONEXCLAMATION ) Then
MB.lpszIcon = %IDI_EXCLAMATION
dwStyle = dwStyle And Not %MB_ICONEXCLAMATION
ElseIf ( dwStyle And %MB_ICONINFORMATION ) Then
MB.lpszIcon = %IDI_ASTERISK
dwStyle = dwStyle And Not %MB_ICONINFORMATION
ElseIf ( dwStyle And %MB_ICONQUESTION ) Then
MB.lpszIcon = %IDI_QUESTION
dwStyle = dwStyle And Not %MB_ICONQUESTION
ElseIf ( dwStyle And %MB_ICONSTOP ) Then
MB.lpszIcon = %IDI_HAND
dwStyle = dwStyle And Not %MB_ICONSTOP
End If
MB.dwStyle = dwStyle Or %MB_TASKMODAL Or %MB_USERICON
Function = MessageBoxIndirect( MB )
End Function
merci
Posted: Wed Sep 09, 2009 12:44 pm
by Sparkie
Re: Message Requester beep
Posted: Thu Sep 10, 2009 12:25 pm
by +18
Thanks, that's good
