473,587 Members | 2,412 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

how do you change the size of the clipping region of a Graphics object

Hi there,

I have a panel that I'm trying to draw lines on based on mouse events.
I'm using a Graphics object to do this. However, the region that the
graphics object will draw lines in is different in size than the panel
size. I'd like the graphics object's clipping region (is "clipping
region" the right terminology?) to be the same size as the panel. How
do I do this?

Note that the default size of the clipping region for the graphics
object that I created seems to be 200x100. Why is this? Shouldn't it be
the same as the panel in which it was instantiated?

Thanks,
Don

Jan 24 '07 #1
0 1330

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

Similar topics

1
1720
by: Mudcat | last post by:
Hi all, I am writing a gui that expands depending on the number of interefaces a user decides to use with Win 2k, Tkinter, and Pmw. So with normal use the gui window will expand to the screen size and then clip without scrolling. If I use Pmw.ScrolledFrame, the clipping frame is set based on the size of the first child frame and never...
1
4885
by: RIck Measham | last post by:
I pop up a window with a picture in it, however the picture can be very large. So here's what I want to do: Pop up a mindow with the picture clipped to the size of the window, then place a scaled version of the picture on top of it. Thus it will look like this: +------------------------+ | WINDOW |...
1
1563
by: Steve Richter | last post by:
is there a "GetTextExtentPoint32" equivalent in Windows Form or Font class? from the button text I would like to calculate the size that the button needs to be. thanks, -Steve
0
1621
by: William Stacey [MVP] | last post by:
This code worked on fx 1.1 and now I get a "Keyset does not exist" error when trying to SignData with RSA under FX2.0. Smells like some security error, but can't debug it as I think error is thrown in win32. If you create a new RSA, it works. But creating RSA from an SNK does not work. string privSnk =...
1
2447
by: Carl Gilbert | last post by:
Hi I am drawing a pie like shape on a windows form in VB.NET using the FillPie method as follows in the form Paint event: e.Graphics.FillPie(brush, Me.ClientRectangle, pro.Angle, pro.Span) How can I get back a System.Drawing.Region from the recently added pie? Regards, Carl Gilbert
3
2212
by: Brad Rogers | last post by:
All, Being immersed in vb.net and trying CSharp after almost a year I forgot the differences. I like vb fixing the uppercase/lowercase names and seeming to be more flexible to code entry. But while trying to insert a text box to see when a method is used, and putting a counter to bump some variable? The textbox sits there unchanged. ...
7
2543
by: Curious | last post by:
Hi, I have created my own data structure. Basically it is a two way 'stack', where I can push elements and pop elements both from top and bottom. I also included a counter to show the number of elements currently on the data structure. I need to calculate the size in bytes of this datastructure content at a certain time. What I am...
0
2483
by: zeng.hui.stephen | last post by:
I download the demo http://msdn.microsoft.com/msdnmag/issues/02/10/cuttingedge/. I inherite the demo, and write my code. I want to use Hook to monitor C++ Edit change. I use a C# form containing a Edit(textbox) and button to test at first. When I change text in Edit or press button to setText value, I want to monitor the change event. ...
2
2465
by: Mike Borrowdale | last post by:
-- Hi, my application simulates a panel of scientific instruments. Digital readouts are provided by label components embedded in a TableLayoutPanel with the rows and columns set to percentages of size, so the labels expane and contract when the application is resized. So far so good. My customer wants the maximum text size possible for...
0
8206
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. ...
0
8340
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...
1
7967
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...
0
8220
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...
0
6621
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...
0
5392
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...
0
3840
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...
0
3875
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2353
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

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.