VB程式設計題

2021-05-02 11:22:18 字數 812 閱讀 9805

1樓:匿名使用者

**如下。

==================

private sub form_keydown(keycode as integer, shift as integer)

if shift = vbaltmask + vbshiftmask and keycode = vbkeyf11 then msgbox "你好"

end sub

2樓:匿名使用者

我把最主要的思路告訴你

把alt shift f6 三個鍵的ascii碼查出來如果(用if語句)同時接受到(and)這三個ascii輸入的時候則用printf 把「你好」輸出到 文字框中end

3樓:

vb宣告:

private declare function getasynckeystate lib "user32" (byval vkey as long) as integer

在窗體上新增一個timer控制元件。設nterval屬性為100--可以設為其它的,但經過測試,用0.1秒是最合適的。也可能不同的電腦效果不一樣,我沒經過詳細的測試。

private sub timer1_timer()

if getasynckeystate(vbkeycontrol) and getasynckeystate(vbkeyq) then

'在這地方加按了熱鍵後執行的**

end if

end sub

自己研究下,高階點的就用registerhotkey來註冊熱鍵,或者使用hook鉤子。

vb程式設計題求大神解答,VB程式設計軟體題目,求大神解答謝謝

private sub mand1 click if val text1.text 7 or val text1.text 1 then msgbox 有效數字輸入範圍1 7 exit sub end if text2.text choose val text1.text 一 二 三 四 五 六 日...

求解VB程式設計題(初學者),請教一道VB陣列程式設計題(大學初學者),謝謝!!!

恕我直言,要查錯遠遠比解題麻煩多了.所以,如果可以,請把題目補充出來,晚一點我再看回來.祝好運.我也貼一段 function ishuiwen n as double as boolean 判斷是否迴文數 ishuiwen false dim m,i as double m 0 i n while ...

VB程式設計題目,vb程式設計題目

private sub mand1 click dim i as integer,j as integer,k as integer dim a 1 to 10 as integerdim max as integer,min as integer,pj as single dim sumnum a...