Jump to content
Xtreme .Net Talk

Recommended Posts

  • Leaders
Posted

Why such big text?

You create a Graphics object from the label, as in

GFX = yourlabel.CreateGraphics()

And then, you draw it, like

GFX.DrawLine(0, 0, yourlabel.width, yourlabel.height)

'Draws a line going from the top left to the bottom right of the label. :)

Iceplug, USN

One of my coworkers thinks that I believe that drawing bullets is the most efficient way of drawing bullets. Whatever!!! :-(

Posted

Thanks

 

Sorry about the big text ... I was experimenting ...

Thank You for your advice ...

Why such big text?

You create a Graphics object from the label, as in

GFX = yourlabel.CreateGraphics()

And then, you draw it, like

GFX.DrawLine(0, 0, yourlabel.width, yourlabel.height)

'Draws a line going from the top left to the bottom right of the label. :)

Posted

Graphics Question

 

Works great iceplug! Just tried it, never worked with graphics before... One question though, after I draw the line or fill a new backround, how do I return the label to it's original state?

-Sean
Posted

You can:

DIspose the graphics object

or use an If statement to NOT draw the line ... for example

If IwantToDrawTheLine Then

e.graphics.drawline(......)

End If

 

jtstantish - also you can go in to the label's Paint event and draw the line:

e.graphics.DrawLine(.....)

 

and use Label1.Invalidate if the position of the line ever changes and you want to update it.

 

-The Pentium Guy

My VB.NET Game Programming Tutorial Site (GDI+, Direct3D, Tetris [coming soon], a full RPG.... you name it!)

vbprogramming.8k.com

My Project (Need VB.NET Programmers)

http://workspaces.gotdotnet.com/ResolutionRPG

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...