Archived Months
June 2003
July 2003
August 2003
September 2003
October 2003
November 2003
December 2003
January 2004
February 2004
March 2004
April 2004
May 2004
June 2004
July 2004
August 2004
September 2004
October 2004
November 2004
December 2004
January 2005
February 2005
March 2005
April 2005
May 2005
June 2005
July 2005
August 2005
September 2005
October 2005
November 2005
December 2005
January 2006
February 2006
March 2006
April 2006
May 2006
June 2006
July 2006
August 2006
September 2006
October 2006
November 2006
December 2006
January 2007
February 2007
March 2007
April 2007
May 2007
June 2007
July 2007
August 2007
September 2007
October 2007
November 2007
December 2007
January 2008
February 2008
March 2008
April 2008
May 2008
June 2008
all groups > dotnet windows forms > may 2007 > threads for may 1 - 7, 2007

Filter by week: 1 2 3 4 5

WPF HOW TO: Insert a ComboxBoxItem after databinding?
Posted by ER at 5/7/2007 9:20:31 PM
Hi All I have a ComboBox that is bound to a DataTable returned from a Business Logic Component. How to I insert a new ComboBoxItem after binding. My Code so Far: StockItemDepartmentBLLC s = new StockItemDepartmentBLLC(); cmbDepartment.DataContext = s.GetDepartmentsForDDL(); //returns ...more >>


Looking for an exception handle
Posted by John at 5/7/2007 3:07:13 PM
Hi I am looking for an exception handler that can handle all unhanded exceptions in my vb2005 app and also email the exception log to myself. There is one here http://www.codeproject.com/dotnet/ExceptionHandling.asp but it only works with vb2003. Any help would be appreciated. Thanks ...more >>

Sorted combobox displays wrong data
Posted by Paolo Niccolò Giubelli [Axettone] at 5/7/2007 12:39:01 PM
Hi! I have a tedious problem with comboboxes, as they don't display data correctly. Suppose I have a combobox "cmbEmployees" that shows Employee objects; class Employee has an "Id" member and a "CompleteName" member. I set up my combobox so to have "Id" as valuemember and "CompleteName" as d...more >>

Starting up the win form as non visible
Posted by melon at 5/7/2007 10:24:42 AM
So I have something like Application.Run(new PopupForm()); public PopupForm() { InitializeComponent(); } I want the PopupForm as non visible from anywhere (including the actual form should be non visible, as well as in task bar, alt tab bar). I tried to add this.Visible = ...more >>

SmartClient and WebPermission exception in .NET 2.0
Posted by Jürgen Laude at 5/7/2007 8:14:02 AM
Hello, I have a windows forms smart client application that was made for .NET 1.1. It is accessing a web service that is located on the same site as the client dlls. The application is running with Internet permissions without any problems on .NET 1.1 clients. Now I'm trying to run this ...more >>

Right-click in listview
Posted by Tim Johnson at 5/6/2007 11:01:01 PM
I've seen this technique for grabbing the listviewitem from a right-click: private void listView1_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e) { if(e.Button == MouseButtons.Right) { ListViewItem rClickedItem = listView1.GetItemAt(e.X, e.Y); } } and this works fine if ...more >>

Reading file list
Posted by John at 5/6/2007 10:41:03 PM
Hi How can I get all the files matching a mask in the current folder read into an array or list for processing? Thanks Regards ...more >>

Restarting app after exception
Posted by John at 5/6/2007 10:29:33 PM
Hi Is it possible to restart a vb.net winform app form within the same app? I have noticed that sometimes even after app has ended it stays "running" and is still visible in the task manager list of processes. Is there a way to completely end all such instances before restarting? Thanks...more >>



Will this do the global error handling?
Posted by John at 5/6/2007 10:08:47 PM
Hi My vb.net winform app has frmMyForm as the start-up form. I have enclosed My.Forms.frmMyForm.Show() within try/catch. Will this do the trick of handling all exceptions that have not been handled elsewhere? Thanks Regards Private Sub MyApplication_Startup(ByVal sender As Object, ...more >>

Start-up from Sub Main problem
Posted by John at 5/6/2007 3:54:18 PM
Hi I have created below class with a Sub Main to use for start-up. Problem is when I go into project->properties->Application and drop down the 'Startup form', my class isn't listed so I can't select it. How can I set the app to use Sub Main as the starting point? Thanks Regards ...more >>

Weird listview phenomena
Posted by Rune Jacobsen at 5/6/2007 12:34:33 AM
Hi all, I think I have just witnessed the strangest thing ever. Sort of. I have a complex solution upgraded from VS 2003 / .Net 1.1 to VS 2005 (Sp1) / .Net 2.0. The solution consists of a few projects; Some GUI apps and a few class libraries. Most stuff works fine, however, I see a very...more >>

Global error handling
Posted by John at 5/6/2007 12:00:00 AM
Hi I have a winform app with try/catch error handling implemented in key areas. Problem is errors can occur in other areas in situations that I may not foresee. Is there a way to implemented a global error handler which takes over if an error occurs that is not caught by other try/catch? ...more >>

Error installing published app
Posted by John at 5/6/2007 12:00:00 AM
Hi When I try to install a published app using a url like http://www.mydomain.com/publish.htm, it starts the download but then comes up with the eror given at the end below. I am installing the app on an sbs 2003 (windows 2003 + ISA 2000) server. I suspect ISA 2000 is the problem but don'...more >>

Email link
Posted by Elmo Watson at 5/5/2007 11:50:48 PM
(I'm using VB.Net 2005) I have a system in my application that, upon receiving an error - it shows a messagebox with all the necessary error information, and sets the same message on the clipboard. I would like to also open a new email window, with my support email address, and a preset er...more >>

What happens when ClickOnce Certificate expire?
Posted by DineshVelupula at 5/5/2007 6:45:30 PM
Published a application at say 06-01-2006 with the ClickOnce deployment. Before that we sign a own test certificate because the application is only used internally. After the 06-01-2007 when the certificate expire. The users will not be able to start the application. What should we do to p...more >>

Can't get ValidateChildren to validate
Posted by Flomo Togba Kwele at 5/5/2007 6:13:34 PM
I have a UserControl with 2 textboxes as its only controls. AutoValidate is set to EnableAllowFocusChange, although I've tried EnablePreventFocusChange and Disable with the same results. The textboxes are not databound. I have also defined an ErrorProvider, which is set in both textbox Validati...more >>

byte conversions
Posted by AVL at 5/5/2007 6:18:00 AM
hi, I've a byte value of 15... i wan to get it's representation a follows 0x01 | 0x02|0x03|0x04 basically i want to know by OR ing which numbers,..am I getting a value of 15... help me out.....more >>

datagridview help
Posted by AVL at 5/5/2007 6:06:00 AM
i've used .net 2.0 datagrid view control/.. i want to show a dropdowm menu whenever i doubleclick a row on my grid.. how do I achieve it...any good samples...more >>

Need xml help
Posted by AVL at 5/5/2007 6:03:01 AM
I'm a newbie to xml concepts.. my requirement is to read a very big xml file and pick up few slected nodes and build List array out of it..... how to I acheive it with minimal coding? which xml class supports this.. any good samples? please help out...more >>

Adding a function call to an event dynamically
Posted by Vince Panuccio at 5/5/2007 3:50:19 AM
Hello I know how to loop through all the controls on a form, but what id like to do as Im looping is (depending on the control), add a function i've written to an event of that control. For example, If during the loop I encounter a textbox control, how would I add my foobar() function call ...more >>

Different window size between framework 2.0 and 3.0
Posted by Massimo at 5/4/2007 9:26:18 PM
I have an application where the main window's size is defined at runtime, based on an image which is displayed inside it. The application contains a (subclass of) PictureBox which displays the image; the size of the PictureBox is set to the image's size; the PictureBox is then placed inside...more >>

active cell the current row selected ?
Posted by zw at 5/4/2007 5:10:15 PM
Hi Is there a sample code which shows that when an active cell in a datagrid is selected, that row of a record is selected by the datagrid ? Thanks ...more >>

Save listview items/subitems to application settings
Posted by deciacco at 5/4/2007 12:23:21 PM
Ok...I know how to use the built-in application settings in .net 2, but i'm not sure how to save the contents of a listview. I can put the contents of the listview in a dataset and then use the dataset methods to save to xml, but I want to be able to save to the application settings. How do...more >>

SendMessage - using for forms
Posted by SushiSean at 5/4/2007 11:07:02 AM
I Have a question. I use C# to send messages for other wondows. In my example it is windows notepad.exe So after I found handle of this window I can send WM_CHAR event. But I need help with other two types of events. How can I send 1) Some system key like "F5" ? 2) some combination of them? ...more >>

serialization
Posted by AVL at 5/4/2007 7:02:03 AM
Hi, I'm new serialization concepts....I need some hwlp.. I've a class defined as follows class CustomSerialization1 { private string s; public string Test { get { return s; } set { s = value; } } private int i; ...more >>

How to ask current form to wait for user input
Posted by Emma Middlebrook at 5/4/2007 3:14:08 AM
Hi, I have a form that executes a task in a separate thread, however sometimes it's necessary to get some more information from the user when the thread is executing. If this is the case, the form grows to show a new section of the dialog where the edit controls are displayed. I've program...more >>

CheckBoxList query
Posted by AVL at 5/3/2007 11:24:01 PM
Hi, I've used a checkboxlist control on my windows form.. I've added few obejcts to it dynamically.. now I want to retrieve all unchecked items from this list....how do i it// please help me out......more >>

File busy after sent via email
Posted by John at 5/3/2007 9:14:07 PM
Hi I am emailing a text file as attachment via the below code. The problem is that after the file has been emailed, it becomes locked and can not be accessed by further code such as IO.File.AppendAllText(FileName, Content) which gives the error 'file is in use by another process' or somethi...more >>

Listing properties of an object
Posted by John at 5/3/2007 5:08:09 PM
Hi Is there an easy or a built-in way to collect all properties of an object into a string variable for debugging purpose? I am looking for something similar to this; "Property1: Property1value Property2: Property2value Property3: Property3value ..... Propertyn: Propertynvalue" Than...more >>

Save listview to file
Posted by deciacco at 5/3/2007 3:16:34 PM
I need some ideas on saving the contents of a listview to a file. C# 2 VS2k5. Thanks. ...more >>

Best time to force a paint
Posted by Jeff at 5/3/2007 1:43:36 PM
I have some controls (panels) that I have performed some custom painting on. I find however that when I drag some other window (like say an copy of notepad) over and across my application that the paint disappears. I can repaint manually, but I need to know when to do it. I tried the various ...more >>

How to delete the * row in Datagrid
Posted by zw at 5/3/2007 11:47:49 AM
Hi When displaying the grid with rows, I have an extra empty row with * on the leftmost grid. How do I remove it from display or should I remove it from the dataset ? Any help is appreciated. ...more >>

SnapLines not honored during resize.
Posted by ravi.s.desai NO[at]SPAM gmail.com at 5/3/2007 9:06:35 AM
I have a custom control that contains a textbox. It has two properties, Name (string), and UoM (string). The name should show on the control before the textbox, and the UoM should show on the control after the textbox. The usercontrol sets its MinimumSize based on a fixed minimum size of the ...more >>

disable the highlighted background of selected treenode
Posted by J.Matthews at 5/3/2007 8:56:01 AM
Hi, Does anyone know how to disable the highlighed background of a treenode's label when it is selected. I need to be able to select the node but I don't want to see the highlight (default colour gray) Thanks in advance JM...more >>

having trouble with drag-n-drop of multiple items
Posted by Dan Morrow at 5/3/2007 6:59:22 AM
I'm having trouble handling drag-n-drop of rows from a DataGridView. The SelectionMode is FullRowSelect, so when I click, the whole row gets selected, not just cells. What I'd like to do is select rows 1, 3 and 5 (by control-clicking) and then click one more time, and drag all three rows. ...more >>

Setting required framework version
Posted by QDL at 5/3/2007 12:00:00 AM
Hello everyone, I'm experimenting running side by side fw versions on a test box. One thing i do not understand is how it is determined the version to use when running an app. I wrote a very small proggy that just displays the version of the framework it is run by. If i use vs2003 (with fw1...more >>

Getting info from excel.
Posted by Falcon at 5/2/2007 11:46:39 PM
I'm displaying an Excel spreadsheet using a data gird control in a winform using oleDB objects and so far Data is displaying correctly. I'm having difficulties getting cell style information for each cell in the xls file (Excel spreadsheet) . Does anyone have an idea how to pull that infor...more >>

Cannot sort DataGridView bound to array
Posted by StanB at 5/2/2007 2:56:57 PM
Should DataGridView sort work if the datasource is an array? It works fine out of the box if bound to DataSet... ...more >>

DataTable.Merge()
Posted by mj2736 NO[at]SPAM yahoo.com at 5/2/2007 12:46:00 PM
I'm a little confused about DataTable.Merge(). I have two DataTable objects with the same structure - dtOrig and dtCurrent. The end result I'm trying to achieve is to get all the rows in dtCurrent that are in some way different from the corresponding rows in dtOrig so those new/ modified/deleted...more >>

reading a mdb file in c#
Posted by AVL at 5/2/2007 7:44:02 AM
I want to access a table from a mdb file in my form... how do i it?...more >>

CheckboxList query
Posted by AVL at 5/2/2007 7:42:04 AM
I've used a checkboxlist control on my form.. i'm populating values dynamically at runtime to this list.. but when i do it, the checkboxes so added are remaining unchecked... but I want a newly added item to be checked by default... how do i do it? any good samples......more >>

How can I reference a parent objects properties?
Posted by moongirl at 5/2/2007 5:29:43 AM
I have an object called Company, and this contains 3 public properties which are all of type BindingList<Issue> where Issue is another class of mine. Each issue needs to have a unique reference number which should be automatically incremented when a new issue is added to a binding list. The list...more >>

Relection question
Posted by fj at 5/1/2007 4:57:58 PM
I am wondering if anyone has this same problem and what's the solution. I am assigning values to an object, for example, ObjEntityPerson.Edit[0].Item.KeyValue = "12345"; However, the Edit[] might be null, Edit[0] and Item might be null. Eventually I end up with check each object, if null t...more >>

Refresh only the CurrentRow of a DataGridView?
Posted by Barry Gilbert at 5/1/2007 2:33:01 PM
I have a DGV that is read only. When selecting a row, the item is edited in individual controls elsewhere on the form, also bound to the same bindingsource. The default behavior is that when the value is changed in a textbox, it only repaints the value in the DGV cell after the textbox commits...more >>

Binding User Settings to Controls
Posted by Bob Costello at 5/1/2007 1:45:00 PM
I made a User control that contains several check boxes and text boxes. I then added properties to the user control to contain the values in these controls. Finally, I bound these properties to user scope settings created with the Settings Designer. At program start-up, everything looks fine. ...more >>

ListBox.DataSource clears exisiting items
Posted by Mahesh Nimbalkar at 5/1/2007 10:27:02 AM
Hi, When I bind data source to ListBox.DataSource, it clears (deletes) existing items in the ListBox. I want to preserve existing items when I set ListBox.DataSource. Thanks, Mahesh ...more >>

SMO Disconnect
Posted by Luc at 5/1/2007 8:35:02 AM
How can I disconnect from the selected server and connect to another server during runtime, I'm always receive the following error message Connection properties cannot be changed after a connection has been established. This is vb code I'm using Private Sub testCONNECTION() ...more >>

How can I draw dynamic diagram with gdi+
Posted by Yasin Cepeci at 5/1/2007 12:07:22 AM
I want to draw a live diagram. I have to draw sine(sinus) like diagrams that changes by time. It slides every second a pixel left to right. I made it with setpixel() and arrays but it requires more and more memory. Is there any easy way to draw it Thanks a lot ;:) ...more >>


DevelopmentNow Blog