分类 C# 下的文章
WebBrowser可以使用WebBrowser控件向Windows窗体客户端应用程序添加现有的动态的Web应用程序。使用WebBrowser控件,可以通过ObjectForScripting和Document属性在客户端应用程序代码和网页脚本代码之间实现双向通信。此外,可以对WebBrowser控件进行配置,使Web控件可以与应用程序窗体上的其他控件进行无缝整合,从而隐藏其HTML实现。若要使控件无缝整合,请对所显示页的格式进行设置,使其背景颜色和视觉样式与窗体的其余部分匹配,然后使用AllowWebBrowserDrop、 IsWebBrowserContextMenuEnabled和WebBrowserShortcutsEnabled属性禁用标准浏览器功能。webBrowser1.AllowWebBrowserDrop = false;//将 WebBrowser 控件的 AllowWebBrowserDrop 属性设置为 false,以防止 WebBrowser 控件打开拖放到其上的文件。 webBrowser1.IsWebBrowserContextMenuEnable...
winform窗体中使用WebBrowser嵌入网页

winform窗体中使用WebBrowser嵌入网页

using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Net; using System.Net.Sockets; using System.Text; using System.Threading; using System.Threading.Tasks; using System.Xml; namespace ClassLibrary { /// <summary> /// 文件传输服务器 /// </summary> public class FileTransferServer { /* 服务器接收文件Socket */ private static Socket ServerSocket; /* 文件根目录 */ private static string ServerRoot; /...
C#文件服务器

C#文件服务器

ExeEmbedForm类/// <summary> /// 将外部exe嵌入至winform中 /// </summary> public class ExeEmbedForm { EventHandler appIdleEvent = null; Control ParentCon = null; string strGUID = ""; public ExeEmbedForm(Control C, string Titlestr) { appIdleEvent = new EventHandler(Application_Idle); ParentCon = C; strGUID = Titlestr; } /// <summary> /// 将属性<code>AppFilename</code>指向的应用程序打开并嵌入此容器 /// </summary> ...
exe程序嵌入Winform窗体

exe程序嵌入Winform窗体

启动进程System.Diagnostics.Process.Start("Client.exe");查看进程Process[] processes = Process.GetProcessesByName(Path.GetFileNameWithoutExtension("Client.exe")); foreach (Process process in processes) { // 输出每个进程的进程号、名称、占用的物理内存、开始的时间和文件名 Console.WriteLine(process.ProcessName); Console.WriteLine(string.Format("{0} KB",process.PrivateMemorySize64/1024.0f)); Console.WriteLine(string.Format("{0}",process.StartTime),); Console.WriteLine(process.Ma...
WinForm启动和停止进程

WinForm启动和停止进程