C 操控滾動條

2021-07-25 16:44:59 字數 858 閱讀 5250

#region 獲取或設定滾動條位置

////// 獲取指定滾動條中滾動按鈕的當前位置

//////

帶有標準滾動條控制項的控制代碼

///0:水平滾動條,1:垂直滾動條

///[dllimport("user32.dll", entrypoint = "getscrollpos")]

private

static

extern

intgetscrollpos(intptr hwnd, int nbar);

////// 設定滾動條位置

//////

帶有標準滾動條控制項的控制代碼

///0:水平滾動條,1:垂直滾動條

///位置

///重繪標誌,是否重繪

///[dllimport("user32.dll")]

private

static

extern

intsetscrollpos(intptr hwnd, int nbar, int npos, bool bredraw);

////// 設定控制項內容位置

//////

控制項控制代碼

///訊息(0x00b6)

///0

///位置

///[dllimport("user32.dll", entrypoint = "sendmessage")]

private

static

extern

intsendmessage(intptr hwnd, int msg, int wparam, int iparam);

#endregion

C 視窗滾動條

ws hscroll 新增水平滾動條 ws vscroll 新增垂直滾動條 setscrollinfo 設定滾動條的範圍 setscrollpos 設定滾動條的位置 在onsize 訊息中設定 onhscroll 處理水平直滾動條訊息 onvscroll 處理垂直滾動條訊息 scrollwindow...

python橫向滾動條 控制滾動條

調過js指令碼控制 python 1.coding utf 8 2.from selenium import webdriver 3.import time 5.driver webdriver.firefox 6.driver.get 7.搜尋 8.driver.find element by i...

谷歌滾動條設定 IE滾動條設定

google瀏覽器chrome設定滾動條樣式 courrlist webkit scrollbar courrlist webkit scrollbar track courrlist webkit scrollbar thumb courrlist webkit scrollbar thumb w...