Q: Status Bar Vanishes

G

Geoff Jones

Hi

I have an application which puts a status bar at the bottom of a form. The
form is initially maximised so that the status bar appears directly above
the desktop Taskbar. However, if I minimise the form and then maximise it
the status bar appears almost under the taskbar.

Has anybody else experienced something similar or tell me how to resolve my
problem?

Whilst trying to sort this out I tried to capture when a form is minimised
or maximised, however I could not find the event. Can anybody tell me what
event I need to capture?

Thanks

Geoff
 
R

Robert Schoen

Not sure about your max/min status bar issue. I will have to look into that this week...hopefully.

I think that we (VB) should make this easier to capture max/min events like you are asking. The event that is actually fired in the "Resize" event. However if you really
want to capture specifically the max/min events for the form, you can do something like the below code snippet...

Hopefully this will help you out. What you should do is in Help look at topics related to "Message Stuctures". But...basically what is happening below is we are listening
to os messages that are occuring..and check to see if the message value is for maximizing a window. Hopefully this will get you started for listening to the events for
max/min.

Private Const WM_SYSCOMMAND As Integer = &H112
Private Const SC_MAXIMIZE As Integer = &HF030

Protected Overrides Sub WndProc(ByRef m As Message)
' Listen for operating system messages - specificall for...
Select Case (m.Msg)

Case WM_SYSCOMMAND

' The WParam value identifies what is occurring.
If m.WParam.ToInt32 = SC_MAXIMIZE Then
MsgBox("We are maximizing")
'ElseIf m.WParam.ToInt32 = <somevalue here for min>
End If

End Select
MyBase.WndProc(m)
End Sub


Robert S (MSFT Visual Basic QA)
 
R

Robert Schoen

FYI - I think having a more intuitive way of capturing max/min events is useful. I have logged a product bug for the addition of such support.

I was not able to repro the issue you described - related to status bar showing up almost under the windows task bar. Is the windows task bar on your machine not set to
a default setting? What can you tell me about your settings? Specifically Screen Area...

Can your repro with a basic windows application with status bar?

Robert S (MSFT Visual Basic QA)
 

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