We're a community of 1.1M IT Pros here for help, advice, solutions, professional growth and fun. Join us!
1,080,688 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Start New Discussion Reply to this Discussion

Delphi second monitor activation problem

I am having a problem in Delphi with the use of multiple monitors.

My application consists of a main form, with several different kinds of child forms. If I started running my application (not from Delphi – the executable), and I then enable a second monitor, and then move from one type of child form to another, my application would immediately crash. The same thing happens if I have started my application with two monitors enabled, and then disable the secondary monitor.

I don’t get this behavior if I enable or disable the secondary monitor before starting my application – it only happens when I make the change while the application is running.

I found that if I set the DefaultMonitor property on all of my child forms to dmDesktop, this problem went away. I could then close one type of child form, open another, no problem.

BUT – even though the child forms now work, if I try to open a standard Delphi dialog box, like TColorDialog or TFontDialog, I get an “access violation at address…” error. This same thing happens if I call the routine ShowMessage. If I try to open one or two more such dialogs, eventually the program completely crashes.

Oddly enough, this same thing happens to Delphi itself if I disable or enable a secondary monitor – it immediately crashes (I get the charming dialog “Delphi-32 Development Environment has encountered a problem and needs to close. We are sorry for the inconvenience,” etc.)

Admittedly, I am running an older version of Delphi (version 5.0, build 5.62) and Windows XP, version 5.1. This same thing happens when I run the executable on a newer laptop that is running Windows Vista.

Has anyone else ever run into this problem?

1
Contributor
1
Reply
1 Month
Discussion Span
2 Years Ago
Last Updated
3
Views
amarkevans
Newbie Poster
2 posts since Mar 2010
Reputation Points: 10
Solved Threads: 0
Skill Endorsements: 0

I recently downloaded a 30-day demo version of Delphi XE. I tested it on the scenario described, and it seems to have fixed the problem. I guess maybe 11-12 years ago, not as many people were working with dual monitors? :)

amarkevans
Newbie Poster
2 posts since Mar 2010
Reputation Points: 10
Solved Threads: 0
Skill Endorsements: 0

This article has been dead for over three months: Start a new discussion instead

Post: Markdown Syntax: Formatting Help
 
You
View similar articles that have also been tagged:
 
© 2013 DaniWeb® LLC
Page generated in 0.0650 seconds using 2.68MB