Problem when subclassing form (1 Viewer)

NikBab

New member
Local time
Today, 08:34
Joined
Sep 16, 2019
Messages
4
went back and review the sequence of events of the form.
when you double-click the title bar of the form, the Resize event fires.
so I capture it and direct it to my user defined sub.

there is no timer, no class, no subclassing here.
uses api to get the mdiClient of MSAccess.

32bit and 64bit mso compatible.
also tested on MSA 2019 x64. .
Your solution is very interesting but I think that it causes some flickering when the form is being resized by dragging one of its edges or corners. Looking at your code I guess that this happens because the resize event occurs constantly during this operation and the form is being maximized and restored alternately .

Best regards
 
Last edited:

arnelgp

error reading drive A:
Local time
Today, 16:34
Joined
May 7, 2009
Messages
11,121
firstly define what is subcassing:

https://en.wikipedia.org/wiki/Inheritance_(object-oriented_programming)#Subclasses_and_superclasses

access is written in c++.
when you create a form in any programming language, you already making a subclass.

in access since the form is already derived from base class Form, it is already subclassed.
you cannot (the compiler will not let you) use the base class of form.
so you need to subclass it. it has most of the the components/events you will need but you can override or enhance its functionality.
 

arnelgp

error reading drive A:
Local time
Today, 16:34
Joined
May 7, 2009
Messages
11,121
it's really challenging.

no more flicker, no timer, no class, no subclassing.
 

Attachments

  • db2 (1) (1).mdb
    264 KB · Views: 21

arnelgp

error reading drive A:
Local time
Today, 16:34
Joined
May 7, 2009
Messages
11,121
one comment though with timer.
it is set to 500 (500 msec?), it is fast that it instantly catch the double click on the title bar. there is no entry point of checking whether the form is already maximized, so as to temparily kill the timer.
this might interfere when you are doing critical updates on large dataset, specially on a long query. the worst, the outcome might be disastrous to your data.
as always the liberty is up to you.
 

Users who are viewing this thread

Top Bottom