|
-
Sep 20th, 2002, 07:28 AM
#1
Thread Starter
Member
Lines - where are they?
Hi all,
Does anyone know how I can draw a Line on a Form like you can in VB6? What is the .NET equivalent, I can't seem to find it?
Thanks for your time
-
Sep 20th, 2002, 07:44 AM
#2
VB Code:
Imports System
Imports System.Windows.Forms
Imports System.Drawing
Public Module modmain
Sub Main()
'The KPD-Team 2001
'URL: [url]http://www.allapi.net/dotnet/[/url]
Dim theForm as MainForm = new MainForm()
theForm.Size = new Size(500, 350)
theForm.Text = "Visual Basic.NET"
theForm.ShowDialog()
End Sub
End Module
Public Class MainForm
Inherits Form
Protected Overrides Sub OnPaint(e as PaintEventArgs)
e.Graphics.Clear(Me.BackColor)
e.Graphics.DrawLine(new Pen(Color.Blue), 0, 0, Me.ClientSize.Width, Me.ClientSize.Height)
End Sub
End Class
-
Sep 20th, 2002, 08:07 AM
#3
yay gay
the answer like the guy up said is GDI+...that means graphic device interface that is what makes about all graphics in windows
u can find it in the Drawing and Drawing2d namespaces
-
Sep 20th, 2002, 09:04 AM
#4
Thread Starter
Member
thanks guys
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|