- [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#] Hướng dẫn tạo file PDF sử dụng thư viện QuestPDF
[C#] Hướng dẫn mở nhiều ứng dụng zalo trên Desktop
Xin chào các bạn, bài viết hôm nay mình sẽ hướng dẫn các bạn cách mở nhiều ứng dụng Zalo trên Winform C#.
[C#] How to Run App with profile another User Account Windows
Mặc định, trên Window, Zalo chỉ cho phép chúng ta đăng nhập một tài khoản vào một cửa sổ.
Nếu bạn có nhiều tài khoản Zalo và muốn chạy nhiều tài khoản cùng một lúc thì các bạn thực hiện như sau:
Do Zalo mỗi lẫn chạy nó đi với một tài khoản Windows Account.
Nên ở đây, các bạn muốn mở 2 cửa sổ zalo chẳng hạn thì bạn cần thêm 1 tài khoản User Windows.
Và ở Hàm Process.start trên Windows, chúng ta sẽ truyền thêm thông tin login của tài khoản mới để mở thêm được nhiều cửa sổ.
Giao diện demo của mình:
Password mật khẩu tài khoản Windows các bạn truyền vào theo kiểu SecureString
:
Full source code MutiInstance Zalo C#:
private void btnOpenZalo_Click(object sender, EventArgs e)
{
SecureString strPassword = new SecureString();
// Điền password: LapTrinhvb.net, các bạn Append vào theo từng ký tự
strPassword.AppendChar('L');
strPassword.AppendChar('a');
strPassword.AppendChar('p');
strPassword.AppendChar('T');
strPassword.AppendChar('r');
strPassword.AppendChar('i');
strPassword.AppendChar('n');
strPassword.AppendChar('h');
strPassword.AppendChar('v');
strPassword.AppendChar('b');
strPassword.AppendChar('.');
strPassword.AppendChar('n');
strPassword.AppendChar('e');
strPassword.AppendChar('t');
Process objProcess = new Process();
objProcess.StartInfo.LoadUserProfile = true;
objProcess.StartInfo.UseShellExecute = false;
objProcess.StartInfo.CreateNoWindow = false;
objProcess.StartInfo.FileName = "C:\\Users\\laptrinhvb\\AppData\\Local\\Programs\\Zalo\\zalo.exe";
objProcess.StartInfo.Domain = "GROUPNAME"; // tên group name
objProcess.StartInfo.UserName = "new_user"; // tên tài khoản windows
objProcess.StartInfo.Password = strPassword;
objProcess.Start();
}
Hoặc để Map mật khẩu nhanh bạn cũng có thể sử dụng Array.Foreach()
đoạn code sau:
var strPassword = "LapTrinhvb.net";
SecureString securePassword = new SecureString();
Array.ForEach(strPassword.ToArray(), securePassword.AppendChar);
securePassword.MakeReadOnly();
Thanks for watching!