473,769 Members | 5,869 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 1567
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
2475
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
7651
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
1900
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
1846
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
1945
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
9416
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
10199
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
10032
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9849
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...
1
7393
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
6661
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
5433
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3948
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
3
2810
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.