UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
3 Pages V < 1 2 3  (Go to first unread post)
   Reply to this topicStart new topic
> Don’t Show Application Icon In Taskbar, Access 2003    
 
   
PhilS
post Oct 10 2017, 06:29 AM
Post#41



Posts: 626
Joined: 26-May 15
From: The middle of Germany


Patricia, thanks a lot!

"Access 2000 - Access 2007" does include Access 2002!
Just download and extract the ZIP file. Open your Access database and then the VBA-Editor.
In the VBA Editor use Menu "File" -> "Import File" and select the cls-file extracted from the ZIP.

That should work already, but I have to admit, I haven't tested it.
Go to the top of the page
 
patriciaxxx
post Oct 10 2017, 06:37 AM
Post#42



Posts: 273
Joined: 20-December 12



Hello Philipp

In my enthusiasm to try it I failed to notice that the example was the class with no db in either zip. So I will add it to my db and try it out.

Thank you for all your hard work and effort that went into solving this. I, like you, was interested to know if this was possible. For me this was more of a reason to accomplish this, unfortunately my programming skills and knowledge are not quite up to the level required to solve a problem as big as this one, not yet anyway.

Thank you, again.
Go to the top of the page
 
patriciaxxx
post Oct 10 2017, 06:40 AM
Post#43



Posts: 273
Joined: 20-December 12



Oops, we just cross posted, but I will try it out and post back.
Go to the top of the page
 
patriciaxxx
post Oct 10 2017, 06:54 AM
Post#44



Posts: 273
Joined: 20-December 12



Hello Philipp

Just tested it in Access 2002 / Windows XP.

1. Compiles without fault
2. Removes the button from the taskbar.

Wow. Excellent.

With my db open and the button hidden I then opened another Access db, in doing this the hidden button then becomes unhidden is there a way to make the button hidden permanently during the instance it’s open?
Go to the top of the page
 
patriciaxxx
post Oct 10 2017, 08:33 AM
Post#45



Posts: 273
Joined: 20-December 12



Hello Philipp

Just to conclude my findings in testing your class I can confirm it does in fact work perfectly in Access 2002 / Windows XP SP3 environment.

The finding I mentioned in Post#64 is only present when you open a Popup Form (non Modal).

When you open a Popup Form (Modal) everything seems to work as expected.

So job very well done.

Nice to know that should anyone read this topic seeking a solution to this problem, they now have it.

Thank you again.
Go to the top of the page
 
jleach
post Nov 4 2017, 07:34 PM
Post#46


UtterAccess Editor
Posts: 10,152
Joined: 7-December 09
From: St Augustine, FL


QUOTE
I encountered that part of the Windows API (Shell Interfaces) more than once in the past and it always was a dead end. I'm happy that I now figured out a blueprint for using this kind of API.


Same here. Never did have the ambition to work past it myself. Impressive work thumbup.gif
Go to the top of the page
 
strongm
post Sep 18 2019, 05:04 AM
Post#47



Posts: 3
Joined: 29-September 14



2 years too late, I know - but, unless I am missing something, it is really much easier to hide a taskbar icon than this thread has concluded - and patriciaxxx was actually nearly there with her first post

CODE
Option Explicit

Public Declare Function GetWindowLong Lib "user32" Alias "GetWindowLongA" (ByVal hWnd As Long, ByVal nIndex As Long) As Long
Public Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hWnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long

Public Const GWL_EXSTYLE = -20
Public Const WS_EX_TOOLWINDOW = &H80
    
Public Sub Example()
    ToggleTaskbarIcon hWndAccessApp ' if we are running Access, this is the required top level window
End Sub

Public Sub ToggleTaskbarIcon(lHwnd As Long)
    SetWindowLong lHwnd, GWL_EXSTYLE, GetWindowLong(lHwnd, GWL_EXSTYLE) Xor WS_EX_TOOLWINDOW
End Sub
Go to the top of the page
 
PhilS
post Sep 19 2019, 03:03 AM
Post#48



Posts: 626
Joined: 26-May 15
From: The middle of Germany


QUOTE
CODE
Public Sub ToggleTaskbarIcon(lHwnd As Long)
    SetWindowLong lHwnd, GWL_EXSTYLE, GetWindowLong(lHwnd, GWL_EXSTYLE) Xor WS_EX_TOOLWINDOW
End Sub

Well, I agree, this is much easier. - However, it has a couple of "side effects".

QUOTE
WS_EX_TOOLWINDOW - The window is intended to be used as a floating toolbar. A tool window has a title bar that is shorter than a normal title bar, and the window title is drawn using a smaller font. A tool window does not appear in the taskbar or in the dialog that appears when the user presses ALT+TAB. If a tool window has a system menu, its icon is not displayed on the title bar. However, you can display the system menu by right-clicking or by typing ALT+SPACE.
Quoted from: Extended Window Styles

If this is tolerable or even desired has to be decided by the person building the application in question.

--------------------
Go to the top of the page
 
3 Pages V < 1 2 3


Custom Search


RSSSearch   Top   Lo-Fi    21st October 2019 - 10:38 PM