Need a small app...

Trigger said:
Great thanks again :)

EDIT: Problem... I can still close it by the red 'x' :o :confused: I do heartily appologise for being such a pest :(

There shouldn't even be a close button. Something is rotten in the state of Denmark.

Will says:
unless my browser is deciding to cache it for some odd reason
Will says:
aha
Will says:
that's the reason

^ try
 
Hi there,

Sorry to but in, but i was just wondering if it auto docks to the bottom right on any resolution?

If so how did you go about doing that?

Thanks.
 
Conrad11 said:
Hi there,

Sorry to but in, but i was just wondering if it auto docks to the bottom right on any resolution?

If so how did you go about doing that?

Thanks.
A quick peak at the disassembly reveals Screen.GetWorkingArea() was used. :)
 
Conrad11 said:
Hi there,

Sorry to but in, but i was just wondering if it auto docks to the bottom right on any resolution?

If so how did you go about doing that?

Thanks.

It doesn't dock it, it just moves it to the bottom right of the working area (that is, the desktop minus the taskbars and any docked windows).

Code:
Rectangle workingArea = Screen.GetWorkingArea(this);
int x = workingArea.Width - this.Width - 5;
int y = workingArea.Height - this.Height - 5;
this.SetDesktopLocation(x, y);

The "-5" just adds a little bit of padding away from the edges of the screen.

I'm pretty sure you need to do this after the form has loaded, although I'm not sure what setting the start position to "manual" does but I cba to try :)
 
How did the trial run go
shobon.png
 
Back
Top Bottom