資源簡介
winform 文件導出類源碼 Export
代碼片段和文件信息
using?System;
using?System.Collections.Generic;
using?System.Text;
using?System.Windows.Forms;
using?System.IO;
using?System.Diagnostics;
using?System.Runtime.InteropServices;
namespace?BullSofts.File.Helper
{
????public?class?Export
????{
????????public?enum?FileType
????????{
????????????Excel
????????????Txt
????????????Csv
????????}
????????#region?導出到txt文件
????????[DllImport(“User32.DLL“)]
????????public?static?extern?int?SendMessage(IntPtr?hWnd?uint?Msg?int?wParam?string?lParam);
????????[DllImport(“User32.DLL“)]
????????public?static?extern?IntPtr?FindWindowEx(IntPtr?hwndParent?IntPtr?hwndChildAfter?string?lpszClass?string?lpszWindow);
????????public?const?uint?WM_SETTEXT?=?0x000C;
????????public?void?ToNotepad(string?strText)
????????{
???????????
評論
共有 條評論