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

System.Drawing.Graphics

Hi Sharpies,

This is a very basic question. I am using .Net IDE 2003 and
System.Drawing.dll (1.1.4322). I wrote a simple program like this
(ommitting the commons)

using System.Drawing;

..
..
..
private void button1_Click(object sender, System.EventArgs e)
{
Graphics graph = new Graphics();
graph = Graphics.FromHwnd(pictureBox1.Handle); //**** line
}

When I tried Graphics. in the **** line, I was expecting FromHwnd to
appear through intellisense, but it didn't. When I tried
System.Drawing. I was expecting Graphics to appear in the intellisense
but it didn't. I am sure I am missing something very simple. Please
help.

Nov 17 '05 #1
1 3608
First of all. Before you tie yourself in horrible knots, go read the GDI+
FAQ. You'll feel better afterwards. I promise.

--
Bob Powell [MVP]
Visual C#, System.Drawing

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.

"DBC User" <ks*****@gmail.com> wrote in message
news:11**********************@o13g2000cwo.googlegr oups.com...
Hi Sharpies,

This is a very basic question. I am using .Net IDE 2003 and
System.Drawing.dll (1.1.4322). I wrote a simple program like this
(ommitting the commons)

using System.Drawing;

.
.
.
private void button1_Click(object sender, System.EventArgs e)
{
Graphics graph = new Graphics();
graph = Graphics.FromHwnd(pictureBox1.Handle); //**** line
}

When I tried Graphics. in the **** line, I was expecting FromHwnd to
appear through intellisense, but it didn't. When I tried
System.Drawing. I was expecting Graphics to appear in the intellisense
but it didn't. I am sure I am missing something very simple. Please
help.

Nov 17 '05 #2

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

Similar topics

1
by: news.microsoft.com | last post by:
Hello group, My goal is to attach an image over another image. Top image should be transparent so the back image is visible through the top one. Bellow is a test code in VB.NET. You need to...
0
by: Tomi Holger Engdahl | last post by:
I am looking for a solution to add on-line drawing tool to a phpBB discussion board. The idea would be that the users can draw their own simple drawings with the tool and attach them easily as...
1
by: Paul Hoad | last post by:
I'm trying to use MeasureString() to determine the length in pixels of a string However to do I need a System.Drawing.Graphics object to do this I need to create a System.Drawing.Graphics...
1
by: Hadar | last post by:
Hi, I'm getting "object is currently in use elsewhere" when I use System.Drawing.Graphics.MesureString. This is what I do: My controls use a utility class the helps it to mesure strings. To...
7
by: Randy Vande Hei | last post by:
Does anyone know how to change the the GDI+ coordinate system like you used to be able to do in VB6 with the picturebox.scale method. The picturebox.scale method took an x,y point defining the...
3
by: Qwert | last post by:
Hello, I want to draw from one System.Drawing.Bitmap to another. All I can find is how to draw to a Graphics object. System.Drawing, System.Drawing.Drawing2D or System.Drawing.Imaging have no...
3
by: Eduard Witteveen | last post by:
Hello list, I have code the draw MyDrawingObject information on a System.Drawing.Graphics object. The code is more/less the following: I now want to rotate / mirror the object i draw. I've...
3
by: forest demon | last post by:
for example, let's say I do something like, System.Diagnostics.Process.Start("notepad.exe","sample.txt"); if the user does a SaveAs (in notepad), how can i capture the path that the user...
2
by: ThatsIT.net.au | last post by:
I have this code that writes a pie chart in a asp.net page, but I want to use it in a server control. When I try I get a error on the last line "Response.OutputStream" Obviously there is no...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
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.