Delphi 2010 forms shows on "wrong" monitor -


i have simple test app, 1 empty form, , second containing tbutton. button script this:-

procedure tform1.button1click(sender: tobject); begin   form2.show(); end; 

form2 auto-created @ startup. there's no other code @ all.

when run app, can press button , form2 appears. can reposition/resize form2 on primary monitor, , close it. if press form1 button again, form2 correctly reappears in position last at. fine far...

however, if position form2 onto secondary monitor, close it, , press button, form2 appears on primary monitor!

i want form reappear on monitor last on - how can behaviour??

this because default value form's defaultmonitor property dmactiveform.

set form2's defaultmonitor dmdesktop, , problem resolved.


Comments

Popular posts from this blog

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

c++ - qgraphicsview horizontal scrolling always has a vertical delta -