try this:
vb Code:
Module Module1 Public Sub DrawPlayerCoordinates(ByVal frm As Form) Dim g As Graphics = frm.CreateGraphics g.DrawString("Map: " & GetPlayerMap(MyIndex) & vbCrLf & "X: " & GetPlayerX(MyIndex) & vbCrLf & "Y: " & GetPlayerY(MyIndex), frm.Font, Brushes.Red, 15, 15) End Sub End Module
to call it from your button_click event:
vb Code:
Public Class Form1 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click DrawPlayerCoordinates(Me) End Sub End Class




Reply With Quote