Date: 02-16-2022
Return to Index
created by gbSnippets
'Compilable Example: (Jose Includes)
'This example captures pressing 'Enter' in a textbox
#Compiler PBWin 9, PBWin 10
#Compile EXE
#Dim All
%Unicode=1
#Include "Win32api.inc"
Global hDlg,hText As Dword
Function PBMain() As Long
Dialog New Pixels, 0, "ComboBox Test",300,300,200,200,%WS_SysMenu, 0 To hDlg
Control Add TextBox, hDlg, 200, "Test", 50,50,75,100
Control Handle hDlg, 200 To hText
Dialog Show Modal hDlg Call DlgProc
End Function
CallBack Function DlgProc() As Long
Select Case Cb.Msg
Case %WM_Command
Select Case Cb.Ctl
Case %IdOk 'pressing Enter ComboBox edit box
Select Case GetFocus
Case hText
? "Enter pressed"
End Select
End Select
End Select
End Function
'gbs_00833
'Date: 03-10-2012
http://www.garybeene.com/sw/gbsnippets.htm