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# > february 2006 > threads for tuesday february 14

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

Retrieve private fields
Posted by David Dvali at 2/14/2006 11:58:55 PM
Hello. How can I retrieve private fields from instance of my class with GetFields method? Thank you. ...more >>


mapping printers?
Posted by cykill at 2/14/2006 10:43:57 PM
Hi, I'm new to c#. Is it possible to map network printers with it? and change devmode? Thanks....more >>

Properties.Settings: Where are they saved?
Posted by suranga.suranga NO[at]SPAM gmail.com at 2/14/2006 9:59:52 PM
VS2005/NET 2.0 provides easy way to manage configuration files using "appNamespace.Properties.Settings.Default" class. It seems initial values entered at design time through VS2005's property are saved in appname.exe.config file. These values can be changed and saved by the application at runt...more >>

Connecting Crystal Reports to DB2
Posted by Peter at 2/14/2006 9:16:42 PM
C# .NET 2.0 - Crystal Reports XI I am trying to connect Crystal Report to DB2 database from my C# application. After I run the connection info code and try to export the report I get {"Database logon failed."} System.Exception {CrystalDecisions.CrystalReports.Engine.LogOnException} ...more >>

load arrayList into ListBox.ObjectCollection
Posted by andrewcw at 2/14/2006 6:05:27 PM
This is wrong but it seems I might be on track somewhat close: I want to display my ArrayList of Random numbers in the list box. Below you see this as aLRandoms. There seems to be a provision to load a range : listBox1.Items.AddRange(lboxObjCol); so I try to load the lboxObjCol as shown: S...more >>

CSharp inside an ActiveX dll within IE
Posted by Jim Mcduggan at 2/14/2006 5:57:52 PM
Can this be done? Also if anyone in Seattle would like to moonlight for a small project on this let me? -Jim jd at qiot.com ...more >>

Custom Object Structure
Posted by a at 2/14/2006 5:31:32 PM
I'm trying to save data from a custom object into the profile object, but it is not structured the way that I want. I'm trying to get the custom object to serialize as xml to a Profile object like so: <Teachers> <Teacher> <Classes> <Class> <Students...more >>

How to make sure that data displayed on a form is the newest data?
Posted by Dino Buljubasic at 2/14/2006 4:31:51 PM
Hi, I am using VS2005 (C#) and SQL Server 2000. How can I make sure that: 1. Client A queries info from database and displays it in a list view or other controls on a form. If Client B changes some of this info that is displayed by client A, clint A gets its info updated 2. If clint B...more >>



Datagrid sorting by date?
Posted by Brett Romero at 2/14/2006 4:28:58 PM
Is there a way to properly sort by date (not string) in a datagrid? The date is shoved into a DataGridTextBoxColumn type, which seems to be the only alternative. Then is sorts by string instead of date. Thanks, Brett ...more >>

block-comment position?
Posted by David Veeneman at 2/14/2006 4:11:29 PM
In VS.NET 1.1, when I commented-out a block of code, VS.NET put the comment slashes on the left margin, rather than next to the code. This made it very easy to identify blocks of code that I had commented out. VS.NET 2.0 puts the slashes next to the code, which I find far less convenient. B...more >>

XLT to XLS
Posted by jamesbond at 2/14/2006 3:41:25 PM
I have a web application in .Net 2.0. It generates. I have a web for where user enters data and I need to generate an excel sheet from that and send that as an emil to certain email addresses. I have no clue how to create a new excelsheet from a template. If someone has a code sample that would...more >>

DataGridView
Posted by wayne.b NO[at]SPAM freeguestforum.com at 2/14/2006 3:38:27 PM
Hi, I have a datagrid in my windows application, where data of a MS SQL Server should be displayed. I did this and it works fine. Now I have the problem of changing the format for displaying the date which is stored in the database. The format in the database looks like this: yyyy-mm-dd hh...more >>

What tool generates Settings.Designer.cs?
Posted by Frank Rizzo at 2/14/2006 3:23:28 PM
Hello, I am trying to automate deployment of the same project to several servers in one shot (e.g. dev, qa, etc...). Depending on the server, the app should access a different web service. The web service seems to be defined in the Settings.Designer.cs (which is a generated file). I am wo...more >>

Stoopid newbie post
Posted by JamesB at 2/14/2006 3:09:04 PM
Hi all, I'm used to VB.net (in VS2003) but just starting out with C#. I have a silly problem, I can't access the properties and methods of controls to add code. In a VB Project, I could double-click on (for example) a button and it would add a bit of code for the click event, but if I did...more >>

How to avoid circular references
Posted by tomb at 2/14/2006 3:02:30 PM
VS2005. It's possible to avoid circular references like in C++? ...more >>

SWF as embedded resource and .NET
Posted by photochop NO[at]SPAM comcast.net at 2/14/2006 2:20:19 PM
I know the question of whether or not a SWF file can be read in by a ..NET application has been asked a billion times, however, what I'm asking is whether or not it is possible (any examples? tutorials? Flash Object COM readme?) to embed a SWF file into your VS.NET project as a resource, and the...more >>

How convert Excel data into DataSet/DataTable?
Posted by Ronald S. Cook at 2/14/2006 2:08:26 PM
Hi, I need to open an Excel file from within my ASP.NET app and read data. I'm guessing the most like format in ASP.NET would be a DataTable. Regardles,, how do I get the data into my ASP.NET app from the Excel file? I have made a reference to the Excel 11.0 object library, but am not sur...more >>

Generics and Reflection
Posted by uttara at 2/14/2006 2:02:58 PM
I have a generic collection which I am using in classes to store a collection of embedded objects. Class Employee: IEntity { Private string mName; Private int mEmployeeID; …. Private GenericCollection<Address> mAddresses; //property Public GenericCollection<Address> Addresses {...more >>

Using a javascript alert box
Posted by Dave at 2/14/2006 1:47:40 PM
I am beginning to write some C# pages to an app I created with VB.Net. There is one VB routine I use frequently - a javascript alert box. I have created a C# version, but it does not handle newlines. I get an "unterminated string constant" error message. Googling this problem gives some h...more >>

varying executable name based on conditional compilation
Posted by lavu at 2/14/2006 1:30:15 PM
Is there any way to specify a different executable name for my project based on value that I have set in my conditional compilation constant. For eg: If I have FIRST specified in my conditional compilation constant then I would like the executable to be XYZ.exe and if nothing is specified then ...more >>

invoking method from dataGridView1_CellClick with passthru to CellDoubleClick
Posted by hazz at 2/14/2006 1:10:50 PM
how do I call a method from CellClick if a user performs a single click on a datagridview row and the same time allowing a double click event to be passed onto CellDoubleClick if the user performs a double click action? As it is now, the CellClick traps the single click event but does not all...more >>

Getting only datagrid results?
Posted by Brett Romero at 2/14/2006 12:59:47 PM
I've created a custom datagrid and would like to get only entries displaying in the grid. The datasource may be a table or dataview. So I check for this in the custom datagrid class: if (this.DataSource.GetType().FullName.Equals("System.Data.DataTable")) dt = (DataTable)this.DataSource; ...more >>

running DTS package from windows form using C#
Posted by juventusaurabh at 2/14/2006 11:20:07 AM
Hi, Has anyone managed executing a DTS package in SQL Server 2000 from a windows form created using c#? Also, I specify the path of the new file everytime through this windows form. Please HELP! I've see examples of windows console based execution, but nothing from a windows form. ...more >>

thousands/millions of objects
Posted by DKode at 2/14/2006 11:13:54 AM
I am re-creating an application that is outdated and originally created in C++ This app, reads values in, creates objects for each line and populates fields, then runs some conditions on the data setting various flags, then outputs it all to a dbf (foxpro) database. I want to keep the struc...more >>

msbuild whackiness
Posted by Frank Rizzo at 2/14/2006 10:28:44 AM
Hello, I am trying to use msbuild to try and automate the building process. It does compile fine, but I get the following warning: CSC : warning CS1668: Invalid search path 'C:\Program Files\Microsoft Visual Studio .NET 2003\VC7\ATLMFC\LIB' specified in 'LIB environment variable' -- 'The s...more >>

Problem Downloading PDF with HTTPWebRequesst
Posted by GJK at 2/14/2006 10:07:29 AM
Hello, I am trying to download a pdf file using HTTPWebRequest class and then save the downloaded pdf to a SQL Server 2005 database image column and then display the pdf on a web app. When I try to display the PDF, Adobe reader comes up and shows an error msg "an uncrecognized token aID was fou...more >>

events and object lifetime
Posted by anonymous.user0 NO[at]SPAM gmail.com at 2/14/2006 10:05:52 AM
The way I understand it, if I have an object Listener that has registered as a listener for some event Event that's produced by an object Emitter, as long as Emitter is still allocated Listener will stay alive. Is this correct? If this is correct, I've got a problem. Let's say I've got an obje...more >>

asp.net radio buttons
Posted by hal at 2/14/2006 9:29:02 AM
hello, can someone point me to an example or show me how to grey out or hide a text box when a certain radio button is selected? i've searched and read through the internet for a couple of hours and couldn't find an example of how to do this. Below is the code for my radio button and text box...more >>

reading a pst with C#
Posted by Bob Weiner at 2/14/2006 9:16:58 AM
Not sure where I should be posting this question but... I want to loop through all the messages in a pst file and forward them to another address. My purpose is first to test a spam filtering solution, then to train a baysian filter. I would like to use C# but am finding that .net/mapi don'...more >>

Problem with Marshal class in Visual Studio 2005
Posted by william.thorpe.b NO[at]SPAM bayer.com at 2/14/2006 9:11:35 AM
I have recently switched from VS2003 to VS2005 and at the same time from V1 to V2 of the .NET Compact Framework. The target is a Windows CE 5.0 device and an ARMV4I processor. System.Runtime.InteropServices.Marshal.WriteInt32 used to work fine but now is misbehaving. I wrote some native-co...more >>

Calling BackgroundWorker synchronous
Posted by Pro1712 at 2/14/2006 8:32:05 AM
Hi, this may be a stupid question: How can I can call the DoWork-function of a BackgroundWorker synchronous? Or in other words: How can I extend the BackgroundWorker class with a function RunWorkerSync()? I want to write a class that I can call functions synchronous and asynchronous. ...more >>

Static variables thead safe?
Posted by Macca at 2/14/2006 8:30:03 AM
Hi, Are static variables thread safe? I have a static byte array. This will be accessed from more than one thread. Is it automatically thread safe by being static rather than an instance or do i need to write code to make it thread safe? Cheers Macca...more >>

Display Publish Version
Posted by Mike L at 2/14/2006 8:28:17 AM
I want frmMain.text to show the current publish version. What is the code to get the current publish version? For example. frmMain.text = "My Application Version: " & project.publish.version But I don't know how to call the project.publish.version numbers. ...more >>

Comparing dates
Posted by Simon Harvey at 2/14/2006 8:16:33 AM
Hi everyone, I need to be able to compare to dates to ensure that one is at least 1 day greater than the other. Im trying to do if(toDate !> fromDate){ // handle } This works but the problem is its comparing the datetime down to the minute and second. I need to be accurate only ...more >>

OO: Who am I in the hierarchy?
Posted by Bill Gregg at 2/14/2006 8:14:32 AM
I have an abstract class that is a windows form called "BaseList" that contains a grid control. This grid control is then populated by any concrete class that inherits from BaseList. I have a class SpecificList class that is a kind of BaseList (class SpecificList:BaseList). When a user intera...more >>

How to set file extension?
Posted by Brett Romero at 2/14/2006 8:13:53 AM
I'm trying to associate a file extension to a program I've created. I have browsed for the program in Windows Explorer | Tools | Options and set it there. However, Windows always keeps Notepad as the program that should open this file. I'd did the exact same steps a few days ago and the pro...more >>

Add shortcut on desktop for Published application
Posted by Mike L at 2/14/2006 7:49:29 AM
How do I set the publish wizard to add a shortcut to the client's desktop?...more >>

Editor behaving strangly
Posted by Sanjay at 2/14/2006 7:26:30 AM
I have been updating my windows application written in C#. I have added several region statements to organize my code. The forms inherit from other forms. The application runs fine. I am having problems with editing the forms and adding new code. If I double click on a new event it adds the e...more >>

Using the # sign
Posted by Mike at 2/14/2006 7:21:43 AM
Hello, I have an enum that uses the # sign in a Constant and I'm getting syntax errors. How do I excape this in my code. enum Notes { A, A#, B, C, C#, D, D#, E, F, F#, G, G# } Thanks Mike ...more >>

Building and executing SQL Query dynamically, best practices
Posted by WebMatrix at 2/14/2006 6:50:27 AM
Hello, I am developing ASP.NET 1.1 application against SQL Server 2000 db, where users have ability to construct their own select criteria (for a where clause). I already developed a user control where user can select field name, operator (equals, like, begins with, etc) and value of the se...more >>

open a password protected Zip file in C# code.
Posted by connoisseur.infotech NO[at]SPAM gmail.com at 2/14/2006 6:48:34 AM
hello we are developing one tool where we need to open and make password protected zip files. we found some solutions but they don't support password protected things. does any one knows about this or any aproach for this. We need to open password procted zip file and then again recr...more >>

PROBLEM WITH THREADS - WIN 2003
Posted by Mr at 2/14/2006 6:30:31 AM
Hi We have a application with Framework 1.1 and Vs .NET 2003. the application has a service with pooling; like a File system Watcher, but works. the system works fine in the development enviroment with a performance very good; but production not. ------------------------------------------...more >>

Generic type implementers, class and interface versions not compatible
Posted by HC at 2/14/2006 5:53:19 AM
I've stripped down my code to barebones to demonstrate (below). I have interfaces and classes which implement them. I force my generic collection to accept only the interface type. If I create an instance of the generic class using the class implemention of the interface I find it can't be con...more >>

Get Mac address
Posted by adenyer NO[at]SPAM awtxglobal.com at 2/14/2006 5:35:08 AM
Hi I need to get a unique identifier to a machine, I chose to use a MAC address. The problem I am having is that the methods I have found on the internet and through Google groups aren't sufficient for what I require. Option 1 - using WMI Unfortunately I'm using Framework 1.1 http://grou...more >>

Catch ReleaseComObject exception
Posted by Christian Havel at 2/14/2006 5:30:22 AM
Hi, on shutdown I receive the exception ReleaseComObject. Following the call stack when the exception occures. mscorlib.dll!System.Runtime.InteropServices.Marshal.ReleaseComObject(System.Object o = <Nicht definierter Wert>) + 0x18 Bytes system.management.dll!System.Management.Instrumentati...more >>

type ProcessThread has no constructors defined
Posted by MegaGreg at 2/14/2006 5:21:02 AM
I'm trying to inherit from System.Diagnostics.ProcessThread but I keep getting the same error no matter what I try:The namespace 'CSRSystem' already contains a definition for 'Program' None of these pieces of code work: using System.Diagnostics; namespace CSRSystem { class Program : Proce...more >>

Cannot see source code of referenced binaries
Posted by hahoyer at 2/14/2006 5:14:06 AM
My solution (C#) contains binary references to .NET Framework components. The sources for those components are available. But it seems that these sources are not reachable by DevStudio: I cannot set break points, I cannot browse source code from Class View or Object Browser and I cannot see XML-...more >>

C# && Excel
Posted by Lamis at 2/14/2006 3:51:28 AM
Hi, I just started programming with C# and have big troubles with reading from an excelFile.... plz, could anyone help med with the code -- LZ...more >>

Exact (X, Y) position of a file on the desktop
Posted by Henrik at 2/14/2006 2:00:54 AM
Anybody know how to get the exact (X, Y) position of a file on the desktop? ...more >>

how to get selected row after sorting a DataViewGrid ???
Posted by (cmrchs NO[at]SPAM yahoo.com) at 2/14/2006 1:28:05 AM
Hi, I have a DataViewgrid that is filled with records sorted on a column 'Date'.When double-clicking on a row do I view the selected row in another window. So far so good But when I sort the DataViewgrid on another column and dbl-click again do I get a different row than the one selected ??? ...more >>

Why can't access this site with WebReqest?
Posted by Sin Jeong-hun at 2/14/2006 1:11:43 AM
If you type directly this address http://www.parkoz.com/zboard/login_check.php?user_id=xxx&password=xxxx&auto_login=false into your browsers (IE or Opera) and press enter, it shows a page anyway. But in the following code, just throws a time-out exception. I think the server is checking the cli...more >>

File Search
Posted by Dhans at 2/14/2006 1:01:30 AM
Framework version : 1.1 For a given directory (which may have subdirectories), I need to identify the number of text files (*.txt). For this I have tried recursive method to search files, it works fine for the directory which has smaller size, but it takes 2 or 3 minutes to search the direc...more >>

Error in code after converting to VS.NET 2005?
Posted by Asaf at 2/14/2006 12:04:27 AM
Hi, After converting my project from VS.NET 2003 to VS.NET 2005 I am receiving the error: The call is ambiguous between the following methods or properties: 'System.Math.Floor(decimal)' and 'System.Math.Floor(double)' For the line of code: byte upperValue = (byte)Math.Floor(bytes[i]/...more >>

dynamic path
Posted by Ankit Aneja at 2/14/2006 12:00:00 AM
My service is running fine when i give full path like this "E:\c# windows\clamservice\bin\Release\database" but when i tried for dynamic "/database" it compiles well but when i go to Computer Management ->Services and start it ,it gives "The clamservice on local computer started and ...more >>

Performance when using paramterised queries
Posted by Kevin Lawrence at 2/14/2006 12:00:00 AM
Hi all SQL Server 2000 & C# 2005 Currently if I want to execute a batch of INSERT's I will join all the inserts up with ; and then execute them at once in one execution, however I am considering the use of parameterised queries - I'm wondering if there is any major performance issues her...more >>

Windows Service and notyfication icon...
Posted by Jacek Jurkowski at 2/14/2006 12:00:00 AM
I would like to make a notyfication icon showing all the time my service is running ... The problem is that in implementation above requires to check "Allow interact with desktop" in service properys tab to work properly ... Why? How to make my notyfication visible without doing anything manual...more >>

Can't get a my DataGrid to work .. I'm busted or its busted
Posted by bob at 2/14/2006 12:00:00 AM
I cannot seem to display any info with my Data Grid ... the online examples I have seen 'appear' to say the same thing. create a DataTable then simply call something like this myDataGrid.Source = myDataTable. I'm missing something fundemental here cos I get big black nothing. here's some c...more >>


DevelopmentNow Blog