Questions tagged [winforms]

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

Filter by
Sorted by
Tagged with
2
votes
3answers
128 views

Changing control name property during runtime — Why doesn't anything break and why shouldn't I do it?

To make a long story short, I needed a property of a button to act as a "secondary text property" and retain the original .Text value of a button, and the only String property that wasn't ...
0
votes
0answers
29 views

Structuring a “Large” Windows Forms Project and Solution To something with Multiple Sub-Projects

I've willingly inherited a VB.Net forms project based on .Net 3.5 last edited with VS2012. I was able to open it up and up-convert it to VS2017. I can compile and run it and make some little tweaks. ...
4
votes
3answers
424 views

Single massive solution - good idea?

I am analysing a Windows Forms application in .NET Framework 4.5.2 with 4 separate solutions with a combined 1.5million lines of code (and 10 years of development) Libraries.sln (54 projects) Tools....
-4
votes
1answer
130 views

Choosing architecture for Winforms C# application

I'm developing GUI for controlling and testing hardware device. The GUI consists of many basic controls like textboxes and radio buttons which are mostly independent of each other - each control ...
5
votes
0answers
120 views

Daylight savings time for real time application

I am building an application on windows forms C# that will run in real time 24 hours a day 365 days a year. This application tracks the time that components are out of storage. I am running into a ...
0
votes
3answers
761 views

How to handle views and logic in a Winform C# app? [closed]

I come from a webdev background so I'm used to MVC to handle the separation between the views and the logic (and the data/models). I'm starting to develop using Winforms in C# and I want to know what'...
2
votes
2answers
175 views

Solving similar devices problem

Problem: Winform app for servicing different types of devices (approx. 10 types). Some devices have more settings similar (or same) then the others. Each device could also has software and hardware ...
-1
votes
2answers
276 views

Winforms: Using the designer vs. generation by code

Due to a new job opportunity I am switching back from WPF to WinForms. Currently I am playing around a little to get used to it. Here are my main questions that arose: Should I use the designer in ...
-1
votes
1answer
590 views

About Three Layer Architecture

I'm currently developing a minor project for school and I'm supposed to use a three layer architecture in the project. I'm working with C# in .NET and I'm also working on Windows Forms, and with the ...
-2
votes
1answer
244 views

How should i license my application?

I developed c# winform application which monitors database and I want to license it. License will be concurrent based. Standart license 2 concurrent users, Premium users 5 concurrent users. I want ...
2
votes
3answers
536 views

Are there any benefits of using .NET Framework 4.0 Client Profile nowadays?

We are developing visual controls for WinForms in .NET, and one of our customers using our products is still compiling all his apps for .NET 4 Client Profile. He has to do this as his customers, some ...
1
vote
1answer
236 views

how should the MVP pattern handle views created at runtime?

how should the MVP pattern handle views created at runtime ? for example There is a mainView (that has a model and presenter) that needs to display a list, each item in the list is represented by it'...
2
votes
1answer
2k views

In a C# Windows Forms application - how does the message pump use the main/form controls thread to update the form?

From my understanding, the form and all of its graphical controls run on the main thread. The form is displayed by the main thread and the inputs from the keyboard and mouse are received via the ...
12
votes
1answer
12k views

How can I apply the MVC pattern to a C# WinForms application?

I'm a C++ developer who has been using the MVC pattern to design GUIs ever since. Recently I wanted to get back into C#, and I set up a Windows Forms application, but now I am a little bit lost on ...
0
votes
0answers
67 views

Creating a common ancestor form in Visual Studio

I have 5 forms which in hindsight should have an ancestor descended from Form. Unfortunately, the common elements of the forms is a splitContainer and a listbox in one of the containers. Each form ...
1
vote
0answers
195 views

How should I implement generic datagrid for CRUD Operations?

I wrote multiple times different apps that have following requirement. CRUD Operations via DataGrid control... Everytime I start new prject I write new code for same requirement over and over - what ...
4
votes
2answers
641 views

A simple GUI app: states

I'm making a Windows Forms app: It is client-server. Authorization, then load some data from server, then send back some statistics from time to time. You should go through a bootstrapping procedure, ...
3
votes
0answers
61 views

Entity Framework - Old school save/update advice?

I've a query for you relating to best use of EF6 when using Winforms yet not having justification for changing things to something more modern. I've got half a dozen classes that are based on ...
1
vote
1answer
1k views

I have a few questions about the MVP pattern in a WinForms project

I hope someone can answer these. I have a WinForms project with +/- 8 forms. I have an SQLite database and a class that handles the queries to this database. I would like to use the passive View ...
3
votes
0answers
67 views

Background operations in controller/presenter or form?

I have a desktop application with each window decopuled into presentation layer (containing the Form/Controls etc.) and application layer (Controller/Presenter - naming is irrelevant to the question). ...
3
votes
0answers
1k views

Traditional installer for a WinForms application

What is the preferred method of creating a "normal" traditional installer for a .NET WinForms application? I'm using VS 2015 which comes without a template for such a deployment project. I installed ...
3
votes
2answers
257 views

GUI applicaton states and polymorphism

I have WinForms GUI application, which can work in two "states" with different functionality, but these states share GUI controls. I am dividing these states by using enum almost in every method, like:...
0
votes
1answer
492 views

How could I approach building a Tile based Map Editor in Winforms?

I need to build a Tile-based Map Editor in #C Winforms. My main concern is drawing the tiles. In what space should I draw the tiles? Within a Panel? A Picture Box? Also, I obviously need to draw ...
1
vote
0answers
53 views

How to display a very delayed success message after async method call in WinForms after Form is closed

The users are on a Windows Form where they fill out a fax cover sheet and hit Send. The remote fax service takes anywhere from two seconds to two minutes to return a result (long timeout). By that ...
1
vote
1answer
953 views

General guidelines for architecturing a plugin based application

Our application is composed of a main webapp and a handful of windows services that perform a variety of jobs that feed, sanitize and optimize that webapp. In order to ease the task of maintaining ...
1
vote
1answer
819 views

How to create a layout of controls that can be duplicated on a form at runtime

I have a bunch of controls including labels, updown menu, combo boxes, radio buttons, and check boxes that must be replicated once someone hits the add button. Is there a way that I can create a ...
1
vote
2answers
240 views

Separating save logic from WinForm to make it reusable

I have a Windows Form for creating configs. It has around 50 fields of data, which represent a group of entities, that I need to capture when the user presses the save button. Currently, on the press ...
0
votes
0answers
47 views

Is it good practice to code entire business form as single component (control)?

Is it good practice to code entire business form as single component (control) and then proudly put it on window/form as the final step in development? Of course, this form can involve some other ...
-1
votes
2answers
1k views

Why use using-statements when you want to reopen connections? [closed]

In a Winforms project I've been working on recently, I've been dutifully using using-statements for objects that implement IDisposable. I want to reopen a database connection, however because the ...
1
vote
3answers
1k views

Use case for async/await?

Background Most of the applications that I write are hour long sequential tests for electronic equipment. The equipment under test has a specification that is a state-machine that looks like... Get ...
-1
votes
1answer
665 views

Winform User Control on ASP?

I wrote a C# Winform User Control as follows when Executable is Run: My question is how we can use this Winform C# user control in one ASP Page. I know about WEB User Control and using in ASP but ...
1
vote
0answers
347 views

Using events and event subscribers to create windows in a desktop application

I should probably open this by saying I do mostly Web applications at work, which obviously have some major differences from typical desktop stuff. I had a small Windows Forms program I'd made for ...
1
vote
1answer
1k views

Why are interfaces necessary in MVP design pattern?

I am trying to understands MVP using Winforms. I found this example. Why do UserModel and UserView need to implement the IUserModel and IUserView interfaces ?
5
votes
4answers
414 views

Object with Customized Properties and Methods

A project I am working on currently models Order information. Right now, there is one class with a bunch of properties and functions that all of orders have in common. In addition, some of our users ...
0
votes
1answer
918 views

C# Application GUI design dependent on configuration

I have built quite big WinForms application working in industry for a few years. It communicates with many HW devices. Application can be configured to use or not use some of these devices and GUI is ...
5
votes
1answer
2k views

Pattern for communicating between nested usercontrols and parent form (C# / Winforms)

I'm trying to decide the best way to handle communication between a UserControl that is nested within another UserControl and the parent Form itself. I have a Form, inside the form there's a ...
0
votes
0answers
703 views

Is it possible to have multiple threads using Background Workers for different controls within one GUI

In my current project i have a CPU intensive 3D chart that needs to be updated in real time. I have been using background workers for the project and using those, i do all the processing in the ...
1
vote
1answer
995 views

Multi-threaded winforms with multiple child forms using sockets

I develop application with two main option grouped by groupBox in main form. First option is run server with specific behaviour for example I choose TCP protocol, type IP address, port number and ...
2
votes
1answer
1k views

Two way communication between Form and plugins

I have started to develop a support tool for an old legacy system that is no longer maintained but still needed for the foreseeable future. The legacy system offers few, clunky and error prone methods ...
1
vote
1answer
146 views

Databinding When View Differs From Model

I have an entity Customer. Customer has a collection of Accounts. I have corresponding classes. The Customer class has-a List<Accounts>. I have two views. First page shows the Customer's name, ...
18
votes
2answers
25k views

How do you separate view from logic in a Winform application?

I know there are patterns like MVC to separate view from logic, however, I don't know how common they are in Winform applications. For a C# Winform application, I may start with a Form and gradually ...
0
votes
1answer
637 views

proper exception handling (throwing/message) dll libary

I just wrote a dll library using vb.net. while testing, i got an error which i did not initially use a try-catch block. The code is Try 'The first four bytes are for the Command ...
1
vote
0answers
574 views

Choosing the right design pattern/architecture for a scenario

I have a situation, in which I would like your opinion about the best approach that I should take. Let's consider 10 classes (obj001, obj002 etc.) all which represent some business entities, and are ...
-1
votes
2answers
1k views

Would redrawing controls in c# give more performance?

Now I realize this is a kind of weird question but here it is: Let us assume I redraw all the controls by myself rather than using the default provided ones (Obviously I'm talking of winforms as WPF ...
-1
votes
2answers
2k views

Productivity using .Net WPF for large ERP (LOB) desktop applicatons ~1500 forms\dialogs [closed]

I am wondering if WPF will fit in my case: We want to refactor an old legacy application written in a 4GL language with about 1500 forms\dialogs. We want to do that in .Net (desktop application), now ...
0
votes
2answers
3k views

What is the best way to allow a user to specify a SQL server and database from a Windows application?

I am working on building a Windows application that will require a connection to at least two different Microsoft SQL Server databases (for example, a source and a target), which may or may not be on ...
3
votes
0answers
778 views

How should one handle a Parent-Child relationship using MVP?

In a conventional MDI WinForms application, one would go like this: public partial MainMdiForm : Form { public MainMdiForm() { InitializeComponent(); } private void ...
0
votes
3answers
8k views

Is it ok to restart a BackgroundWorker inside its Completed event

I want a background worker to continue running and occasionally update the user interface. My first idea was to use a BackgroundWorker and in its completed event just fire it up again. Is using a ...
2
votes
1answer
401 views

Where to store front-end data for “object calculator”

I recently have completed a language library that acts as a giant filter for food items, and flows a bit like this :Products -> Recipes -> MenuItems -> Meals and finally, upon submission, ...
2
votes
1answer
697 views

Changelog Management [closed]

I'm currently developing a WinForm application. In order to inform the client about the improvements and corrections made during the last version, I would like to manage and display a changelog. I ...