473,386 Members | 1,754 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.

Can't seem to draw a straight line

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 line across the
screen?

TIA,

Mike Rodriguez
Nov 16 '05 #1
1 3861
There is no built in line or shape control. You'll need to draw your own
line using the Graphics.DrawLine() method or the ControlPaint class.
Alternatively, you can use a control, such as a Label, set it's BorderStyle
property to FixedSingle and make the control 1 pixel high or set the
BorderStyle to Fixed3D and set the height to 2. If you'd like an actual
control in the ToolBox, I'm sure you can find lots of these types of
controls around the Internet.

--
Tim Wilson
..Net Compact Framework MVP

"Michael Rodriguez" <mi**@nospamforme.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
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 line across the
screen?

TIA,

Mike Rodriguez

Nov 16 '05 #2

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

Similar topics

9
by: Rogue9 | last post by:
Hi, I´m trying to retrieve an item from a list using a reference called ´draw´' (which is an integer from 1 to 792 in a while loop) using:- draw = 1 while 1: if draw == 792: break b1 =...
5
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...
1
by: smilnet | last post by:
I want to Make a Draw Line Contrls,Please Help me Thanks!
1
by: Juan Romero | last post by:
Hey guys, I am trying to draw a vertical line in a class of mine that inherits from the RichTextBox control, but for some reason the line won't be drawn. Here is the code, fairly straight...
2
by: dan heskett | last post by:
I am owner-drawing a listbox, in an attempt to create a nice list with some custom "fields" and text layout. Essentially it works, but I must be missing something big, conceptually, because I...
8
by: Oberfuhrer | last post by:
I am an old mathematician, who in my sparetime work on a topic oriented math application. I have converted from old, dry Fortran to the more intuitive and juicy VB.net and Windows. In...
0
by: Ben3eeE | last post by:
Im having trouble making a Paint.exe straight line draw. You know the one where you point out where to start then hold down the mouse button and release it to finish the drawing. My problem is...
6
by: Tom P. | last post by:
I am writing a drawing program but I want to keep the scale down (there could end up being several hundred objects on the screen). I want to limit the points collected to a certain distance from...
14
by: Joe | last post by:
this file is drawn in VB.NET and input output goes by XmlSerializer. Therefore, simple output file looks like: <?xml version="1.0" encoding="utf-8"?> <DrawablePicture...
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: 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: 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?
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
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
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...
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.