- [C#] Hướng dẫn bảo mật ứng dụng 2FA (Multi-factor Authentication) trên Winform
- [C#] Hướng dẫn convert HTML code sang PDF File trên NetCore 7 Winform
- [C#] Hướng dẫn viết ứng dụng chat với Gemini AI Google Winform
- Hướng dẫn khóa file bằng nhiều process id, không cho xóa tập tin
- Hướng dẫn cách tạo Product Id cho ứng dụng phần mềm XXXXX-XXXXX-XXXXX-XXXXX
- [SQLSERVER] Hướng dẫn tạo script sql từ ứng dụng Sqlserver management Studio
- [C#] Hướng dẫn sử dụng thư viện AutoITx lấy id và password Ultraviewer trên winform
- [VB.NET] Hướng dẫn lấy thông tin tài khoản đăng nhập windows và khởi động lại ứng dụng ở chế độ Administrator
- [C#] Sử dụng thư viện Polly gửi lại request api khi request bị lỗi hay rớt mạng
- [DEVEXPRESS] Chia sẻ source code tạo báo cáo report in tem nhãn label trên C# winform
- [DEVEXPRESS] Hướng dẫn vẽ biểu đồ Bar Chart trên Winform
- [C#] Tạo form đăng nhập và đăng ký với hiệu ứng Sliding Animation Effect
- [C#] Hướng dẫn tạo thanh toán đơn hàng qua mã vạch VietQR sử dụng API PayOS hoàn toàn miễn phí
- [C#] Hướng dẫn ghi log ra RichTextBox giống Console trên Winform sử dụng thư viện Serilog
- [C#] Hướng dẫn cách tạo mã QR Code trên file Excel
- [VB.NET] Gởi tin nhắn và file đính kèm qua ứng dụng gởi tin nhắn Whats App
- [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#] 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!