473,472 Members | 2,163 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Designing an Interface and the "On Mouse UP..." Event

121 New Member
I am designing an interface, and I would like to customize the buttons instead of using the plain gray boxes that are standard in Access.

Is there a way to set for the "On Mouse Up" and "On Mouse Down" events for the control to display two different pictures?

I have two pictures: Button-UP.jpg and Button-Down.jpg. Can is set Access to show Button-Down on the "on mouse down event" and show the Button-UP on the "on mouse up" events?


Thanks
Apr 8 '07 #1
10 3551
ADezii
8,834 Recognized Expert Expert
I am designing an interface, and I would like to customize the buttons instead of using the plain gray boxes that are standard in Access.

Is there a way to set for the "On Mouse Up" and "On Mouse Down" events for the control to display two different pictures?

I have two pictures: Button-UP.jpg and Button-Down.jpg. Can is set Access to show Button-Down on the "on mouse down event" and show the Button-UP on the "on mouse up" events?


Thanks
Assuming your Command Button is Command1:
Expand|Select|Wrap|Line Numbers
  1. Private Sub Command1_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
  2.   Me![Command1].Picture = "C:\<your path to .jpg>\Button-UP.jpg "
  3. End Sub
Expand|Select|Wrap|Line Numbers
  1. Private Sub Command1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
  2.   Me![Command1].Picture = "C:\<your path to .jpg>\Button-Down.jpg "
  3. End Sub
Apr 8 '07 #2
JHNielson
121 New Member
Assuming your Command Button is Command1:
Expand|Select|Wrap|Line Numbers
  1. Private Sub Command1_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
  2.   Me![Command1].Picture = "C:\<your path to .jpg>\Button-UP.jpg "
  3. End Sub
Expand|Select|Wrap|Line Numbers
  1. Private Sub Command1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
  2.   Me![Command1].Picture = "C:\<your path to .jpg>\Button-Down.jpg "
  3. End Sub

Great - thanks! I'll try that. Is there anyway to make this embedded in the Access database itself?
Apr 8 '07 #3
ADezii
8,834 Recognized Expert Expert
Great - thanks! I'll try that. Is there anyway to make this embedded in the Access database itself?
The code in these 2 Events will automatically be 'embedded' within the Database. The code accompanies the Form's Code Module. Is that what you are referring to?
Apr 8 '07 #4
JHNielson
121 New Member
Sorry - I should have been more clear......

Is there anyway to embed the pictures so that it doesn't have to call on them form a location on the hard drive? I was wondering, can I put them in a table or something. It's just that this is an "application" that will be sent ot a few users, and wanted to avoid having to have the interface pics installed in a specific area.


Thanks again for all the help.
Apr 9 '07 #5
missinglinq
3,532 Recognized Expert Specialist
I believe most everyone here will agree that embedding images in Access is a bad idea, as it quickly leads to major file bloat, especially if you plan on doing this for a number of buttons, and will also agree with ADezii's suggestion of linking to the images. Sometimes people will paste an image over a button that suggests the button's purpose, but if your images are ButtonUp and ButtonDown, how are your users going to know the purpos of the button?
Apr 9 '07 #6
JHNielson
121 New Member
I believe most everyone here will agree that embedding images in Access is a bad idea, as it quickly leads to major file bloat, especially if you plan on doing this for a number of buttons, and will also agree with ADezii's suggestion of linking to the images. Sometimes people will paste an image over a button that suggests the button's purpose, but if your images are ButtonUp and ButtonDown, how are your users going to know the purpos of the button?

Great. That makes a lot of sense. I will take that advice and look into changing the names to be more reflective.

My one question would be, what are my options for "installing" the application on someone else's computer without having to manually copy the folder of the interface pages themselves. This utility will potentially be moved around a bit (not a ton but to a couple of different computers)

Otherwise I would have to embed the images inside the database - and I will have to minimize the number of buttons I'm creating - Fortunately, right now it's only ten - so it won't be too bad. How would I go about doing this?


Thanks for everyone's help so far.
Apr 9 '07 #7
Rabbit
12,516 Recognized Expert Moderator MVP
You can use Winzip's self extractor.
Apr 9 '07 #8
ADezii
8,834 Recognized Expert Expert
Great. That makes a lot of sense. I will take that advice and look into changing the names to be more reflective.

My one question would be, what are my options for "installing" the application on someone else's computer without having to manually copy the folder of the interface pages themselves. This utility will potentially be moved around a bit (not a ton but to a couple of different computers)

Otherwise I would have to embed the images inside the database - and I will have to minimize the number of buttons I'm creating - Fortunately, right now it's only ten - so it won't be too bad. How would I go about doing this?


Thanks for everyone's help so far.
You could also utilize the Package and Deployment Wizard which I think comes with the Microsoft Office Software Developement Kit (SDK), Visual Basic, and Visual Studio. This would provide you with a full blown installation option.
Apr 9 '07 #9
JHNielson
121 New Member
Thanks for all the help. I am looking into the idea of building the installer using Visual Studio.

But, as an option, I think i might be able to simplify the button needs down to 4, in which case I only have 8 pictures to call on. Is there a way to put these into a table in access and then call on them for the Mouse_Up and Mouse_Down events?


Thanks for everyone's help, this is a new area of development for me and I really appreciate all the help.
Apr 10 '07 #10
JHNielson
121 New Member
Thanks for all the help. I am looking into the idea of building the installer using Visual Studio.

But, as an option, I think i might be able to simplify the button needs down to 4, in which case I only have 8 pictures to call on. Is there a way to put these into a table in access and then call on them for the Mouse_Up and Mouse_Down events?


Thanks for everyone's help, this is a new area of development for me and I really appreciate all the help.

I jumped the gun. I have solved my problem thanks to everyone's suggestions. Thanks again for all the help.
Apr 10 '07 #11

Sign in to post your reply or Sign up for a free account.

Similar topics

8
by: Frances Del Rio | last post by:
I'm getting Getting "Access is Denied" on resizeTo and moveTo methods in IE (IE 6.0..) I saw two posts about this from 7/6 & 7/7.. I suspect, like previous poster said, that this has to do w/MS...
1
by: Bob Alston | last post by:
I am trying to highlight required data fields in a continuous form situation. Got it working for all but date fields. For date fields, I am trying setting default date to -1 (=12/29/1899) and...
1
by: n_o_s_p_a__m | last post by:
My web service has a webmethod whose return type is declared as an interface type, for example: public IBusinessProcess GetBusinessProcess() {} which generates the lovely error: Cannot...
2
by: Alex Sedow | last post by:
Why interface-event-declaration does not support multiple declarators like event-declaration? Grammar from C# spec: variable-declarators: variable-declarator variable-declarators ","...
0
by: Martin | last post by:
Hi, I wanted to preform my own custom validation for the entire page so i though I would implemet the IValidator interface and do all of my validation in the "Validate" method, and this works...
11
by: Antony | last post by:
I know this sounds stupid but I am going to carry on anyway. I want to create an interface that implements all methods of a form, plus another one or two. But I need to know if there is an...
2
by: Niklas | last post by:
Hi How do I get the currently used interface on an object? See code below for an example. Regards /Niklas using System;
4
by: ~~~ .NET Ed ~~~ | last post by:
I am facing a problem. My project is composed of several assemblies. In one of them -the backend- I have several internal classes that must implement an interface. These internal classes are only...
0
by: Peter | last post by:
Hi I'm stuck and would appreciate some help. I have created a Class library project that contains a number of interface definitions that must be used by a range of other VB.NET applications. ...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.