c# - Top of program opening off screen -


i've written c# winforms app, tested on several pcs, worked without problem. when installed on grandmother's, top of program (including minimize, maximize, , exit buttons) cut off, worse, not move form around show buttons, since move program have click top. tried alt > tab > move, tried position cursor on top, couldn't since top off screen..

i couldn't take screenshot on pc, , i'm not reproduce error. know of causing , way can assure doesn't happen other users?

i made small application shows how set left-upper-corner of application left-upper-corner of screen if it's outside screen.

public partial class form1 : form { public form1() { this.initializecomponent(); this.startposition = formstartposition.centerscreen; this.locationchanged += onlocationchanged; } private void onlocationchanged(object sender, eventargs eventargs) { screen screen = screen.fromhandle(this.handle); if (!screen.workingarea.contains(this.location)) this.location = screen.bounds.location; } } 

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 -