Questions tagged [winforms]

WinForms is the informal term given to the graphical application programming interface (API) included as a part of Microsoft's .NET Framework, providing access to the native Microsoft Windows interface elements by wrapping the existing Windows API in managed code.

Filter by
Sorted by
Tagged with
2 votes
2 answers
72 views

Form in the Epicor ERP environment

I've written this code for use on a form in the Epicor ERP environment. The code is doing what I need, but since I'm still learning I would imagine that there are better ways of coding. I'm here ...
DaShMa's user avatar
  • 21
2 votes
1 answer
145 views

Proving that a Window Message is being sent by async/await

I asked a question on Stack Overflow and there's a discussion between @Serg, who posted an answer and @Jimi, whose comments suggest that the answer might be wrong. So I implemented the following code ...
Thomas Weller's user avatar
-2 votes
1 answer
58 views

Is it possible to simplify an event that does the same thing for every panel? [closed]

I wanted to make certain panels have their own custom border color, and the only way to accomplish this (as far as I know) is to manually subscribe every individual panel to a paint event that changes ...
byron's user avatar
  • 59
4 votes
1 answer
120 views

Is there a more performance-friendly way to check and change the colors of a WinForms app?

I'm a somewhat new programmer developing a WinForms application in C# that has the option to change the theme/colors depending on user input. Due to the complexity of the application and the amount of ...
byron's user avatar
  • 59
6 votes
4 answers
229 views

2-Player Chess in WinForms V.2 (With Separation of Concerns)

Introduction After getting initial feedback on my first working version of this Chess WinForms game here, I have used the suggestions and comments from there to come up with this new version, trying ...
Shinglington's user avatar
3 votes
2 answers
454 views

2-Player Chess in WinForms

Introduction I decided to program a two player Chess game in C# windows forms to help me to improve my programming skills and OOP skills. I have come to a working finished program (as far as I can ...
Shinglington's user avatar
0 votes
1 answer
90 views

Fill TextBox from ListBox on click

I have a form in a WinForms application that has a Textbox called txtSupplier, a button called btnSrchSuppliers, a label called <...
user10191234's user avatar
4 votes
1 answer
371 views

Bouncing balls program with speed up/speed down boxes and lines which change direction of ball

I'm new to C#, background in Ada, C. This is my second lab in a course, output works correct but I feel like I've missed something about OOP. I've asked for feedback from lab 1, but didn't get any. ...
Jackiie's user avatar
  • 53
1 vote
1 answer
294 views

WinForms Most effective way to Rearrange Custom Controls in a FlowLayoutPanel?

I am creating a video parser in C# WinForms. You select files, they get parsed then a custom control (ViewWideNarrow ) is created showing the video's name, duration and so forth, which is then added ...
user19430329's user avatar
5 votes
1 answer
402 views

Simple Ellipse Collision Mini Game

I am doing an exercise to help me understand C#and OOP. The exercise is supposed to teach me about ...
Darke's user avatar
  • 163
2 votes
1 answer
416 views

Login authentication using MVP pattern

How can I improve my login script and is there a cleaner way to get the same result? I had this project and redesigned it using MVP patten . Working with this patten is a new challenge for me. It's ...
Ammar Talal's user avatar
1 vote
3 answers
1k views

Saving Multiple Lists to Database - C# Forms

I am trying to store multiple lists to a database but I'm struggling on finding a better way of doing it, as the way I am doing it now, seems to be incorrect. On my form, I have 6 different legs. Each ...
Jimmy293288's user avatar
0 votes
1 answer
106 views

Creating a new WinForm each time pressing a button in a main WinForm

I have WinForm C# application that every time you press on the green button: It opens a new WinForm window. This is the code after pressing the green button: ...
E235's user avatar
  • 237
0 votes
1 answer
185 views

How to optimize the code of my pdf generation from DGV code using iText5 & c#?

I have 2 DGV's one containing bills info & another containing credit notes info. When at least one item from both the DGV's are selected then it should generate a pdf (result1) taking data from ...
Tamal Banerjee's user avatar
4 votes
1 answer
476 views

Windows standard calulator replica in WinForms C#

I tried my best to replicate, in style and functionality, the Windows standard calculator: I would like to get some feedback on the efficiency and readability of my code as well as the approach i ...
Tommaso's user avatar
  • 93
1 vote
3 answers
378 views

Export DGV data as a table to a word file using Xceed's DocX library

my winform app contains a combo box, a button and two datagridview among other controls. Both DGV's have 3 columns. When I select an item/items from one or both of the DGV's and hit the button the app ...
Tamal Banerjee's user avatar
4 votes
2 answers
158 views

User interface for a simple tool that generates Word documents from Excel data

This question provides the code behind the dialogs in the C# refactoring question. I'd like a review of this code as well. I'm not currently using databinding anywhere, and there is really only one ...
pacmaninbw's user avatar
  • 23.8k
3 votes
3 answers
118 views

Follow Up: Refactored C# Tool to Generate MS Word Document Mailbox List From MS Excel

Background Some very good observations were made about my original code in the 2 answers to this question. In this version I have attempted to reduce cyclic complexity and class coupling even more as ...
pacmaninbw's user avatar
  • 23.8k
2 votes
2 answers
147 views

Optimize the data adding process to datatable from excel file

I'm creating a simple windows form application containing a combo box, a text box, a datagridview, a button and some radio buttons. The idea is upon the form loading the combo box is to be populated ...
Tamal Banerjee's user avatar
0 votes
2 answers
241 views

Simple stock taking program in C# Windows forms

so I've made a simple program meant to increase and decrease numbers, then save those numbers, basically a rubbish stock taking app, I want to make one I can use and well it's usable I'd say the code ...
Mr Cat Chap's user avatar
3 votes
4 answers
134 views

Verify that 5 Textboxes have some content

I'm new to C#. I have created a form that has 5 text boxes and this function checks to see if every text box has text in the box. If not, then it displays a message box saying "Error (Add Text)...
Ablac's user avatar
  • 33
1 vote
0 answers
806 views

DataGridView Undo/Redo Manager in C#

While answering this code review question, I proposed a solution with List<DataTable>. I am trying to encapsulate this data structure into a "...
JimmyHu's user avatar
  • 4,708
3 votes
1 answer
1k views

Undo/Redo Functionality in DataGridView c#

I have looked at many topics related to this topic, but I could not find or understand for datagridview table. Finally I made the undo / redo implementation myself using datatable lists. This solution ...
Gokhan's user avatar
  • 133
1 vote
1 answer
97 views

A Tiny Image Tagger Implementation in C#

I am trying to implement a tiny image tagger with customized tag options in C#. The main window is as follows. The left block is a picture box MainPictureBox and ...
JimmyHu's user avatar
  • 4,708
2 votes
1 answer
57 views

This code loops through a GlobalEmployeesList, eliminates duplicate email and phone records for the selected employee, and populates listboxes

I have a DataGridView which displays an employee list. I use the employee ID to filter my global employee list and display information about the selected employee in various listboxes. This is my ...
Joshua White's user avatar
2 votes
2 answers
130 views

final code of my first winform application

I am learning .NET for about a month now ..and i am practicing by making a simple WinForms project ..now almost my WinForms is completed ..i need to gather your suggestion on how my progress is going ...
RaviKumar's user avatar
4 votes
0 answers
390 views

Simple target shooter game using Windows Forms

Currently, my game is a basic target shooting game. The targets rise to the top, if the target reaches the top an end screen is shown. If you shoot a target you get more score, and the speed in which ...
Tytal124's user avatar
2 votes
0 answers
36 views

What is the correct way to alter ComboBox between two DataSources?

I am looking to alter one combobox between two DataSources depending on the button clicked. Here are the 2 lists: ...
DeveloperLV's user avatar
4 votes
1 answer
197 views

Is my structure of program readable?

Just looking for reviews to improve my coding and my structure of C#. It feels I probably have some unnecessary code that is not needed, been following some YouTube videos to accomplish some tasks. ...
DeveloperLV's user avatar
3 votes
2 answers
194 views

Getting data from database and present it on Winforms

Currently, I am working on this project where I need to achieve the following... Get column named Category from MySQL database. And whatever the output is, check ...
DeveloperLV's user avatar
8 votes
2 answers
817 views

WinForm Logon Best Practices

I have a working logon for a WinForms Project. I use the program.cs file to launch the login form. I am not so sure there isn't a better way of implementing this. ...
Randy's user avatar
  • 487
2 votes
0 answers
37 views

Applying OOP to refactor my Windows Forms APP [closed]

Could you please give me some direction about how I could refactor my code? As I add functionalities to my Budget App the class is getting bigger and I'm sure I could start looking at separating ...
Pablo Aguirre de Souza's user avatar
1 vote
1 answer
396 views

C# easier ways to filter values in data-grid by month

Goal: My goal is to filter datagrid by selected month from dropdown options. January, February, March etc... I'd like to know if ...
DeveloperLV's user avatar
2 votes
1 answer
590 views

Windows Forms Log in and Dashboard

I'd like to see and hear some reviews on my current WinForms Login and Dashboard code. It's a desktop application to be used only internally and not over the web. If you have any code suggestions - I'...
DeveloperLV's user avatar
3 votes
2 answers
2k views

C# Window Form Application Loading data into DataGrid and highlight specific values based on their values

I'd like to hear some reviews or tips where I can improve in my code - or better if you can post your own version of the code from somebody experienced where I can visually see to why you have coded ...
DeveloperLV's user avatar
3 votes
0 answers
73 views

Identify clickable area in a big panel

I have a panel that has 4 images per row and a lot of rows. Each image has a 15 pixels separation and are 250,250 each. Here is a screenshot: I'd like to be able to click on a picture and identify ...
Sebastien Chemouny's user avatar
2 votes
0 answers
36 views

Web API wrapper design and sharing EF database context

I'm trying to keep my sanity while working with a legacy winforms application that uses an web api, both maintained by my team. In the past we have multiple cases of methods using wrong api endpoints,...
Rubens Farias's user avatar
4 votes
1 answer
582 views

C# MineSweeper Game using winform

I designed a game with trying to use solid principles. What changes should I do for making program more extensible, readable. Thanks in advance. Cell class ...
yuga's user avatar
  • 81
3 votes
2 answers
84 views

Entering specific models, brands, and prices into system

Specifically the if/else statements trying to match model and brand. The code works, but it's ugly. Any suggestions to clean it up? ...
Spaz's user avatar
  • 83
1 vote
1 answer
300 views

C# MySQL connection and some queries

Goal: I am trying to get the hang of using MySQL connections within C# windows forms. These are such areas I am targeting: Loading dataGridView correctly Refresh dataGridView from an external form (...
DeveloperLV's user avatar
4 votes
1 answer
2k views

C# Windows Forms App: Adding An Element To The BindingSource And Save These Changes To The DB [closed]

I have build a C# Windows Forms app that used Entity Framework(DB first model). For the data I am using a .mdf database file. The data view of dbo.students: GUI: The Form1 class: ...
user avatar
2 votes
2 answers
328 views

Is there a better/cleaner way to assign values based on the result of radio buttons?

I have 3 radio buttons all grouped inside a group box in a WinForms project. Currently, I am checking which button is checked and assigning values using the following if/else statement, similar to the ...
Glazbee's user avatar
  • 145
7 votes
1 answer
844 views

Minesweeper Implementation c# winforms

I made a minesweeper game in c# as a method of studying, and right now its fully operational. I tried to use inheritance, recursion, and other fundamentals as clean as possible. Also I tried to use ...
gordkyn's user avatar
  • 73
4 votes
1 answer
121 views

Simple winform that randomizes images in a picturebox

I wrote this code for a simple app that gives us random images. The code works, but I feel like I'm doing something wrong. And one thing I would love to know is instead of grabbing from a folder ...
Sinesters's user avatar
1 vote
0 answers
80 views

Work-in-Progress Form to be used throughout an application

I want to write my own Work-In-Progress form to use it throughout my app (for the time being, mostly as an exercise). I came up with the following code, I would like to know what are the design ...
Veverke's user avatar
  • 171
6 votes
1 answer
244 views

TreeView class in WPF class

We are converting a WinForms application to WPF. so I need to accept the input like WinForms. As I don't want to change the logic of it. Ao I write the class for those its works. But the is not good ...
Avinash Reddy's user avatar
4 votes
2 answers
844 views

Reading Data from XML and storing them into SQL Database

I am developing a C# Windows forms application. In that, I am reading data from XML which is coming from a web API and storing that XML data into SQL database. I am able to achieve this. But my only ...
Sunil Edupuganti's user avatar
5 votes
1 answer
107 views

Page-by model of data output and search results with values for UI

This is my first experience of designing classes with inheritance. I would like to get feedback on the interaction between the presented classes. It is unlikely that this code will seem complicated. ...
Owl's user avatar
  • 204
8 votes
2 answers
1k views

ROT13 encoder/decoder

This is a simple utility, intended to sit on the desktop for when needed, that does the simple ROT13 encoding and decoding. I am used to coding in VBA, and I am interested in more .Net idiomatic ...
AJD's user avatar
  • 2,346
3 votes
1 answer
125 views

Small application for manipulating users and their activities

I made a small application using C#, SQL Database, entity framework , and windows forms to manipulate users (...
Aris Koutsoukis's user avatar

1
2 3 4 5
7