473,795 Members | 3,441 Online
Bytes | Software Development & Data Engineering Community
+ 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 3600
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 "applicatio n" 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

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

Similar topics

8
7671
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 Windows Updates (Tools --> Windows Update in IE..) because this started happening to me recently (ONLY in IE, works fine in N7), and I updated about two weeks ago (AND: this is happening to me also at work, where I have same OS (W2000 Pro), and...
1
1668
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 then using this format: mm/dd/yyyy ;" Missing Date" Shows words "missing Date" for the default value. And if a good date is entered, the field displays with black text. What I want to do is make it easy to fix missing dates. Now, If i click
1
13643
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 serialize interface IBusinessProcess
2
4990
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 "," variable-declarator variable-declarator:
0
1660
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 well with one small problem. The "Page" class has a property called "IsValid" which is read-only. IValidator implements a private variable called isvalid
11
2219
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 interface that defines all a forms methods etc. In the example below "System.Windows.Forms.Form" isn't an interface, but it gets my point across. Is there an interface for a form that I can substitute here? Thank you again Tony
2
1494
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
2405
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 used by one master class that is public. I am able to declare the interface as "internal interface" without problem but when I attempt to use it by declaring a class that implements it, if I declare the implemented interface members as...
0
1372
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. One of the interfaces has been defined as follows: Public Interface IPlugin
0
9672
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9519
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10214
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9042
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7538
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5437
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5563
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4113
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3723
muto222
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.