TechSapphire Monday, 2024-12-09, 5:08 PM
Site menu
Login form
News
Play Games
  • Deep Freeze
  • Ice Slide
  • Gyroball
  • Fat Fish
  • Bush Royal Rampage
  • Writing Text to image using Vb.Net Or writing text to image .net Or writing to image file .Net
    You can write text to image pro grammatically using VB.Net. This is sample code in VB.Net.
    Solution:
    Namespace required:

    Imports System.Drawing

    Imports System.Drawing.Imaging

    Source Code:

           Dim objBitmap As New Bitmap(100, 50)

            Dim objGraphics As Graphics = Graphics.FromImage(objBitmap)

            Dim objPoint As New PointF(5.0F, 5.0F)

            objGraphics.FillRectangle(Brushes.White, 0, 0, Width, Height)

            objGraphics.DrawString(Me.TextBox1.Text, "selectedfont", Brushes.Black, objPoint)

            objBitmap.Save("Result.JPG", ImageFormat.Jpeg)

    Explanation:

    At place of selected font you have to specify name of font, this is of type drawing font.

    If want to check live project example download this project. Here you would find installation of font run time using Vb.Net.

    Categories
    Programming [27]
    Tips for programming
    Security [2]
    Security Tips
    Google [1]
    Use google faster then ever you use
    Project [14]
    HTML [2]
    Electronics [0]
    Data Structure [0]
    Database [16]
    SQL SERVER
    SSRS [1]
    Sql Server Reporting Services
    Copyright MyCorp © 2024