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

how to draw a SOLID line in VB.NET

I'm trying to draw a solid line if VB.NET the way I can in VB.

What I WANT to do is set the pentype to solidcolor, but it says pentype is read only and you have to instantiate the brush as the pen type that you want, SO ... I do this:

Expand|Select|Wrap|Line Numbers
  1.     Public myBrush As New SolidBrush(Color.Red)
  2.     Public p1 As New Pen(myBrush, 5)
And what I get when I draw a line is a pen type that is hashed. It's a bit weird, too. The line I'm drawing is between captures of the mouse position and if I move the mouse really fast, I get an almost solid line, but if I move the mouse slowly, I get a hashed line.

Any ideas what I'm doing wrong?

Thanks,

Paul
Oct 15 '10 #1
0 1097

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

Similar topics

6
by: R | last post by:
Hello everybody! I'm newbie to JavaScript and I have a basic question. I have X and Y coordinates of A and B points. How can I draw a line connecting A and B? thanks in advance cheers
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...
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...
3
by: Steve | last post by:
Hi All, I am sure this is a simple question, but how do I draw a line onto a windows form in VB.NET, or any shape for that matter. VB6 had a line and shape control that you could use. ...
4
by: Jason Huang | last post by:
Hi, In my C# Windows Form, how do I draw a Line? Thanks for help. Jason
2
by: Lamis | last post by:
Hi, I want to draw a line graph in my C# form. it is in real time so the graph will constantly get new values. it should show one line for maximum value, one line for minimum value and a third for...
0
by: vimalapalanichamy | last post by:
Actually i am using PIC16F877 controller for my project.The inputs for the line graph are came from controller (through RS232).Now i am trying to get the data through RS232 from the controller to vb...
1
by: berry | last post by:
Hi all.. How to draw a line graph? My axis-x is the daily hour from 8am to 8pm. Can i use a XY mschart type to draw it? Or I must use a picture box to draw it? If with XY chart type, how to draw?...
1
by: vikvikash | last post by:
i am creating a site using c sharp where i am using google map i would like to know how to draw line along the road on the map(i mean the source to draw the line)
2
complete
by: complete | last post by:
How do you draw a line on a canvas in WPF that is 1 pixel thick? This is the method I am using for drawing a line on a canvas in WPF that uses the line class set to 1 pixel thick but it actually...
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: 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...
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
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...
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,...

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.