홈 · 개발 참고자료

개발 참고자료

[파워빌더] 컨트롤에 키 입력을 보내기

작성자
관리자
작성일
2016-10-16
조회
8907
분류
파워빌더
[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 )