Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

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.

VB & Subclassing eines Formulars

Empfohlene Antworten

Hi!

Ich möchte ein Formular subclassen, in etwa so:

Option Explicit


Private Declare Function SetWindowLong Lib "user32" _

        Alias "SetWindowLongA" (ByVal hWnd As Long, _

        ByVal nIndex As Long, ByVal dwNewLong As Long) _

        As Long


Private Declare Function CallWindowProc Lib "user32" _

        Alias "CallWindowProcA" (ByVal lpPrevWndFunc _

        As Long, ByVal hWnd As Long, ByVal Msg As _

        Long, ByVal wParam As Long, ByVal lParam As _

        Long) As Long


Private Const WM_NCLBUTTONDBLCLK = &HA3

Private Const WM_NCLBUTTONDOWN = &HA1

Private Const WM_NCLBUTTONUP = &HA2


Const GWL_WNDPROC = (-4&)

Dim PrevWndProc&




Public Sub Init(hWnd As Long)

  PrevWndProc = SetWindowLong(hWnd, GWL_WNDPROC, AddressOf SubWndProc)

End Sub


Public Sub Terminate(hWnd As Long)

  Call SetWindowLong(hWnd, GWL_WNDPROC, PrevWndProc)

End Sub


Private Function SubWndProc(ByVal hWnd As Long, _

                            ByVal Msg As Long, _

                            ByVal wParam As Long, _

                            ByVal lParam As Long) As Long


  If Msg = WM_NCLBUTTONDBLCLK Then

     MsgBox ("DoubleClick")

  End If

  SubWndProc = CallWindowProc(PrevWndProc, hWnd, Msg, wParam, lParam)

End Function

Nun habe ich folgendes Problem: Das Doppelklickereignis wird in den Non-Client-Bereichen mit der Message-Box quittiert, in den Client-Bereichen aber nicht! Hängt die Varieble Msg von dem Bereich ab, auf den ich klicke?

Ich hoffe, einer von Euch kann mir helfen.

cu, frankos

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

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.