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    
 
   
patriciaxxx
post Sep 22 2017, 12:20 PM
Post#1



Posts: 273
Joined: 20-December 12



Iím trying to find a way to NOT show the Access application icon in the taskbar. I donít want code to hide the application itself and I donít want code to put the application icon in the systray I just want to NOT show the application icon in the taskbar.

I use the following code when I open my popup form:

SetWindowRgn hWndAccessApp, CreateRectRgn(0, 0, 0, 0), True

This code I wish to keep, however because it shows the application icon in the taskbar and need additional code to NOT show the application icon in the taskbar.

I have tried the following but it doesnít work:

Call SetWindowLong(Application.hWndAccessApp, GWL_EXSTYLE, _
GetWindowLong(Application.hWndAccessApp, GWL_EXSTYLE) And Not WS_EX_APPWINDOW)
Go to the top of the page
 
ADezii
post Sep 23 2017, 08:00 AM
Post#2



Posts: 2,678
Joined: 4-February 07
From: USA, Florida, Delray Beach


I do believe that you will need the following API Call to accomplish this, it should be no problem to research. When I get a chance, I will look into it further.
CODE
Public Declare PtrSafe Function Shell_NotifyIcon Lib "shell32.dll" Alias "Shell_NotifyIconA" _
                       (ByVal dwMessage As Long, lpData As NotifyIconData) As Long
Go to the top of the page
 
patriciaxxx
post Sep 24 2017, 07:56 AM
Post#3



Posts: 273
Joined: 20-December 12



ridders I too have code that does that, but thank you for replying.

ADezii Iím sure the solution will be API and if you know how it can be done I would appreciate that as Iím just canít find how to do it either by myself or on the web.

I just want too make sure that you and anyone else who may be able to help knows exactly what I want to NOT show, so I have uploaded a jpg showing the Access application ďicon ď on the taskbar. This is what I want to not show.

One further point, I know I can make the application window itself invisible and that by doing so the access application will not show in the taskbar. But I need the application visible, so thatís not an option. I just want to NOT show the application icon in the taskbar, nothing more, nothing less?
Attached File(s)
Attached File  image1.jpg ( 4.05K )Number of downloads: 2
 
Go to the top of the page
 
missinglinq
post Sep 24 2017, 09:52 AM
Post#4



Posts: 4,637
Joined: 11-November 02



I, too, am interested in the why this OP, and so many other users, lately (going by posts here and elsewhere) appear so interested in hiding the fact that they're using MS Access...why else hide the Taskbar icon?

Linq ;0)>
Go to the top of the page
 
patriciaxxx
post Sep 24 2017, 10:21 AM
Post#5



Posts: 273
Joined: 20-December 12



ridders / missinglinq
> I, too, am interested in the why this OP, and so many other users, lately (going by posts here and elsewhere) appear so interested in hiding the fact that they're using MS Access...why else hide the Taskbar icon

I, at lest, am not interested in hiding the fact that Iím using MS Access, if I were, then I would make the application itself invisible ie hidden. Which I have explicitly stated is not what I want.

I just want to NOT show the application icon in the taskbar, nothing more, nothing less. Can anyone assist me with the solution too this.
Go to the top of the page
 
cheekybuddha
post Sep 24 2017, 11:19 AM
Post#6


UtterAccess VIP
Posts: 11,527
Joined: 6-December 03
From: Telegraph Hill


Hi patriciaxxx,

If you're going to achieve this then you will need to involve subclassing - which is an utter nightmare in Access!!

See here on Randy Birch's fantastic VBnet site for VB6 code to place an icon in to the systemtray. (Using the same API function that ADezii mentioned)

It has a method to remove the application icon from the taskbar.

Even if you can adapt the code (not difficult) just be aware that subclassed Access is normally very unstable (ie the slightest thing can cause it to crash completely) and also can end up using a lot of processor.

I have to say that I used to love playing with these subclassed examples in Access, but whilst it was possible to create one-off proof-of-concepts, I never used it in any production database.

And also, while it's probably not the best way forward, I think 'because I want to' is a plenty fine reason for trying! wink.gif

Good luck, have fun! thumbup.gif

d
Go to the top of the page
 
ADezii
post Sep 24 2017, 11:31 AM
Post#7



Posts: 2,678
Joined: 4-February 07
From: USA, Florida, Delray Beach


Patricia:
What you are requesting appears to be at least very difficult, if not impossible, even with the Shell_NotifyIcon() Procedure. It appears as though you can dynamically Load an Icon into a Container Control such as an Image Control, have it displayed in the Taskbar, then subsequently hide it. Hiding an Icon for an Active Application while leaving that Application visible is another story in and of itself. I am afraid you are fighting an uphill battle on this one. Have you considered Hiding/Unhiding the Taskbar itself?

@cheekybuddha:
It looks like the Code you mentioned applies to the System Tray and not the Taskbar as requested by the OP. How would it still be applicable?
Go to the top of the page
 
PhilS
post Sep 24 2017, 04:50 PM
Post#8



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


No solution, just a few thoughts on this.

I second ADezii's assessment that it is going to be very hard to remove the icon from the task bar.

The Shell_NotifyIcon-API does not apply to this situation, as it only deals with the notification area ("SysTray") of the taskbar, but not with "normal" taskbar buttons. Randy Birch's sample application does not help either. The comment in there about "removing an icon from the taskbar" is misleading. It refers to the icon in the notification area too.

Patricaxxx's original idea to set the GWL_EXSTYLE of the application windows is actually a very near miss. In theory it would do the trick, but I believe the GWL_EXSTYLE WS_EX_APPWINDOW can only be set when creating the the window in question. Impossible to do that for the Access application window from code in an Access application. - I was not able to find official documentation confirming this limitation. So if you desperately need this feature, you should do some more research in this regard.

I think this can only be achieved by calling the DeleteTab-Method on the ITaskbar_List-Interface. And here we are, right at the very hard part.

My advice is to think about alternative solutions to the still rather mysterious requirement.
Go to the top of the page
 
cheekybuddha
post Sep 24 2017, 04:59 PM
Post#9


UtterAccess VIP
Posts: 11,527
Joined: 6-December 03
From: Telegraph Hill


Thanks, Phil - on re-reading I see I was mistaken - sorry for the misinformation blush.gif

d
Go to the top of the page
 
akn_39
post Sep 24 2017, 10:13 PM
Post#10



Posts: 102
Joined: 9-June 09
From: Parksville, BC, Canada


Hi ridders (Colin): I have been interested in manipulating the MS/Access application window and implemented the solution from The Access Web - Manipulate Access Window. However, I found while it worked initially (i.e. hid the MS/Access application window), when the user switches from Access to another application window, and then back to Access, the application window reappears. This happens in with MS/Access 2010, running on Windows 7 or Windows 10. I described this in this UtterAccess post.

Do you have any thoughts on this?

Regards. . .

Tony N.
Go to the top of the page
 
patriciaxxx
post Sep 25 2017, 08:28 AM
Post#11



Posts: 273
Joined: 20-December 12



Thank you everyone for your help and thoughts. Having taken the time to read, digest and research the information contained within them Iíve reached the conclusion that I might indeed be attempting something near to impossible.

> I think this can only be achieved by calling the DeleteTab-Method on the ITaskbar_List-Interface. And here we are, right at the very hard part.

I believe this input to be correct and too that it ends my chances of removing the taskbar item.

Like Tony N. I too have used the very same solution to manipulate the Access application window and like Tony I have encountered a problem which if it can be resolved would allow me an alternative to my problem.

1. Specifically if I set the application window itself to be invisible upon opening the main popup form whilst it works without error when I resize the form I get flickering.

2. However if I set the invisible function to fire on the forms timer interval set to 1 second then open the form wait the one second for the event to fire which sets the app window invisible, then I go and resize the form its totally flicker free and works just like when the app is not invisible.

My problem is that I would like it to work flicker free on start up and WITHOUT the timer (as described in 1)
Any ideas?
Go to the top of the page
 
akn_39
post Sep 25 2017, 10:12 AM
Post#12



Posts: 102
Joined: 9-June 09
From: Parksville, BC, Canada


Hi Colin: Thanks for getting back me. Yes, I have tried your example database, and on my configuration (Windows 10, MS/Access 2010), it also re-displays the MS/Access application window after switching to another window and then back to Access.

Thanks. . .

Tony N.
Go to the top of the page
 
patriciaxxx
post Sep 25 2017, 10:40 AM
Post#13



Posts: 273
Joined: 20-December 12



Tried it, with my form, but when I resize the form which resizes an image I get the same flicker. Out of curiosity I put you code on a timer like I put my code and it worked fine, like mine did. Something strange happening by the delay the timer gives between when the form opens / loads /displays and the action of the code which sets the app invisible or / and a window focus / style issue but for the life of me I canít pin it down?
Go to the top of the page
 
patriciaxxx
post Sep 25 2017, 11:16 AM
Post#14



Posts: 273
Joined: 20-December 12



ridders thank you for you reply and help

for me I would rather remain with my original goal of removing the aap icon from the taskbar rather than pursue the invisible route which I really donít want to use.

I just noted your comment about maybe having the expertise to solve it if you can I would very much appreciate it. I wish to go down this route as it best serves my needs both in general and for security, the user will have a taskbar icon to click on provided by the form in taskbar which Iíve implemented Again if you can help solve my original problem I would be grateful.
Go to the top of the page
 
akn_39
post Sep 25 2017, 04:24 PM
Post#15



Posts: 102
Joined: 9-June 09
From: Parksville, BC, Canada


Hi Colin: Thanks for your latest reply. As far switching between application windows, it can be any application. I have tried Internet Explorer, Control Panel, Chrome Browser, Firefox, File Explorer - basically, I can't find any combination that will not cause the Access window to be re-displayed.

One thought that came to mind is to do with program versions. My Windows 10 system is up to date, but the MS/Access 2010 is literally as it came with the distribution DVD - I don't believe it would have had any maintenance updates applied. I have attached version information on both Windows and Access in case your code has dependencies that I do not have implemented.

Thanks for your continued help with this.

Cheers. . .

Tony N.

Attached File  Windows_10_version_information.png ( 69K )Number of downloads: 5

Attached File  Access_2010_version_information.png ( 122.41K )Number of downloads: 2
Go to the top of the page
 
akn_39
post Sep 25 2017, 10:28 PM
Post#16



Posts: 102
Joined: 9-June 09
From: Parksville, BC, Canada


Colin: OK, thanks for your comments. I would still like to implement something that works consistently on my configuration, so if you come across anything that you think might be causing this behaviour, I would be interested in hearing about it.

In the meantime, thanks for looking into it.

Regards. . .

Tony N.
Go to the top of the page
 
patriciaxxx
post Sep 26 2017, 07:15 AM
Post#17



Posts: 273
Joined: 20-December 12



Thank you Colin and everyone

Listening and investigating all the expert comments on the taskbar problem I feel more and more that it would indeed be difficult if not impossible to resolve, so I move decidedly to the second, invisible app solution.

Having already pointed out the flicker problem I get when resizing the popup form, I have uploaded a very simple stripped back example to demonstrate this.

The database contains 2 forms, 1 subform, and a simple invisible routine, and there's a linked image (Iíve lost the plot with the resize code but it shows the flicker problem just the same). Please note I need to keep the form / subform setup.

Form frmFlicker fires the invisible routine on the onLoad event and when you resize the form the image flickers.

Form frmFlicker FREE fires the invisible routine on the onTimer event and when you resize the form the image doesnít flicker.

The problem to solve is identifying whatís causing the flicker and eliminating it so Iím not forced to use the timer.

If you or anyone else might understand whatís causing this behaviour and how to solve it I would be interested to know.
Attached File(s)
Attached File  db1.zip ( 68.93K )Number of downloads: 14
 
Go to the top of the page
 
patriciaxxx
post Sep 26 2017, 09:03 AM
Post#18



Posts: 273
Joined: 20-December 12



Thanks Colin

I made some silly errors there in my haste in putting the example together.

I just downloaded your copy, and having read your comments I was confident it was going to work but unfortunately not.

For me itís exactly as before, there must be some clue in that it works for me with the timer?

Any ideas about how I can solve this; or additional / alternative code to make app invisible that might work with Access 2003 / Windows XP on up?
Go to the top of the page
 
patriciaxxx
post Sep 26 2017, 09:54 AM
Post#19



Posts: 273
Joined: 20-December 12



I was afraid that was coming.

Thank you very much for your time and help trying to solve this, and too everyone who contributed, as always, itís very much appreciated.

Iíll continue to try a few more things you never know I might get lucky.

Thanks again.

Go to the top of the page
 
ADezii
post Sep 26 2017, 12:37 PM
Post#20



Posts: 2,678
Joined: 4-February 07
From: USA, Florida, Delray Beach


Patricia: Have you considered programmatically setting the Taskbar to AutoHide? Not a solution I know, just a band aid.
Go to the top of the page
 
3 Pages V  1 2 3 >


Custom Search


RSSSearch   Top   Lo-Fi    17th October 2019 - 08:47 PM