This article is the extension of the past article How to crate Image Thumbnails in vb.net( The article shows how to create a user control for viewing all images of the directory or folder in a thumbnail view). Continue reading “Create Image Slide Show in vb.net”
Tag: GDI in .net
Create a Round Button with 3D look in vb.net
Yesterday an user comment on my article ‘How to create a round button in vb.net’, he need a round button with 3D affect. So i write this article about how we can give the 3d look to button control. Continue reading “Create a Round Button with 3D look in vb.net”
How to draw GDI text with Emboss effect in vb.net
The following example learns how to draw text with emboss effect as image in Picturebox using vb.net
This example requires a PictureBox control named PictureBox1, two NumericUpDown controls( one for font size another for Depth) and one textbox.
Continue reading “How to draw GDI text with Emboss effect in vb.net”
How to open an image in Photoshop using vb.net
In this article we will see that how we can open an image in photoshop application using vb.net.
The following example requires two button control named Button1 and Button2 and need to add reference of ‘Adobe Photoshop object Library’ in the application. With the help of this code we can open an image on the click of Button1 control, see below:
Dim PhotoshopApp As Photoshop.Application Dim photoshopDoc As Photoshop.Document Dim curLayer As Photoshop.ArtLayer Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click PhotoshopApp = New ApplicationClass PhotoshopApp.DisplayDialogs = PsDialogModes.psDisplayNoDialogs PhotoshopApp.PlaybackDisplayDialogs = PsDialogModes.psDisplayNoDialogs photoshopDoc = PhotoshopApp.Open("C:\Users\Administrator\Pictures\imgage1.jpg") End Sub Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click photoshopDoc.ResizeImage(5, 5) photoshopDoc.Close() PhotoshopApp.Quit() End Sub
How to find out hex value of a color using vb.net
The following code sample shows how we can get hex value from System.Drawing.Color using vb.net.
Continue reading “How to find out hex value of a color using vb.net”
How to draw an arrow on windows form using VB.net
The following example will draw a red arrow on windows form. Continue reading “How to draw an arrow on windows form using VB.net”
How to Convert Image File from One format to another using vb.net
In this article we will discuss about how we can convert an image file from one image format to another like .jpg to .gif or .jpg to .png using vb.net.
Continue reading “How to Convert Image File from One format to another using vb.net”
How to draw scroll button on a scroll bar control on windows form in vb.net
You can draw a scroll button on a scroll bar control in the specified state, on the specified graphics surface, and within the specified bound with the help of ControlPaint.DrawScrollButton Method using vb.net
You can use ControlPaint.DrawScrollButton Method like as :
Public Shared Sub DrawScrollButton ( _
graphics As Graphics, _
rectangle As Rectangle, _
button As ScrollButton, _
state As ButtonState _
)
Example
Following example draw a scroll button on windows form:
Private Sub Form1_Paint(ByVal sender As System.Object, _ ByVal e As System.Windows.Forms.PaintEventArgs) _ Handles MyBase.Paint ControlPaint.DrawScrollButton(e.Graphics, _ New Rectangle(10, 180, 20, 20), ScrollButton.Left, ButtonState.Normal) ControlPaint.DrawScrollButton(e.Graphics, _ New Rectangle(50, 180, 20, 20), ScrollButton.Max, ButtonState.Pushed) End Sub
How to draw 3D border on windows form in vb.net
You can draw a three-dimensional style border on the specified graphics surface and within the specified bounds on a control with the help of ControlPaint.DrawBorder3D Method using vb.net
You can use ControlPaint.DrawBorder3D Method like as :
Public Shared Sub DrawBorder3D (grp As Graphics,rect As Rectangle)
Example
Following example draw a 3D style border on windows form:
Private Sub Form1_Paint(ByVal sender As System.Object, _ ByVal e As System.Windows.Forms.PaintEventArgs) _ Handles MyBase.Paint ControlPaint.DrawBorder3D(e.Graphics, New Rectangle(10, 10, 200, 200)) End Sub
Draw ComboButton on the windows form using vb.net
You can draw a drop-down button on a combo box control in the specified state, on the specified graphics surface, and within the specified bounds with the help of ControlPaint.DrawComboButton Method using vb.net
You can use ControlPaint.DrawComboButton Method like as :
Public Shared Sub DrawComboButton ( grp As Graphics, rect As Rectangle, state As ButtonState )
Example
Following example draw a drop-down button on a combo box control on windows form:
Private Sub Form1_Paint(ByVal sender As System.Object, _ ByVal e As System.Windows.Forms.PaintEventArgs) _ Handles MyBase.Paint ControlPaint.DrawComboButton(e.Graphics, New Rectangle(50, 50, 20, 20), ButtonState.Checked) End Sub