Category "winforms"

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

RichTextBox auto scroll to bottom when replacing a line

I'm using a richtexbox to put logs for an application of mine. I'm also using it as some sort of progress bar for a background worker. I'm not going to go in t

change color of all controls inside the form in c#

in one button click event i want to change form color and all control color inside the form(textbox,label,gridview,combobox) ,,so i given code like this: fo

Unhook Window into its original State

I hook a window into a Panel using this code: SetParent(win, pnlApp.Handle); SetWindowLong(win, GWL_STYLE, WS_VISIBLE); MoveWindow(win, 0, 0, pnlApp.Width, pnlA

Winform c# combobox border is like a hole in my program

I know this is a minor thing but it's really annoying. I have a winform project where I've added a combobox, but the borders is like a hole in my program. If I