- [DEVEXPRESS] Hỗ trợ tìm kiếm highlight không dấu và không khoảng cách trên Gridview Filter
- [C#] Chia sẻ source code phần mềm Image Downloader tải hàng loạt hình ảnh từ danh sách link url
- [C#] Chụp hình và quay video từ camera trên winform
- [C#] Chia sẽ full source code tách file Pdf thành nhiều file với các tùy chọn
- Giới thiệu về Stock Tracker Widget - Công cụ theo dõi cổ phiếu và cảnh báo giá tăng giảm bằng C# và WPF
- [VB.NET] Chia sẻ công cụ nhập số tiền tự động định dạng tiền tệ Việt Nam
- [VB.NET] Hướng dẫn fill dữ liệu từ winform vào Microsoft word
- [VB.NET] Hướng dẫn chọn nhiều dòng trên Datagridview
- Hướng Dẫn Đăng Nhập Nhiều Tài Khoản Zalo Trên Máy Tính Cực Kỳ Đơn Giản
- [C#] Chia sẻ source code phần mềm đếm số trang tập tin file PDF
- [C#] Cách Sử Dụng DeviceId trong C# Để Tạo Khóa Cho Ứng Dụng
- [SQLSERVER] Loại bỏ Restricted User trên database MSSQL
- [C#] Hướng dẫn tạo mã QRcode Style trên winform
- [C#] Hướng dẫn sử dụng temp mail service api trên winform
- [C#] Hướng dẫn tạo mã thanh toán VietQR Pay không sử dụng API trên winform
- [C#] Hướng Dẫn Tạo Windows Service Đơn Giản Bằng Topshelf
- [C#] Chia sẻ source code đọc dữ liệu từ Google Sheet trên winform
- [C#] Chia sẻ source code tạo mã QR MOMO đa năng Winform
- [C#] Chia sẻ source code phần mềm lên lịch tự động chạy ứng dụng Scheduler Task Winform
- [C#] Hướng dẫn download file từ Minio Server Winform
[C# - WPF] Chia sẽ source code lấy thông tin CPU, Ram, HDD, OS Windows, các phần mềm cài đặt trên máy tính
Xin chào các bạn, bài viết hôm nay mình chia sẻ các bạn source code lấy thông tin: Hardware, Software trên máy tính bằng ngôn ngữ C# WPF.
[C# - WPF] Get systeminfo Hardware and Software in Computer
Dưới đây là giao diện demo ứng dụng:

- Bấm nút Lấy thông tin để lấy thông tin phần cứng và phần mềm
- Hỗ trợ xuất danh sách ra File Excel.
Các bạn tạo 1 class SystemInfoHelper.cs
P/s: Class này các bạn tải ở source code bên dưới về để sử dụng.
Source code C# sử dụng ở MainWindow:
using Microsoft.Win32;
using System;
using System.Collections.Generic;
using System.Data;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using SystemInfoWpf.Helpers;
namespace SystemInfoWpf
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();
            this.Loaded += MainWindow_Loaded;
            btnExport.Click += BtnExport_Click;
            btnGetData.Click += BtnGetData_Click;
        }
        private void BtnGetData_Click(object sender, RoutedEventArgs e)
        {
            dataInfo = SystemInfoHelper.GetSystemInfo();
            myDataGridview.ItemsSource = dataInfo.DefaultView;
        }
        DataTable dataInfo;
        private void BtnExport_Click(object sender, RoutedEventArgs e)
        {           
            Microsoft.Office.Interop.Excel.Application excel = null;
            Microsoft.Office.Interop.Excel.Workbook wb = null;
            object missing = Type.Missing;
            Microsoft.Office.Interop.Excel.Worksheet ws = null;
            Microsoft.Office.Interop.Excel.Range rng = null;
            
            excel = new Microsoft.Office.Interop.Excel.Application();
            wb = excel.Workbooks.Add();
            ws = (Microsoft.Office.Interop.Excel.Worksheet)wb.ActiveSheet;
            ws.Columns.AutoFit();
            ws.Columns.EntireColumn.ColumnWidth = 25;
            // Header row
            for (int Idx = 0; Idx < dataInfo.Columns.Count; Idx++)
            {
                ws.Range["A1"].Offset[0, Idx].Value = dataInfo.Columns[Idx].ColumnName;
            }
            // Data Rows
            for (int Idx = 0; Idx < dataInfo.Rows.Count; Idx++)
            {
                ws.Range["A2"].Offset[Idx].Resize[1, dataInfo.Columns.Count].Value = dataInfo.Rows[Idx].ItemArray;
            }
            excel.Visible = true;
            wb.Activate();           
           
        }
        private void MainWindow_Loaded(object sender, RoutedEventArgs e)
        {
           
        }
      
    }
}
Thanks for watching!

![[C# - WPF] Chia sẽ source code lấy thông tin CPU, Ram, HDD, OS Windows, các phần mềm cài đặt trên máy tính](https://laptrinhvb.net/uploads/users/9a8cb514e4428e85fb4ca07588e9103f.png)

![[C#] Hướng dẫn tạo custom list sử dụng Usercontrol và FlowLayoutPanel](https://laptrinhvb.net/uploads/source/vbnet/custom_list_csharp_thumb.jpg)
![[C#] Mã hóa văn bản text sử dụng thuật toán AES Winform](https://laptrinhvb.net/uploads/source/csharp/aes_csharp_thumb.png)
![[C#] Hướng dẫn sử dụng đệ quy Recursion trong lập trinh Winform](https://laptrinhvb.net/uploads/source/csharp/dequy_csharp.png)

![[C#] Hướng dẫn tạo menu trên Console App](https://laptrinhvb.net/uploads/source/new_image_baiviet/menu_console_csharp.gif)
![[C#] Hướng dẫn push notification sử dụng API One Signal](https://laptrinhvb.net/uploads/source/csharp/one_signal_thumb.png)
![[C#] Hướng dẫn tạo hiệu ứng Label Letter Text Effect](https://laptrinhvb.net/uploads/source/csharp/letter_text_effect.gif)
![[C#] Tạo hiệu ứng hình ảnh Image Cartoon Effect](https://laptrinhvb.net/uploads/source/csharp/effect_image_cartoon_thumb.png)
![[C#] Hướng dẫn kiểm tra địa chỉ email có tồn tại hay không sử dụng API InfoByIP](https://laptrinhvb.net/uploads/source/image_baiviet/306ac3c5b4fb2cd52a92668f45ef01c0.jpg)
![[C#] Hiệu ứng gõ phím Smooth typing Effect RichTextBox giống MS Word 2013](https://laptrinhvb.net/uploads/source/csharp/smooth_typing_csharp_thumb.png)
![[C#] Hướng dẫn tạo hiệu ứng Karaoke Text Effect Winform](https://laptrinhvb.net/uploads/source/new_image_baiviet/karaoke_csharp_effect.png)
![[C#] Hướng dẫn giới hạn số cửa sổ ứng dụng khi chạy trên winform](https://laptrinhvb.net/uploads/source/new_image_baiviet/limit_instance_app_thumb.png)
![[C#] Hướng dẫn lấy khoảng thời gian ngày đến ngày trong tuần lập trình csharp](https://laptrinhvb.net/uploads/source/csharp/week_csharp_thumb.jpg)
![[C#] Hướng dẫn ngắt kết nối mạng card ethenet trong windows](https://laptrinhvb.net/uploads/source/csharp/ethenet_csharp_thumb.jpg)
![[C#] Hướng dẫn đọc file excel đơn giản sử dụng thư viện Epplus](https://laptrinhvb.net/uploads/source/new_image_baiviet/EPPlus.png)
![[C#] Hướng dẫn thêm text vào hình ảnh icon winform](https://laptrinhvb.net/uploads/source/vbnet/icon_progress.gif)
![[C#] Giới thiệu thư viện Fluent FTP Awesome dùng để làm việc với FTP](https://laptrinhvb.net/uploads/source/vbnet/fluent_ftp_thumb.png)
![[C#] Hướng dẫn tạo Form Splash Screen Good bye](https://laptrinhvb.net/uploads/source/csharp/good_bye_form.gif)
![[C#] Khóa, mở khóa, protected file readonly USB trên winform](https://laptrinhvb.net/uploads/source/csharp/usb_management_thumb.png)
![[C#] Hướng dẫn sử dụng Color Translator để đọc mã màu từ HTML và ngược lại](https://laptrinhvb.net/uploads/source/csharp/color_translator_thumb.png)
![[C#] Hướng dẫn bật màn hình Window Console trong Winform](https://laptrinhvb.net/uploads/source/image_baiviet/8b87f7ffa822221afb152eb88370728c.jpg)
![[C#] Thiết kế giao diện ứng dụng trên Console sử dụng thư viện Terminal.Gui](https://laptrinhvb.net/uploads/source/new_image_baiviet/console_gui.png)
![[BÀI 2] Đơn giản hóa lập trình với cơ sở dữ liệu (ADO.NET) - Sử dụng SqlBulkCopy](https://laptrinhvb.net/uploads/source/image_baiviet/c1ec70e91a79636c4a0b57b11711e485.jpg)
![[C#] Hướng dẫn xuất danh sách hình ảnh nhân viên ra file Excel](https://laptrinhvb.net/uploads/source/web/image_excel_thumb.png)
![[C#] Tìm kiếm file trùng nhau trong cùng thư mục lập trình Winform](https://laptrinhvb.net/uploads/source/csharp/duplicate_file_thumb.png)
