Solved

How do I maximize a form that is minimized (through code)

Posted on 2006-10-26
5
217 Views
Last Modified: 2010-04-23
Friends,

I have a form that is running in the background (minimized), and it is listening to a TCP Stream (and consequently parsing the strings coming out of the stream).  Now, when a valid string is found, and matches the criteria below, I want to maximize the screen.  What is the syntax for maximizing a form?

Thanks in advance!

Btw, here is the code where, if the condition is met, the form would need to be maximized.

Case "F"
                If PresentFlagState = Nothing Then
                    PresentFlagState = AMBParser_Flag.GetValue(AMBMLPValidString, 4)
                Else
                    Dim TestForNewFlagState As String = Nothing
                    TestForNewFlagState = AMBParser_Flag.GetValue(AMBMLPValidString, 4)
                    If PresentFlagState = TestForNewFlagState Then
                        NewFlagStateFound = False
                    Else
                        NewFlagStateFound = True
                        PresentFlagState = TestForNewFlagState
                    End If
                End If

                If NewFlagStateFound = True Then
                    'Get Flag Detail
                    Select Case PresentFlagState
                        Case PresentFlagState = "Green"
                            AVAOMain.??? '<-This is where the form would need to be maximized.


Regards,
Eric
0
Comment
Question by:indy500fan
  • 2
  • 2
5 Comments
 
LVL 52

Accepted Solution

by:
Carl Tawn earned 500 total points
ID: 17811957
Try:

    AVAOMain.WindowState = FormWindowState.Maximized
0
 
LVL 63

Expert Comment

by:Fernando Soto
ID: 17811975
Try this

        AVAOMain.WindowState = FormWindowState.Maximized

Fernando
0
 
LVL 63

Expert Comment

by:Fernando Soto
ID: 17811981
Sorry carl_tawn did not refresh before posting.
0
 

Author Comment

by:indy500fan
ID: 17811983
Sorry Fernando, carl_tawn beat you to it.  :)
0
 
LVL 52

Expert Comment

by:Carl Tawn
ID: 17811993
No prob FernandoSoto, happens to us all ;o)
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I think the Typed DataTable and Typed DataSet are very good options when working with data, but I don't like auto-generated code. First, I create an Abstract Class for my DataTables Common Code.  This class Inherits from DataTable. Also, it can …
A while ago, I was working on a Windows Forms application and I needed a special label control with reflection (glass) effect to show some titles in a stylish way. I've always enjoyed working with graphics, but it's never too clever to re-invent …
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question