Questions tagged [winforms]

WinForms is the informal name given to Windows Forms, a GUI class library in the Microsoft .NET Framework and Mono. Questions in this tag should also be tagged with the target framework ([.net] or [mono]) and should ordinarily be tagged with a programming language tag.

-1
votes
0answers
18 views

How to perform an action at specified date and time intervals in winform application

In my winform application, it will need to perform a certain action on specified intervals, lets say every First Tuesday of each month at 3 am. What's the best way to achieve this? Timers? Task ...
0
votes
1answer
29 views

How to make label reappear as soon as it's going out of panel width

I want to make a moving label seem nicer and smoother than just reappearing the whole thing to the left after it has all gone out of panel width .For example label 'Hello' , as soon as 'lo' goes out ...
-3
votes
0answers
20 views

install .exe file on windows pre defined path

I have a windows application on C#. I need it to get installed it in to my defined path. I dont want user defined path. instead i want to explicitly install the application into my defined path in%...
1
vote
1answer
26 views

C# UserControl scrollbar issues

I'm having trouble setting the VerticalScroll/HorizontalScroll.Value property. Every time I set the value, the scrollbar moves, then snaps back (see screenshot below) Here is the code for my user ...
0
votes
1answer
25 views

How can I clear all form controls of an MDI child?

I have a function that clears a non-MDI child form, but when I apply it to an MDI child it doesn't do anything. I've tried attacking this problem from a few different angles without any luck, was ...
-3
votes
1answer
62 views

How can I get a Boolean from form 2 to form1? [on hold]

how can I get a bool from class2 in Form2 to class1 in form1? I've tried calling the variables, but that wasn't a success. Or i did something wrong Class Form3UpgradesGunSounds: // If you ...
0
votes
0answers
34 views

How can I custom a DataGridView like the following?

Suppose, I want to do a desktop version of this web-site like the following: Is it technically feasible to format a DataGridView like I showed in the picture: the 3rd column where texts and buttons ...
0
votes
1answer
35 views

Joining two ID's together to get another Column Result

I am using Windows Form and C# and an SQlite Database. I have a Combo Box with the Player's Name and below i have a textbox which i need to fill with the Overall Rating I have two tables named Player ...
0
votes
1answer
21 views

Issue with Open DataReader which must be closed first

I am getting the following error in my code: "There is already an open DataReader associated with this Command which must be closed first." I have two SqlDataReaders and I made sure that I ...
0
votes
0answers
25 views

C# Whats the best way to go about copying a class list when you select/double click one from one listbox to another?

I'm working on a personal project to help manage tasks and upcoming events throughout the year. Which lets me create a task by typing in the name, the amount of time it may take and then I send it off ...
0
votes
0answers
16 views

How To Override DataBindings Property with a class the inherits ControlBindingCollection

How would I go about overriding the my custom checkedlistbox class which redefines the DataBindings property to include a SelectedChecked and DataSource Property? I have tried googling how to bind a ...
0
votes
0answers
14 views

How to have Setup Project .exe use separate/unbundled App.config

I have created a Setup Project for a Windows Forms application that successfully builds the installer. Upon installing it also successfully creates AppName.exe.config in ProgramFiles. However, I ...
0
votes
1answer
31 views

Exporting SQL db to an Excel issue

I'm trying to set up a button to easily export the database in my app to an excel sheet. However I'm having issues getting it to work. And I cant figure out what's going wrong, since I'm not seeing ...
0
votes
2answers
28 views

Can't Get/set combobox's SelectedValue if its data source is null

I'm trying to add a contains-like autocomplete to winforms combobox. I've started with Hovhannes Hakobyan's idea from this thread. I had to adjust it a bit because autocomplete didn't know where to ...
0
votes
1answer
29 views

Setting Player Name from Combo Box then show stats in Textbox from another table

I am doing a Windows Form Application in C# using an SQlite database. I have a drop down which includes the Players Names taken from a table named "Player". I want to show a particular statistic of ...
0
votes
2answers
36 views

How do i insert a value to a string, if i want to change that string's value later, but i want to keep the format?

I want to display the total price of ordered meals in a textbox. Now, it looks like "1800", but i would like to make it look like "1.800". The problem is, if I just try to Insert a "." into the string ...
0
votes
0answers
20 views

Winforms combobox SelectedItem bindin [duplicate]

I am experiencing some trouble to properly set a ComboBox selected item binding in a Windows Forms project. This question is different from this other question because in my case the comboBox ...
-6
votes
0answers
43 views

Passing a value between a Form and a class.cs [on hold]

I have a question that i can't find properly in your Forum... I just want to pass the data from my login form and my class. Scenario: I have a login form where i ask to choose wich DataBase to use... ...
-1
votes
0answers
32 views

Cant update record with a byte image. Empty Path Name is not legal

Empty Path Name is not legal. this error comes up when I update record that contains an image . I am trying to update record. It Successfully updates image but when i update other record without ...
0
votes
0answers
32 views

Stick a secondary form to the main form

I have a question that I can't find on the net. Is it possible to "stick" a secondary form to the Main Form? My scenario is.. I have a main Form that will never be closed and has some button to open ...
1
vote
1answer
24 views

Resource-related error condition in Windows Forms C++ application

I am working on a legacy Windows Forms application using VS 2008 under C++ and face a weird problem. The form uses an ImageList object, to which two bitmap images have been added. At run-time, I get ...
0
votes
0answers
20 views

If value exist in excel overwrite, else add to new empty row

I have a user input datagridview cells. When the button is click, it will export all data into excel. However, I would like it to search a value in a specific datagridview column and compare it to a ...
0
votes
1answer
23 views

Labeling ticks on TrackBar [on hold]

I want to auto draw labels on every tick of a track bar. I', setting a very simple track just with current year and +- 2 years to select from. I've already check all other questions/answers, no one ...
0
votes
0answers
23 views

How to filter comboboxes based on the selections in other comboboxes?

I have 3 tables: 1) House: | ID_house | House_names | num_region | --------------------------------------- | int | names | int | num_region - a foreign key, which equals to a ...
0
votes
1answer
30 views

UI Automation Control Desktop Application and Click on Menu Strip

I am using UI Automation to click on a Menu strip control. I have already pre filled the textboxes and can now invoke the button as well. But i would like to traverse to the Menu Bar select an option ...
0
votes
0answers
33 views

Error in System.Net.HttpWebRequest.GetResponse() “ResponceSystem.Net.WebException: The request was aborted: Could not create SSL/TLS secure channel”

Dotnet application is built with dotnet 4.5. On a few system, we are getting this error while connecting to the web server where few changes were made in SSL recently. Web server TLS only 1.2 https://...
0
votes
0answers
17 views

How can I record audio and merge it with Aforge player video recording? c#

My app have requirements for play multiple webcam videos at a time, change it's resolution, view mode etc. I can achieve all these using Aforge Player. Unfortunately the last requirement is record ...
0
votes
0answers
43 views

How to refresh DataGridView in active WinForm from another class?

I have a Winform with a DataGridView holding a few table values from API calls to a server database. I want to refresh the table after the servers are polled, so I used a timer to regularly poll the ...
0
votes
1answer
23 views

How to fix 'Key already exists Parameter name: Key' error in UltraGrid?

I wanted to setting Grid Column to coded Grid InitializeLayout Event at the beginning of coding. UltraGridColumn ugc = null; ugc = e.Layout.Bands[0].Columns.Add(key,caption); ugc = e.Layout.Bands[0]...
0
votes
0answers
12 views

How do I get and set checkedlistbox data whether its bound content of from the list itself

Hello I am making a custom checkboxlist by inheriting a the winforms checkedlistbox directly. I was wondering how I would go about making setdata and getdata methods for it that return the binded ...
-1
votes
0answers
47 views

C# - Code not throwing an error, yet does not work (again) [on hold]

I have a separate class from my c# windows form app. I have code (down below) that has been called, yet it does not run (again.) I am making a life simulation, and suddenly my code does not work. I am ...
-3
votes
0answers
29 views

How to create a windows form where users can create commands [on hold]

I'm creating a Virtual Assistant on Visual Studio 2019. I want to make a form which users can access to create commands by themselves. Users can create commands by typing. It will then create a ...
0
votes
0answers
21 views

Change resource properties to plain text

I want to change all appearance Properties.Resources.XXX in project to text value which is in *.resx file eg var someText= Properties.Resources.someText; //I want to change to var someText= "some ...
0
votes
0answers
28 views

Reasons for Win32Exception: “Error creating window handle” even when handlecount and GDI objects less than 10.000

I try adding an user control to a panel, like in the code snippet below. It works serveral times. The exception only occurs when I try adding an InputElement to the sixth "hierarchy level" of panels. ...
-1
votes
1answer
49 views

At runtime, how to update a listview control on a hidden form

I got a hidden form (ViewRegisterForm) which has a ListView. This form is hidden, but I want to update the ListView from another form (RegistrationForm) during runtime. To be honest I am not sure ...
0
votes
1answer
86 views

Serializing C# model with a custom list to JSON

I have a model with a list that I need to serialize to JSON in order to send a request to a web service. The problem is that in my model I have a list that need to be serialized in a specific format. ...
0
votes
0answers
17 views

An automatic datagridview filter control (dialog) with filterString property

I would like to ask for recommendation of any filter control that I could use to filter Winforms DataGridView. As there are many forms I'd like to use it on, it'd be best if the filter would be ...
-5
votes
0answers
29 views

We are having a combo smart scanner,so I want to integrate my winform with scanner [on hold]

When we are scanning any document that data should be bind with textboxes automatically.In this we are using c# windowsforms.
0
votes
1answer
31 views

How can I raise an event from another thread on the main (UI) thread? [duplicate]

I'm trying to raise an event from my worker thread in the SerialPort.DataReceived event in the main thread. Background: I have a device connected that can send data by itself to the serial port of my ...
0
votes
0answers
32 views

Cant draw a border while resizing a borderless form

I have a borderless form (FormBorderStyle.None)... I tried to override the WndProc method to resize border-less form and used OnPaint Method to draw border lines around my form... But when I'm ...
0
votes
0answers
13 views

can Syncfusion.Pdf.WinForms nuget package be used for free?

Create, Read and Edit PDF file in Windows Forms using Syncfusion PDF library Referenced url address: https://www.nuget.org/packages/Syncfusion.Pdf.WinForms/
4
votes
0answers
72 views

a video repeatedly on idle event and restore back to the previous window on the detection of user activity

I have a requirement on WPF to play a video repeatedly on idle event and restore back to the previous window on the detection of user activity. For this, I followed the answered https://stackoverflow....
0
votes
1answer
39 views

Looking for a simple OpenGl-based WinForms control to display 3D geometries [on hold]

I wonder if there are some usable C# OpenGL libraries containing a control that would enable me to display rather simple geometrical 3D scenes (3D primitives, meshes, coordinate axes, etc.) I do not ...
0
votes
1answer
36 views

how to write the character `é` in an rft file?

I need to write a string from c# into an rtf file, but having weird problems. To write the text I simply use string fileName = System.IO.Path.GetTempPath() + Guid.NewGuid().ToString() + ".rtf"; ...
0
votes
4answers
87 views

How to calculate the “average” value , “highest” value , and “Lowest” value in an array? C#

PART 1: I am to create a program that that reads a file’s contents into an array, and displays the array’s contents in a ListBox control, and calculates and displays the total of the array’s values. - ...
0
votes
2answers
48 views

How to display the array in structured format?

i'm new to c# programming, I had coded in c#(winforms) to get the output as: if an Item in the list box is clicked then the items should be displayed in the text box ,i had coded but its little bit ...
0
votes
0answers
19 views

How to save image in byte[] to sql server(varbinary(max)) windows

I'm getting error implicit conversion from data type varchar to varbinary is not allowed use the convert function i have used varbinary(max) datatype in ms sql server for storing image and converted ...
0
votes
0answers
14 views

How i Can Capture Value From Project Setting Variable With Out Using Timer in C#

I have a Date Variable in My project Setting in VS And I Want to Compare this Variable With the Current System date During The Apps Is Running If is the Same Do Any code. How I can Do This With Out ...
0
votes
3answers
30 views

Fetching data from Json and displaying it in Combobox

I am trying to get a json file using a url and deserialize the json and display a particular field in the combobox but nothing shows up WebClient client = new WebClient(); string json = client....
0
votes
2answers
30 views

How do I create an installer with only exe and no dependencies in Winforms?

I have seen applications that once installed only have a .exe file in the folder and no dependencies that is (no dll, no xml, no ico) nothing. I have seen one in a Point of Sale application. How do I ...