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

8
votes
1answer
84 views

Pattern-finding game

This is a game that is supposed to be based on strategy and guessing. The letters need to match in a ABCD fashion on each button on buttons[0] - ...
4
votes
1answer
48 views

SQL Permission Handling in WinForms

For my application, I've opted to use Integrated Security with Windows Authentication to access the SQL database. I've created AD security groups for each role and given them ...
3
votes
1answer
48 views

Tic Tac Toe with winforms

This game works out the basic of a Tic Tac Toe game. I am looking to see if this can be redone in any way to make the code more smaller since this is really big. ...
18
votes
5answers
1k views

Console window to debug Windows Applications

Since I was having some difficulties to debug the next step for Scrolly - A (very) simple infinite mouse "scroll", I've decided to make a console-like class that allows to add messages to it. This ...
10
votes
3answers
277 views

Scrolly - A (very) simple infinite mouse “scroll”

Out of fun, and to practice my rusty C# skills, I've made a very basic program. It only has 1 function: When you move the mouse to a side of the screen, it shown on the other side. Like an infinite ...
7
votes
2answers
53 views

Drag and drop single files on different targets for different purposes

I have three text fields (DevExpress ButtonEdits set to read only) on a Windows Forms app. They look like this: They're used by dragging and dropping a single ...
3
votes
1answer
128 views

Populate tree from 3 different data sources and show its content

The task is to build a WinForm app which populates a tree from 3 different data sources and shows its content. 1 ComboBox at top - to choose datasource. (File ...
5
votes
1answer
55 views

Winforms Mathematical Operator Label

I wrote a custom class which (atm) displays the +, -, =, x, and ÷ operators inside a circle. Apart from the issue of some symbols not appearing in the exact center (everything except + looks a bit ...
5
votes
1answer
234 views

Preparing a YouTube downloader based on Windows form

The program this function was written for is a Windows forms program. This function downloads videos from the internet one after the other. It runs in a separate thread (so the user can drag the form ...
4
votes
1answer
103 views

Binding Lists to a DataGridView in Winforms

I'm using Winforms and I find this pattern showing up in my code a lot. It works, but I'm unsure if it's best. The goal is to pass an IList of items through a view ...
5
votes
1answer
56 views

User can choose to add one of two node types to a treeView, both of which have almost identical settings

There is a context menu that comes up when a user right-clicks on a node in a TreeView. They are then presented with the choice to either add what is called a "RWB" or an "AQ" node to the tree. Both ...
1
vote
1answer
39 views

Properly managing a collection from deserialized XML file throughout app's lifetime

I'm developing a WinForms app to manage some settings and profiles for multiple video games. The list of video games is specified by the user, and I'm trying to figure out how to properly maintain ...
5
votes
2answers
152 views

Script that parses the Chase.com page for my recent payments

I wrote this code earlier to parse Chase.com's online transactions page. It's written in WinForms. stepBtn is a button that starts this. ...
2
votes
1answer
52 views

Loading a Model from a Database

As you will see from the code below, I have a base model. ...
4
votes
2answers
363 views

Controls Edits of DataGridview in Winform

I want to refactor this code that is currently in a partial Form Class and deals with edits made on certain cells in a datagridview (in this case called dgvReplenish). I would like to refactor so ...
3
votes
1answer
92 views

Linq-to-SQL DAL on a Windows Forms project

I just started out a new job as a C# programmer on .NET 3.5. My manager gives me total independence on how I build my modules, which is generally a good thing, but there are minuses too. Having too ...
11
votes
1answer
107 views

Rubberduck “GoTo Anything” Navigation

The next version of rubberduck is going to include a pretty nifty "goto anything" / find symbol navigation tool that lets the user enter an identifier name in a combobox: UI To achieve the ...
12
votes
3answers
134 views

Reordering method parameters

Next release of Rubberduck (should be 1.4) introduces a reorder parameters refactoring, which lets user reorder the parameters of a module (or class) member, and automatically adjust all usages. ...
15
votes
5answers
746 views

Populating a ListView with Items

I populate a ListView with Items. Each Item has data attached to its .Tag property. Over time, I have needed to handle many cases where something would be null or ...
11
votes
2answers
189 views

Exploring the code of the Code Explorer

The Code Explorer is a dockable toolwindow that displays a TreeView that shows all opened VBA projects and their respective modules, but unlike the "native" Project Explorer, Rubberduck's explorer ...
1
vote
2answers
188 views

Check before proceeding if the task in BackgroundWorker has completed

I have a Login Form (which has a label that will show status of background process, username and password text boxes, Login and Cancel buttons) along with that I have a background worker to do some ...
1
vote
3answers
128 views

Dealing with DB Through EF within Winforms

I have the following code which uses EntityFramework to reach out to a DB and retrieve data to populate into a Winform application gridview. I am still quite new ...
2
votes
1answer
241 views

Cancellable progress form using async/await

Introduction: For a project I'm working on I used a BackGroundWorker to lift some heavy tasks away from the UI thread and report progress. For this I created some ...
1
vote
1answer
104 views

Efficient use of LINQ - Indexing

I have a Class with a List of objects, and those objects contain a list which has lists to objects in the first class, and I'm trying to quickly index them. Simplified: ...
3
votes
2answers
161 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
126 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
228 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
1k 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
613 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
195 views

Optimizing paint code

I am trying to optimize the following code: ...
6
votes
1answer
103 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
72 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
96 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
150 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
343 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
130 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 ...
1
vote
2answers
2k 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
449 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
76 views

Adding list of customcontrols

This is the basic class that I am trying to display: ...
2
votes
1answer
212 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
290 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 ...
2
votes
1answer
111 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
410 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
488 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
441 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
133 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
317 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
414 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
434 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
296 views

Updating XML config files

I have been unable to find any other way to update a user config file than the following method. ...