Tech changes fast. You can learn faster. That’s why we’re bringing professional training courses to Experts Exchange. With a subscription, you can access all the Cloud Class® courses to expand your education, prep for certifications, and get top-notch instructions.

Private Sub Form_Unload(Cancel As Integer)
Call SetWindowLong(hwnd, GWL_WNDPROC, OldProc)
End Sub
'=================================
Note: this code use subclassing, so don't stop it with IDE stop button, use form [x] button to close form.

- if i add "End" on query unload it crashes and i must add it to end the app if other windows are opened.
- i removed AutoRedraw = true because i draw everything with api, so this is faster a lot ! is it good or bad ?