Visual Basic Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsProgrammingVisual Basic Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old May 31st, 2006, 07:59 AM
kumar-pln kumar-pln is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Oct 2005
Posts: 43 kumar-pln User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 17 h 5 m 43 sec
Reputation Power: 4
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

Reply With Quote
  #2  
Old May 31st, 2006, 09:16 AM
sync_or_swim's Avatar
sync_or_swim sync_or_swim is offline
Moderator
Click here for more information.
 
Join Date: Mar 2006
Location: South Wales
Posts: 1,932 sync_or_swim User rank is General 4th Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 4th Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 4th Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 4th Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 4th Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 4th Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 4th Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 4th Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 4th Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 4th Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 4th Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 4th Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 4th Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 4th Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 4th Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 4th Grade (Above 100000 Reputation Level) 
Time spent in forums: 1 Month 6 Days 22 h 36 m 35 sec
Reputation Power: 1243
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!!

Reply With Quote
  #3  
Old June 1st, 2006, 07:13 AM
kumar-pln kumar-pln is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Oct 2005
Posts: 43 kumar-pln User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 17 h 5 m 43 sec
Reputation Power: 4
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

Reply With Quote
  #4  
Old June 1st, 2006, 08:07 AM
sync_or_swim's Avatar
sync_or_swim sync_or_swim is offline
Moderator
Click here for more information.
 
Join Date: Mar 2006
Location: South Wales
Posts: 1,932 sync_or_swim User rank is General 4th Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 4th Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 4th Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 4th Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 4th Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 4th Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 4th Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 4th Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 4th Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 4th Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 4th Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 4th Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 4th Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 4th Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 4th Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 4th Grade (Above 100000 Reputation Level) 
Time spent in forums: 1 Month 6 Days 22 h 36 m 35 sec
Reputation Power: 1243
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?

Reply With Quote
  #5  
Old June 1st, 2006, 09:21 AM
sync_or_swim's Avatar
sync_or_swim sync_or_swim is offline
Moderator
Click here for more information.
 
Join Date: Mar 2006
Location: South Wales
Posts: 1,932 sync_or_swim User rank is General 4th Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 4th Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 4th Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 4th Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 4th Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 4th Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 4th Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 4th Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 4th Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 4th Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 4th Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 4th Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 4th Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 4th Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 4th Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 4th Grade (Above 100000 Reputation Level) 
Time spent in forums: 1 Month 6 Days 22 h 36 m 35 sec
Reputation Power: 1243
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

Reply With Quote
  #6  
Old June 1st, 2006, 11:09 AM
kumar-pln kumar-pln is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Oct 2005
Posts: 43 kumar-pln User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 17 h 5 m 43 sec
Reputation Power: 4
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

Reply With Quote
Reply

Viewing: ASP Free ForumsProgrammingVisual Basic Programming > Mdi form


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump



 Free IT White Papers!
 
How to Present Effectively Online
This white paper offers practical and actionable advice on the key steps that any presenter should consider as they plan and execute a Webinar or online meeting.

 
Open Source Security Myths
Open Source Software (OSS) is computer software whose source code is available to the general public with relaxed or non-existent intellectual property restrictions (or arrangement such as the public domain), and is usually developed with the input of many contributors.

 
Power and Cooling Capacity Management for Data Centers
This paper describes the principles for achieving power and cooling capacity management.

 
Scalable, Fault-Tolerant NAS for Oracle - The Next Generation
For several years NAS has been evolving as a storage alternative for Oracle databases, and for good reason: NAS is quite often the simplest, most cost-effective storage approach for Oracle. Learn about the benefits that HP's approach to scalable NAS brings to Oracle environments in this comprehensive white paper.

 
Understanding Web Application Security Challenges
This white paper discusses many common threats and preventive measures for Web application security, and explains what you can do to help protect your organization.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2009 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway
Stay green...Green IT