Click here to Skip to main content
15,889,403 members
Home / Discussions / C#
   

C#

 
Questioncontextmenu Pin
PHDENG8123-Sep-05 7:29
PHDENG8123-Sep-05 7:29 
AnswerRe: contextmenu Pin
Judah Gabriel Himango23-Sep-05 8:05
sponsorJudah Gabriel Himango23-Sep-05 8:05 
GeneralRe: contextmenu Pin
PHDENG8126-Sep-05 1:57
PHDENG8126-Sep-05 1:57 
GeneralRe: contextmenu Pin
Judah Gabriel Himango26-Sep-05 4:11
sponsorJudah Gabriel Himango26-Sep-05 4:11 
QuestionListing Database Names Pin
Member 205875323-Sep-05 7:28
Member 205875323-Sep-05 7:28 
AnswerRe: Listing Database Names Pin
Mohamad Al Husseiny23-Sep-05 14:09
Mohamad Al Husseiny23-Sep-05 14:09 
GeneralRe: Listing Database Names Pin
Member 205875326-Sep-05 7:23
Member 205875326-Sep-05 7:23 
Questionneed to understand once and for all.... Pin
...---...23-Sep-05 5:49
...---...23-Sep-05 5:49 
I have been told and told and told (correctly) that I MUST do all my drawing in the Paint handler. That being said here is my simple problem.
1. I have a class:
MyClass
{
//let's forget Set/Get and make public....
public int x;
public int y;
}

2. I have the Paint handler:

protected override OnPaint(..,..)
{
}

Here's my problem?
I want to pass the x, and y coordinates as the x2, y2 coordinates of the args in a g.DrawLine overload inside some function as in--(assume x1, y1, both have a value of 20--

"return type" DrawFunc("some args or void?")
{
g.DrawLine(pen, 20, 20, "x", "y")
}
Is this the right way to do this?
Does "g.DrawLine(...) need to be INSIDE the paint handler?
Also I will want to draw more lines with different values of x, and y.
I know how to Set/Get them. I want to know the correct way to draw them in the Paint handler from a function call... please help thanks
AnswerRe: need to understand once and for all.... Pin
Robert Rohde23-Sep-05 6:21
Robert Rohde23-Sep-05 6:21 
GeneralRe: need to understand once and for all.... Pin
...---...23-Sep-05 6:56
...---...23-Sep-05 6:56 
GeneralRe: need to understand once and for all.... Pin
Dan Neely23-Sep-05 7:05
Dan Neely23-Sep-05 7:05 
GeneralRe: need to understand once and for all.... Pin
...---...23-Sep-05 7:17
...---...23-Sep-05 7:17 
GeneralRe: need to understand once and for all.... Pin
Guffa23-Sep-05 8:06
Guffa23-Sep-05 8:06 
GeneralRe: need to understand once and for all.... Pin
...---...23-Sep-05 8:39
...---...23-Sep-05 8:39 
GeneralRe: need to understand once and for all.... Pin
Dave Kreskowiak23-Sep-05 8:48
mveDave Kreskowiak23-Sep-05 8:48 
AnswerRe: need to understand once and for all.... Pin
mikanu23-Sep-05 9:04
mikanu23-Sep-05 9:04 
AnswerRe: need to understand once and for all.... Pin
Guffa23-Sep-05 11:36
Guffa23-Sep-05 11:36 
QuestionExcel Type or Namespace Pin
zaboboa23-Sep-05 5:19
zaboboa23-Sep-05 5:19 
AnswerRe: Excel Type or Namespace Pin
Radioactive Cat23-Sep-05 7:06
sussRadioactive Cat23-Sep-05 7:06 
Questiondeployment (removing previous versions automatically) Pin
BlackDice23-Sep-05 4:30
BlackDice23-Sep-05 4:30 
AnswerRe: deployment (removing previous versions automatically) Pin
Wjousts23-Sep-05 10:08
Wjousts23-Sep-05 10:08 
GeneralRe: deployment (removing previous versions automatically) Pin
BlackDice23-Sep-05 10:09
BlackDice23-Sep-05 10:09 
QuestionA question about the "file field" Pin
shanzy23-Sep-05 3:38
shanzy23-Sep-05 3:38 
AnswerRe: A question about the "file field" Pin
Dave Kreskowiak23-Sep-05 6:23
mveDave Kreskowiak23-Sep-05 6:23 
QuestionType of a calling instace from within a method Pin
Radioactive Cat23-Sep-05 3:37
sussRadioactive Cat23-Sep-05 3:37 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.