Missing WindowState Property

J

JerryB

Hi

I am new to VB.Net so please bear with me as I am not sure if this is
the right group to ask my question. Since this is a personal home
project I am using VB 2010 Express.

I am trying to learn how to make a tray application. In order to
display, or not display, the form it seems that I must use the form's
WindowState property. In design mode I see that the form has a
WindowState property but if I type FormName.WindowState or
Me.WindowState it seems that the form does not have a WindowState
property, according to intellisense. I have searched the web, news
groups and Microsoft and cannot seem to find the answer.

In my code I have specified:

Imports System
Imports System.Windows.Forms

and I have a reference to System.Windows.Forms (based on a
recommendation I read).

I have the following form properties set in design mode:

ControlBox = False
FormBorderStyle = Sizable
ShowInTaskBar = True
TopMost = False
WindowState = Normal

Is this a normal condition or am I missing something? If it is a
normal condition how do I tell if the form is Minimized or not?

If any other information is needed please advise and I will supply
it.

Thank you in advance for considering this issue and any response.

Jerry B
 
J

JerryB

Hi

I am new to VB.Net so please bear with me as I am not sure if this is
the right group to ask  my question.   Since this is a personal home
project I am using VB 2010 Express.

I am trying to learn how to make a tray application. In order to
display, or not display, the form it seems that I must use the form's
WindowState property.  In design mode I see that the form has a
WindowState property but if I type FormName.WindowState or
Me.WindowState it seems that the form does not have a WindowState
property, according to intellisense.   I have searched the web, news
groups and Microsoft and cannot seem to find the answer.

In my code I have specified:

Imports System
Imports System.Windows.Forms

and I have a reference to System.Windows.Forms (based on a
recommendation I read).

I  have the following form properties set in design mode:

ControlBox = False
FormBorderStyle = Sizable
ShowInTaskBar = True
TopMost = False
WindowState = Normal

Is this a normal condition or am I missing something?  If it is a
normal condition how do I tell if the form is Minimized or not?

If  any other information is needed please advise and I will supply
it.

Thank you in advance for considering this issue and any response.

Jerry B

Hi

Please ignore my help request.

I changed

ControlBox = False -> ControlBox = true
FormBorderStyle = Sizable -> FormBorderStyle = None

Intellisense still did not show WindowState property with
Me.WindowState. In form load event I tried Msgbox (Me.WindowState)
ignoring intellisense. The form state displayed was correct. After
this Intellisense started showing WindowState property. Huh?

Jerry B
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top