private sub map1_mousemove(button as integer, shift as integer, x as single, y as single)
dim x1 as double
dim y1 as double
dim x2 as double
dim y2 as double
dim sngtemp as single
dim tempzoom as integer
on error resume next
map1.numericcoordsys.set milonglat, 0 '將螢幕座標轉變為經緯度座標
if button = vbleftbutton and map1.currenttool = mtzoominout then
while boolbuttonmove
if abs(y - map1.mapscreenheight / 2) > map1.mapscreenheight / 1000 then
if y > map1.mapscreenheight / 2 and y >= sgly then
'縮小tempzoom = map1.zoom + 10 * abs(y - map1.mapscreenheight / 2) / map1.mapscreenheight
if tempzoom < 600 and tempzoom > 0 then
map1.zoom = tempzoom
end if
sgly = y
elseif y < map1.mapscreenheight / 2 and y <= sgly then
'放大/
tempzoom = mainform.map1.zoom - 10 * abs(y - map1.mapscreenheight / 2) /map1.mapscreenheight
if tempzoom > 0 and tempzoom < 600 then
map1.zoom = tempzoom
else
if map1.zoom > 0.001 then
map1.zoom = map1.zoom / 2
end if
end if
sgly = y
end if
end if
doevents
wend
end if
end sub
Altium 怎麼設定滑鼠滾輪放大縮小
altium安裝後,要對原理圖或者pcb進行放大或者縮小,預設是ctrl鍵 滑鼠滾輪,但可以設定成只有滑鼠滾輪進行放大縮小,如下 1 在原理 件中,將 輸入法切換 到英文輸入法,點依次點鍵盤t p鍵,出現引數選擇對話方塊,選擇schematic這一欄,繼續選擇mouse wheel configur...
qt子視窗跟隨主視窗進行移動(放大和縮小也實現)
子視窗跟隨主視窗進行移動,需要獲取子視窗相對于父視窗的位置。然後在mousemove 的時候,始終獲取相對位置,然後移動子視窗即可。h protected void resizeevent qresizeevent e void mousepressevent qmouseevent event v...
滑鼠移動區域區域性放大
這個程式類似於 購物時,在商品影象上移動滑鼠,會出現乙個放大滑鼠周圍矩形區域內的區域性影象的視窗。話不多說,直接貼 c sharp view plain copy include include include pragma comment lib,cv.lib pragma comment lib...