Real Software Forums

The forum for Real Studio and other Real Software products.
[ REAL Software Website | Board Index ]
It is currently Mon Mar 30, 2020 11:03 am
xojo

All times are UTC - 5 hours




Post new topic Reply to topic  [ 19 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Show and Hide the task bar from application ?
PostPosted: Thu Apr 05, 2012 8:26 am 
Offline

Joined: Tue Dec 27, 2011 8:54 am
Posts: 139
Location: India
Hi All,

I have a desktop application which contains a window. In the window contains a Segment control.
In the segment control i have added two text : On and Off.

Quote:
My question is : how to show and Hide the OS task bar on the basic of this two values means when the segment value is "On" then "Task Bar" is visible and if "Off" then it is Invisible.



Thanks,
Prakash

_________________
PK Pothal
Software Developer in REAL STUDIO 2011r4.3, ASP.NET, VB.NET, C# AND SQL SERVER 2005/08
OS:WINDOWS N MAC


Top
 Profile  
Reply with quote  
 Post subject: Re: Show and Hide the task bar from application ?
PostPosted: Thu Apr 05, 2012 8:50 am 
Offline

Joined: Thu Dec 01, 2011 2:13 pm
Posts: 288
Hmm... Window.MenuBarVisible works on Mac with the dock, not sure bout eindows.

_________________
Mac OS X 10.3-10.8
Windows 2000 (I know it sucks)
Windows Server 2007

You want a bunch of new classes and web styles? realstudiodevspot.com (search there for Web Styles Plugin)
Folderitem is too hard? File Bin Class
I hate cows.


Top
 Profile  
Reply with quote  
 Post subject: Re: Show and Hide the task bar from application ?
PostPosted: Thu Apr 05, 2012 9:07 am 
Offline

Joined: Tue Dec 27, 2011 8:54 am
Posts: 139
Location: India
Hi NaNdummy,

yes..menu bar is working fine in both but i was talking about "Task bar" ?


Thanks,
Prakash

_________________
PK Pothal
Software Developer in REAL STUDIO 2011r4.3, ASP.NET, VB.NET, C# AND SQL SERVER 2005/08
OS:WINDOWS N MAC


Top
 Profile  
Reply with quote  
 Post subject: Re: Show and Hide the task bar from application ?
PostPosted: Thu Apr 05, 2012 9:14 am 
Offline

Joined: Thu Dec 01, 2011 2:13 pm
Posts: 288
On mac, the dock will be hidden in this case.
I thought that this will happen in windows with the task bar... Perhaps.

_________________
Mac OS X 10.3-10.8
Windows 2000 (I know it sucks)
Windows Server 2007

You want a bunch of new classes and web styles? realstudiodevspot.com (search there for Web Styles Plugin)
Folderitem is too hard? File Bin Class
I hate cows.


Top
 Profile  
Reply with quote  
 Post subject: Re: Show and Hide the task bar from application ?
PostPosted: Thu Apr 05, 2012 9:23 am 
Offline

Joined: Tue Dec 27, 2011 8:54 am
Posts: 139
Location: India
Yes..i am talking about windows Os.

_________________
PK Pothal
Software Developer in REAL STUDIO 2011r4.3, ASP.NET, VB.NET, C# AND SQL SERVER 2005/08
OS:WINDOWS N MAC


Top
 Profile  
Reply with quote  
 Post subject: Re: Show and Hide the task bar from application ?
PostPosted: Thu Apr 05, 2012 1:19 pm 
Offline
User avatar

Joined: Mon Apr 02, 2007 2:08 am
Posts: 1225
Location: San Francisco, CA, USA
The Window.MenuBarVisible property controls system-wide UI elements. Under Windows, setting this to False will make the Taskbar, notification area, and Start button invisible.

It should be noted that the taskbar/Start button belong to the user; applications should not override the user's preferences without a very good reason/user permission.

_________________
Boredom Software


Top
 Profile  
Reply with quote  
 Post subject: Re: Show and Hide the task bar from application ?
PostPosted: Thu Apr 05, 2012 2:03 pm 
Offline
User avatar

Joined: Sun Aug 12, 2007 10:10 am
Posts: 1086
Location: Boiling Springs, SC
This is VB6 code..but with minor tweaking it can be used for Real studio and includes everything you need and more

API Declares

'**************************************
'Windows API/Global Declarations for :Taskbar Disable/Enable
'**************************************
Private Declare Function EnableWindow Lib "user32" (ByVal hwnd As Long, ByVal fEnable 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


Now the Code:

'**************************************
' Name: Taskbar Disable/Enable
' Description:disable/enable taskbar icons | Disable/Enable Start Button and Disable/Enable Hidden Icons on taskbar have a look (simple things)

'Enable Start Button
Dim shelltraywnd As Long
Dim button As Long
shelltraywnd = FindWindow("shell_traywnd", vbNullString)
button = FindWindowEx(shelltraywnd, 0&, "button", vbNullString)
Call EnableWindow(button, 1)
'......................................
'Disable Start Button
Dim shelltraywnd As Long
Dim button As Long
shelltraywnd = FindWindow("shell_traywnd", vbNullString)
button = FindWindowEx(shelltraywnd, 0&, "button", vbNullString)
Call EnableWindow(button, 0)
'.......................................
'Enable Taskbar
Dim shelltraywnd As Long
Dim rebarwindow As Long
Dim mstaskswwclass As Long
Dim toolbarwindow As Long
shelltraywnd = FindWindow("shell_traywnd", vbNullString)
rebarwindow = FindWindowEx(shelltraywnd, 0&, "rebarwindow32", vbNullString)
mstaskswwclass = FindWindowEx(rebarwindow, 0&, "mstaskswwclass", vbNullString)
toolbarwindow = FindWindowEx(mstaskswwclass, 0&, "toolbarwindow32", vbNullString)
Call EnableWindow(toolbarwindow, 1)
'..............................................
'Disable Taskbar
Dim shelltraywnd As Long
Dim rebarwindow As Long
Dim mstaskswwclass As Long
Dim toolbarwindow As Long
shelltraywnd = FindWindow("shell_traywnd", vbNullString)
rebarwindow = FindWindowEx(shelltraywnd, 0&, "rebarwindow32", vbNullString)
mstaskswwclass = FindWindowEx(rebarwindow, 0&, "mstaskswwclass", vbNullString)
toolbarwindow = FindWindowEx(mstaskswwclass, 0&, "toolbarwindow32", vbNullString)
Call EnableWindow(toolbarwindow, 0)
'..............................................
'Enable Show/Hide taskbar (hidden icons)
Dim shelltraywnd As Long
Dim traynotifywnd As Long
Dim button As Long
shelltraywnd = FindWindow("shell_traywnd", vbNullString)
traynotifywnd = FindWindowEx(shelltraywnd, 0&, "traynotifywnd", vbNullString)
button = FindWindowEx(traynotifywnd, 0&, "button", vbNullString)
Call EnableWindow(button, 1)
'...............................................
'Disable Show/Hide taskbar (hidden icons)
Dim shelltraywnd As Long
Dim traynotifywnd As Long
Dim button As Long
shelltraywnd = FindWindow("shell_traywnd", vbNullString)
traynotifywnd = FindWindowEx(shelltraywnd, 0&, "traynotifywnd", vbNullString)
button = FindWindowEx(traynotifywnd, 0&, "button", vbNullString)
Call EnableWindow(button, 0)
'................................................

_________________
Matthew A. Combatti
Real Studio 2012 r1.2

Visit Xojo Developer's Spot!
Systems I Use:
Windows XP/Windows Vista/Windows Server 2008 r2/Windows 7/Windows 8
Mac OSX 10.5/Mac OSX 10.6/Mac OSX Server/Ubuntu/Debian/Suse/Red Hat/
Windows Server 2011/CentOS 5.4 /ReactOS/SimOS

~All Xojo Compatible~


Top
 Profile  
Reply with quote  
 Post subject: Re: Show and Hide the task bar from application ?
PostPosted: Thu Apr 05, 2012 4:40 pm 
Offline

Joined: Thu May 08, 2008 2:26 am
Posts: 82
Taskbar ON:
'Taskbar ON
#if TargetWin32
Declare Function FindWindow Lib "user32" Alias "FindWindowA" ( lpClassName As CString, lpWindowName As CString ) As Integer
Declare Function ShowWindow Lib "user32.dll" ( hwnd As Integer, nCmdShow As Integer ) As Integer
Dim TaskBar As Integer
Dim ReturnValue As Integer
TaskBar = FindWindow("Shell_TrayWnd", "")
ReturnValue = ShowWindow(TaskBar, 4)
#endif


Taskbar OFF:
'Taskbar OFF
#if TargetWin32
Declare Function FindWindow Lib "user32" Alias "FindWindowA" ( lpClassName As CString, lpWindowName As CString ) As Integer
Declare Function ShowWindow Lib "user32.dll" ( hwnd As Integer, nCmdShow As Integer ) As Integer
Dim TaskBar As Integer
Dim ReturnValue As Integer
TaskBar = FindWindow("Shell_TrayWnd", "")
ReturnValue = ShowWindow(TaskBar, 0)
#endif


Have fun, greeting Paul

_________________
Graphic-BevelButton Class: MDButton
RealStudio (2008R1) & 2011R4 PRO (Win/Mac)
Windows 7 x64 Ultimate / Mac OSX 10.8


Top
 Profile  
Reply with quote  
 Post subject: Re: Show and Hide the task bar from application ?
PostPosted: Fri Apr 06, 2012 12:52 am 
Offline

Joined: Tue Dec 27, 2011 8:54 am
Posts: 139
Location: India
Thanks All.

Yes Paul.. its working for window Os. thanks a lot...
But can you please tell me how to do the same thing for MAC ?


Thanks,
Prakash

_________________
PK Pothal
Software Developer in REAL STUDIO 2011r4.3, ASP.NET, VB.NET, C# AND SQL SERVER 2005/08
OS:WINDOWS N MAC


Top
 Profile  
Reply with quote  
 Post subject: Re: Show and Hide the task bar from application ?
PostPosted: Tue Apr 17, 2012 2:03 pm 
Offline

Joined: Tue Dec 27, 2011 8:54 am
Posts: 139
Location: India
Hi Paul,

I used your "Taskbar On" and "Taskbar Off" code for show and hide the task bar in windows Os but it will create a problem for user.
Suppose user set the up the task bar as off and close the application then it will become active till the user again open the application and setup the taskbar on.

Is there any other options for overlay the total windows screen when user make the TaskBar off ?


Thanks,
Prakash

_________________
PK Pothal
Software Developer in REAL STUDIO 2011r4.3, ASP.NET, VB.NET, C# AND SQL SERVER 2005/08
OS:WINDOWS N MAC


Top
 Profile  
Reply with quote  
 Post subject: Re: Show and Hide the task bar from application ?
PostPosted: Tue Apr 17, 2012 3:11 pm 
Offline
User avatar

Joined: Mon Apr 02, 2007 2:08 am
Posts: 1225
Location: San Francisco, CA, USA
Why not just set the window to Fullscreen?

_________________
Boredom Software


Top
 Profile  
Reply with quote  
 Post subject: Re: Show and Hide the task bar from application ?
PostPosted: Thu Apr 19, 2012 3:00 am 
Offline

Joined: Tue Dec 27, 2011 8:54 am
Posts: 139
Location: India
Hi charonn0,

when i will make it fullscreen it will hide the application bar/ title bar.
Which i don't want.

Can you please tell me if you have any other options for it.
Quote:
I want the application windows full screen but it should not hide the application bar ?




Thanks,
Prakash

_________________
PK Pothal
Software Developer in REAL STUDIO 2011r4.3, ASP.NET, VB.NET, C# AND SQL SERVER 2005/08
OS:WINDOWS N MAC


Top
 Profile  
Reply with quote  
 Post subject: Re: Show and Hide the task bar from application ?
PostPosted: Thu Apr 19, 2012 12:00 pm 
Offline
User avatar

Joined: Mon Apr 02, 2007 2:08 am
Posts: 1225
Location: San Francisco, CA, USA
Use a plain box window frame and some math to increase/decrease its width/height/left/top properties to fill the screen areas other than the task bar.

_________________
Boredom Software


Top
 Profile  
Reply with quote  
 Post subject: Re: Show and Hide the task bar from application ?
PostPosted: Thu Apr 19, 2012 2:25 pm 
Offline

Joined: Tue Dec 27, 2011 8:54 am
Posts: 139
Location: India
Hi charonn0,

Thanks for your time but sorry to say
Quote:
what is plain box window frame ?

Can you please provide any examples for this ?



Thanks,
Prakash

_________________
PK Pothal
Software Developer in REAL STUDIO 2011r4.3, ASP.NET, VB.NET, C# AND SQL SERVER 2005/08
OS:WINDOWS N MAC


Top
 Profile  
Reply with quote  
 Post subject: Re: Show and Hide the task bar from application ?
PostPosted: Thu Apr 19, 2012 2:49 pm 
Offline
User avatar

Joined: Mon Apr 02, 2007 2:08 am
Posts: 1225
Location: San Francisco, CA, USA
Here ya go. As you can see, it's very easy.

_________________
Boredom Software


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 19 posts ]  Go to page 1, 2  Next

All times are UTC - 5 hours


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group