
[英]How to remove default blue background on treeview nodes c# winform
我有一个 treeview 但是当我点击一个节点时它显示蓝色背景。 你有办法去除这个蓝色背景吗? 我正在使用 winform c# 谢谢 ...
[英]How to remove default blue background on treeview nodes c# winform
我有一个 treeview 但是当我点击一个节点时它显示蓝色背景。 你有办法去除这个蓝色背景吗? 我正在使用 winform c# 谢谢 ...
[英]File.create shows no errors but doesnt create file?
我正在尝试通过读取文件内容、在别处创建新文件并将内容写入其中来从外部驱动器复制文件。 我的代码没有显示任何错误(使用 MSV),但是当我尝试“下载”文件时,它完成了代码但没有创建文件。 谁能帮忙? 我一直在寻找不同的创建文件的方式,不同的写入文件的方式,但似乎没有任何效果。 ...
[英]getter setter can't change textBox.Text control value in Winform c#
为什么 textBox3.text 不显示值 _TextBoxRequestMsg。 MessageBox 打开并显示 _TextBoxRequestMsg 值 OK,控制台也打印。 ...
[英]How to take input from TextBox and use that input in game loop in a Windows Forms App?
我正在开发一款基于文本的冒险游戏。 在游戏中,有一个显示文本的 ListBox 和用户键入命令的 TextBox: 我将游戏循环放在 Game_Load 方法中,这会产生问题,因为它一直在检查 TextBox 内容,并且由于在用户有机会键入任何内容之前它是空的,它会返回 null 并崩溃。 我之 ...
[英]Is there a way to create an onClick event to a button within a sync fusion data grid?
我在 blazor winform 中有以下代码块,我正在尝试将带有单击事件的按钮添加到 id 字段以以新形式编辑该行的数据但是在搜索文档后我找不到执行此操作的方法不只是直接更改表中的字段。 我只是尝试通过创建一个 onclick 事件来完成此操作,就像您在传统的 html 表中所做的那样,但我认 ...
[英]Is there a way to use OffScreen Rendering in CefSharp.WinForms.ChromiumWebBrowser
我想在CefSharp.WinForms.ChromiumWebBrowser中使用 OffScreen Rendering。 是否应该将其重写为CefSharp.OffScreen.ChromiumWebBrowser ? 主要思想是预加载 web 页面并将其显示在 WinForms windo ...
[英]How can I connect multiple TextBoxes with a ProgressBar?
我一周前刚开始使用编程语言 C#,并使用 Visual Studio 程序和 win Forms。我已经遇到了几天的问题。 我想将 ProgressBar 连接到不同的 TextBoxes。 这样随着每个填充的文本框 ProgressBar 增加。 删除文本后,progressBar 应该再次下降 ...
[英]Custom Sort a ListBox in C# Visual Studio
我将从举一个例子开始,因为它会更容易。 假设我有一个名为“lbDestinations”的列表框,并且我有一个名为 Destination 的列表框的 class。 目的地.cspublic class Destination { public string Name { get; set; ...
[英]NumericUpDown with different increment values
我有一个 C# WinForm 应用程序,我想在其中实现一个 NumericUpDown 组件,该组件根据单击箭头按钮时是否按下控制键来递增/递减其值。 如果按下控制键,它应该增加 1,否则增加 0.1。 使用 ValueChanged 事件不起作用,因为该值已经更改。 我还尝试使用 Click ...
[英]How to ignore first Interval on first run of System.Windows.Form.Timer?
我有一个以 1 秒为间隔重复的计时器。 用户可以Start()或Stop()定时器。System.Windows.Form.Timer timer = new(); timer.Interval = 1000; timer.Tick += (sender, e) => { // Perf ...
[英]text file im trying to overwrite is being used by another process, but it is not in use?
我正在尝试使用 vb.net winforms 中的打开文件对话框覆盖保存在外部驱动器上的文本文件,但我不断收到错误消息: System.IO.IOException: 'The process cannot access the file 'F:\SETTINGS.TXT' because it ...
[英]Why when reading pixels from one image and set the pixels over another image not all the pixels are set on the second image?
这是我用来读取和设置像素的方法: 这就是我在 form1 中使用它的方式: 图像 resized1 的大小为 512x512 位深度 32 这是图像: 调整大小的图像这是 resized1 应该覆盖的基础图像。 此图像尺寸为 512x512 72 dpi 位深度 24 基本图像结果是图像 myne ...
[英]GetClientRect is not giving the correct Rectangle
我正在尝试创建一个覆盖外部 window 内容的覆盖表单(不包括边框等)。 我相信GetClientRect是用于此目的的正确 winapi 但它似乎不起作用。 我创建了一个示例,我将表单加载为黑框并将其显示在打开的记事本上。 这个的output是: 我预计 output 是: 从我所有的搜索中 ...
[英]Update/Refesh Listbox after Editing Source Data
我想在 PowerShell 中创建一个 Windows 表单,该表单使用一个选择数据进行编辑的列表框。 选择 ListBox 中的条目时,下面的文本框将绑定到所选条目中的属性,从而允许编辑该条目。 听起来很简单,而且几乎就是这样,只要 ListBox 始终显示当前 state 的数据就好了。 代码 ...
[英]How to implement auto resizable text that fits a visible part of a TextBox?
我使用 VS WinForms App (.net core 6.0) 制作了一个基本功能计算器,我想修复设计问题。 问题是,当输入的符号长度超过 20 个符号时,您无法看到整个表达式。 这就是为什么我希望程序自动调整字体大小。 源代码: https://github.com/yanu1ya/Ca ...
[英]Add SignalR to Net6 Web Api and connect from Winforms application (.net fx4.8) - hub not found
我正在尝试将 signalr 添加到 webapi,我创建了 CucinaHub class: 并配置 SignalR: 然后在 Windows 表单应用程序中,我使用此代码连接集线器: 我总是得到 404 响应代码: 宿主环境:开发内容根路径:D:\SwDev\PigsutffHTML\Serve ...
[英]How to get the location of AxisY and AxisY2 in a Windows Forms Chart
我需要在图表中获取 AxisY 和 AxisY2 的位置。 我想用这些信息做很多事情。 然而,作为一个简单的例子,我只想在两个 y 轴之间画一条水平线,但不要让它超过它们。 只要所有值都出现在图表上,使用 AxisX.Minimum 和 Maximum 就可以了。 但是,如果图表有滚动条,则线条会延 ...
[英]How to add Labels to a Dictionary Windows Forms App
我正在尝试将标签添加到字典中,以便稍后在程序中调用它们。 显示的代码导致错误无法从字符串转换为系统。windows.forms.label。 我希望用尊重的数字保存每个 label,例如:1,label1 2,label2 3,label 3 ...
[英]Visual studio 2022 WinForm publish folder
我创建了一个 WinForm 应用程序并尝试发布它,但我对这个发布过程有很多疑问。 为什么Visual Studio会在C:\Users\'用户名'\AppData\Local\Apps\2.0中创建app文件夹? 有没有办法将 app.exe 安装在另一个文件夹中,例如“ProgramFiles” ...
[英]How I can make this insert in the MySQL Database work?
我不知道我在这里做错了什么。 ...