Random forms freeze when Mouse Wheel disable is used on a dialog f

G

Guest

Help! This problem has caused me lots of grief! The mouse wheel disable
code (from KB article 278379) seems to work fine with all forms that are
opened "normally". I have used the wheel disable code in at least 5
different applications on about 25 different forms seemingly without a
problem. I am exclusively using Access 2003 with all latest SPs.

But, users have complained about Access “getting hosed up†AFTER a detail
form is used. After troubleshooting, it’s clear that the Wheel Disable code
breaks Access when it is used on a simple form that is opened in dialog mode.
I have very simple MDB file that exemplifies the problem. Basically if the
disable code is used on a form that is opened in dialog mode Access chokes
and corrupts/freezes the MDI layout of the forms. Restarting Access is the
only way to get the forms working again.

EXAMPLE: Note each of the three forms in the example are basically the same
- all properties are the same and each has a simple two column table
(autonumber, text) set at as their record source, and these columns are set
as text boxes on the forms (just to show that the forms function ok). And
all three forms have the mouse wheel disable code exactly as KB 278379 states
(along with the basSubClassWindow and CMouseWheel modules). The code is
only un-commented and complied before MDE creation - so that the mouse wheel
is only disabled in the MDE file. There is never a problem with the forms
when the wheel disable code is commented out.

FormOne: two buttons: OpenFormTwo and OpenFormThreeAsDialog
FormTwo: one button: OpenFormOne
FormThree: Just the fields, Close the form by clicking the “Xâ€.

Basically you can switch between form one and form two by clicking the
buttons ( “DoCmd.OpenForm "frmTwo", acNormal, , , acFormEdit, acWindowNormalâ€
for example). All is well, the forms work fine, the mouse wheel is disabled.

So that leaves the “OpenFormThreeAsDialog†button. When this is clicked
form three opens as a dialog (DoCmd.OpenForm "frmThree", acNormal, , ,
acFormEdit, acDialog). Everything works find with form three, the wheel is
disabled.

BUT, when form three is closed, form TWO freezes and becomes unusable. Form
one is mostly ok, but form two is completely hosed. If the forms were set to
maximize, then the everything locks up when form two gets the focus.

What in the world is going wrong? Why is form two even effected when it
has nothing to do with form three (the form that opened as a dialog)????? If
I remove or comment the wheel disable code on form three, everything works
fine, if form three in not opened as a dialog, everything is fine.


The mouse wheel disable code blows up Access when a regular form is opened
in dialog mode (that uses the mouse disable code).


Maybe the CMouseWheel object is getting crossed linked or something?
 
G

Guest

Another weird thing, all forms exhibit a pseudo maximize after the problem
occurs (i.e. the dialog form is closed). A pseudo maximize is a form that
fills the MDI space but you can still see the borders (right inside the MDI
window) and the forms title bar is visible just below the tool bars. The
child windows never maximize again, but always stay within the MDI widow when
their “restore†button is clicked. Really weird…
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top