I need an images to act like a button ,
In the button's properties , you have the option to set an downpicture , so
If you push the button , there appears an image .
BUT when you hold the mouse down and move the cursor away from the button , it returns to it's origional state .
And if you do it with an image and mousedown option , it stays in that state .
So , is there an solution for the images ?
So it would change back again .
Or could you change the style of the button so it wouldn't look like a button no more .and it would appear to be an image .
(PS. how do I change the exe style to WS_EX_STATICEDGE )
12 2167
I need an images to act like a button ,
In the button's properties , you have the option to set an downpicture , so
If you push the button , there appears an image .
BUT when you hold the mouse down and move the cursor away from the button , it returns to it's origional state .
And if you do it with an image and mousedown option , it stays in that state .
So , is there an solution for the images ?
So it would change back again .
Or could you change the style of the button so it wouldn't look like a button no more .and it would appear to be an image .
(PS. how do I change the exe style to WS_EX_STATICEDGE )
I've been playing around with what you said and this seemed to work just fine: - Private Sub Image1_MouseDown(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)
-
Image1.BackColor = vbBlue
-
End Sub
-
-
Private Sub Image1_MouseMove(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)
-
If Button = 1 Then
-
If X < 0 Or X > Image1.Width Or Y < 0 Or Y > Image1.Height Then
-
Image1.BackColor = vbWhite
-
Else
-
Image1.BackColor = vbBlue
-
End If
-
Else
-
Image1.BackColor = vbWhite
-
End If
-
End Sub
-
-
Private Sub Image1_MouseUp(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)
-
Image1.BackColor = vbWhite
-
End Sub
HTH
Image. background?
=>works just fine for buttons , but not for images ...
No , I'm talking about something like this :
Image. background?
=>works just fine for buttons , but not for images ...
No , I'm talking about something like this :
use that code, but instead of changing the background color change the image in it.
instead of writing image1.backcolor, use image1.picture
Well , I used a down picture for the button
(it's an option in properties , doesn't work for images )
Only in the button's properties
Well , I used a down picture for the button
(it's an option in properties , doesn't work for images )
Only in the button's properties
Create a couple of dummy images, set them visible=false. One will be called dummy1, the other will be dummy2. Dummy1 will have in it the up picture, Dummy2 will have the down picture.
Change:
image1.Backcolor=vbBlue for image1.Picture = dummy2.Picture and,
image1.Backcolor=vbWhite for image1.Picture=dummy1.Picture
That's an easy way to assign images.
Could you attach a file that works, because nothing works here ...
Could you attach a file that works, because nothing works here ...
I see what you mean, I tried that code with images but they didn't change every time, only when they wanted to.
I'll check it out.
Here's one I've just created in VB6. It works, as far as I can tell.
Sorry, I was in a rush so there aren't a lot of comments, and I just grabbed two stock images that came with VB, so they don't look so good. But you can easily fix that.
Very good ! ,
but can you do it to with mouseover ?
not working here ...
Very good ! ,
but can you do it to with mouseover ?
not working here ...
Not sure what you mean. That code was designed to make the image act like a button, as requested. And it worked on my PC.
hi i have used the code that u have given but got an error as
i am using it in the activex control
"Procedure declaration does not match description of event or procedure having the same error"
please help the solution as soon as possible
thanks
"Procedure declaration does not match description of event or procedure having the same error"
Hm... I'm going to take a stab in the dark and say that you probably used the code for a control which is part of an array, so the procedure declaration (the Sub statement) needs an Index parameter.
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Steve |
last post by:
Hi, I have a nice little script that works well displaying images on
my website. It's a script where if you clik a thumbnail image a pop
up window opens that contains a larger version of the same...
|
by: Frenchie |
last post by:
Hi,
I have created a very neet menu from an example found on the MSDN
library at:
http://msdn2.microsoft.com/en-us/library/system.web.ui.webcontrols.menuitembinding.imageurlfield.aspx
My...
|
by: petr pilsl |
last post by:
sorry - no idea where to post my question, so I crossposted to a linux
and a html-authoring-group. Both groups might be familiar with wget.
wget -p http://www.goldfisch.at
does not load the...
|
by: chaos |
last post by:
Hi all, i need help in this forgot password page, as the error message is show in another page cause the arrangement of the design in a mess. As i want to show the error message on the forgot...
|
by: ttamilvanan81 |
last post by:
Hai everyone, i am new to javascript.
Now i have doing one Image gallary application. In that application i have upload two images, one for Befor image and another one for after image.
All...
|
by: Dave |
last post by:
Hello All,
These one may be a bit tricky, and what I'd like to do may not even be
possible. I would love to hear any ideas you guys have for solving
this.
Here is the situation: I have a form...
|
by: tesa |
last post by:
Thanks for the help early this morning!
The one problem I can not figure out still is how to swap the images.
I have the images in an array.
is the image to start with.... then as the player...
|
by: JRough |
last post by:
Hi,
I have a page with a form that is included into a php page. It has
some php variables which are headers based on the user choices. In
the form I will send some mysql data columns but right...
|
by: rahulephp |
last post by:
Hi there,
Kindly have a look on below CSS property.
What i want to ask is: when i'll click on a button, it should be look active. I mean it would have to get property of .sidebar_menu:active
But...
|
by: DolphinDB |
last post by:
Tired of spending countless mintues downsampling your data? Look no further!
In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
|
by: ryjfgjl |
last post by:
ExcelToDatabase: batch import excel into database automatically...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: Vimpel783 |
last post by:
Hello!
Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
|
by: jfyes |
last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
|
by: Defcon1945 |
last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
|
by: af34tf |
last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
| |