|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Mdi form
do anybody have an idea how i can maximize my mid form, in such a way that my windows status bar should be not seen when i run my app
any idea |
|
#2
|
||||
|
||||
|
Hi,
I would also be interested to know how this is done!! It is easy to hide the taskbar but I am not sure how you would use the screen real estate for your app!! The following code enables you to show/hide the taskbar: Code:
Private Declare Function ShowWindow Lib "user32" _
(ByVal hwnd As Long, ByVal nCmdShow As Long) As Long
Private Declare Function FindWindow Lib "user32" _
Alias "FindWindowA" (ByVal lpClassName As String, _
ByVal lpWindowName As String) As Long
Private Declare Function FindWindowEx Lib "user32" _
Alias "FindWindowExA" (ByVal hWnd1 As Long, _
ByVal hWnd2 As Long, _
ByVal lpsz1 As String, _
ByVal lpsz2 As String) As Long
Sub TaskBar(blnValue As Boolean)
Dim lngHandle As Long
Dim lngStartButton As Long
lngHandle = FindWindow("Shell_TrayWnd", "")
If blnValue Then
ShowWindow lngHandle, 5
Else
ShowWindow lngHandle, 0
End If
End Sub
Calling the function with: TaskBar(False) will hide the taskbar, TaskBar(True) will bring it back!! |
|
#3
|
|||
|
|||
|
mdi form
thanks,
it works but, my mdi form does not resizes accordingly, instead it shows a blue bar (ie color of the screen) below is there anything to solve this it would be great if it is solved Thanks in advance |
|
#4
|
||||
|
||||
|
No I'm sorry, thats what I mean't - I know how to get rid of the TaskBar, but I dont know how to resize your form to use that blue bar at the bottom where the taskbar was!!! What happens when you set Form1.Windowstate = vbMaximized? will it fill the space?
|
|
#5
|
||||
|
||||
|
I've had a quick look on the web and I think the only way you can achieve what you want would be to use the "Autohide" property of the taskbar! I dont know if you have used this before, you can see what it does if you go to Start -> Settings -> TaskBar and Start Menu, then tick the Autohide box and click OK.
The only problem is that I have found conflicting reports on the web. It seems that Microsoft have not allowed developers the functionality of being able to set the autohide property programmatically, I have found several examples of code which allow you to display the current settings, heres an example: http://vbnet.mvps.org/index.html?code/screen/shappbarmessage.htm The only possible method which looks as if it may let you alter anything is ABM_GETSTATE, but it seems to be that this only works on user defined tool bars and not the Windows TaskBar!!!! You could try something like this: Code:
Private Declare Function SHAppBarMessage Lib "shell32" (ByVal dwMessage As Long, pData As APPBARDATA) As Long Private Const ABM_GETSTATE = &H4 Private Const ABM_SETSTATE = &HA Private Const ABS_AUTOHIDE = &H1 Private Const ABS_ALWAYSONTOP = &H2 Private Type RECT Left As Long Top As Long Right As Long Bottom As Long End Type Private Type APPBARDATA cbSize As Long hwnd As Long uCallbackMessage As Long uEdge As Long rc As RECT lParam As Long End Type Sub TaskbarAutohideOn() Dim ABD As APPBARDATA ABD.cbSize = Len(ABD) SHAppBarMessage ABM_GETSTATE, ABD ABD.lParam = ABS_AUTOHIDE SHAppBarMessage ABM_SETSTATE, ABD End Sub Sub TaskbarAutohideOff() Dim ABD As APPBARDATA ABD.cbSize = Len(ABD) SHAppBarMessage ABM_GETSTATE, ABD ABD.lParam = ABS_ALWAYSONTOP SHAppBarMessage ABM_SETSTATE, ABD End Sub Private Sub Command1_Click() TaskbarAutohideOn End Sub Private Sub Command2_Click() TaskbarAutohideOff End Sub Mind you, that said, I would be pretty upset if I ran an application which changed the settings of my machine!! Have a look at this thread: http://vbcity.com/forums/topic.asp?tid=1431 |
|
#6
|
|||
|
|||
|
mdi
hi,
is there anything other that i can hide my windows status bar during running my app. and my app. status bar should be there at that position, i mean to say that i want to utilise the whole screen thanx if it done |
![]() |
| Viewing: ASP Free Forums > Programming > Visual Basic Programming > Mdi form |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|