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

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
8 Pages V  1 2 3 > »   (Go to first unread post)
   Reply to this topicStart new topic
> SideMenu    
 
   
RexAbandon
post Jul 8 2007, 09:50 PM
Post#1



Posts: 56
Joined: 18-May 05
From: Chatham, Ontario


I have been developing databases for people in our office using Xpress SideBar for years but found that installing the ActiveX a pain. So I decided to create my own SideMenu and I wanted to learn more about Class modules and API programming. Well this is the result. I also had a little fun with icons and colours along the way. I borrowed the Administration forms from Tiny Giant's explorerbar. Let me know what you think.
ex.
SideMenu is in Access 2000 format.
Attached File(s)
Attached File  SideMenu.zip ( 323.43K )Number of downloads: 3326
 
Go to the top of the page
 
tinygiant
post Jul 9 2007, 10:56 AM
Post#2



Posts: 1,186
Joined: 22-November 02
From: Nashville, GA


Nice looking db. I've been looking for a better way to highlight items in the ExplorerBar. The current method I use to highlight the entire row, although looking good (I think), uses way to much processing power. I'm going to try to incorporate the underline/bold that you use here. Not sure how successful it'll be, but I'll let you know if it works. Thanks for the example!
Go to the top of the page
 
tazzmaxx
post Jul 9 2007, 01:37 PM
Post#3



Posts: 33
Joined: 9-July 03
From: Napa, CA, USA


Great Utility!
It is very flexible and simple to use. Any thoughts on how best to make the sidebar suppress (much like the xpress version)?
Brilliant!
Cheers
Maxx
Go to the top of the page
 
RexAbandon
post Jul 9 2007, 02:05 PM
Post#4



Posts: 56
Joined: 18-May 05
From: Chatham, Ontario


I am not sure I know what you mean by 'suppress'.
Go to the top of the page
 
tazzmaxx
post Jul 9 2007, 05:26 PM
Post#5



Posts: 33
Joined: 9-July 03
From: Napa, CA, USA


I apologize. I meant to reduce the size of the sidebar to expose a larger working area (via a button or 'Splitter' bar). I figured out how to do it this afternoon. I have added a splitter bar that is adjustable and will reduce to a predetermined size based on user input (in a preference menu item).
nce I make a few tweaks I will post it.
Go to the top of the page
 
r_cubed
post Jul 11 2007, 08:32 PM
Post#6


UtterAccess VIP
Posts: 3,754
Joined: 8-November 02
From: Australia (NSW)


Very nice sidebar idea.I have already picked it up and used it in a Production app that I am redeveloping, and like the flexibility of being able to 'play with the menu items'. I have also added some additional functional;ity into it which NOW' in addition to the current OpenForm and OpenReport options. I have it now that it can dynamically build the function and subroutine names from the CURRENTinto the dropdown list (where forms/reports) currently go and allow for selection from there.
Go to the top of the page
 
jmcwk
post Jul 12 2007, 12:59 PM
Post#7


UtterAccess VIP
Posts: 12,559
Joined: 21-November 02
From: Tacoma, WA.


Rob,
My chance are you going to post a Demo ?
Go to the top of the page
 
r_cubed
post Jul 12 2007, 05:37 PM
Post#8


UtterAccess VIP
Posts: 3,754
Joined: 8-November 02
From: Australia (NSW)


John,
Just spotted that my previous post didn't contain WHAT it was that I had added (PC had played up at that time and must have dropped my typing.
What I have added is the ability to also now select functions and/or subroutines from the same drop-down as that in which forms/reports are selected.
I have had a routine for ages which can cycle through exisitng app modules and extract the names, so used that as the basis for it. (This process currently causes a LOT of screen flashing to occur whilst it is opening each individaul module in the app (which in the past has not been a worry as I tend to only use it myself during development) but with this great interface, and I was hoping to NOT have this annoying flashing to occur, and will try to 'nail it' this weekend and then post.
The actual functionaluity of running/calling a functions (AND using the exisitng sidebar 'arguments' field for any required function parameters to be passed) is actually working fine by use of BOTH the EVAL function for running a function and the Application.Run for subroutines (after testing), so all is well in that part of the added functionality.
It is now down to the 'Mickey Mosue' side of it of simply getting rid of this flashing that occurs.
Will get it back soon as an attachment here.
Keep watching .......
Go to the top of the page
 
jmcwk
post Jul 12 2007, 05:39 PM
Post#9


UtterAccess VIP
Posts: 12,559
Joined: 21-November 02
From: Tacoma, WA.


Thank You Rob !!
Go to the top of the page
 
sjcharles
post Jul 13 2007, 11:17 AM
Post#10



Posts: 625
Joined: 27-February 03
From: Central California


Tazz Maxx,
Otoo would like to make the side bar smaller. How did you accpomplish it?
Thanks,
Stephen
S
Rex, a great interface!!!
Go to the top of the page
 
sjcharles
post Jul 13 2007, 02:28 PM
Post#11



Posts: 625
Joined: 27-February 03
From: Central California


I figured out how to make the side bar smaller. So forget my question above.
Stephen
Go to the top of the page
 
sjcharles
post Jul 17 2007, 10:41 AM
Post#12



Posts: 625
Joined: 27-February 03
From: Central California


I have added a login form used to control what "group" buttons users have access to. Here's what I did.
ew form "frmLogin" with boxes for user name and password. After valiadation of user login I store the users name in variable "gstrCurrentUser ".
New tables:
tlkpUsers (it is a backend table)
Field1: Name-UserName, Data Type-Text (eg. User1)
Field2: Name-UserPassword, Data Type-Text (eg MyPassword)
Field3: Name-UserAccess, Data Type-Text (eg 1,2,4,5 This means the user does not have access to button 3))
In the class module clsSideMenu I have modified the following code.
Private Sub Class_Initialize '(changed to) 'this opens sidebar to the first "Group button" user has authorization to
Dim db As Database
Dim rs As Recordset
Set db = CurrentDb
Set rs = db.OpenRecordset("tlkpUsers", dbOpenDynaset)
rs.FindFirst "[UserName] = " & """" & gstrCurrentUser & """"
ActiveGroup = Mid(rs!useraccess, 1, 1)
Set db = Nothing
Set rs = Nothing
End Sub
Added code to the beginning of Public Function UpdateActiveGroup(intGroup As Integer)
Public Function UpdateActiveGroup(intGroup As Integer)
On Error GoTo Err_UpdateActiveGroup
Dim db As Database
Dim rs As Recordset
Dim lngPosition As Long
Dim i As Integer

Set db = CurrentDb
Set rs = db.OpenRecordset("tlkpUsers", dbOpenDynaset)
rs.FindFirst "[UserName] = " & """" & gstrCurrentUser & """"
If InStr(1, rs!useraccess, intGroup) > 0 Then
'user has permission to use this group button
Else
MsgBox "You do not have permission to access this portion of the program."
Exit Function
End If

'Stop Screen Redraws - Note: Be Careful
Application.Echo False . . . . . . . . .
Go to the top of the page
 
ClintC
post Jul 18 2007, 12:41 AM
Post#13


Microsoft Corp UA VIP
Posts: 205
Joined: 5-August 03
From: Redmond, WA


Nice demo. You might want to consider changing the mouse cursor to a hand on the hover. It feels wacky to me to have the arrow when you are trying to make it act similar to a hyperlink. here are some API code that I used back in the day when I built an interactive chart demo.
Private Const HandCursor = 32649&
Private Declare Function SetCursor Lib "user32" (ByVal hCursor As Long) As Long
Private Declare Function LoadCursor Lib "user32" Alias "LoadCursorA" (ByVal hInstance As Long, ByVal lpCursorName As Long) As Long
http://blogs.msdn.com/clintcovington/archi...ode-sample.aspx
Go to the top of the page
 
lotusvball
post Jul 18 2007, 10:14 AM
Post#14



Posts: 44
Joined: 11-April 05



A much easier way to change the hand over is to add a space in the property field hyperlink in the format section. This can be done on any of the buttons or text or anything that has this hyperlink property.
Go to the top of the page
 
tinygiant
post Jul 18 2007, 03:49 PM
Post#15



Posts: 1,186
Joined: 22-November 02
From: Nashville, GA


I think using the hyperlink property causes the text to always be displayed as blue underline, which is not desirable in this type of application.
Go to the top of the page
 
lotusvball
post Jul 19 2007, 08:12 AM
Post#16



Posts: 44
Joined: 11-April 05



All you have to do to get rid of that is to reformat the text. I do this all of the time and do not have the blue underlined text. You just set the text format to what you want after you add the space to the hyperlink property.
Go to the top of the page
 
lotusvball
post Jul 19 2007, 08:16 AM
Post#17



Posts: 44
Joined: 11-April 05



I did it for the first 2 menu items it the sidemenu program. No blue underline and you have the hand when you hover over the menu option. It only took about 1 minute.
Go to the top of the page
 
lotusvball
post Jul 19 2007, 08:17 AM
Post#18



Posts: 44
Joined: 11-April 05



oops forgot the attachment.
Attached File(s)
Attached File  SideMenu.zip ( 328.28K )Number of downloads: 522
 
Go to the top of the page
 
sjcharles
post Jul 19 2007, 09:46 AM
Post#19



Posts: 625
Joined: 27-February 03
From: Central California


I add cursor's a bit different, see attachment. You will need to the DB and "Cursor1.cur" file in the same folder.
Added to the DB is module basMousePointer and added code "Call GetCursor" to function "HighlightGroup" and "HighlightItem" in clsSideMenu as the last line.
The reason I like this menthod is I can add "Call GetCursor" to any control (combo box, list box etc) and get the cursor. Also, you can design your own cursor.
Stephen.
Attached File(s)
Attached File  SideMenu.zip ( 404.18K )Number of downloads: 385
 
Go to the top of the page
 
RexAbandon
post Jul 19 2007, 10:30 AM
Post#20



Posts: 56
Joined: 18-May 05
From: Chatham, Ontario


Wow, this is quite the discussion on the hand cursor. So what I decided to do is to have the hand cursor as a display option via the parent and child menu defaults. I took Clint's suggestion and added his code clsSideMenu and changed the 'HighlightGroup' and 'HighlightItem' functions accordingly.
Is for tazzmaxx 's suggestion for shrinking SideMenu, I added a commandbar to frmDesktop that will hide or show the SideMenu. This will allow for a larger viewing area for the working form.
Thank you all for your interest.
Attached File(s)
Attached File  SideMenu v01.zip ( 359.71K )Number of downloads: 928
 
Go to the top of the page
 
8 Pages V  1 2 3 > » 


Custom Search


RSSSearch   Top   Lo-Fi    25th August 2019 - 11:45 PM