VB 控鍵移動,VB 控鍵位置

2025-02-07 13:40:10 字數 2950 閱讀 5172

1樓:bai_o00o_知道

在窗體上放乙個frame控制項,裡面放4個按鈕,再放乙個timer控制項。

private j as double

private sub form_load()= 10

end sub

private sub timer1_timer()j = j +

sin(j) +1) */2

cos(j) +1) */2

sin(j + 1) */2= cos(j + 1) */2= sin(j + 1) */2= cos(j + 1) */2= sin(j + 1) */2= cos(j + 1) */2end sub

2樓:麗蕤伴

private sub form_load()= true

1000 / 6 '這是60秒走完一圈。

end sub

private sub timer1_timer()static i as integer

i = i + 1

if i > 360 then i = 0cirmove command1, 4000, 4000, 2000, i

icirmove shape1, 4000, 4000, 2500, 360 - i

end sub

sub cirmove(byval sobj as object, byval x as long, byval y as long, byval r as long, byval i as integer)

sobg 物件。

x 圓心x座標。

y 圓心y座標。

r 圓半徑。

i 弧度 最大360

dim xx, yy as long

dim rstmp, rctmp as doublei = i + 1

if i > 360 then i = 0a = * i / 180

rstmp = r * sin(a)

rctmp = r * cos(a)

xx = x + rctmp

yy = y + rstmp

cos(a)

xx - / 2, yy - / 2 '控制項的位置。

x, y), r

end sub

vb中怎麼讓按鈕移動

3樓:網友

除了樓上提供的move方法,還可以用直接設定控制項的left和top值來實現。

vb 控鍵位置

4樓:濮冰楓

獲取螢幕解像度,然後計算 螢幕位置1/6

5樓:網友

以前我在公司的做法是,在需求階段就搞清楚客戶的要求,其中包括解像度,然後針對這個解像度進行開發。

後來,也鑽研了一些方法:例如自動判斷螢幕解像度,然後自動調整控制項大小及位置,但這樣做會增加很多工作量。

vb程式中怎麼使按鈕移動

6樓:網友

這是我剛自學vb時寫的。

option explicit

dim x1%, y1%

private sub command1_mousedown(button as integer, shift as integer, x as single, y as single)

x1 = x

y1 = y

x, yend sub

private sub command1_mousemove(button as integer, shift as integer, x as single, y as single)

if button = vbleftbutton then' x, y

with command1

move .left + x - x1, .top + y - y1

end with

end if

end sub

vb中如何禁止用方向鍵移動按鈕焦點?

7樓:網友

可以採用api中的訊息處理,攔截鍵盤訊息,如果不是方向鍵,再將訊息扔出去。最好重定義窗體的訊息處理程式windowproc。

附件中沒有定義windowproc,而是通過無限迴圈來做的,但是有可能會有漏掉。可能不太合你用,但是可以研究研究。

8樓:網友

private sub command1_gotfocus()end sub

在command1的gotfocus事件裡給其他控制項或視窗用setfocus方法。。。

vb可以自制控鍵嗎?????

9樓:網友

方法很多,舉一例:你可以放image,裡面放入你喜歡的**,image外面用line劃線將他圍住,看起來像按鈕,但是你可以變的花樣就多了。

vb所有控鍵的解釋與集合。

10樓:葵花點穴手k你

可以在**仔襲察中完成:

顯示:禪慶控制項名念茄。visible=true

隱藏:控制項名。visible=false

11樓:網友

visible屬迅行性設坦察置為true 控畝信譁件可見。

設定為false 控制項不可見。

還有兩個方法。

show 顯示。

hide 隱藏。

vb 中如何改變控鍵屬性的設定

12樓:網友

可以在窗體佈局視窗中單擊這個按鈕,然後在屬性視窗中設定它的enabled為false,也可以在包含這個按鈕的窗體的load事件中,先寫入一行**:,這樣,按你寫的程式,單擊了cmdstart按鈕後,cmdguess按鈕才會可以使用。

vb滑鼠移動事件,VB 關於滑鼠移動事件

來的晚,幫頂頂,樓上 很好,很強大.嘿嘿 不過有點侷限,mousemove事件只侷限在form中.建議通過getcursorpos api來獲取滑鼠座標.從而判斷,滑鼠是否移動 呵呵,根據你要求寫了下面 你試試 private declare function getcursorpos lib us...

vb按ctrl鍵響應相關事件,vb 按ctrl鍵 響應相關事件

更改form屬性的keypreview屬性為true,然後把執行條件改成 private sub form keydown keycode as integer,shift as integer if keycode 17 then 按下ctrl時執行。end if end sub 只有一個辦法,就...

摩托V8鍵的問題 40,摩托V8鍵的問題

摩托v鍵的問題 有救 好修 用丙酮清冼機子主機板尤其是排線介面 巴許手機有積水示清理徹底。機子裡面還是有短路的地方也就是有水。摩托羅拉 v鍵位混亂 .手機軟體故障,一般來說亂插資料線是很容易引起軟體故障的,因為尾插 資料線介面 直接和裝系統的字型檔相連,亂找跟資料線如果不匹配就會導致串線。手機程式出錯!...