ListBox not updated via DataSource

I have a ListBox which has its DataSource set to a BindingList. BindingList<PairDiff> pairList = new BindingList<PairDiff>(); pairList.RaiseListChangedEvents = true; listBox1.DataSource = pairList; The type of the BindingList implement...
more »

2017-01-08 20:01 (2) Answers

Append clipboard text to a listbox

So I created a variable to hold my clipboard text and I have no idea on how to append it to a listbox. This is as far as I got.. private void clipboardBtn_Click(object sender, EventArgs e) { string items = Clipboard.GetText(); List<strin...
more »

2017-01-01 23:01 (5) Answers

Send notification on Time/Date from database

I'm trying to figure out how to make my application send a notification on the specified date/time which it retrieves from my database. it does not need to do anything complicated like a pop-up/sound notification it just needs to send a simple mes...
more »

2016-12-28 15:12 (1) Answers

Winforms c# app on datagridview binding

I have a WinForms application and would like to bind an XML file to a DataGridView. On the first 2 rows of the DataGridView I need to append a timespan (HH:MM) time format. How do I achieve this, so that in addition all the rows are editable? What wo...
more »

2016-12-25 23:12 (1) Answers

How to save an object after exit

So I'm currently working with and winforms and I need the have objects created from my classes saved so they are still there if I exit the program and open it again. I also needed to make them dynamically so I was going to add them to a dictio...
more »

2016-12-22 02:12 (1) Answers

70% Opacity Color to a Button WinForms

I want to make that effect when I hover a button to still be like 30% transparent (so you can see the background image from the form) but still see some color.. I tried this but this just gives me a blank black: private void roundedButton2_MouseEnt...
more »

2016-12-17 23:12 (1) Answers

Converting int to string with a specific format

I'm trying to convert an classical integer value like: 2000 into a format like this: 2.000,00 I have tried the following methods: String.valueOf(input.format()); And this method: private String getCents(Decimal x){ String y = String.val...
more »

2016-12-14 15:12 (2) Answers

How to update a value in local SQL Server database

In my program I want the user to have the option to change the value (price in my example) in a local database, that I created. I'm having a problem with it. The connection works fine and it debugs well and even shows the message that "saving ok", b...
more »

2016-12-04 19:12 (1) Answers

Invert text color depending on BackColor

I have a ProgressBar control like the following two: The first is painted properly. As you can see, the second only has one 0, it's supposed to have two but the other cannot be seen because ProgressBar's ForeColor is the same as the TextColor. Is ...
more »

2016-12-04 00:12 (1) Answers

Get the largest and smallest number from a array

I’m using WinForms. At first I was having a hard time adding data from textbox to an array, but I figured it out, but I don’t know if this is the ideal way to do it. Next, what I’m trying to do is get the largest number in the array and the sma...
more »

2016-10-26 18:10 (3) Answers