Users Pricing

forum

Home Forums To scroll a text inside picture box – MindStick

To scroll a text inside picture box

Madhu Mitha 2265 22 Mar 2015
hi thr,

          I want to scroll text inside a picturebox, from right to left can anyone help me in solving this problem..

My code is 

Public Class Form1
    Dim brush As New Drawing.SolidBrush(Color.Black)
    Dim g2 As System.Drawing.Graphics
    Dim img As New Bitmap(400, 100)
    Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged
        g2 = Graphics.FromImage(img)
        PictureBox1.Image = img
        g2.Clear(Color.White)
        g2.SmoothingMode = Drawing2D.SmoothingMode.HighQuality
        g2.TextRenderingHint = Drawing.Text.TextRenderingHint.ClearTypeGridFit
        g2.CompositingQuality = Drawing2D.CompositingQuality.HighQuality
        '
        g2.DrawString(TextBox1.Text, TextBox1.Font, Brushes.Red, 0, 0)
    End Sub
End Class


1 Answers

Markdown for AI

A clean, structured version of this page for AI assistants and LLMs.

Open .md