Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

2
votes
2answers
165 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
133 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 ...
-2
votes
1answer
381 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 ...
-3
votes
1answer
126 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 ...
0
votes
0answers
31 views

Implementing 3rd party control while keeping proper separation

I'm building a big user control around a 3rd party map control. The map control has a lot of features in it, along with other .dlls that can be added to do more (which I use). Originally I was going ...
2
votes
3answers
339 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
176 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'...
1
vote
1answer
763 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 ...
7
votes
1answer
6k 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
62 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
143 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 ...
0
votes
2answers
2k views

Using Tasks on DataGrid Controls

Recently, I am using tasks on datagrid controls and in my application there are almost 20 datagrids in different forms. I do this because sometimes data retrieving takes a long time over database and ...
5
votes
2answers
468 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, ...
2
votes
0answers
58 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
851 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 ...
2
votes
0answers
55 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). ...
2
votes
0answers
757 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
215 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
304 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
48 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 ...
0
votes
1answer
731 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
523 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
170 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
950 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
881 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 ...
0
votes
0answers
141 views

Usage of “Passive View” for winforms application

I'm currently working on a winforms project which will have a rather complex structure with about 300/400 controls which I will have to access during the program is running. I am contemplating the ...
-1
votes
1answer
554 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
288 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
914 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
364 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
778 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
608 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
874 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
859 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
140 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, ...
14
votes
2answers
19k 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
605 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
536 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
2k 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 ...
2
votes
0answers
647 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
6k 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
347 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
667 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 ...
1
vote
1answer
351 views

Can't understand on how to implement MVP/MVC for my software requirements [closed]

Recently I decided to start developing a client/service based system using WCF and a Duplex Channel (callbacks from Service to client). The clients will behave as "slaves", that is, they will only ...
2
votes
2answers
4k views

Organizing solution / project structure and classes for Line of Business Application (LOB)

The question how-do-you-organize-your-projects already has a few good answers. I would like to get a better understanding about this suggested structure: MyApp.Core MyApp.Model MyApp.Presenter MyApp....
1
vote
1answer
8k views

Differentiating Standalone and Client-Server architectures

I was wondering what is the exact difference between a client-server and a standalone application, particularly in following scenario. For example lets say there is a win forms application running on ...