Category "winforms"

How to set target net7.0 -windows?

I try change <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <OutputType>WinExe</OutputType> <TargetFramework>net6.0-

Scrape data from div in Windows.Form

I am new in c# programming. I am trying to scrape data from div (I want to display temperature from web page in Forms application). This is my code: private voi

Nothing happens when I RIGHT click the Tree Node on the TreeView (Windows Form)

I am trying to create a new node when I right click on the treenode. private void treeView1_NodeMouseClick(object sender, TreeNodeMouseClickEventArgs e) { i

How can I toggle the checkbox of an item in a CheckedListbox if CheckOnClick is True, but SelectionMode is None..?

How can I toggle the checkbox of an item in a CheckedListbox if CheckOnClick is True, but SelectionMode is None..? If I set SelectionMode to One it works as exp

How do I call the injected dependency 'level' and use it as a condition in an IF statement? C#

An object reference is required for the non-static field, method, or property 'Form1.level' public Form1( int level ) { this.level = level; playtune()

String or binary data would be truncated when input data from winforms

I'm trying to insert record into my database through a form made by Winforms. At first I try to insert it directly in SQL Server: INSERT INTO item (name, price,

TreeView To JSON

From the JSON file, I was able to build a treeView in windows forms. Now I need to do the reverse process - save the tree to a JSON file after pressing the butt

How to cancel hiding a Devexpress flyoutpanel according to a condition?

I have a FlyoutPanel and I want to hide it according to a condition. For example: I want to hide it when a counter is equal to 3. What I have tried is: private

MouseDown Event After Seconds

I'm working on a project that have a touchscreen monitor. I have 4 picturebox with two event(Mouse Down , Mouse click ). in this case, when i click on the pictu

How to detect whether the Mouse Hovers above a drawn line in C#

I have a panel on a form. On this panel there are drawn a few lines. I would like to know how to detect when the Mouse is above one of the lines and get the det

sendkeys doesn't work inside github API (command line)

I'm trying to automate the creating of remote repos using powershell and gh repo create and the first thing that happens after running that command is an option

Create a function that shows user controls in a panel

I created several user controls that i want to display on a main panel. Thus, I have this function that takes in input the control I want to display by setting

Create a function that shows user controls in a panel

I created several user controls that i want to display on a main panel. Thus, I have this function that takes in input the control I want to display by setting

Is it possible to show Hyperlink in System.Windows.Forms.NotifyIcon?

I'm using System.Windows.Forms.NotifyIcon in WPF app, I need to show Hyperlink in System.Windows.Forms.NotifyIcon, I tried to set the Hyperlink in BalloonTipTex

How to disable scrolling of comboBox from keys arrow Up\Down when it closed?

The arrow keys should scroll only pictureBox (placed in panel). It works fine. But it also scroll through comboBox items though it is closed (droppedUp). How to

How to get the value of date cell datagridview into the datetimepicker?

First thing go to datagridview event MouseClick, and write the code below: DateTime dateValueOftheCell = DateTime.Parse(dataGridView1.CurrentRow.Cells[4].Value.

Create a Powershell ListBox Sticky Notes Backup Utility

I'm building a PowerShell utility that will backup and restore sticky notes using a powershell script to pull the Get-localuser command from a local device into

DLLs not working after installing Visual Studio Setup Project

I have a C# project that I am creating which uses a few DLLs located in a separate folder in my project. I have added these files into the application folder on

How to check if some text in a RichTextBox is selected

I am creating a text editor and I want to add copy, paste and cut functions in the Edit Menu. I want these MenuItems to only to be enabled when there's an activ

How to elevate my winform privileges (at runtime) to admin on button press

I am developing an application that should not require elevated privileges unless the user wants to change a network adapter's IP address. I would like to allow