473,778 Members | 1,759 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Region.Makeinfi nite has no effect

i have a control that uses a region to make it non rectangular

when i try to to remove the region by calling this.Region.Mak einfinite() the
control keeps its non rectangular Region.

if i call RecreateHandle( ) after calling Region.Makeinfi nite() it works.

I Don't understand why it does not work if i don't call RecreateHandle( );

Johan
Sep 3 '07 #1
1 1568
Sagaert Johan wrote:
i have a control that uses a region to make it non rectangular

when i try to to remove the region by calling this.Region.Mak einfinite() the
control keeps its non rectangular Region.

if i call RecreateHandle( ) after calling Region.Makeinfi nite() it works.

I Don't understand why it does not work if i don't call RecreateHandle( );
I don't either, not directly anyway. But...

What happens if you create a new region, initialized to infinite, and
assign that to the Region property?

The one thing I note here is that when you call MakeInfinite() on the
original region, the control instance itself has no direct way to be
aware of the change.

Recreating the underlying windows control handle obviously updates the
control using the changed region. But since the MSDN example shows
updating the region in the Paint handler (actually, that seems kind of
wrong to me, but what the heck), it seems likely that merely assigning a
new Region to the property may be sufficient to get the control to
update itself.

It seems to me that for something like changing the control's region,
recreating the handle may not be all that big of a problem anyway; the
latter would be required for a variety of major changes to the
fundamental behavior of the control, and the control's region does seem
to me to be at least marginally in that category. But it may be that
you can achieve the same effect in this particular case with a
less-intrusive technique.

Pete
Sep 3 '07 #2

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

Similar topics

8
2476
by: Ryan R. Rosario | last post by:
Hi - **I apologize for posting this again. I dont think my first one went thru** I am in the process of converting a table based website over to a CSS based website and I am having a problem. The website "template" consists of 3 regions: header, sidebar and content. Header spans horizontally across the screen at the top of the
11
7652
by: Altramagnus | last post by:
I have a complicated Region object, which I need to draw the outline, but not fill How can I convert the Region object to GraphicsPath object? or How can I draw the outline of the Region object?
6
1931
by: John | last post by:
I have two books saying different things about the #region directive. One says that all code within #region does not affect the compilation process in any way, while the other states that the entire region is marked for a pre-processor directive which does affect the compilation process. I was wondering which is accurate? Is #region/#endregion just a text editor visualization tool with not effect otherwise, or is everything within the...
4
1901
by: Frank Rizzo | last post by:
In vs.net 2003/c#, how can I collapse the region that I am currently in using the keyboard? Thanks
0
1055
by: Piccinini Andrea | last post by:
Hi, I'have a class that contains a Region and I need to serialize it. I'm istalled ISerializable interface and I try to serialize Region as following; Serialize: info->AddValue("Q",RetinoDisegno->GetRegionData()->Data);
2
1793
by: localhost | last post by:
I want to read an image from disk, get the total width, and then find the bottom region (say an area of 120 high x the total width) and fade-away each pixel by a percentage to white, and then output that memory-modified image to the HTTP stream. Where should I look for info or samples on doing that? Thanks.
2
1847
by: Jack | last post by:
To whom may concern: In Asp.Net Calender control, how to display week days, like Wednesday as "Wed", Monday as "Mon", even my windows' region is set to Chinese? Thanks in advance! Jack 2005-10-11
4
1946
by: Don | last post by:
When creating a new region for a control via a GraphicsPath object, it appears the entire rightmost column of pixels and bottom most row of pixels are not included in the region. I will try to clarify with some ASCII art. Imagine a GraphicsPath describing a 4x4 pixel square with rounded corners (X = pixel, _ = blank) _ X X _ X X X X X X X X
1
1320
by: PJ6 | last post by:
I've Googled this but come up short... I have a non-rectangular region that contains a moveable rectangle. I want to restrict the rectangle's movement to have it always fully contained in this region. Would seem pretty simple to do this with a region's IsVisible function, but no, IsVisible returns true if any portion of the rectangle is visible. I know I'll eventually get this just by messing around but don't want to unnecesssarily...
0
9464
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
10292
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...
0
8954
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
7471
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
5368
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
5497
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4031
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
3627
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2860
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.