473,386 Members | 1,795 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,386 software developers and data experts.

how to draw lines after making a line class (URGENT)

23
Dear Experts,

I need to draw lines. But I have to make a class for this. I know how to draw lines in direct methods.
i.e.
Graphics g = this.CreateGraphics();
Pen mypen = new Pen(Color.Red, 2);
mypen.DashStyle = System.Drawing.Drawing2D.DashStyle.Solid;
g.DrawLine(mypen, 100, 100, 200, 300);


But I dont know how to draw lines after creating a class. Please give me the codes for class and Form also.
Thank You.
Anuhas
Feb 7 '08 #1
0 943

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Matt | last post by:
I am writing a recursive program to draw the lines recursively, given the range and number of intervals (n) between the range. The problem is I don't know how to draw the line in point 0.375, as...
4
by: Mathieu Chavoutier | last post by:
Hi. I would like to do something like paint. I try to draw a line. I want, like paint, that when I clickdown, it begins to draw the line, and then, when I move the mouse, the line follow the...
1
by: Michael Rodriguez | last post by:
In Delphi there was a control called a Bevel. It would let you draw straight lines, top, left, right, or bottom, anywhere on your screen. What is the equivalent in C#? How can I draw a straight...
5
by: kerpal | last post by:
hi all, I'm trying to draw lines from an origin to the coordinate of the mouse. As the mouse moves, the line will follow the mouse's movement and previous lines are then erased. any...
18
by: Ed Bitzer | last post by:
Can draw a line on my form with a button click event but cannot upon the Load event when I wish. No more line object so used the following: Dim bit As Bitmap = New Bitmap(Me.Width, Me.Height) Dim...
1
by: zxo102 | last post by:
Hi everyone, I have tried two days to figure out how to draw the image in wx.BufferedDC on the page created by AddPage of wx.Notebook but still got no clue. The attached example works fine. If...
15
by: d4 | last post by:
I have a vbscript (below) I want to rewrite in C# but I cannot get it to work (unless there is a better way to do it). The script will combine 2 lines if the (next) line contains a "+",...
10
by: wazzup | last post by:
C++ is new to me and I'm trying solve this problem but get stuck. Please help me out. Below is the task and after that is what i got so far. Create a program to print nested squares Input:...
9
by: zhaow | last post by:
Hi, All Greetings! I want to develop as appllication that requires a line-drawing function in the blank area between two forms. I have looked up the MSDN, it says that a graphics object need a...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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,...

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.