Link to home
Start Free TrialLog in
Avatar of alexiat
alexiat

asked on

MonitorFromWindow AV

When a user resizes my app I trap the WMSize to make sure the app doesn't grow wider than the workspace.  I need to keep a maximized app from going over the Vista sidebar if it is "stay on top".

We have a customer who is using a laptop.  At work this laptop is used with a docking station.

When I call Screen.MonitorFromWindow it sometimes throws an AV on his laptop.  Can anyone tell me why and how to fix?  I am assuming it has to do with the docking station since have we no other customer reporting this problem.

Thanks.
Avatar of cebasso
cebasso
Flag of United States of America image

Avatar of Emmanuel PASQUIER
does the problem occurs when the user is using the docking station, or when he is out of it ?
Has he changed that state since the application started (docked in or out) ?
ASKER CERTIFIED SOLUTION
Avatar of Emmanuel PASQUIER
Emmanuel PASQUIER
Flag of France image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
In short, you'd better gather a lot more intel about your user problem : OS, context of the error, and also context of the times there is no error etc...
Try to locate the exact place in Delphi code where the AV occurs. For this, you can use the "Find Execution Error" delphi function with the hexadecimal error address when the AV occurs in your user laptop.
Avatar of alexiat
alexiat

ASKER

Thanks.  Now I have an understanding of the problem and I can work with the user to find out exactly when and where the problem is happening.