473,406 Members | 2,439 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,406 software developers and data experts.

How to figure out with object created a graphics

I have a function that take a graphics and draw something using that
graphics
Anyway, I can use diferent Graphics that are not located in the same
position on the screen coordinate, so I need to offset the image drawn
How can I figure out wich device created that graphic sent to my function?

The Graphics may be created from a bitmap or the one that come with paint
event..but I dont know wich is the one...

--
Cheers,
Crirus

------------------------------
If work were a good thing, the boss would take it all from you

------------------------------
Nov 20 '05 #1
4 945
"Crirus" <Cr****@datagroup.ro> schrieb
I have a function that take a graphics and draw something using
that graphics
Anyway, I can use diferent Graphics that are not located in the
same position on the screen coordinate, so I need to offset the image
drawn How can I figure out wich device created that graphic sent to
my function?

The Graphics may be created from a bitmap or the one that come with
paint event..but I dont know wich is the one...


Why do you want to know this? Pass all the arguments that the procedure
needs to do it's job.
--
Armin

http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html

Nov 20 '05 #2
yeah, but I have subsequent calls to different function so I have to pass
all the way that arg with no need until within last function

--
Cheers,
Crirus

------------------------------
If work were a good thing, the boss would take it all from you

------------------------------

"Armin Zingler" <az*******@freenet.de> wrote in message
news:u5**************@TK2MSFTNGP10.phx.gbl...
"Crirus" <Cr****@datagroup.ro> schrieb
I have a function that take a graphics and draw something using
that graphics
Anyway, I can use diferent Graphics that are not located in the
same position on the screen coordinate, so I need to offset the image
drawn How can I figure out wich device created that graphic sent to
my function?

The Graphics may be created from a bitmap or the one that come with
paint event..but I dont know wich is the one...


Why do you want to know this? Pass all the arguments that the procedure
needs to do it's job.
--
Armin

http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html

Nov 20 '05 #3
"Crirus" <Cr****@datagroup.ro> schrieb
yeah, but I have subsequent calls to different function so I have to
pass all the way that arg with no need until within last function


No, it isn't passed with "no need". You do need it because you have to pass
it to the next function.

--
Armin

http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html

Nov 20 '05 #4
:)
Right
--
Cheers,
Crirus

------------------------------
If work were a good thing, the boss would take it all from you

------------------------------

"Armin Zingler" <az*******@freenet.de> wrote in message
news:OU****************@TK2MSFTNGP09.phx.gbl...
"Crirus" <Cr****@datagroup.ro> schrieb
yeah, but I have subsequent calls to different function so I have to
pass all the way that arg with no need until within last function
No, it isn't passed with "no need". You do need it because you have to

pass it to the next function.

--
Armin

http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html

Nov 20 '05 #5

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

Similar topics

0
by: Martin | last post by:
Hi, I have create a Graphics object from a HWND Both the Window and the Graphics object are created by the same thread, nevertheless when i dispose the object, I get an exception indicating that...
1
by: jty202 | last post by:
I know alot of people have the problem with indexed pixel format. I hope someone can show me the solution to this.I am have problem with graphics with the following code giving the error: "A...
0
by: Sam Barham | last post by:
I have a ListView control, for which I have overwritten the WndProc method to gain access to the WM_PAINT message and generate my own OnPaint and OnPaintBackground messages, in order to colour the...
6
by: SamSpade | last post by:
Public Function PicCreateGraphics() As Graphics 'Client should dispose this PicCreateGraphics = Graphics.FromImage(mDocumentImage) mPicCreateGraphicsSaved = PicCreateGraphics 'Saved so I can...
8
by: Flack | last post by:
Hey guys, In my app I have a bitmap where drawing is done and in the form's paint method I show the bitmap: private void Form1_Paint(object sender, System.Windows.Forms.PaintEventArgs e) {...
2
by: Simon Verona | last post by:
I have a few hundred forms in my application. All are based on a custom base form class. I decided that I wanted to globally change the look and feel of many of the controls in my application -...
0
by: dongarbage | last post by:
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...
6
by: active | last post by:
I have an image and a graphics object created (FromImage) from that image. I need to create a new image and create a new graphics object from the new image. I want the new graphics object have...
3
by: Brian | last post by:
I have a windows forms project done in vb.net. One of the forms creates graphs based on the data supplied to it. I want to take multiple graphs and paste them into a larger Image object. I...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...
0
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,...
0
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...
0
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...
0
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,...
0
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...

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.