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.

learn more… | top users | synonyms

3
votes
2answers
80 views

Is this a thread-safe implementation of background bitmap generation?

For a game implementation, I have a very large overview map with multiple layers (namely base-map / units / highlight & info / fov-shading) of which the first is CPU-intensive to generate. I have ...
8
votes
1answer
70 views

Refactoring my Todo List was on my Todo List. How's my MVC?

This is a follow up to Rolling my own Configuration with UI. I got a lot of great advice about the Configuration system I created, but no one touched on how all of my logic for the UI was in the code ...
12
votes
4answers
175 views

Rolling my own Configuration with UI

The Rubberduck Saga continues as I find a need to roll my own configuration. Since the program is really a *.dll and available to several host applications, using app.config is not an option. I ...
11
votes
3answers
643 views

Winforms Circular Checkbox

So here is my next creation, a circular checkbox. This is my third custom control, so I'm still learning, but have the basics just about down. Tips and suggestions are most appreciated: ...
11
votes
2answers
540 views

Counting Calories

I have this program for counting calories. There isn't a whole lot to it yet. It's a moderately sized project, so I'll do my best to make it as short as possible, posting only the main of the program ...
4
votes
1answer
97 views

Optimizing paint code

I am trying to optimize the following code: ...
6
votes
1answer
71 views

Finding Magic Comments to Create a Custom Task List

I've been working on a COM Add-in for the VBA IDE with a friend. The idea is to search the active VBA Project for "magic" comments and create a task list much like any sane IDE would have. This is ...
0
votes
1answer
47 views

Use parent class to declare a child object or how compiler allocates memory

I'm working with C# and .NET Framework 4.0 and Windows Forms. On my project I have three custom objects that inherits from MyControl class (...
4
votes
1answer
57 views

Stop Watch Application 2.1

After the tips from my previous review. I have come up with these changes: Separation of Concerns Use Delegates I'm asking you guys if this looks good. Other then separate out the ...
7
votes
1answer
105 views

Stop Watch Application 2.0

After the tips from my previous review. I have come up with these changes: Changed my braces to start on a new line Used the Single Responsibility Principle Return early whenever possible Use a ...
3
votes
2answers
271 views

Stop Watch application

I've done the difficult dailyprogrammer challenge #2: Your mission is to create a stopwatch program. this program should have start, stop, and lap options, and it should write out to a file to be ...
8
votes
2answers
127 views

TestExplorerWindow, the event-tossing UI

Following up on Integrating Unit Testing functionality into an old COM-based IDE, I made quite a few changes to the UI, and now the code-behind for my ...
0
votes
2answers
286 views

Disabling selection in textbox

I have a form that displays a list of days in a given month that looks like so: All the text boxes are set as readonly, which is the desired functionality. While ...
5
votes
3answers
224 views

Windows forms set saved groupbox location settings

I have a Windows form that when a user moves some groupboxes around, before the application exits, it saves those X and Y coordinates into a MySQL database (with a bit of added text to identify which ...
3
votes
1answer
65 views

Adding list of customcontrols

This is the basic class that I am trying to display: ...
2
votes
1answer
87 views

Reporting progress to main form's controls from within a threaded heavy task

I'm trying to figure out how to nicely write a Winforms app that reports the progress of completing a long task onto the main form's controls without causing Cross-thread op exceptions and such. So ...
6
votes
1answer
166 views

Handling Parent-Child Relationship using MVP within a WinForms Application

I recently asked on Programmers: How should one handle a Parent-Child relationship using MVP? Based on the comments received, I tried this: IParentView ...
3
votes
1answer
97 views

Optimizing recursive reading of a UI configuration file

In our project(windows app, winforms) the UI is designed based on XML configuration file. I have a program to read the UI configuration file and Parse the configuration and design the UI. The ...
3
votes
1answer
174 views

Design of colour fading for WinForms controls effect

I wrote this little piece of code to linearly interpolate between a winforms control's background colour and any arbirtrarly chosen colour. I don't like the way I wrote this piece and I was ...
6
votes
3answers
453 views

Shutdown Delay Program

I wrote this program a while back that would allow me to set a delay, say 3 hours, and when the delay had expired, my PC would turn off. The purpose of it was so I didn't have to leave my PC on all ...
3
votes
1answer
208 views

Loading GIF form on a Windows console app using threads

I have a main form which does processing for an extended period of time. Normally, progress bars are used to show either the loading status or simply show the program is still running/hasn't freezed. ...
3
votes
1answer
110 views

Winforms Dice Control

This is my second Custom Control I have made, a dice. The code below has worked 100% in all my tests, program contains 1 dice control and seven buttons, 6 for setting a number directly, and one for ...
8
votes
1answer
201 views

Sorting Visualizations - WinForms

Description I think many many people have seen this youtube video "15 Sorting Algorithms in 6 Minutes" When I saw it, I decided: "I can do that better" and I tried to get things done with the tools ...
1
vote
1answer
151 views

Service class for Archiving and Mirroring Files and Directories

I am writing an application that either mirrors a file/directory into another location or creates a zip file "snap shot" of a file or directory and stores it in another location. The user is able to ...
3
votes
1answer
283 views

Winforms Graphical Timer Control

This is a Graphical Timer control I made for C# Winforms, which taught me quite a bit (it is my first Custom Control). The code below is a fully working application with the Graphical Timer, some ...
1
vote
2answers
98 views

Updating XML config files

I have been unable to find any other way to update a user config file than the following method. ...
2
votes
2answers
133 views

Error Handling When Using Dictionary

I have set up a Dictionary that calls on a class to fill a DataGridView via SQL statements. The problem is in two (out of 5) ...
3
votes
1answer
140 views

Populating DataGrids

I'm building an in house query tool. The main form has a drop down which allows the user to select how they want to find scripts, and a drop down for what server they want to run the query on. There ...
7
votes
3answers
166 views

Dataset with optional addition to where statement

I am trying to generate a dataset from a query that has a where statement. If the user passes a value additional things need to be added to the ...
2
votes
2answers
68 views

Two Datasets Same Query

I have a form that allows the user to select a server. This will execute the exact same query just on a different server. ...
2
votes
1answer
806 views

Binding data to a ComboBox and then showing ValueMember in another TextBox

I have a comboBox and a TextBox in the View and when the view is loaded, the ...
3
votes
1answer
241 views

Binding a DataGridView to a List

I'm new to Databinding in MVP and I want to bind my DataGridView to a object list. This grid may be populated in two ways. There are TextBoxes in the form and users can enter text, and when they ...
2
votes
4answers
429 views

Silent Try_catch in high load socket server or not?

I'm working on a socket application that will listen to incoming messages from about 400 devices. They all send a message at least once per minute. Now I have a working program and it has been running ...
4
votes
1answer
365 views

PowerShell Active Directory Browser

I've just published ADExploder. It's a single-script PowerShell app (source) that uses classic Windows Forms and the Directory Services API to be able to browse nodes and properties of Active ...
3
votes
3answers
104 views

Validating a string under few conditions

Following code validates NIC number of a person (National Identity Card, no like SSN) Requirements are... Length should be 10 digits or characters All should be digits except the last one Last one ...
2
votes
1answer
82 views

Using a single validation handler for all controllers in a form

In input validation I'm using this validation method in my all Forms. Here I have a single handler for all TextBoxes in my Form and if I have other controllers like ...
3
votes
4answers
6k views

Input validation for text boxes in a Form

In a Win Form I'm doing initial validation in the Form. So before saving data, I want to validate whether all the required fields are filled (Text Boxes) by the user. There are about 18 such Text ...
2
votes
1answer
130 views

Calling a copy constructor in Presenter to prepare a list of Models

I'm new to MVP. In a presenter I have following code. Here what am I trying is to create a list of Model objects (in this case ...
1
vote
1answer
102 views

Controlling permissions in a MVP application

In a Windows forms payroll application employing MVP pattern (for a small scale client) I'm planing user permission handling as follows (permission based) as ...
1
vote
0answers
531 views

Keeping WebBrowser control's DocumentCompleted event handlers

This morning, being in urgent need of an effective subject code solution, I have had to write a "quick & dirty" custom one: ...
10
votes
3answers
1k views

Pizza form project

I've just recently started C# and I was wondering if there's anything I can improve on. My project is a pizza form, where people can order pizza and the price gets updated, depending on whether they ...
6
votes
2answers
371 views

Message estimator

I'm new to C# and OOP and am struggling to move away from the procedural way of doing things. I understand the tutorials I have looked at but find it more difficult when actually doing something a ...
1
vote
1answer
108 views

Using Models and Entities in MVP pattern

I'm a beginner in MVP design pattern and In a MVP triad, I have Model - AdvanceInfo View - AdvanceForm Presenter - ...
3
votes
2answers
68 views

Using built-in type Decimal or Entity type Advance, to hold AdvanceAmount

In a wage processing system which employees MVP pattern We have Model classes WageInfo, EarningInfo, ...
2
votes
3answers
571 views

Employee wage/salary calculation MVP solution

In this project (C# Win forms) I'm supposed to calculate wages of employees. These are the steps: Calculate earnings from Attendance data. Here all regular earnings like ...
5
votes
1answer
452 views

Calculating Earnings from attendance details

In a C# win forms payroll application I need to calculate employee salary based on their attendance. I've written a stored procedure which calculates earnings of all employees from the data available ...
3
votes
1answer
715 views

Populating a Data Grid View in MVP

I'm developing a win forms application in MVP pattern. In the application, there is a small module to show the branch offices (called points) where the attendance entering process has been completed. ...
5
votes
2answers
127 views

Keep asking the user [after performing an action] until they wish to stop

I have a form that requires the user to select photos to be included in their portfolio before they can proceed to use the app for the first time. I don't want to spend the rest of my life ...
1
vote
2answers
235 views

MVP Pattern used in a payroll solution

I'm using MVP pattern for a payroll system as my final year project. There are about 16 entity classes (like employee, client, ...
11
votes
2answers
7k views

Displaying data from a database onto a form

I'm a beginner to .NET and could you guide me to right direction. My problem is based on the following code. Here I have 4 variations of same method and all 4 variations are working fine. What is ...