Add Watermark to a Picture - Visual Basic .NET

Tags: VB.NET, VB 2008, VB 2010, VB 2012, VB 2013

This tutorial describes how to add watermark on an image.

The watermark will be shown on an image displayed in a picture box

For this tutorial you need a picturebox, a textbox, and a button.

The textbox will be used to enter the text that will be displayed as watermark on the image displayed

Add Watermark Button code:

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
	Dim NF As New Font("Impact", 36, FontStyle.Italic)
	Dim NB As New SolidBrush(Color.FromArgb(64, 192, 255, 255))
	NB.Color = Color.FromArgb(128, 0, 0, 0)
	PictureBox1.CreateGraphics.DrawString(TextBox1.Text, NF, NB, 15, 135)
End Sub


Share This

Home | About | Contact | Privacy Policy

Copyright visual-basic-tutorials.com 2017 - All Rights Reserved.