Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Turning of the windows task bar from access 1

Status
Not open for further replies.

ChrisBelzona

Programmer
Oct 25, 2000
137
GB
I have a database distributed to many users, some users have the autohide turned on for their taskbar properties others do not.

I need to code so that when the database opens if the users autohide is set to no it changes it to yes, any suggestions?

Thanks

Chris
 
By the way it is my intension to turn back on the task bar on exiting the database.
 
There is a registry call that can be made to do this. However, I don't know if you can access the registry from VBA code. In VB, it's simple, but in access, I don't know.
I would imagine it can be done with minimal hassle though.

Eradic8or
 
Ok, further to my last post, here is how you do it.

Declare Function SetWindowPos Lib "user32" (ByVal hwnd _
As Long, ByVal hWndInsertAfter As Long, ByVal x As Long, _
ByVal y As Long, ByVal cx As Long, ByVal cy As Long, ByVal _
wFlags As Long) As LongDeclare Function FindWindow Lib "user32" Alias _
"FindWindowA" (ByVal lpClassName As String, ByVal _
lpWindowName As String) As Long

Const SWP_HIDEWINDOW = &H80
Const SWP_SHOWWINDOW = &H40

** Code to Hide the Taskbar **
Dim Thwnd as Long
Thwnd = FindWindow("Shell_traywnd", "")
Call SetWindowPos(Thwnd, 0, 0, 0, 0, 0, SWP_HIDEWINDOW)
Code to Show the Taskbar


** Code to show the taskbar **
Dim Thwnd as Long
Thwnd = FindWindow("Shell_traywnd", "")
Call SetWindowPos(Thwnd, 0, 0, 0, 0, 0, SWP_SHOWWINDOW)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top