I'm sure that picture1.Line(5 ,5)-(5,5) draws a point (or more precisely a
line of one point)
I don't remember if you can use PSet also for pictureboxes, in this way:
picture1.PSet(5 ,5)
assuming that picture1 is the name of the picturebox and 5,5 are the
coordinates of the point to draw
Bye
"David" <dvd@post.sk> ha scritto nel messaggio
news:u2oM6CAOEH A.904@TK2MSFTNG P12.phx.gbl...[color=blue]
> HEllo.
> How can I draw a point on the picturebox.
> Thanks.
>
>[/color]
In fact this is an interesting question, because in the Graphics class of
the framework I don't see a 'DrawPoint' method.
If I find a solution, I will post in the newsgroup.
Bye
"David" <dvd@post.sk> ha scritto nel messaggio
news:u2oM6CAOEH A.904@TK2MSFTNG P12.phx.gbl...[color=blue]
> HEllo.
> How can I draw a point on the picturebox.
> Thanks.
>
>[/color]
David schrieb:[color=blue]
> How can I draw a point on the picturebox.[/color]
\\\
Private Sub Form1_Paint( _
ByVal sender As Object, _
ByVal e As System.Windows. Forms.PaintEven tArgs _
) Handles MyBase.Paint
e.Graphics.Fill Rectangle( _
Brushes.Red, _
New Rectangle(100, 100, 1, 1) _
)
End Sub
///
--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Dim g As Graphics = PictureBox1.Cre ateGraphics
g.DrawLine(Pens .Black, 10, 10, 10, 10)
Ken
----------------
"David" <dvd@post.sk> wrote in message
news:u2oM6CAOEH A.904@TK2MSFTNG P12.phx.gbl...[color=blue]
> HEllo.
> How can I draw a point on the picturebox.
> Thanks.
>
>[/color]
Ken Tucker [MVP] schrieb:[color=blue]
> Draw a line with the same start and end points.
>
> Dim g As Graphics = PictureBox1.Cre ateGraphics
> g.DrawLine(Pens .Black, 10, 10, 10, 10)[/color]
I am not sure if I am right, but I remember that this filled 2 pixels
instead of one. Did you test it?
--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
"David" <dvd@post.sk> schrieb im Newsbeitrag
news:u2oM6CAOEH A.904@TK2MSFTNG P12.phx.gbl...[color=blue]
> HEllo.
> How can I draw a point on the picturebox.
> Thanks.[/color]
"David" <dvd@post.sk> wrote in message
news:u2oM6CAOEH A.904@TK2MSFTNG P12.phx.gbl...[color=blue]
> HEllo.
> How can I draw a point on the picturebox.
> Thanks.
>
>[/color]
Ken
-----------
"Herfried K. Wagner [MVP]" <hirf-spam-me-here@gmx.at> wrote in message
news:exwFVUBOEH A.1392@TK2MSFTN GP09.phx.gbl...[color=blue]
> Ken,
>
> Ken Tucker [MVP] schrieb:[color=green]
>> Draw a line with the same start and end points.
>>
>> Dim g As Graphics = PictureBox1.Cre ateGraphics
>> g.DrawLine(Pens .Black, 10, 10, 10, 10)[/color]
>
> I am not sure if I am right, but I remember that this filled 2 pixels
> instead of one. Did you test it?
>
> --
> Herfried K. Wagner [MVP]
> <URL:http://dotnet.mvps.org/>[/color]
Comment