עבור לתוכן
View in the app

A better way to browse. Learn more.

HWzone

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

השגת Handle של Scroller בכדי להשיג מידע עליו בעזרת הפונקצייה GetScrollInfo

Featured Replies

פורסם

שלום לכולם,

אני מנסה להשיג את את ה-Handle של הScroller של החלון הנוכחי שהמשתמש נמצא בו.

חשבתי להישתמש בפונקצייה GetFocus שאמורה להחזיר לי את ה-Handle של הפקד

שהמשתמש נמצא עליו בפוקוס אך הפונקצייה אינה עובדת (אפילו אם לחצתי על הScroller בכדי להיכנס לפוקוס):

    Dim si As New SCROLLINFO()
si.cbSize = Marshal.SizeOf(si)
si.fMask = ScrollInfoMask.SIF_POS
GetScrollInfo(Handle, ScrollBar, si)
Debug.WriteLine(Marshal.GetLastWin32Error)
Return si.nPos

ניתן ליראות כי אמרתי לתוכנה לרשום בחלון של ה-Debug את מספר השגיאה, המספר הוא 1400 מה שאומר לפי MSDN:

"Invalid Window Handle."

בעיקרון הפונקצייה כן עבדה בתוך התוכנה כאשר הצבתי Textbox ואפילו לא הייתה שגיאה. אבל בחלונות אחרים

ובFirefox היא לא עבדה, אם אני לא טועה ה-Handle שאני מקבל מה-GetFocus אינו כניראה ה-Handle המתאים או לפחות לא עובד.

האם יש דרך טובה יותר להשיג את ה-Handle של ה-Scroller של החלון שהמשתמש נמצא בו בפוקוס בכדי שאוכל להישתמש

בפונקצייה זו?

תודה רבה!

ארכיון

דיון זה הועבר לארכיון ולא ניתן להוסיף בו תגובות חדשות.

דיונים חדשים

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.