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)
--------------------------------------------------------------------
This reply is provided AS IS, without warranty (express or implied).
--------------------
Reply-To: "Geoff Jones" <no********@email.com>
From: "Geoff Jones" <no********@email.com>
Newsgroups: microsoft.public.dotnet.languages.vb
Subject: Q: Status Bar Vanishes
Date: Sat, 25 Jun 2005 14:13:28 +0100
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
Lines: 19
Message-ID: <42***********************@news.dial.pipex.com>
Organization: Pipex
NNTP-Posting-Host: userc025.dsl.pipex.com
X-Trace: 1119705200 news.dial.pipex.com 13469 62.188.50.25:1294
X-Complaints-To: ab***@uk.uu.net
Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!newsfee d00.sul.t-online.de!t-online.de!newsfeed.icl.net!newsfeed.fjserv.net!new s.tele.dk!news.tele.dk!
small.news.tele.dk!lnewsoutpeer00.lnd.ops.eu.uu.ne t!lnewsinpeer00.lnd.ops.eu.uu.net!lnewspost00.lnd. ops.eu.uu.net!emea.uu.net!not-for-mailXref: TK2MSFTNGXA01.phx.gbl microsoft.public.dotnet.languages.vb:94145
X-Tomcat-NG: microsoft.public.dotnet.languages.vb
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