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
all groups > c# > april 2006 > threads for thursday april 6

Filter by Day: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30

datagridview - DataPropertyName
Posted by WayDownUnder at 4/6/2006 11:44:02 PM
I have a datagridview that is bound to a cutom collection. The classes contained in the custom collection have the properties that are bound to the class . This works fine ! But if one of the properites exposes another object I would like to bind a property of the sub object to the DataPropert...more >>


specifying where to look for assembly when executing BinaryFormatter.Deserialize
Posted by Ryan.Mohammed NO[at]SPAM gmail.com at 4/6/2006 7:05:11 PM
I have a problem where the code that serializes and deserializes an object is actually not the start application but loaded by reflection and located in a subdirectory of the start application. Example \ Start.exe Platforms\Sub\Running.dll Running.dll serializes an object that is define...more >>

Help with .Contains
Posted by Kendall at 4/6/2006 6:50:27 PM
Hi, My form is - a listbox which contains 5 items, a textbox and a button. ListBox - subjectListBox TextBox - subjectTextBox When the button is clicked, I want the 5 items in the listbox to be compared to the text in the textbox (note: items in listbox are single words - text in textbo...more >>

attributes in C#
Posted by vivekian at 4/6/2006 6:21:08 PM
Hi , I am moving on from C++ to C# . Though have understood how attributes work , still dont understand what need do the fullfil ? Where should they be used ? What are their advantages ? some sort of example might help . thanks in advance. ...more >>

Need to reliably detect a text file's encoding for XML deserialization
Posted by Marc Scheuner at 4/6/2006 6:10:21 PM
Folks, I have a text file which contains some XML. In its XML header, it claims to be of UTF-8 encoding - however, it's really not, it's a ANSI / Windows-1252 / ISO-8859-1 encoding. Trouble is: when I deserialize objects from that file, all the German umlauts and other special characters ...more >>

Adding 'object' to Treeview?
Posted by Ed Minrights at 4/6/2006 5:31:06 PM
I have a bunch of related classes that I want to add into a Treeview with a hierarchy. However, Treeview doesn't support the insertion of the root 'object' type into the nodes, which surprises me. I just wanted to add them in and have the mouse events fire back with the reference to the object...more >>

Problem with generics replacing hashtable
Posted by WT at 4/6/2006 4:59:53 PM
Hello, I was using hastable to store collection of objects of the same class MyClass. I start replacing this hastable by a Dictionary<string,MyClass>....but I was storing this hastable in cache an accessing it from another component in an Provider. This component was developped in a separa...more >>

Can't edit property in IDE
Posted by Steve Barnett at 4/6/2006 4:35:29 PM
I have a field in a user control which is a structure. The structure has three fields, an integer a string and a Boolean. When I put my user control on a form, the property that references the structure is greyed out, so I can't set any of the fields of the structure. Is there something I s...more >>



Adding Local Users to Local Groups
Posted by enilno at 4/6/2006 4:35:21 PM
I'm working on a C# app., and I need to programmatically add a local user to a local group on the computer on which the app. is running. When end-users run this app., they will be logged on as local Administrator (so they should have sufficient permissions). Would any one out there know how t...more >>

Bitmap/Image data type
Posted by Michael C at 4/6/2006 4:32:55 PM
It seems that no matter how I load a bitmap into memory it remains attached to whatever I used to create it. If I obtained the bitmap from a file the file stays locked or if it came from a stream I can't close the stream. I don't see why it is doing this when it loads the full image into memor...more >>

How to Package and Deploy Windows Installer 3.0
Posted by John at 4/6/2006 4:22:41 PM
I have made setup project (VS 2005) that includes setup of my app and Framework 2.0 How can I check if there is installed Windows Installer 3.1 and if not to install it? I know that I have to add launch condition, but don't know what to type in properties. Thanks ...more >>

strange console output question
Posted by djc at 4/6/2006 3:31:31 PM
is this possible: lets say my output has 2 columns with headings like 'host' and 'status'. host status ------------ host1 down host2 up host3 up host4 down when the status of a host changes I want to update the display and have it appear that only that hosts status cha...more >>

Converting to grayscale
Posted by Sirin Azazi at 4/6/2006 3:14:59 PM
i am trying to convert an image into grayscale format. but i have a problem saving the bmp file after the process.here the code; for (int y = 0; y < Height; y++) { for (int x = 0; x < Width; x++) { Color c = img1.GetPixel(x, y); ...more >>

How to detect if a printer is connected in C#?
Posted by ZS at 4/6/2006 3:12:02 PM
Hi, in c# how can one detect if a printer is connected to the computer or not. Thanks in advance -zs...more >>

Random -- impacted by the computer?
Posted by Mark at 4/6/2006 2:39:30 PM
Is the code below impacted by the computer that it is executed on, or would one expect two computers that use the same seed to generate the same numbers? For example, I executed the code below on two different computers and got the same set of numbers on both machines repeatedly. Coments? ...more >>

Free disk space and total disk space
Posted by UJ at 4/6/2006 2:31:37 PM
How can I find out the free disk space and the total disk space for a drive? TIA - Jeff. ...more >>

Component class and Custom control
Posted by tony at 4/6/2006 2:25:27 PM
Hello!! When you add an item you can select to add a component class or Custom control or several other. I know what a Custom control is but what is a component class? Is it more or less the same as a custom control? //Tony ...more >>

REGEX help
Posted by pfeifest at 4/6/2006 1:55:20 PM
Hello- How would I validate the following statement in a REGEX validation? Thanks- pfeifest *********************** a 7-digit number starting with an 8 or an 8-digit number starting with a 5 *********************** ...more >>

FileDrop - Files Only, No Folders
Posted by Joe Reggae at 4/6/2006 1:51:01 PM
I have a routine that fills a listbox with file and folder names dragged in from Windows Explorer. I'd like to limit the listbox entries to file names. Can someone advise me on how to distinguish between a file and folder so I can block folder names? I'm building an array in the listbox DragDr...more >>

State of MdiClient
Posted by MuZZy at 4/6/2006 1:47:19 PM
Hi, I'm developing an MDI application and i am having a problem: how do i know the state of MdiClient; what i mean is: when i maximize a MDI child, then close it and then open a new MDI child, it will open maximized, then if i change it's state to Normal and close, then next opened MDI ch...more >>

many new instances
Posted by Martijn Mulder at 4/6/2006 1:10:58 PM
I do some hefty computing in the inner loop of a graphics application. In Java I used the new operator a lot since, as many authors assured me, the Java run-time would implement that very efficient with inline code that required little overhead. Does the JIT-compiler optimize my code accord...more >>

blob
Posted by Hrvoje Voda at 4/6/2006 12:45:59 PM
I'm using this code to get blob from sql server, but I get an error "Parameter is invalid." SqlDataReader sqlRead = null; Image profile; db.sqlConnection.Open(); System.Data.SqlClient.SqlCommand ProfileBLOBSelect = new System.Data.SqlClient.SqlCommand(); ProfileBLOBSelect.Comman...more >>

How To Casting/Convert Color
Posted by MikeY at 4/6/2006 12:22:17 PM
Hi Everyone, Is there a way (syntax) for converting/casting color so I can find the System.Byte of my chosen color with in my button? I have buttons colored ie "Color.Olive" and up to now I change the color into another color. But what I want to do at run time is to find the existing col...more >>

GetType() from a static class
Posted by sklett at 4/6/2006 12:20:00 PM
I'm moving some functions that are littered in various inappropriate classes into a single, static utility class. I ran into a problem with this line: <code> Assembly thisAssembly = Assembly.GetAssembly(this.GetType()); </code> Looks like I don't have access to the 'this' reference (duh),...more >>

Get Byte Count For Folder And Subfolders
Posted by joey.powell NO[at]SPAM topscene.com at 4/6/2006 12:10:47 PM
I am working on a windows forms app where I need to do copies. I also need to show a progress bar. In order to be able to set the Maximum property for the progress bar and then update it during the copy, I must determine the total byte count for the folder and subfolders that the user has select...more >>

WebBrowser questions!
Posted by Jose Chavez at 4/6/2006 12:08:05 PM
How Do I to get the focus on one of the frames of a webpage, after the webpage completed ? How I supposed to read some tags inside the html ? thanks for your help... ...more >>

how to sign interop?
Posted by Tanja Krammer at 4/6/2006 12:04:36 PM
Dear all, when I add a COM object to a project an Interop is generated automatically. This Com object is created in other project, so when I rebild solution it is regenerated and readded. How can I sign this interop automatically? Without redoing manually tlbimp? Thanks a lot, ...more >>

ToolStripTextBox focus problem
Posted by osmarjunior at 4/6/2006 11:20:23 AM
I cannot set focus on a ToolStripTextBox of my tool bar. I've tried the following: myToolBar.Select(); myTextBox.Focus(); The edit cursor doesn't appear on the text box... strange!!!... Junior... ...more >>

Trouble converting smallmoney to decimal
Posted by Aaron Prohaska at 4/6/2006 10:58:52 AM
Good morning everyone, I'm having problems when I convert the SQL Server datatype smallmoney to the .net datatype decimal. I am doing this to pass a dollor amount to the Verisign payment gateway. Verisign requires that the amount passed in is in the format ###.##, so if I have 250.50 its pa...more >>

Using foreach
Posted by tony at 4/6/2006 10:49:40 AM
Hello I use foreach when I have a container of some kind for example an array or ArrayList. But in this case is it really possible to use foreach. In case it is how would I write it. for( int i = 0; i < dSMspComposition.Tables[0].Rows.Count; i++ ) compositionList.Add(dSMspCompositi...more >>

Help with XmlNode - HasChildNodes always returns true even no immediate child exists
Posted by RJN at 4/6/2006 10:44:52 AM
Hi I have to read an xml and add the node elements into a hashtable with nodename as key and nodetext as value. If the selected node has childnodes, then value should go as an array. for eg., <Root> <mysection> <logroot>e:\temp</logroot> <outputdir> <dir1>e:\temp1</dir1><...more >>

Object data source + HastTable
Posted by Jarod at 4/6/2006 10:38:54 AM
Hey I have List<myObjects> and each myObject has property with HashTable. And I want to bind it to GridView. Each item in HastTable is a column in gridView but it will change in time so this one it will have 5 columns, next 3 , next 7. So I need to automatically create columns in gridView dep...more >>

Performance tuning a WinForm app
Posted by Frank Rizzo at 4/6/2006 10:35:56 AM
I am looking for some pointers on how to tune a pretty large WinForm app (written in vs2005). Currently it is pretty sluggish on a 2.8 Ghz P4 with plenty of RAM. The forms have a lot of controls (but they are well hidden in tabs), however the redrawing of controls (even simple ones like a ...more >>

Need databinding help
Posted by Michael Rodriguez at 4/6/2006 10:10:03 AM
Does anyone know how I can bind to the Enabled property of a toolstrip button? That class doesn't seem to expose the DataBindings property... TIA, Mike Rodriguez ...more >>

Killing my web service
Posted by Eric at 4/6/2006 9:52:30 AM
Hello, I've written a c# web service that functions as a test harness. It mimics the user interface of a client's web service. I would like to make it die based on being passed in a certain parameter, so that I can simulate a timeout. The actual time out is configurable in the application ...more >>

How to put myself as publisher on C# code in VS 03 (to use with trust assembly)
Posted by Mads Westen at 4/6/2006 9:38:44 AM
Hi, I'm coding some small applications, that will run from a networkdrive. To make the applications run from network drive, I need to trust every one of them. I use the .net Wizard, to give the applications full trust, then they run. I can see, there's an oppertunity to trust all assemblys...more >>

Trouble with Forms.WebBrowser
Posted by Tomaz Canabrava at 4/6/2006 9:18:02 AM
kay, here it`s my problem. i have a TreeView and a WebBroswer, when i choose something on the treeview, the program generates an html, and it is showed on the webbroswer, but the html has links to other classes that are displayed on the treeview. How can i "cath" the link clicked event to cho...more >>

I good book about C#
Posted by tony at 4/6/2006 9:15:33 AM
Hello! I have earlier worked with C++ programming on server for quite a long time and now I have worked with C# in 4 month. Can you recomment any good book. The book should not be too basic because I now object programming. //Tony ...more >>

application to read website code
Posted by phil2phil at 4/6/2006 8:50:58 AM
Hi, I wanted to know if there is any example or library that I could look at to help me write an application that could read the html code from a website. We currently have a site that display data like <div class="reportproduct"> <div class="timeofreport">11:25 AM</div> <div class="informati...more >>

DataSet.WriteXML doesn't close the file?
Posted by UJ at 4/6/2006 6:46:10 AM
It appears when you do a DataSet.WriteXml ( <filename>, <writemode> ) it doesn't close the file immediately. Is that true ? The reason I think that is I have two programs that are going to be access the same XML file and when one writes to it the other can't seem to read it. I've also tr...more >>

Off Topic: Advice on designing reliable applications
Posted by derrick.signup NO[at]SPAM gmail.com at 4/6/2006 6:02:27 AM
Hello all; I apologize for being slightly off topic, but I have great respect for the knowledge in this group. I am about to begin developing a .NET application where reliability (i.e., uptime/availability) is important. It is going to be a distributed Windows app, which will be controllin...more >>

IE Automation - Print to non default printer using
Posted by Marc Rowe at 4/6/2006 5:43:02 AM
Hello, I have a client who needs to print HTML Files using IE - i have the automation completed, but cannot find anywhere how to print to a printer that is not the default printer - the HTML files they need to print go to specific printers depending on what they are - so this is a necessity ...more >>

Multiple derivations from UserControl
Posted by steve.kaye at 4/6/2006 4:05:43 AM
I am writing a number of controls which use inheritance and I have a problem that I do not know how to solve. It's best if I describe the class structure I want. Grid - derives from UserControl and contains most of the functionality required of a basic grid. ViewGrid, EditGrid and TreeGrid...more >>

Pass parameter/set property using reflection
Posted by poppy at 4/6/2006 3:25:02 AM
I am using reflection to open a form in an assembly. The form contains a picture box. What I want to do is not just open the form usinf reflection but pass an image location/filename to the form to display. Can anyone point me in the right direction? Thanks in Advance...more >>

Add an object to the Running Object Table (ROT)
Posted by theinvisibleGhost at 4/6/2006 2:50:26 AM
Is it possible to add an object to the Running Object Table in .NET? Cheers Chris. ...more >>

Toolstrip item casting problem
Posted by poppy at 4/6/2006 1:27:01 AM
I am having trouble creating a menu item. The Code I have: private void NewLoad(object sender, System.EventArgs e) { //error here ToolStripItem mn = (ToolStripItem)sender; } The error I get is : "Unable to cast object of type 'System.Windows.Forms.ContextMenuStrip' to type ...more >>

Wizard SideBar
Posted by Steven Blair at 4/6/2006 1:25:39 AM
I am using a Wizard component in ASP.NET and would like the SideBar to be visible, but I don't want the user to be able to click the links. However I still need the current step to be highlighted. Is this possible? *** Sent via Developersdex http://www.developersdex.com ***...more >>


DevelopmentNow Blog