ICode9

精准搜索请尝试: 精确搜索
  • WinFrom异步加载数据,不卡主线程2022-07-16 10:34:01

    private async Task GetPackageNo(string mo)         {            await Task.Run(() =>            {                DataTable main_dt=new DataTable();                int Count = int.Parse(ADO.ExecuteScal

  • winfrom窗体控件自适变化2022-07-06 10:33:55

    直接上代码 1 using System; 2 using System.Collections.Generic; 3 using System.ComponentModel; 4 using System.Data; 5 using System.Drawing; 6 using System.Linq; 7 using System.Text; 8 using System.Threading.Tasks; 9 using System.Windows.Forms; 10 11

  • Winfrom实现串口通信工具2022-06-23 20:34:30

    一、简介 要想实现该功能,需要对C#有一些基本的了解 二、实现步骤 2.1 实例化一个SerialPort 对象  SerialPort ComPort = new SerialPort(); 2.2设置串口参数 ComPort.PortName = “COM3”;//串口号 ComPort.BaudRate = 9600;//波特率 ComPort.Parity = Parity.Even;//校验位

  • winfrom添加信息后的自动清空所有2022-06-16 22:31:18

    重新设置所有文本框为空就行、     if (flass) { MessageBox.Show("添加成功", "提示信息"); this.tbSName.Text = ""; this.tbSAddress.Text=""; th

  • Winfrom开发笔记2022-05-14 12:32:20

    Winfrom开发 第一单元   第二单元 2.1、连接数据库 1.连接数据库,查询数据 1.1获取数据库连接字符串 string connString = "Data Source=.;Initial Catalog=studentInfo;Integrated Security=True"; 1.2创建连接对象       ~~~c# SqlConnection conn = new SqlConnection(con

  • C# winfrom 程序窗口不显示在任务栏及alt+tab不显示2022-05-11 02:01:26

    C# winform 程序窗口不显示在任务栏及alt+tab不显示 1.winform窗口不显示在任务栏 this.ShowInTaskbar = false; 2.winform窗口alt+tab不显示 /// <summary> /// 让程序不显示在alt+Tab视图窗体中 /// </summary> protected override CreateParams CreateParams {

  • NX二次开发-Winfrom使用Adobe提供的ActiveX控件显示PDF2022-04-19 21:04:31

    文章讨论主题 有的时候可能需要在我们的二次开发界面上来显示PDF,那么怎么在对话框界面上面来加PDF控件呢?   这张自由拥抱是我设计的一张海报,本来和喜欢的女孩子约好,一起去陆家嘴天桥上做活动,录制自由拥抱视频的, 结果因为新冠疫情,去不上了。该死的  新冠疫情~~ 妈的 步骤 1.

  • task 子线程添加数据到主线程 winfrom2022-04-17 01:34:50

    using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading; using System.Threading.Tasks; using System.Windows.Forms; namespace 导出dbf文

  • WINFROM MVVM2022-03-02 09:32:01

    网上看到WINFROM 也能MVVM,没做研究,摘抄一下,备用 1、引言   谈到MVVM设计模式,首先让人想到的是WPF。没错,MVVM的概念是微软在2005年提出的,并首次将其应用到WPF中。最近很是火的Vue.js也是使用了MVVM的设计模式。MVVM设计模式的核心部分是DataBinding机制。顾名思义,其功能就是将Mod

  • WinFrom(Windows的窗体应用)的chart控件画折线图2022-02-20 15:02:42

    1.问题:Form1_Load() 不执行 问题产生的原因:代码中的Form1_Load()方法不是自动生成的,而是自己手动写的。所以里面有些配置没修改,导致Form1_Load()无效 解决方法一: 删除这个方法,然后到设计界面那里,双击界面后,会发现自动生成了Form1_load(),然后再进行代码编写。 解决方法二: 在 publ

  • Winfrom TextBox切换中英文输入法2021-11-16 15:01:30

    //输入框中切换成英文输入法: this.Textbox1.ImeMode = System.Windows.Forms.ImeMode.Disable; //输入框中切换成中文输入法: this.Textbox1.ImeMode = System.Windows.Forms.ImeMode.HangulFul; 其他属性:NoControl    调出后默认为英文输入状态  调出后默认为西文标点 英文输

  • Winfrom统一单例窗口2021-11-12 16:00:49

    //调用方式 var frm = new MyForm().Instance(); public static class ExFrm { static Dictionary<string, Form> forms = new Dictionary<string, Form>(); /// <summary> /// 单例模式 /// </summary> /// <typeparam n

  • netcore 动软三层架构-急速开发框架 winfrom demo2021-11-07 21:00:26

    动软三层架构代码生成与 netcore三层 开发架构无缝连接 新建项目如操作:                 实现功能 DbHelperMySQL netcore 操作类 DbHelperOleDb netcore 操作类 DbHelperOra netcore 操作类 DbHelperSQL netcore 操作类 DbHelperSQLite netcore 操作类 1.配置数据库连

  • Winfrom 界面嵌入网页解决方案2021-09-15 12:06:09

    第一步,创建Winfrom窗体界面 第二步,Nuget安装CefSharp--67版本为例 第三步,实现,如下所示: <?xml version="1.0" encoding="utf-8" ?> <configuration> <startup> <supportedRuntime version="v4.0" sku=".NETFramework,Version=

  • C# WinFrom 中程序完全退出,终止2021-09-09 15:34:19

    https://wenku.baidu.com/view/621fbbec0066f5335b81218f.html   一、关闭窗体在c#中退出WinForm 程序包括有很多方法, 如:this.Close();Application. Exit(); Application. ExitThread(); System. Environment.Exit(0);等他们各自的方法不一样, 下面我们就来详细介绍一下。 1.

  • winfrom 折线图功能封装2021-07-27 14:02:40

    using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; using System.Windows.Forms.DataVisualiz

  • winfrom后台怎么写定时器?2021-07-25 09:31:13

    winfrom后台怎么写定时器? 例子: private void label5_Click(object sender, EventArgs e) { string time = DateTime.Now.ToString(); this.label5.Text = time; } private void button8_Click(object sender, EventArg

  • Winfrom 向panel控件添加指定行列的控件2021-06-08 10:02:41

      最近用到了这个功能 就总结一段代码,建议panel控件使用此FlowLayoutPanel 控件 private int col = 2;//列数 private int row = 2; //行数 private void InitPnl() { flpHoldPatients.Controls.Clear(); var height = flpHoldPatients.Height /

  • WinFrom、C# 学习记录三2021-06-05 09:04:33

    c#根据字符串公式进行自动计算的实现 方式一: 只支持32位 其所在程序集为Interop.MSScriptControl.dll,组件名称为Microsoft Script Control 1.0。     操作:“添加引用” -- “COM” -- “类型库”,找到“Microsoft Script Control 1.0”组件,“确定”。参 private void InvokeJS

  • winfrom实现简单计算器V2版本2021-06-03 22:55:21

    前面,使用winform实现了个简单的计算器,今天,再来给大家看一个稍微复杂点的计算器,效果图如下: 包括归零,退格,加减乘除都已经实现,如果想要继续扩展的可以在稍微改改即可。 现在看看怎么实现的: 1.先从工具箱里面拉出来一个这样的窗体: 2.归零的方法:private void qingchu_Click(object s

  • Winfrom 添加窗体和保存数据到数据库2021-06-03 16:32:21

    1.fMain界面点击按钮跳转窗体到fMainadad   private void barButtonItem5_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)         {             fMainadd fma = new fMainadd();             //Data(material_no);    

  • C#只允许启动一个WinFrom进程2021-05-24 09:35:10

        [STAThread] public static void Main() { bool ret; System.Threading.Mutex mutex = new System.Threading.Mutex(true, Application.ProductName, out ret); if (ret) { System.Windows.Forms.Application.EnableVisualStyles(); //这两行实

  • winfrom嵌入word2021-04-27 20:03:59

    使用微软的DSOFRAMER控件实现方法:先下载DsoFramer_KB311765_x86.exe ,自己百度一下有很多。安装,默认安装目录C:\DsoFramer可以先注册下: 开始菜单----运行 输入 regsvr32.exe C:\DsoFramer\dsoframer.ocx           using System;using System.Collections.Generic;using Syst

  • 比尔盖茨都不知道的c#winfrom的陷阱/坑2021-04-04 22:00:30

    1.datagridview里面的坑: 1.1、界面UI图 如图,标段和分包名称都是个下拉框,本来我写的方法是初始化加载数据只查询了标段,通过点击表达这个单元格的事件触发了查询分包名称,从而形成分包的下拉框,但这样的弊端就是常常报这个(分包名称字段)dataGridViewColum的数据报错,出错就是绑

  • VS2013用InstallShield打包winfrom项目2021-03-11 10:34:48

    VS2013默认是没有安装打包程序的,需要手动安装,我安装的是 InstallShield2018LimitedEdition。 1.点击解决方案,右键,选择“添加”->“新建项目”,打开“添加新项目”窗口。   2.“添加新项目”窗口,选择安装的 InstallShieldLimitedEdition,点击【确定】。   3.【Project Assistant】

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有