[파워빌더] 컨트롤에 키 입력을 보내기
[Function declaration]
SUBROUTINE keybd_event( int bVk, int bScan, int dwFlags, int dwExtraInfo) &
LIBRARY "user32.dll"
[powerscript]
li_vkey = 65 // the character "A"
sle_1.setfocus() // the target control
keybd_event( li_vkey, 1, 0, 0 )
The following will send a backspace to a SingleLineEdit, deleting the last character.[powerscript]
integer li_vkey
integer ll_pos
ll_pos = len(sle_1.Text) + 1
sle_1.selectText(ll_pos,0) // set the cursor at the end
li_vkey = asc("~b") // backspace
keybd_event( li_vkey, 1, 0, 0 )
SUBROUTINE keybd_event( int bVk, int bScan, int dwFlags, int dwExtraInfo) &
LIBRARY "user32.dll"
[powerscript]
li_vkey = 65 // the character "A"
sle_1.setfocus() // the target control
keybd_event( li_vkey, 1, 0, 0 )
The following will send a backspace to a SingleLineEdit, deleting the last character.[powerscript]
integer li_vkey
integer ll_pos
ll_pos = len(sle_1.Text) + 1
sle_1.selectText(ll_pos,0) // set the cursor at the end
li_vkey = asc("~b") // backspace
keybd_event( li_vkey, 1, 0, 0 )