Click here to Skip to main content
13,353,462 members (55,546 online)
Rate this:
 
Please Sign up or sign in to vote.
See more:
How do i draw lines and curves on a form from within a running program
in vb2008.
Also stuck with creating variables which are seen throughout app.

Needed for personal project, any help will be helpful.
Thanks
Posted 17-May-10 10:22am
Updated 17-May-10 19:01pm
Abhinav S416.3K
v2
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

I can't give you the VB code - I use C#, but it is the same stuff under the hood.

To draw lines and curves, handle the forms Paint event. It has an EventArgs parameter, which contains a Graphics object.
The Graphics object supports functions like DrawLine, DrawArc, etc. which are what you need to use.

In C# we can't create global variables, and I suspect VB is the same - instead we make them part of the form or other class and access them that way.
  Permalink  
Comments
William Winner 17-May-10 16:31pm
   
actually, in VB, you can do a global variable. All you have to do is create a module and then declare a Public variable within that. Any public variable within the module will be visible to the whole project.
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 2

Drawing lines - here.

Variables that need to be seen throughout app - use Public.
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy |
Web02 | 2.8.180111.1 | Last Updated 18 May 2010
Copyright © CodeProject, 1999-2018
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100