Click here to Skip to main content
15,922,574 members
Home / Discussions / C#
   

C#

 
AnswerRe: Why is there a ContextMenu Property on TreeView? Pin
Colin Angus Mackay11-Nov-05 23:38
Colin Angus Mackay11-Nov-05 23:38 
GeneralRe: Why is there a ContextMenu Property on TreeView? Pin
SeanCM14-Nov-05 6:33
SeanCM14-Nov-05 6:33 
Questionsidebar Pin
faviochilo11-Nov-05 8:26
faviochilo11-Nov-05 8:26 
AnswerRe: sidebar Pin
leppie11-Nov-05 10:55
leppie11-Nov-05 10:55 
QuestionCreating a popup from Pin
naglbitur11-Nov-05 7:28
naglbitur11-Nov-05 7:28 
AnswerRe: Creating a popup from Pin
Wjousts11-Nov-05 7:55
Wjousts11-Nov-05 7:55 
GeneralRe: Creating a popup from Pin
naglbitur11-Nov-05 9:36
naglbitur11-Nov-05 9:36 
GeneralRe: Creating a popup from Pin
Wjousts11-Nov-05 10:59
Wjousts11-Nov-05 10:59 
naglbitur wrote:
protected override void OnPaint(PaintEventArgs e)
{
Graphics g = e.Graphics;
Pen p = new Pen(Color.Black, 2);
Point p2 = new Point(50, 70);
Point p3 = new Point(50,100);
g.DrawLine(p, p2, p3);
}


This should be in the class of f2 not f1. But since you are using a generic Form instead of creating a new class that inherits from Form I guess you could hook the f2.Paint event and do your drawing there. Something like this:
<code>
// After you create the form in your button click handler
f2.Paint += new new PaintEventHandler(f2_Paint);
.
.
.
private void f2_Paint(object sender, System.Windows.Forms.PaintEventArgs e)
{
    Graphics g = e.Graphics;
    Pen p = new Pen(Color.Black, 2);
    Point p2 = new Point(50, 70);
    Point p3 = new Point(50,100);
    g.DrawLine(p, p2, p3);
}
</code>

Questionsend webcam stream over tcp ip Pin
toan198111-Nov-05 7:15
toan198111-Nov-05 7:15 
QuestionEventInfo.GetRaiseMethod() - anyone made it work? Pin
vSoares11-Nov-05 6:37
professionalvSoares11-Nov-05 6:37 
AnswerRe: EventInfo.GetRaiseMethod() - anyone made it work? Pin
leppie11-Nov-05 7:07
leppie11-Nov-05 7:07 
QuestionCreating Quick Launch like Applications Pin
jgallen2311-Nov-05 5:54
jgallen2311-Nov-05 5:54 
AnswerRe: Creating Quick Launch like Applications Pin
Dwayner7911-Nov-05 8:22
Dwayner7911-Nov-05 8:22 
GeneralRe: Creating Quick Launch like Applications Pin
Colin Angus Mackay12-Nov-05 3:27
Colin Angus Mackay12-Nov-05 3:27 
GeneralRe: Creating Quick Launch like Applications Pin
jgallen2313-Nov-05 18:19
jgallen2313-Nov-05 18:19 
QuestionDumping the DataGrid into a txt file Pin
zaboboa11-Nov-05 5:29
zaboboa11-Nov-05 5:29 
AnswerRe: Dumping the DataGrid into a txt file Pin
whizzs11-Nov-05 7:26
whizzs11-Nov-05 7:26 
QuestionProblems with SharpZipLib Pin
Ricardo Mendes11-Nov-05 5:20
Ricardo Mendes11-Nov-05 5:20 
QuestionCall CHM content specific Pin
Dwayner7911-Nov-05 4:35
Dwayner7911-Nov-05 4:35 
AnswerGot it Pin
Dwayner7911-Nov-05 8:02
Dwayner7911-Nov-05 8:02 
QuestionExcel Range object Pin
zaboboa11-Nov-05 4:25
zaboboa11-Nov-05 4:25 
AnswerRe: Excel Range object Pin
Dwayner7911-Nov-05 8:15
Dwayner7911-Nov-05 8:15 
QuestionHow to get dependancies of SQL Functions? Pin
pubududilena11-Nov-05 1:37
pubududilena11-Nov-05 1:37 
AnswerRe: How to get dependancies of SQL Functions? Pin
Colin Angus Mackay11-Nov-05 4:17
Colin Angus Mackay11-Nov-05 4:17 
QuestionWindow Form like Google Desktop ??? Pin
faviochilo11-Nov-05 1:28
faviochilo11-Nov-05 1:28 

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.