- [C#] Viết ứng dụng Auto Fill list Textbox from clipboard Winform
- [TOOL] Chia sẻ phần mềm thay đổi thông tin cấu hình máy tính
- [C#] Hướng dẫn Export dữ liệu ra file Microsoft Word Template
- [C#] Chia sẻ source code tool kiểm tra domain website
- [C#] Hướng dẫn tạo file PDF sử dụng thư viện QuestPDF
- [C#] Hướng dẫn tạo ứng dụng dock windows giống Taskbar
- [C#] Chia sẻ source code sử dụng Object Listview trên Winform
- [VB.NET] Chia sẻ source code quản lý thu chi mô hình 3 lớp Winform
- [DATABASE] Xóa lịch sử danh sách đăng nhập tài khoản trên SMSS Sqlserver Management Studio
- [C#] Sử dụng FolderBrowserDialog Vista trên Winform
- [DEVEXPRESS] Chia sẻ tool Winform UI Templates Early Access Preview (EAP)
- [C#] Chia sẻ source code Spin Content (Trộn nội dung văn bản theo từ đồng nghĩa) trên Winform
- [VB.NET] Chia sẻ source code lịch âm dương và hẹn lịch nhắc việc
- [C#] Hướng dẫn đọc thông số thiết bị Thiết bị kiểm tra Pin (HIOKI BATTERY HiTESTER BT3562)
- [VB.NET] Hướng dẫn giải captcha sử dụng dịch vụ AZCaptcha API trên winform
- [C#] Hướng dẫn chứng thực đăng nhập ứng dụng bằng vân tay (Finger Print) trên máy tính
- [C#] Color Thief cách xuất màu sắc thiết kế từ hình ảnh
- [C#] Cách tạo bản quyền và cho phép dùng thử ứng dụng Winform
- [C#] Hướng dẫn sử dụng trình duyệt web Chrome convert HTML sang tập tin file PDF
- [C#] Kết nôi điện thoại Android, IOS với App Winform via Bluetooth
[C#] Flip Image Front and Back Effect Winform
Xin chào các bạn, bài viết hôm nay mình tiếp tục chia sẻ các bạn hiệu ứng flip image trên winform bằng ngôn ngữ lập trình C#.
[C#] Flip Image Animation Effect Winform
Ví dụ: các bạn xem hình ảnh dưới đây.
Chúng ta, có một tấm hình Căn cước công dân, nó có hai mặt: mặt trước và mặt sau.
Khi chúng ta click vào tấm hình thì nó sẽ tự động xoay lại cho chúng ta.
Để chỉnh tốc độ xoay, các bạn có thể tùy chỉnh lại theo ý muốn nhé.
Source code C#:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace FlipImageEffectPanel
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
var pictureBox1 = new PictureBox();
var pictureBox2 = new PictureBox();
pictureBox1.Image = global::FlipImageEffectPanel.Properties.Resources.Deutscher_Personalausweis__2021_Version_;
pictureBox1.Location = new System.Drawing.Point(656, 236);
pictureBox1.Name = "pictureBox1";
pictureBox1.Size = new System.Drawing.Size(440, 280);
pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
pictureBox2.Image = global::FlipImageEffectPanel.Properties.Resources.Italian_electronic_ID_card__back_;
pictureBox2.Location = new System.Drawing.Point(1012, 114);
pictureBox2.Name = "pictureBox2";
pictureBox2.Size = new System.Drawing.Size(440, 280);
pictureBox2.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
flipPanel1.Front = pictureBox2;
flipPanel1.Back = pictureBox1;
flipPanel1.TimerInterval = 10;
flipPanel1.Flip();
}
private void flipPanel1_Click_1(object sender, EventArgs e)
{
flipPanel1.Flip();
}
private void textBox1_TextChanged(object sender, EventArgs e)
{
flipPanel1.TimerInterval = Convert.ToInt16(textBox1.Text);
}
}
}
Thanks for watching!