473,699 Members | 2,302 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

transparent button upon an image

Hi!

I have a windowsform with an imagebox inside a groupbox. The imagebox shows
a image of a man with joints (for medical purose - shoulder, ancle, wrist
etc.). The user is able to mark the jonts by clicking on the spesific joint.
I solved this by using checkbox (with button-appearance) upon each joint.

I know wish to further develop my windows-application. How can I make my
button-appearance checkboxs to be transparent? I wish to to se the joint
(image) through the checkbox, not the default backcolor of the groupbox
control.

Any help or guideline appreciates.

Best regard
Hans Årsjö
May 10 '07 #1
2 5516
You might have to use ControlPaint.Dr awBorder. You'd eliminate your
checkboxes and add a property to your form for each boolean value. Then in
your form's paint event, call ControlPaint.Dr awBorder for each one, passing
in a ButtonBorderSty le of Inset or Outset depending on whether the value is
true or false. In MouseDown or MouseUp, check whether the mouse coordinates
are within one of the rectangles you've drawn, and if so, flip the boolean
value and Invalidate your picture box.

If you want to have complete professionalism in the mouse handling of your
drawn rectangles so they behave like buttons it gets more involved, but this
will get you started on the basic idea.

--
Brian Schwartz
FishNet Components
http://www.fishnetcomponents.com
Fish Grid .NET Light: Powerful Layouts for Small Datasets
"Hans - DiaGraphIT -" <Ha************ @discussions.mi crosoft.comwrot e in
message news:7D******** *************** ***********@mic rosoft.com...
Hi!

I have a windowsform with an imagebox inside a groupbox. The imagebox
shows
a image of a man with joints (for medical purose - shoulder, ancle, wrist
etc.). The user is able to mark the jonts by clicking on the spesific
joint.
I solved this by using checkbox (with button-appearance) upon each joint.

I know wish to further develop my windows-application. How can I make my
button-appearance checkboxs to be transparent? I wish to to se the joint
(image) through the checkbox, not the default backcolor of the groupbox
control.

Any help or guideline appreciates.

Best regard
Hans Årsjö

May 10 '07 #2
Hi Brian!

Thank you for your reply. I'm greatful for your help.

I'm afraid that my application will be more complicated when the drawborder
aslo should apeare as buttons...

But as you said.... It is a start :-)

"Brian Schwartz" wrote:
You might have to use ControlPaint.Dr awBorder. You'd eliminate your
checkboxes and add a property to your form for each boolean value. Then in
your form's paint event, call ControlPaint.Dr awBorder for each one, passing
in a ButtonBorderSty le of Inset or Outset depending on whether the value is
true or false. In MouseDown or MouseUp, check whether the mouse coordinates
are within one of the rectangles you've drawn, and if so, flip the boolean
value and Invalidate your picture box.

If you want to have complete professionalism in the mouse handling of your
drawn rectangles so they behave like buttons it gets more involved, but this
will get you started on the basic idea.

--
Brian Schwartz
FishNet Components
http://www.fishnetcomponents.com
Fish Grid .NET Light: Powerful Layouts for Small Datasets
"Hans - DiaGraphIT -" <Ha************ @discussions.mi crosoft.comwrot e in
message news:7D******** *************** ***********@mic rosoft.com...
Hi!

I have a windowsform with an imagebox inside a groupbox. The imagebox
shows
a image of a man with joints (for medical purose - shoulder, ancle, wrist
etc.). The user is able to mark the jonts by clicking on the spesific
joint.
I solved this by using checkbox (with button-appearance) upon each joint.

I know wish to further develop my windows-application. How can I make my
button-appearance checkboxs to be transparent? I wish to to se the joint
(image) through the checkbox, not the default backcolor of the groupbox
control.

Any help or guideline appreciates.

Best regard
Hans Årsjö


May 11 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
13758
by: Fearless Freep | last post by:
I know there's a PIL mailing list but I thought I would try the question here as well. I'm using PIL on Python 1.5.2 (stop laughing, it's what the ISP has for CGI and I don't have a choice) Anyway. I have a basic image and I need to overlay an image on top of it and let some of the basic image show through. Just as an aside the images are not of the same size and the top image needs to be pasted
2
8307
by: Jaikumar | last post by:
Hi, 1) I have created one windows application, In the main form ( form1) i have added one usercontrol (usercontrol1), In that user control i am drawing one image. 2) In the UserControl1 i am showing one transparent form (form3) when ever user preseed left mouse button. 3) The form3 has one transparent user control (usercontrol2) that paints circles. That measn the circles will show on top the usercontrol1 image. 4) The form3 border style...
0
2624
by: eruess | last post by:
Here's the scenario: I've got a whole bunch (for the sake of argument, let's say thousands) of different little 32x14 .png files that act as buttons all over a very large website. Each button image has 4 transparent pixels; the upper left, upper right, lower left & lower right. This is to help give the otherwise square button graphic a slightly rounded look to it.
8
10609
by: Grahammer | last post by:
Is it possible to set the background of a usercontrol as transparent? I tried setting the background image of the usercontrol to a transparent GIF, but that caused MAJOR problems. I'm making some controls that aren't rectangular and it won't be pretty if I end up with a grey rectangle behind each one. http://msdn.microsoft.com/library/en-us/vbcon/html/vbtskGivingYourControlTransparentBackground.asp?frame=true
0
1707
by: jcvoon | last post by:
Hi: I'm using VS2005, I add my image into project resource file, and my picture box and button control reference the image from the project resource file, what is the default transparent color for the image so that the image in the picture box and button control can be paint transparently ? Currently I'm using Magenta in my image portion which require transparent effect.
9
5866
by: Chuck Anderson | last post by:
Is it possible to overlay a transparent watermark on an image - dynamically? I'd like the result to look like this example: <http://www.cycletourist.com/temp/photo.php> That is a bit of overkill, but you can see what I mean. The watermark image (a png image) is included separately below the photo. I tried using a class from phpclasses.org <http://www.phpclasses.org/browse/package/1580.html...
3
4869
by: NickP | last post by:
Hi there, I have a usercontrol that inherits from Windows.Forms.Button. In the OnCreateControl method I set the style of the control so that it supports transparent backcolor and set the background color to transparent. ..... Protected Overrides Sub OnCreateControl()
0
2865
by: MasterOfTheDark | last post by:
This one's a hairy one to explain. What I've got is a class called "VistaGroupBox" that I put some nice-looking Vista-style gradients in the background and made to look like the ribbon categories you see in Office 2007. I got it working great, and created a few more controls, including a "VistaButton", which is primarily transparent when the cursor does not hover over it. However, when I added a standard Panel in the VistaGroupBox and put my...
1
9084
by: ur4ikk | last post by:
Hi, I try to show a background image on the button control. A background of an image should be transparent (should get the control color). Unfortunately, I can't find appropriate control property like "Transparent" in Delphi or something like this. What is the way to perform this action in C#? Thanks
0
9178
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8916
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8885
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7752
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...
0
5875
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4376
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...
1
3058
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
2348
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2010
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.