|
-
May 31st, 2000, 10:36 PM
#1
Thread Starter
Member
Hi everyone,
I am dragging the image control in visual basic 6 and put it in the form and tried to set it to transparent but I coud not find the right property to do this. Also I tried it with the picture control and could not. Can someone help or give a hint in how to make the image or picture control transparent (I mean you can see other buttons or texts through the image but can not click on the buttons and textboxes). Thanks for any hint or help.
-
May 31st, 2000, 11:54 PM
#2
PowerPoster
I think you're looking for a sprite control, if so download it from my website...
-
Jun 1st, 2000, 02:13 AM
#3
Use BitBlt, and choose not to copy Black or White and have you backcolour of the picture set to Black or White so then it will appear transparent.
-
Jun 1st, 2000, 04:50 AM
#4
Thread Starter
Member
BitBlt
Originally posted by Megatron
Use BitBlt, and choose not to copy Black or White and have you backcolour of the picture set to Black or White so then it will appear transparent.
How can I use BitBlt? can you help here. Thanks
Public Declare Function BitBlt Lib "gdi32" Alias "BitBlt" (ByVal hDestDC As Long, ByVal x As Long, ByVal y As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal hSrcDC As Long, ByVal xSrc As Long, ByVal ySrc As Long, ByVal dwRop As Long) As Long
-
Jun 1st, 2000, 05:16 AM
#5
PowerPoster
-
Jun 1st, 2000, 05:26 AM
#6
-
Jun 1st, 2000, 07:56 AM
#7
Thread Starter
Member
sprite
Originally posted by Fox
Look here
You Have a very cool and useful site.
I looked at your sprite control.
Can I make the sprite to cover any buttons on the screen , still can see the buttons , and can not click on the buttons.
I tried to make it very big and bring to infront but it did not work.
Thanks for any hint or help.
-
Jun 1st, 2000, 08:45 AM
#8
PowerPoster
Im actually not sure if I did right-understand what you mean...
Well, the clipping on my sprite is set to 1 (region). That means you can only click on the visible pixels of the picture you load into it. If you want rectangular clipping just set its ClipBehavior property to 0.
-
Jun 1st, 2000, 10:22 AM
#9
Thread Starter
Member
sprite
Originally posted by Fox
Im actually not sure if I did right-understand what you mean...
Well, the clipping on my sprite is set to 1 (region). That means you can only click on the visible pixels of the picture you load into it. If you want rectangular clipping just set its ClipBehavior property to 0.
May be I have a problem in creating a transpatent file for vb 6! (empty file with transparent format)
OK!, let me tell you what I really want:
1. I would like your sprite to be transparent
2. Lets say, I create a form with a command1 (button)
and your sprite over command1 button inside the form.
3. I make a transparent file using Microsoft photo
editor with gif format. Can you email me one. Maybe I am not doing it correct.
4. I called the gif (or what evere extention file) with its path like he following
c:\transparent.gif
5. I put the following code in my form level:
Private Sub Form_Load()
Sprite1.Picture = "c:\transparent.gif"
End Sub
6. when I run the project, I am suppose to get your sprite as a transparent object over the command1 button. Also I am suppose to see the command1 button but can not click on it because your sprite is suppose to be over the button and prevent me form doing clicking on the button.
Well, What I really want is anything (let say your sprite)to cover Command1 button and can not click on it and still can see it (comand1 button) through your sprite.
I hope, I made you understand. Thanks very much for your help.
-
Jun 1st, 2000, 10:44 AM
#10
PowerPoster
I think Ive got it.
Well, take my sprite, load a BITAMP into it, transparent color is RGB(255,255,0) for default. Then set the Sprites ClipBehavior to 0 (you have to edit the usercontrol for this). I think thats what you need.
(Are you making a cross on the button )
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|