随笔分类 - winfrom
摘要:一、方法方法一(winform实现): 安装VLC media player3.0,然后将安装的plugins文件复制到项目根目录, 1、新建一个类(VlcPlayerBase.cs): using System; using System.Runtime.InteropServices; usin
阅读全文
摘要:项目需求获取某路径下为1开头文件夹,并替换最新文件夹内容,话不多说,上代码 private void Form1_Load(object sender, EventArgs e) { try { string str1 = Properties.Settings.Default.path;//此路径
阅读全文
摘要:/// <summary> /// 拷贝文件到另两个文件夹下 /// </summary> /// <param name="sourceName">新文件路径</param> /// <param name="folderPath">需替换的文件夹路径1</param> ///<param nam
阅读全文
摘要:#region 方法一 Point first = this.Location; for (int i = 0; i < 50; i++) { Application.DoEvents(); Random ran = new Random(); Point p = new Point(this.Lo
阅读全文
摘要:方法一: 函数: // Find Window // 查找窗体 // @para1: 窗体的类名 例如对话框类是"#32770" // @para2: 窗体的标题 例如打开记事本 标题是"无标题 - 记事本" 注意 - 号两侧的空格 // return: 窗体的句柄 [DllImport("User
阅读全文
摘要:private static void KillProcess() { Process process1 = Process.GetCurrentProcess(); //获得当前计算机系统内某个进程并关闭: System.Diagnostics.Process[] process = System
阅读全文
摘要:ProcessStartInfo process = new ProcessStartInfo(); process.FileName = AppDomain.CurrentDomain.BaseDirectory + "CrystalReport\\" + "CrystalReport.exe";
阅读全文
摘要:入参格式例如:C:\\Users\\Administrator\\Desktop\\测试\\测试\\bin\\Debug\\测试.exe type=1^&card_no=123 public bool RunCmd5(string exepath) { string[] str = exepath.
阅读全文
摘要:制作.ico图片地址:https://www.bitbug.net/
阅读全文
摘要:设计思路:1.使用定时器(Timer)来监控鼠标位置和窗体位置,并实现窗体的停靠和隐藏2.当鼠标拖动窗体时,窗体才有可能根据自身位置决定是否停靠3.如果窗体四周没有接触到屏幕边缘则不会停靠4.如果窗体最小化或最大化了则不存在停靠和隐藏5.如果鼠标拖动窗体时,如果窗体很接近屏幕边缘则自动将其停靠在该边
阅读全文
摘要:1、在winform中调用js方法: --调js中的方法无 入参形式 webBrowser1.ExecuteJavascript("logout()"); --调js中的方法给js中的变量赋值操作 webBrowser1.ExecuteJavascript("jsFunction('var1','v
阅读全文
摘要:public Form1() { InitializeComponent(); this.WindowState = FormWindowState.Minimized; this.ShowInTaskbar = false; SetVisibleCoree(false); } protected
阅读全文
摘要:创建两个xml文件,一个 xml做为模板配置项,另一个做为临时接收数据。 private static string localPath = System.Environment.CurrentDirectory + @"\test\"; private static string localPat
阅读全文
摘要:1、安装最新的 SP:(SP 29 示例 – https://origin.softwaredownloads.sap.com/public/file/0020000001636412020) 2、新建CrystalReport.rpt报表 3、拖控件,新建参数字段,赋值 比如新建字段Sex,赋值:
阅读全文
摘要:/// <summary> /// 获取http服务状态 /// </summary> /// <returns></returns> protected static bool CheckPageUrl() { String url = "http://*:7000/posttype/";//获取
阅读全文