New TextureBrush(Image image) : TextureBrush « System.Drawing « VB.Net by API






New TextureBrush(Image image)

   

Imports System
Imports System.Collections
Imports System.Data

Imports System.Drawing
Imports System.Windows.Forms
Imports System.ComponentModel
Imports System.Drawing.Drawing2D
Imports System.IO

Public Class MainClass
    
    Shared Sub Main()
        Dim form1 As Form = New Form1
        Application.Run(form1)
    End Sub
End Class

Public Class Form1
    Inherits System.Windows.Forms.Form

    Public Sub New()
        MyBase.New()
        Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
        Me.ClientSize = New System.Drawing.Size(292, 266)
    End Sub

    Private Sub TextureBrushExample_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles MyBase.Paint
        Dim MyBrush As New TextureBrush(Image.FromFile("figure2.bmp"))
        e.Graphics.FillRectangle(MyBrush, e.Graphics.ClipBounds)
    End Sub
End Class

   
    
    
  








Related examples in the same category

1.TextureBrush.RotateTransform
2.TextureBrush.ScaleTransform
3.TextureBrush.WrapMode