sound on exit stringGadget
Posted: Sat Jan 17, 2004 8:14 pm
* run code
* clic in stringgadget
* enter text and press enter key
a sound this fact of hearing
my question is :
how to not hearing this sound ?
* clic in stringgadget
* enter text and press enter key
a sound this fact of hearing
my question is :
how to not hearing this sound ?
Code: Select all
Enumeration
#WIN_MAIN
#LISTE
#EDIT
EndEnumeration
#VERSION = "DDS BASIC WIN 4.1"
If OpenWindow(#WIN_MAIN, 1, 1, 600, 300, #PB_Window_SystemMenu | #PB_Window_ScreenCentered | #PB_Window_TitleBar , #VERSION)
If CreateGadgetList(WindowID())
ListViewGadget(#LISTE, 0, 0, 600, 260)
StringGadget(#EDIT, 0, 260, 600, 20, "")
EndIf
EndIf
sortie_programme.b = 0
While sortie_programme = 0
event = WaitWindowEvent()
Select event
Case #WM_KEYDOWN ; ou #WM_KEYUP
;; l'utilsateur a appuyé sur la touche entrée ?
If EventwParam() = 13
;; dans le gadget edition ?
If GetFocus_() = GadgetID(#EDIT)
buffer.s = GetGadgetText(#EDIT)
AddGadgetItem(#LISTE, -1, buffer)
;InterpreteBuffer()
SetFocus_(GetGadgetText(#EDIT))
SetGadgetText(#EDIT,"")
EndIf
EndIf
Case #PB_Event_CloseWindow
sortie_programme = 1
EndSelect
Wend
CloseWindow(#WIN_MAIN)