Click here to Skip to main content
15,885,278 members
Home / Discussions / C#
   

C#

 
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 
GeneralRe: App Started With Rundll32.exe - Check If Open And Close It Pin
Kevin Marois2-May-16 8:48
professionalKevin Marois2-May-16 8:48 
GeneralRe: App Started With Rundll32.exe - Check If Open And Close It Pin
OriginalGriff2-May-16 9:41
mveOriginalGriff2-May-16 9:41 
AnswerRe: App Started With Rundll32.exe - Check If Open And Close It Pin
Richard Deeming4-May-16 2:13
mveRichard Deeming4-May-16 2:13 
QuestionConnect to ODBC located in Remote Machine Pin
Jassim Rahma2-May-16 3:59
Jassim Rahma2-May-16 3:59 
AnswerRe: Connect to ODBC located in Remote Machine Pin
Richard MacCutchan2-May-16 4:57
mveRichard MacCutchan2-May-16 4:57 
AnswerRe: Connect to ODBC located in Remote Machine Pin
Gerry Schmitz3-May-16 6:00
mveGerry Schmitz3-May-16 6:00 
QuestionHow to activate the Keyboard direction key "up key" to zoom the chart Pin
Member 120434382-May-16 2:57
Member 120434382-May-16 2:57 
AnswerRe: How to activate the Keyboard direction key "up key" to zoom the chart Pin
Dave Kreskowiak2-May-16 5:33
mveDave Kreskowiak2-May-16 5:33 
AnswerRe: How to activate the Keyboard direction key "up key" to zoom the chart Pin
Bernhard Hiller2-May-16 21:00
Bernhard Hiller2-May-16 21:00 
Questionfeature extraction methods in image quality assessment Pin
Safaeian30-Apr-16 22:28
Safaeian30-Apr-16 22:28 
AnswerRe: feature extraction methods in image quality assessment Pin
OriginalGriff30-Apr-16 23:02
mveOriginalGriff30-Apr-16 23:02 
Questionimage structural information Pin
Safaeian30-Apr-16 21:39
Safaeian30-Apr-16 21:39 
AnswerRe: image structural information Pin
Richard MacCutchan1-May-16 1:13
mveRichard MacCutchan1-May-16 1:13 
QuestionHello how to display images with the title from a file (in ListVeiw C #)? helpe please Pin
Member 1249073930-Apr-16 7:21
Member 1249073930-Apr-16 7:21 

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.