by ds | Mar 26, 2013 | C# .Net
Since UAC, the SetForegroundWindow or ShowWindows methods of user32.dll do not always work. E.g. if you want to activate an existing process window that has never been to the foreground before, it sometimes only appears partly behind the currently active window....
by ds | Sep 20, 2012 | C# .Net
Problem: You use the ComboBox SelectedIndexChanged event handler to do something after the user changes another item. But this event also fires on form loading and e.g. when the DataBinding value changes. Solution: Use the event...
by ds | Sep 7, 2012 | C# .Net
Problem: If you use SQL Select queries which contain multiple databases (in 1 query), the DataSet Designer and VS often crash. Solution: Try to use “`” before and after the database name in the SQL query, e.g. select meow from `mydbname`.`mytablename`...
by ds | Jul 6, 2012 | C# .Net
Scenario: User types text into a TextBox, e.g. for searching in a table. With the TextChanged event, you can send a query to the database every time the user hits a key. Problem: You don’t know if the user has finished writing. If this is a huge table in your...
by ds | Jul 5, 2012 | C# .Net
Sometimes the feature “RowSizing: Auto-Free” does not work like it should. For example, when you have a cell which contains 8 rows, it can happen that you don’t see the last one. PerformAutoResize() helps, but is not always the best way. In my case...
by ds | Jun 27, 2012 | C# .Net, MySQL
This exception is thrown e.g. using the following code in C# .Net 2010: MySqlCommand cmd = new MySqlCommand("insert into common_history(datetime, username, text) values (@datetime, @username, @text)", adapter.UpdateCommand.Connection);...