473,385 Members | 1,312 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Custom control clipping (irregular shape)

I have been trying to figure out how to have a custom
control that is irregular (non-rectangular) not interfere
with other elements on the screen that may interfere with
it's "regular" shape (the control defining rectangle).
For example, if I make a custom control that simply paints
a circle inside its bounding box, how can I have the
control not have the area of the control outside of
the "bounding circle" affect any objects underneath it or
subsequently placed on top of these new "bounds." Any
suggestions would be welcome. Thanks.
Nov 15 '05 #1
2 3929
Check out the Control.Region property.

Also, for very irregularly shaped regions, you might want to implement
something like this algorithm to generate your regions:

http://codeguru.earthweb.com/cs_misc...pToRegion.html

Hope that helps,

Erik

"ppyrstr" <po**********@hotmail.com> wrote in message
news:2b****************************@phx.gbl...
I have been trying to figure out how to have a custom
control that is irregular (non-rectangular) not interfere
with other elements on the screen that may interfere with
it's "regular" shape (the control defining rectangle).
For example, if I make a custom control that simply paints
a circle inside its bounding box, how can I have the
control not have the area of the control outside of
the "bounding circle" affect any objects underneath it or
subsequently placed on top of these new "bounds." Any
suggestions would be welcome. Thanks.

Nov 15 '05 #2
Thanks Erik, I'll take a look.
-----Original Message-----
Check out the Control.Region property.

Also, for very irregularly shaped regions, you might want to implementsomething like this algorithm to generate your regions:

http://codeguru.earthweb.com/cs_misc...pToRegion.html
Hope that helps,

Erik

"ppyrstr" <po**********@hotmail.com> wrote in message
news:2b****************************@phx.gbl...
I have been trying to figure out how to have a custom
control that is irregular (non-rectangular) not interfere with other elements on the screen that may interfere with it's "regular" shape (the control defining rectangle).
For example, if I make a custom control that simply paints a circle inside its bounding box, how can I have the
control not have the area of the control outside of
the "bounding circle" affect any objects underneath it or subsequently placed on top of these new "bounds." Any
suggestions would be welcome. Thanks.

.

Nov 15 '05 #3

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

Similar topics

1
by: Phil Price | last post by:
Hi there, I'm developing a shape recognition application for the tablet PC for a) fun b) university project. Currently I'm working on the learning stage using neural networks, and have to store...
0
by: Shailaja Kulkarni | last post by:
Hi All, I am new to component development. I want to create custom control to arrange contained controls in form of polygonal shape. The objects are placed in separate panel on the some form....
3
by: Arnold the Aardvark | last post by:
I am creating a custom draw tree view based on CTreeCtrl. When the control is re-sized the background is blanked completely, resulting in a horrible flicker. I've seen various suggestions...
9
by: Nathan Sokalski | last post by:
I am using ASP.NET 2.0's ImageMap Control to create 2 imagemaps, one directly below the other. When I do this a thin blank space appears between them. After several days of frustration I realized...
2
by: MrNobody | last post by:
IF I am making a custom user control which draws stuff that might exceed its boundaries, can I get the user control to handle the scrolling for me? The AutoScroll property doesn't seem to be doing...
5
by: sunil borwankar | last post by:
I am trying hard to make Custom Command Buttons of Irregular Shape and of Different colours in Active X Interface Wizard but am not successful. Irregular Shape Buttons i.e.; Triangular, Arrow Shape...
0
by: boopsboops | last post by:
Hello thescripts readers, I have a bitmap consisting of an irregular figure on a transparent background. I'd like to convert the figure's boundary into a graphics path. Can anyone suggest an...
1
by: --== Alain ==-- | last post by:
Hi, I have a question about drawing windowed control. For example, i have a windowed control, let's called it C1 (as container for example). its width = 300 px and height = 200 px. C1...
4
by: Linda Liu[MSFT] | last post by:
Hi Moondaddy, I downloaded your sample project and run it and did see the problem on my side. There're three problems in the source code of your project. 1. You should move the following...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
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...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.