2,503 questions
0
votes
0
answers
113
views
Flickering when displaying a KryptonForm in Windows Forms
I'm working on a code editor using Windows Forms and I'm stepping into the typical "flickering" problem. However, it seems that traditional solutions do not work for me.
My application uses ...
0
votes
0
answers
41
views
Unable to use ArrayEditor class in WinForms application with Microsoft.WinForms.Designer.SDK in .NET 9
In a simple .NET 9 Winforms application, I have tried to create a custom class which is derived from ArrayEditor class, and it works only before I added the Microsoft.WinForms.Designer.SDK in my ...
0
votes
0
answers
23
views
AxWPLib Windows Forms Video Black Screen Problem
I am putting two videos side by side in Windows Forms application and these videos start automatically when the forms are started and return to the beginning when it ends (I looped it). However, I ...
0
votes
1
answer
161
views
Implementing a custom ParentControlDesigner for UserControl that conditionally allows (or not) adding controls at Design Time
As a Minimal Reproducible Example, in order to customize the designer behavior of my UserControlEx I subclassed:
Microsoft.DotNet.DesignTools.Designers.ParentControlDesigner
First, I successfully ...
0
votes
0
answers
129
views
MenuStrip and StatusStrip Items Disappear in My C# WinForms Program
Description: I'm developing a C# WinForms application using Visual Studio 2022, .net6.0-windows, Visual Studio Version: 17.12.4, I created the form and wrote the code. Everything was fine at first, ...
0
votes
0
answers
83
views
How do I properly save .gif files to SQLite database in Windows Forms?
In my solution, I have a helper class with these methods:
public static Image ToImage(this byte[] sadrzaj)
{
var ms = new MemoryStream(sadrzaj);
return Image.FromStream(ms);
}
...
0
votes
0
answers
65
views
How to Keep Panels Below Maximized Forms and Prevent Panels from Being Covered When Minimizing in a Windows Forms Application?
I'm working with a Windows Forms application where I have a main form (MainForm) with IsMdiContainer = true and FormBorderStyle = None. On the left side, I have a Panel with a MenuStrip, and at the ...
1
vote
2
answers
540
views
Visual Studio 2022 v17.11 to v17.12 Upgrade - Form Designer Issues
We have a very large WinForms solution (38 projects) that targets .NET 8.0 (Windows), and it worked just fine in VS 17.11.6 but as soon as we upgraded to v17.12 we can no longer open most Forms/...
0
votes
2
answers
149
views
How can I hide files in windows form output folder?
I created a windows form using C# in Visual Studio.
The form looks great all buttons, labels, tabPages…etc. all work just fine.
The one issue the I have is the output folder located at “C:\Winform\bin\...
-1
votes
1
answer
60
views
Resizing the form1 window from the Form2 window
I am writing C# code in VS windowsforms
I have a problem, I need to resize the parent window of Form1 by clicking a button in the Form2 window. The main problem is that I don't understand how to ...
0
votes
0
answers
68
views
Visual Studio Designer changes code so much that UI no longer works
I'm trying to add to a project of a colleague which is an UI for a monitoring program. Adding new UI elements to the project or changing existing ones results in the designer recompiling the designer....
-1
votes
1
answer
18
views
Issue on display dateTime when reopening previous windows form
I have an issue in showing a timer when i come back tio my main form from another
the main form have the following code
public Main()
{
InitializeComponent();
}
private void timer1_Tick(object ...
1
vote
1
answer
108
views
How to Prevent Multiple Confirmation Dialogs When Closing Forms in WinForms Application?
I have a WinForms application where I need to show a confirmation dialog when the form is being closed and it should close the entire application. However, the confirmation dialog appears multiple ...
1
vote
1
answer
169
views
How to disable annoying popups when using Winforms Designer?
Lately I'm getting a lot of messagebox popups when I'm trying to open a Form or UserControl in Designer mode. It's like any debug log message had it's output set as a messagebox, and I cannot find how ...
-1
votes
1
answer
119
views
Visual Studio 2022 Windows Forms changes code when moving components of the bottom interface panel
The code in the .Designer.cs and .resx files changes automatically when i move any interface component from the "bottom part of the Windows Forms Designer", as the Microsoft tutorial puts it....
2
votes
1
answer
82
views
Why does my Designer Generated Code (InitializeComponent()) Not Generate an Object Instantiation Line For my Custom Control?
Enviroment details:
.NET 4.8
Visual Studio 2022
Designer interface (if that's what it's actually called)
I've created a custom form called WeatherBox which inherits from another custom form ...
0
votes
0
answers
33
views
How to Invoke complete CLI onto the GUI Output text Box using C# (.NET Framework)
I Have done CLI invoking to my program, by these lines of codes
Invoke((Action)(() => textBoxOutput.AppendText(Environment.NewLine + e.Data)))
I am getting output on my GUI Output text Box, But it ...
1
vote
0
answers
93
views
I cannot open form designer in my Visual Basic program
How can I open the form designer in Visual Basic?
I'm making a Windows form program using Visual Basic 2022, but I cannot find the form designer. When I press the compile button, the form I've ...
0
votes
2
answers
2k
views
how can i add chart to toolbox visual studio 2022?
in vs code 2002 i dont fint chart
i searched on internet but i did not fint any answer! how can i to add this to tool box.
I'm working on a Windows Forms application in Visual Studio ...
0
votes
1
answer
39
views
I am trying open a new form inside a panel of another form. But control is not passing
[enter image description here][1]I am trying open a new form inside a panel of another form. But control is not passing. I am providing the code snippet below. The code is written in C# windows form.
...
-2
votes
2
answers
157
views
ListBox's ColumnCount not available in WindowsFormApp VisualStudio [closed]
For some strange reason, I cannot find "ColumnCount" property for my listbox in WindowsForm (.NET Framework), in Visual Studio.
When I tried to find a solution to specifying the number of ...
0
votes
0
answers
45
views
How to stored data from user control where there is the input from and a save button on another form
I want to make value data from usercontrol will be save on database where the triggers is to click save button from other form. It should be a form that contain button save and usercontrol will be ...
0
votes
1
answer
92
views
How to input values from keyboard for a basic calculator in c#
I made a basic calculator on visual studio 2022 c#. The calculator works perfectly but I want to know how can I input values into the text box on the calcator using the keyboard instead of clicking on ...
0
votes
1
answer
252
views
Custom ToolStrip removes PerfromLayout from Designer.cs file
Let's assume I've a Form and it contains a ToolStrip. In the Form1.Designer.cs file I can see the following to lines:
this.toolStrip1.ResumeLayout(false);
this.toolStrip1.PerformLayout();
Let's ...
0
votes
0
answers
45
views
Coordinate system in Visual Studio VB.net Windows Form App extremely weird?
My goal is to use DrawLine method to create lines.
This method has arguments Pen, x1, y1, x2, y2
Pen is the pen with which the line shall be drawn
(x1, y1) Start point
(x2, y2) End point
Here is my ...
0
votes
0
answers
39
views
Creating a configuration wizard for a C# Windows Form Application
I am creating a C# Windows Form Application which will be deployed to different areas. This application executes PowerShell Script in host computers; however, each script is stored in different areas. ...
0
votes
0
answers
153
views
I have the "Tx TextControl.NET for windows form 20.0 Express" Issue when loading the control
Takes too long when loading the control and the information but it is weird it just happens for one session and it happens when the function starts textcontrol.load(data, stringtype), anyone please ...
-1
votes
1
answer
85
views
How can I make background of a button transparent when it is on top of other colored buttons?
Firstly, this is a windows form application.
As in the picture, I want the background of the Restart button to be transparent and show the colors behind it.
There is no picture.
I created all buttons ...
2
votes
1
answer
1k
views
Can't open WinForms forms with Infragistics UltraWinGrid control anymore in Visual Studio designer after moving to .NET 8
We can't open WinForms forms in Designer anymore since a couple of days during which we switched from .NET 7 to .NET 8. It seems not related to the VS 2022 version as my collegue has the same problem ...
1
vote
0
answers
67
views
Trouble creating in-editor button in custom control
I used Custom Control class to create a panel that can hold many layers of controls separately, but I needed to add an in-editor usable button like "Add Layer" or "Remove Layer". I ...
1
vote
0
answers
18
views
Restore mdi children after Controls.Clear [duplicate]
I have Form1 which is MdiParent and Form2 which is MdiChild. In Form1 I have sidebar which has combo box that contains language names, and buttons which switches between mdi children. When value of ...
0
votes
1
answer
127
views
Screen-sharing in C# Windows Form using TCP: half screen glitched out
I'm trying to write a very simple Screen-sharing code in C# over LAN. It seems to be working well and smoothly with a 100s delay besides the screen being cut in half (or at times 30% when I switch ...
0
votes
0
answers
24
views
How do I parse values to text boxes from a row of selected cell in a datagridview in a windows forms app?
I would like to know how to select a category value from a combo box and the data according to the selection parses to a data grid view from a sql database, after that I want to click on a cell and ...
2
votes
1
answer
64
views
Forbid to move cursor in RichTextBox past certain position
I am writing a program for entering words by syllable. The logic is, the user is entering part of the phrase (a syllable), and if it's correct it lights out a green color and adds a hyphen in the end, ...
0
votes
0
answers
83
views
Import files (.png...local files) as assets like Windows Forms importer does [duplicate]
I created a local folder within the project named 'Assets' with .ico and .png icons of the program, when I assign a local file icon to the tray icon placed in the Windows Forms window and publish the ...
0
votes
1
answer
467
views
Visual Studio Form designer started displaying my form like it is zoomed in
I am running Visual Studio 2019 winforms app (C#). If I recall correctly I might of been adjusting the size of a font used in a label when shortly after the form appear to zoom to approximately 3X the ...
0
votes
0
answers
49
views
Why does Windows Forms Designer resize my controls?
I have a simple button. Whenever I change its width the designer automatically updates the height and even updates the width to a different value.
The only way around this I found is to set min and ...
1
vote
0
answers
330
views
Why is the WinForms editor causing so much code change?
I open the WinForms designer and I make a simple change like changing the button text. After saving, a lot of unintended code changes occur:
I have the <ForceDesignerDpiUnaware>true</...
4
votes
1
answer
2k
views
How to add a user control (from a DLL file) to the .NET Core's Windows Forms designer controls toolbox?
I'm using Visual Studio 2022, trying to migrate some components and user controls from NET Framework 4.8 that can be added to the Windows Forms designer, to the Windows Forms Designer of a NET Core 6 ...
0
votes
0
answers
103
views
How to Open the Explorer on the Windows 11
I am trying to open the windiws explorer using c# in windows 11 but the File Explorer opens briefly and then closes without displaying the window while still showing in the task manager, please help ...
0
votes
0
answers
109
views
Returning Value From Child form to parent form is not working
I am writing the script which have two forms first form is Form1 which has 3 radio buttons , 1 multi ListBox and second is Form2. What I am trying to achieve that , after selecting desired options and ...
0
votes
0
answers
147
views
Windows Form with PowerShell - getting selected items from Listbox
Windows Form with PowerShell - getting selected items from Listbox.
I have script which take inputs from Excel and load into list box called available Clients. Then depending on requirement remove ...
0
votes
2
answers
82
views
data input from combobox and radio button to text in new form2 in c# windows form
This is a first so my apologies for any mistakes or further confusion.
First of all I'm creating a small game on c# windows form where user inputs name, date of birth, and chooses avatar I used ...
0
votes
2
answers
1k
views
Error when opening the form designer in visual studio 2022 Version 17.9.0 Preview 2.0 : exception has been thrown by the target of an invocation
In visual studio 2022 Version 17.9.0 Preview 2.0 when opening the form designer occured this error :
exception has been thrown by the target of an invocation
This problem happened once before and I ...
-4
votes
2
answers
74
views
How do I exit if statement if the 1st input is wrong but the 2nd one is correct it displays an error message for the 1st one and accepts the 2nd one
I am trying to make it so that when the user enters a password in the password textbox it checks its length and if it is less than 10 characters it displays an error message but it have you have a ...
-1
votes
2
answers
541
views
Visual Studio WinForms Groupbox is not displayed after I have moved it in the Designer
I'm currently working on a C# Windows Forms project and facing issues displaying a GroupBox correctly. I work in the Designer and move the different groupboxes around. I place my groupbox on the edges ...
0
votes
1
answer
1k
views
Convert a Panel to a PDF Document in C# Windows
I want to print out a panel in my form to a pdf file.
I've tried using iText7 library as show in the code below.
using System;
using System.Data;
using System.Windows.Forms;
using iText.Kernel.Pdf;
...
1
vote
1
answer
251
views
I can't seem to play an audio file in my C# .NET Windows Form programm
I place my audio file called MouseClick.wav under my resources folder and I have a function in code to play it.
private void playSimpleSound()
{
SoundPlayer simpleSound = new SoundPlayer(...
0
votes
0
answers
29
views
How to connect a DataGridView to a SQL table using the VS GUI?
WinForms, 64-bit, show the data from a table in a scrollable grid.
After much frustration (error 233, Browser not running, etc) I was able to use VS2022's Server Explorer to make a working link to my ...
0
votes
0
answers
91
views
C# Sqlite and dataGridView Database
There is a datagridview table in the project into which data from the sqlite database is filled. The data is entered into the database manually using the cell value changed event (like in excel). The ...