Click here to Skip to main content
15,921,793 members
Home / Discussions / C#
   

C#

 
AnswerRe: Repeat Value Pin
Pradeep C2-Nov-06 13:46
Pradeep C2-Nov-06 13:46 
QuestionTo focus or not to focus Pin
barbiomalefico2-Nov-06 2:26
barbiomalefico2-Nov-06 2:26 
AnswerRe: To focus or not to focus Pin
stancrm2-Nov-06 2:50
stancrm2-Nov-06 2:50 
GeneralRe: To focus or not to focus Pin
Tamimi - Code2-Nov-06 3:39
Tamimi - Code2-Nov-06 3:39 
AnswerRe: To focus or not to focus Pin
Saqib Mehmood2-Nov-06 2:56
Saqib Mehmood2-Nov-06 2:56 
Questionsimple grafics problem Pin
rzvme2-Nov-06 2:07
rzvme2-Nov-06 2:07 
AnswerRe: simple grafics problem Pin
V.2-Nov-06 3:09
professionalV.2-Nov-06 3:09 
AnswerRe: simple grafics problem Pin
J4amieC2-Nov-06 3:45
J4amieC2-Nov-06 3:45 
Pretty easy.

1) Override the OnPaint method of your form.

2) This method gives access to PaintEventArgs which has a property named Graphics which you will use

3) You cant draw a point, but you can draw a rectangle with dimentions 1,1 - ie one pixel square at your given point (note the point will be the top right corner of your rectangle.

some code to get you started (untested, typed quickly)

using System.Drawing;

public override void OnPaint(PaintEventArgs e)
{
  Point myPoint = new Point(20,20);
  Graphiocs g = e.Graphics;
  using(SolidBrush brush = new SolidBrusgh(Color.Black))
  {
    g.FillRectangle(brush,new Rectangle(myPoint, new Size(1,1) ));
  }
}



GeneralRe: simple grafics problem Pin
rzvme2-Nov-06 20:50
rzvme2-Nov-06 20:50 
QuestionIs this a bug in .NET 2.0? Pin
adfgh752-Nov-06 2:02
adfgh752-Nov-06 2:02 
AnswerRe: Is this a bug in .NET 2.0? Pin
sam#2-Nov-06 2:35
sam#2-Nov-06 2:35 
AnswerRe: Is this a bug in .NET 2.0? Pin
Michael P Butler2-Nov-06 2:53
Michael P Butler2-Nov-06 2:53 
GeneralRe: Is this a bug in .NET 2.0? Pin
adfgh752-Nov-06 3:54
adfgh752-Nov-06 3:54 
Questionif statement Pin
fmardani2-Nov-06 1:57
fmardani2-Nov-06 1:57 
AnswerRe: if statement Pin
sam#2-Nov-06 2:16
sam#2-Nov-06 2:16 
AnswerRe: if statement Pin
J4amieC2-Nov-06 2:20
J4amieC2-Nov-06 2:20 
GeneralRe: if statement Pin
eggsovereasy2-Nov-06 3:30
eggsovereasy2-Nov-06 3:30 
GeneralRe: if statement Pin
J4amieC2-Nov-06 3:39
J4amieC2-Nov-06 3:39 
GeneralRe: if statement Pin
Andrew Rissing2-Nov-06 3:43
Andrew Rissing2-Nov-06 3:43 
GeneralRe: if statement Pin
Dan Neely2-Nov-06 4:11
Dan Neely2-Nov-06 4:11 
AnswerRe: if statement Pin
Guffa2-Nov-06 4:37
Guffa2-Nov-06 4:37 
AnswerRe: if statement Pin
ednrgc2-Nov-06 6:23
ednrgc2-Nov-06 6:23 
QuestionKeys shortcuts problem Pin
Tavbi2-Nov-06 1:19
Tavbi2-Nov-06 1:19 
AnswerRe: Keys shortcuts problem Pin
luckykhalid2-Nov-06 1:29
luckykhalid2-Nov-06 1:29 
GeneralRe: Keys shortcuts problem Pin
Martin#2-Nov-06 1:31
Martin#2-Nov-06 1:31 

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.