Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 'https://laptrinhvb.net/bai-viet/chuyen-de-csharp/---Csharp----Huong-dan-tao-conner-circle-image-trong-PictureBox/22b5b2caa895c8c8.html
- Imports System
- Imports System.Collections.Generic
- Imports System.ComponentModel
- Imports System.Data
- Imports System.Drawing
- Imports System.Linq
- Imports System.Text
- Imports System.Threading.Tasks
- Imports System.Windows.Forms
- Namespace Conner_PictureBox
- Public Partial Class Form1
- Inherits Form
- Public Sub New()
- InitializeComponent()
- End Sub
- Private Sub button1_Click(ByVal sender As Object, ByVal e As EventArgs)
- pictureBox1.LoadAsync("http://i569.photobucket.com/albums/ss134/hongchautkn/PHUONGTHAO.jpg")
- Dim r As Rectangle = New Rectangle(0, 0, pictureBox1.Width, pictureBox1.Height)
- Dim gp As System.Drawing.Drawing2D.GraphicsPath = New System.Drawing.Drawing2D.GraphicsPath()
- gp.AddEllipse(0, 0, pictureBox1.Width - 3, pictureBox1.Height - 3)
- Dim rg As Region = New Region(gp)
- pictureBox1.Region = rg
- End Sub
- Private Sub Form1_Load(ByVal sender As Object, ByVal e As EventArgs)
- pictureBox2.LoadAsync("http://i569.photobucket.com/albums/ss134/hongchautkn/PHUONGTHAO.jpg")
- End Sub
- End Class
- End Namespace
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement