- [DEVEXPRESS] Chia sẻ source code cách tạo biểu đồ sơ đồ tổ chức công ty Org Chart trên Winform C#
- [C#] Hướng dẫn tạo Auto Number trên Datagridview winform
- [DATABASE] Hướng dẫn tạo Procedure String Split in Mysql
- [C#] Thiết lập dấu (,) hay dấu (.) ở định dạng số đúng với định dạng số Việt Nam
- [C#] Chia sẻ source code Game Spin Lucky Wheel
- [C#] Hướng dẫn Encode and Decode HTML
- Danh sách tài khoản ChatGPT miễn phí - Hướng dẫn tạo tài khoản Chat Open AI GPT tại Việt Nam
- [C#] Hướng dẫn thay đổi giao diện ứng dụng Winform theo giao diện của Windows
- [VB.NET] Hiệu ứng Acrylic, Mica, Tabbed Blur Effect trên Winform
- [DEVEXPRESS] Hướng dẫn sử dụng HTML Template trên Combobox Edit
- [C#] Chia sẻ source code Orange Rain in Winform
- [DEVEXPRESS] Hướng dẫn sử dụng HTML Template trên XtraMessageBox Winform Devexpress 22.2.3
- [DEVEXPRESS] Hướng dẫn sử dụng HTML and CSS Code Viewer trên Winform
- [C#] Number Effect Counter up and down in winform
- [C#] Hướng dẫn Supend and Resume Process ID in Winform
- [C#] Hiển thị line number trên Richtextbox Winform
- [C#] Fake Blue Screen BSOD in winform
- [C#] Chia sẽ code demo sử dụng Async Parallel Foreach and For in Winform
- [C#] Sử dụng ActionBlock run X task at time winform
- [C#] Hướng dẫn sử dụng Property Grid để lưu và tải lại thông tin cấu hình user trên winform
[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!