Hi.
I need to show any text near a cursor while creating a link. So I use DrawString function in DrawLink event. But it seems area to draw is small for me and property Graphics of parameter
e is readonly.
Now Im playing with some solutions and I found out that there is any increasing area around mouse cursor. Right part of text is not visible when Im moving cursor to right. But then when Im coming back to left averything is okay.
http://i43.tinypic.com/35lrfys.jpgOn this picture is shown increasing blinking area while Im moving a cursor. Thats the proof
http://i43.tinypic.com/raywqr.jpgIm using this code for it (sub is called from DrawLink event):
Public Sub DrawText(ByRef IoEvent As DrawLinkEventArgs, ByVal InX As Single, ByVal InY As Single)
Dim font As Font = New Font("Arial", 12, FontStyle.Regular, GraphicsUnit.Pixel)
Dim defaultIcon As Bitmap = New Bitmap(50, 50)
Dim graphics As Graphics = graphics.FromImage(defaultIcon)
IoEvent.Graphics.DrawString("abcdefg", font, Brushes.Blue, InX, InY)
Dim g As Graphics = XtraForm1.fcDiagramView.CreateGraphics
g.Clear(Color.Transparent)
font.Dispose()
End Sub
Any help how to draw string or icon or whatever near a cursor?
Thx.
...MUDO...