Mist (Ps could you give me an example of how to do sprites well in VB?)
Yeah, it's really easy. When I get home today, I will make a screen cast tutorial of it. Than post it up.
But... If you can't wait that long:
Dim playerpos As Point 'Create the player's X/Y coordinates variable
Private Sub Form1_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles MyBase.Paint
Dim bmp As New Bitmap("smile.bmp") 'Load Image into Program
bmp.MakeTransparent(Color.Black) 'Make black background transparent
e.Graphics.DrawImage(bmp, playerpos) 'Draw Image to Screen at playerpos coordinates
End Sub
Private Sub Timer1_Elapsed(ByVal sender As System.Object, ByVal e As System.Timers.ElapsedEventArgs) Handles Timer1.Elapsed
Me.Invalidate() 'Update Graphics every 25 milliseconds
End Sub
Private Sub Form1_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles MyBase.KeyDown
Select Case e.KeyCode 'Change player coor when you press certain arrow key
Case Keys.Up
playerpos.Y -= 4
Case Keys.Down
playerpos.Y += 4
Case Keys.Right
playerpos.X += 4
Case Keys.Left
playerpos.X -= 4
End Select
End Sub
Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load
Setstyle(ControlStyles.DoubleBuffer, True) 'make movement smoother
Setstyle(ControlStyles.AllPaintingInWmPaint, True) 'Reduce Flicker
End Sub
Create a new program, and stick that code in the form1. After that, go to the form1 design, and add a timer that runs ever 25 milliseconds. Than go to paint and create a sprite called "Smile.bmp", save it in "Bin" in the project folder.
Tinker and test it out, works wonderfully.
so its an absoluly bug free, optimized chat program?..... i could do that in sc in 3 minutes
Vb.net is just a bit harder to program with than Sc. Though, that would be pretty cool if you made one.
-Gandolf