Click here to Skip to main content
15,896,912 members
Home / Discussions / C#
   

C#

 
Questionproject Convert of Binary To Decimal Pin
Member 120777803-May-16 19:23
Member 120777803-May-16 19:23 
AnswerRe: project Convert of Binary To Decimal Pin
OriginalGriff3-May-16 19:43
mveOriginalGriff3-May-16 19:43 
AnswerRe: project Convert of Binary To Decimal Pin
Patrice T3-May-16 21:56
mvePatrice T3-May-16 21:56 
AnswerRe: project Convert of Binary To Decimal Pin
Pete O'Hanlon3-May-16 23:32
mvePete O'Hanlon3-May-16 23:32 
AnswerRe: project Convert of Binary To Decimal Pin
DaveyM694-May-16 4:21
professionalDaveyM694-May-16 4:21 
Questioninterface inherits from interface, method over-ridden: my brain is stuck Pin
BillWoodruff3-May-16 7:24
professionalBillWoodruff3-May-16 7:24 
AnswerRe: interface inherits from interface, method over-ridden: my brain is stuck Pin
Sascha Lefèvre3-May-16 10:20
professionalSascha Lefèvre3-May-16 10:20 
GeneralRe: interface inherits from interface, method over-ridden: my brain is stuck Pin
BillWoodruff4-May-16 2:55
professionalBillWoodruff4-May-16 2:55 
GeneralRe: interface inherits from interface, method over-ridden: my brain is stuck Pin
Sascha Lefèvre4-May-16 4:45
professionalSascha Lefèvre4-May-16 4:45 
GeneralRe: interface inherits from interface, method over-ridden: my brain is stuck Pin
BillWoodruff4-May-16 8:49
professionalBillWoodruff4-May-16 8:49 
QuestionC# Get system information on remote computer and display result in a listbox Pin
oluwatosin agbabiaka2-May-16 15:15
oluwatosin agbabiaka2-May-16 15:15 
AnswerRe: C# Get system information on remote computer and display result in a listbox Pin
Garth J Lancaster2-May-16 15:51
professionalGarth J Lancaster2-May-16 15:51 
AnswerRe: C# Get system information on remote computer and display result in a listbox Pin
Pete O'Hanlon2-May-16 19:34
mvePete O'Hanlon2-May-16 19:34 
AnswerRe: C# Get system information on remote computer and display result in a listbox Pin
ZurdoDev3-May-16 3:07
professionalZurdoDev3-May-16 3:07 
QuestionGet 802.11 frames from access point ? Pin
mohammed qaid2-May-16 12:55
mohammed qaid2-May-16 12:55 
AnswerRe: Get 802.11 frames from access point ? Pin
Nathan Minier3-May-16 1:45
professionalNathan Minier3-May-16 1:45 
GeneralRe: Get 802.11 frames from access point ? Pin
mohammed qaid3-May-16 7:52
mohammed qaid3-May-16 7:52 
GeneralRe: Get 802.11 frames from access point ? Pin
Nathan Minier3-May-16 7:59
professionalNathan Minier3-May-16 7:59 
GeneralRe: Get 802.11 frames from access point ? Pin
mohammed qaid3-May-16 12:45
mohammed qaid3-May-16 12:45 
QuestionHow can I change the default maximum size of windows? Pin
Member 114640432-May-16 9:20
Member 114640432-May-16 9:20 
AnswerRe: How can I change the default maximum size of windows? Pin
Eddy Vluggen3-May-16 3:40
professionalEddy Vluggen3-May-16 3:40 
AnswerRe: How can I change the default maximum size of windows? Pin
BillWoodruff3-May-16 9:09
professionalBillWoodruff3-May-16 9:09 
What is stopping you from editing the 'MaximumSize Property of your Form in the Property Browser at design-time ? Or, setting that Property at run-time ?

The one side-effect you may not expect ... if you have set the Form 'StartPosition to 'CenterScreen ... is that when you then 'Maximize, the Form may appear with its upper-left corner at screen upper-left.

You can deal with that by writing a Form 'ReSize event handler that does the "right thing" to center the Form in the screen area
C#
private void Form1_Resize(object sender, EventArgs e)
{
    if (this.WindowState == FormWindowState.Maximized)
    {
        this.WindowState = FormWindowState.Normal;
        this.Size = MaximumSize;

        Rectangle scrn = Screen.PrimaryScreen.WorkingArea;

        this.Left = scrn.Width / 2 - this.Width / 2;
        this.Top = scrn.Height / 2 - this.Height / 2;

        this.Refresh();
    }
}
And, of course, you could modify this to do something when the WindowState was 'Minimized. You can also do weird stuff like setting a Form Size larger than Screen Size.

However, I suggest you think long and hard about modifying the behavior of the Maximize, or Minimize, buttons on a WinForm. People often expect those to behave in a "standard" way. I have yet to see an actual case where having a WinForm sized larger than screen size was "good design."
«There is a spectrum, from "clearly desirable behaviour," to "possibly dodgy behavior that still makes some sense," to "clearly undesirable behavior." We try to make the latter into warnings or, better, errors. But stuff that is in the middle category you don’t want to restrict unless there is a clear way to work around it.» Eric Lippert, May 14, 2008

QuestionApp Started With Rundll32.exe - Check If Open And Close It Pin
Kevin Marois2-May-16 8:00
professionalKevin Marois2-May-16 8:00 
AnswerRe: App Started With Rundll32.exe - Check If Open And Close It Pin
OriginalGriff2-May-16 8:08
mveOriginalGriff2-May-16 8:08 
AnswerRe: App Started With Rundll32.exe - Check If Open And Close It Pin
OriginalGriff2-May-16 8:13
mveOriginalGriff2-May-16 8:13 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.