Message Requester beep
Message Requester beep
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
I tried the code
SystemParametersInfo_(#SPI_SETBEEP,0,0,0)
but it doesn't work (My OS is Vista)
Thanks in advance
Just add a flag of $80, thus:
Code: Select all
MessageRequester("Confirm", "Are you sure?", #PB_MessageRequester_YesNo | $80)
Anthony Jordan
- Kaeru Gaman
- Addict
- Posts: 4826
- Joined: Sun Mar 19, 2006 1:57 pm
- Location: Germany
- Arctic Fox
- Enthusiast
- Posts: 609
- Joined: Sun Dec 21, 2008 5:02 pm
- Location: Aarhus, Denmark
-
- Addict
- Posts: 1073
- Joined: Fri Apr 25, 2003 11:13 pm
- Location: Netherlands
- Contact:
oh, please convert this code for PB
merci
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
Have a look at
http://www.purebasic.fr/english/viewtop ... 683#121683
http://www.purebasic.fr/english/viewtop ... 683#121683
What goes around comes around.
PB 5.21 LTS (x86) - Windows 8.1
PB 5.21 LTS (x86) - Windows 8.1
Re: Message Requester beep
Thanks, that's good 
