Solved

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

Posted on 2006-10-26
5
201 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 62

Expert Comment

by:Fernando Soto
ID: 17811975
Try this

        AVAOMain.WindowState = FormWindowState.Maximized

Fernando
0
 
LVL 62

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.

896 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now