Category "winforms"

Hiding particular datagridview cell in c#

I have a datagridview in windows form. Datagridview looks like below: In this, have one Checkbox column, two textbox column. My requirement is need to hide che

Add panels dynamically to form

I'm trying to add panels to a form according to the ids quantity that is received. At running, the panels are added to the form, but only the first one has the

Focus a child Control of a User Control when a combination of keys is pressed

I have a Form that contains a Panel where I placed a UserControl. I want that when the Ctrl+F Keys combination is pressed, a TextBox Control, child of my UserCo

Transparent background image for Form - Smooth edge shape for the Form

When I tried from with transparent background, it's not completely transparent. I tried two code blocks for this issue. First i tried like this code: public F

There is no "MouseButtons" information in "MOUSEMOVE" of 'winapi'

I'm trying to implement LBUTTONDOWN->MOUSEMOVE->WM_LBUTTONUP using winapi in outfocus. But the "MouseButtons" information doesn't come. I want to simulat

How to soft delete a selected row in a DataGrid View using a button

So I have a DataGridView called MyMovieDataDrid which is connected to a sql server, and I already have my IsDeleted property, and a delete repository which is s

DataGridView ScrollBars are not working after Thread

I'm setting a dataTable as data source of a datagridview. I do this on a new thread (I don't want my UI blocked while is loading data). My dilema is: the scroll

Create Visual Studio plugin to launch window form application inside visual studio(not standalone)

I have a window based tool which is currently working. I need to add this tool as a plugin/extension in visual studio. So that if user has visual studio install

Which WebView2 event/function can be use to replace ScriptNotify Webview event?

Today, I have decided to migrate WebView control to WebView2 control in a VB.net application. I have installed WebView2 from NuGet and I have changed declaratio

How to set the form resolution for each screen in C#?

I made a project in C# Form with FormBorderStyle=FormBorderStyle.None Resolution = 1920 x 1080. But, this project is set for 1080p only and takes it offscreen a

Make string comparison case-insensitive for .net winforms application [duplicate]

Need to have string comparison case insensitive for .net winforms application. It is not a problem when strings are compared in my code, but I

.net Windows forms Property Grid

I have a .NET windows forms property grid which is tied to the collection of entities public class Entity { public string A { get; set; } public string B { get

how to find mail that was send by MailItem.Display()

I have following requirement : Allow the user to drag & drop an email from outlook to a datagrid Prepare a reply mail, and show it so the user can review a

How to search a word in a RichTextBox having specific format?

I have a RichTextBox where the user will copy-paste from MS Word an MCQ quiz question. The correct choice would either be highlighted or with bold text (e.g. in

Ef Core filtering included query using uow and repository

I started creating a role-based security system in my WinForm application so I began with Form navigation (Permission Navigation) and this is my entity's public

VB.NET Core 6, Hashing password in (Win form) using SHA512 - Visual Basic

I am trying to build an application where security and encryption are a high concern. I am using Visual Studio 2022 and VB.NET 6.0 (I searched for 3 days now an

Code generation for struct property of user control

I create a user control like below: public partial class TestControl : UserControl { [DesignerSerializationVisibility(DesignerSerializationVisibility.Conte

Custom Combobox with values

I have a windows application with multiple Forms containing the same ComboBoxes. These Comboboxes have fixed items. On each Form I load the Comboboxes with thes

How to auto open a ComboBox when focused?

I have a Form which contains several ComboBoxes. I want one ComboBox of them to open the elements list when it gets the focus, both from keyboard and mouse. The

Get ID of item selected in ComboBox

I have a ComboBox that gets filled with items from my database. I'm trying to get the ID of the item that is selected in the ComboBox, but nothing I've tried se