Link to home
Start Free TrialLog in
Avatar of indy500fan
indy500fan

asked on

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

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
ASKER CERTIFIED SOLUTION
Avatar of Carl Tawn
Carl Tawn
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Try this

        AVAOMain.WindowState = FormWindowState.Maximized

Fernando
Sorry carl_tawn did not refresh before posting.
Avatar of indy500fan
indy500fan

ASKER

Sorry Fernando, carl_tawn beat you to it.  :)
No prob FernandoSoto, happens to us all ;o)