Skip to content

MikeBevers.be

Putting it out there…

Archive

Tag: WinForms

Background

When you’re creating a Mobile application, the UI is very important. Your controls cannot be too small, shortcuts cannot be used, and lots of other little things. I don’t like repetition, but I do like UserControls! So let’s bring in the “TSGrid”.

TSGridSource code: Touch Screen DataGridView Control

continue reading…

The problem

I thought it would be usefull if there was a “Selection Changing” event on a ComboBox.

For Example: I have a ComboBox filled with Customers. Linked with the ComboBox is a UserControl which contains detailed information for the selected customer. On the UserControl I have validation methods. I wish that they are executed when the user wants to change the selected customer.

With a “Selection changing” event, I would still be able to cancel the new selection and still have access to the current SelectedItem.

continue reading…

A silly problem

After three years of programming WinForms, it’s the first time I’ve encountered this error.

It’s a pretty vague error “Too many items in the combo box.”, without an inner exception. Even weirder, my ComboBox was empty when I used the Add method to insert a custom DTO object. So I went into debug mode and after a couple of minutes, a bell rinkled.

continue reading…

The Problem

In some popup windows (fe: while data processing) you don’t want a user to be able to close the “dialog”. Since there is no option in the Visual Studio IDE to disable the close button, nor does a simple property exists on Form level.

So in order to solve this problem, we need to be creative.

continue reading…