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 monday april 10

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

adding custom keywords to c#
Posted by Dan at 4/10/2006 11:44:01 PM
Hi everybody, is it possible to add new keywords in c#, in order to improve functionality? just as (using IDisposableImplementer = new IDisposableImplementer()) { // use the IDisposableImplementer } first thing that pops in my mind - even though may seem trivial - is for automatically...more >>

Using Windows Scheduler from C#
Posted by newscorrespondent NO[at]SPAM charter.net at 4/10/2006 11:16:33 PM
From my C# application I would like to fill in some of the fields in the Windows Task Scheduler and then bring up the scheduler window for the client to fill in the rest. I looked through the refereces but did not find one that looked appropriate. How can I do this? Thanks in advance....more >>

System.Timers.Timer
Posted by Jonathan Woods at 4/10/2006 11:13:26 PM
Hi there, I have three methods these need to execute at every interval time. I would like to know which option is better? Option A) Three System.Timers.Timer objects these execute each method. timer1.Elapsed += new System.Timers.ElapsedEventHandler(Method1_Elapsed); timer2.Elapsed += ne...more >>

Split tiff and stamp string (GDI+ or DX)
Posted by Benny at 4/10/2006 10:54:01 PM
I first of all need to know if the change from .NET 2.0 GDI+ to DirectX would benefit me in my situation. I need to transform multi-page tiffs to stamped single- or multi-page tiffs. I have come very close to doing this with GDI+ but it was suggested that it may be beneficial to use the actu...more >>

keyboard hooks for IE alone
Posted by Hema at 4/10/2006 10:20:29 PM
Hi all, I want to develop a application that logs the keys pressed only when IE is active(i.e. in focus).The hook must not log any key press when any windows or applications are in focus.How to do this? Thanks and regards, hema ...more >>

ListBox CHnage Selected Item
Posted by Mr. Bean at 4/10/2006 9:06:53 PM
Hello, How could i change the selected item of a listbox on runtime. I have a dropdownn list with 4 values, when the appplication is initiated the selected item in the listbox is supposed to chnage based on the value retrieved form the db. Thanks ...more >>

Newbie - SQL Server and Export XML
Posted by Ranginald at 4/10/2006 8:54:21 PM
Hi! I have a SQL Server view that ends with a FOR XML EXPLICIT command -- problem: I know more about databases than C#! 1. How would I go about writing a C# method that would take the XML results of this view, and use a save as dialog box to save it to a file. Even better, I'd love to ...more >>

[STAThread]
Posted by Martijn Mulder at 4/10/2006 7:35:49 PM
What is the penalty if I do not put [STAThread] just above the Main() method? ...more >>



Can't quite parse XML correctly - please help
Posted by Ronald S. Cook at 4/10/2006 7:08:45 PM
Hi, I have the following code that reads an XML document. I want it to delete nodes where the date is less than today. It *almost* works (please see the output below the code). How can I make the <Data /> element completely disappear for those first 3 nodes that were earlier than the cur...more >>

System.Diagnostics.Process ExitCodes -- What do they mean?
Posted by tenpsa at 4/10/2006 5:11:37 PM
Hi, I have a C# application that uses the System.Diagnostics.Process functionality to execute other processes (to install a couple of .msi files). Here's my code so far: System.Diagnostics.Process proc = new System.Diagnostics.Process(); proc.StartInfo.Arguments = sArgs; proc.StartInfo.File...more >>

C# Raw Printing
Posted by Richard MSL at 4/10/2006 5:09:01 PM
I need to print raw byte data (PCL) to a printer in C# .NET 2.0. I was disappointed that the BinaryWriter.Write method seems to specifically forbid it. I would like to print to device names (e.g. lpt2:) and also network queue names. Is there a way to do this using .NET? Failing that, can it be...more >>

Combo box with Multiple columns
Posted by ratethebuilder.co.uk at 4/10/2006 5:02:13 PM
Hi I am trying to replicate a drop down combo box in C# that I have in a MS Access form. The combo box has three columns, each of which comes from a different field in the database. I can merge the three fields into one in the stored procedure, but I need them to be formatted in the combo b...more >>

folder browse and file access
Posted by Sirin Azazi at 4/10/2006 3:29:35 PM
Hi, I wrote simple program to get the .c and .h files in a folder and number of lines they contain. It works; but when i choose the 'c:\' folder, i get an Argument Exception. when i choose another driver or folder, there is no error. what could be the reason? if the reason is hidden system ...more >>

How to tell a char is ascii or unicode?
Posted by Nick at 4/10/2006 2:58:04 PM
hi, I want to know if a string contain any unicode character, and what I did is like this: for(int i = 0 ; i < str.Length; i++) { char ch = str[i]; //Then, right here, how to tell this char is ascii or unicode? } thanks. ...more >>

Are attributes inherited?
Posted by Dan Holmes at 4/10/2006 2:55:37 PM
For instance if i inherit from Exception public class MyException : Exception { public String myVar ; public MyException (String myVar, String message) : base(message) { this.myVar = myVar; } } When this is serialized do i need to write a GetObjectData or add the [Ser...more >>

TrackBar Changes
Posted by Tony Clark at 4/10/2006 2:06:27 PM
Hi, I have a track bar that I wish to move between 0 and 100 in increments of 10, is there a setting for this? I have tried altering the smallchange attribute and largechange! I think I am missing something obvious! thanks ...more >>

ckecked listbox
Posted by Hrvoje Voda at 4/10/2006 1:58:51 PM
I'm using checked listbox to show items. I would like to prevent selecting more then one value. So, when a user want to check another item i want to unchecked the other. Hrcko ...more >>

Reflection on generics, could anyone confirm/deny a bug?
Posted by Wiktor Zychla [C# MVP] at 4/10/2006 1:33:01 PM
Could anyone confirm/deny that following is a bug (or at least an "unexpected behaviour")? If this is not a bug, I would be glad for a short explanation or a workaround. Issue: A generic class, Base, with a constraint on the generic parameter. A generic class, RelTable, with a constraint...more >>

console.writeline overload question
Posted by djc at 4/10/2006 1:20:04 PM
out of all the overloads that pop up via intellisense for console.writeline() the following one confuses me: Console.WriteLine (string format, params object[] arg) 1) whats the deal with 'params' there? I am used to this pattern: type var, type var, type var etc... like: string str, int i,...more >>

Regular expression
Posted by abuck at 4/10/2006 1:14:03 PM
Hi everybody, I have a very stupid question here but I can't get it to work. string repText = @"abc\nabc"; Regex reg = new Regex(@"abc\nabc",RegexOptions.Singleline ); Match match = reg.Match(repText); Why this doesn't match ? I need to keep the Singleline because in my scenario, this ...more >>

re-use an instance
Posted by Martijn Mulder at 4/10/2006 1:10:45 PM
Can I call the constructor on an object that is already in memory? The desired behavior is that I reset the state of an object with (one of the) constructs of its type, but not have it allocate dynamic memory and not be subjected to the garbage collector (until the process ends). ...more >>

Opening a Print Queue
Posted by Andy at 4/10/2006 12:27:20 PM
Hi, Does anyone know if there is a way to open the print queue dialog for a specified printer? I already know what the printers name is (e.g. \\server\printer1) but I would like to be able to show the standard Windows print queue dialog. Thanks, Andy ...more >>

TabIndex property not working for me
Posted by michael sorens at 4/10/2006 11:48:34 AM
I have a form with a variety of controls (TextBox, CheckBox, and Button). I have assigned TabIndex values starting from 1 at the top, working my way down the form to 15 at the bottom. Each of these has TabStop set to true. When I run the application and repeatedly press the tab key, the on-...more >>

Opening a winform from property grid
Posted by John at 4/10/2006 11:36:31 AM
I want to open my winform, when I click on one property in the propertygrid, like the Color/Font dialog. thx for ur help John ...more >>

keyboard navigation through tabs in a TabControl
Posted by michael sorens at 4/10/2006 11:31:01 AM
After extensive searching of the docs, I find no mention of support for Ctrl-Tab and Ctrl-Shift-Tab to navigate among tabs in a TabControl. I am surprised that such a common/standard keyboard navigation is not provided. Or am I just missing it...?...more >>

Where are all the .net
Posted by AdamH at 4/10/2006 10:51:02 AM
Not sure what I am missing. We have started a new project and for the past month and a half have not seen more than 3 qualified .NET engineers, Seems that most of the people out there now days have moved to Java ( SF Bay Area ). Figured I’d ask in the communities to see what I’m missing...more >>

ASP.NET UserControls in the IDE
Posted by smilly at 4/10/2006 10:44:01 AM
When viewing the user control on a page in the designer I get this where the user control is on the page Error Rendering Control An unhanled exception has occured. Session state can only be used when enableSessionState is set to true, either in a configuration file or in the Page directiv...more >>

Why do I need to check the version myself?
Posted by D. Yates at 4/10/2006 10:27:25 AM
Hi, I got bit by the fact that applications using library files that are NOT strongly named will use older versions of the library without generating an error, so........ Is there a way to tell an application "Use the library files you were built with or NEWER versions" without using the...more >>

Determine if Local User is in Local Group
Posted by orp at 4/10/2006 9:53:55 AM
We've been struggling on how to determine if a local user is already in a local group. We have code (C#) that creates a local user, if the user doesn't already exist. And, we have code (C#) that creates a local group, if the group doesn't already exist. Both of these work fine. Now, we need...more >>

Reading multi-user updates to excel sheet in c#
Posted by hgupta NO[at]SPAM bearwagner.com at 4/10/2006 9:11:03 AM
Problem: A. I have a c# process that opens an excel spreadsheet (in read only mode) and frequently polls a data range of cells and uses it. B. There is another process that modifies the same range of cells in the same spreadsheet simultaneously. However, my read (in A) does not reflect the u...more >>

Is there a way to pass a declared array as a parameter?
Posted by AAOMTim at 4/10/2006 8:34:02 AM
Give the method ProcessArray as follows: void ProcessArray(Object [] objects) { foreach (Object object in objects) { // Do something } } I can call it as follows: Object [] ojectArray = {object1, object2, object3}; ProcessArray(objectArray); But I would like to know if I...more >>

Winforms Picturebox control
Posted by GSSI at 4/10/2006 8:10:02 AM
I have an image data field in a datarow (as in the Northwinds demo sql database). What is the C# instruction syntax to display it in a Winform picturebox control. -- GSSI...more >>

value in the variable expires
Posted by Vijay at 4/10/2006 7:49:02 AM
I have 2 forms. in form1 i declared a public variable in which a value is stored. then i goto form2 . (for this is create an object of form2 in form1.) when i go to form2 there is call form1. when i come to form1 the value stored in the variable decalred in form1 gets lost. how can i retain th...more >>

DataView issues
Posted by koredump at 4/10/2006 7:30:32 AM
Hi, I'm working on fixing a bug in a very data intensive windows application. The application has a datagrid that binds to a dataview. The dataview can hold as many as 40000 records that are retrieved from two tables with a join. The user filters the dataview to display a subset of the 40000...more >>

Timer not working in .net
Posted by archana at 4/10/2006 7:22:54 AM
Hi all I am having application which is using server based timer that is timer from namespace system.timer. I am having windows service which i want to run after every 1 hour and after every one hour i am sending mail. In service.cs class i am creating one worker thread and in thread ...more >>

Array.Find()
Posted by John Wolff at 4/10/2006 7:18:02 AM
Pardon me for such a newbie question. I've only been using C# for 14 months, and most of the stuff has been relatively basic. I have a serializable "Contact" class that has a number of properties (e.g. ..ID, .LastName, .FirstName) I am populating an array of Contacts with an XML feed, and...more >>

best practice for passing parameters (form fields) to a method
Posted by MicroMoth at 4/10/2006 6:51:02 AM
Hi, I'm trying to write a update method, in which when the user clicks the update button the update method is passed 10 form fields. Then a update SQL is run to update the database. My question is whats the best way to pass large numbers of parameters into a method. Ten seems a large number...more >>

Start <Div> at bottom of scroll
Posted by Ben at 4/10/2006 6:33:03 AM
I Have a datagrid that i have placed inside a <div> section so that it becomes scrollable, but now i have a new problem. I would like the <div> to auto start at the bottom of the scroll (newest entries are at the bottom). Can this be done? I dont know any javascripting and everythign i h...more >>

Difference between 2 files
Posted by Ben at 4/10/2006 6:05:02 AM
Does anyone know of a tool (other than sourcesafe) that will allow me to do a side by side compare of two files? In linux there is a tool called 'diff' but i need a windows based tool. We dont currently use sourcesafe (or any alternative..I know, bad developer...). I have put in a business...more >>

Assembly Event Question
Posted by Andrew Neillans at 4/10/2006 3:45:09 AM
Hi all, First off, I apologise if this is mentioned in a MSDN document somewhere, but I've searched both MSDN and Google and can't find anything - so thought I'd post. Ok, now the problem. I have an application which is dynamically loading a series of Assemblies (as plugins to extend the...more >>

How to change the GUI language?
Posted by Sharon at 4/10/2006 3:19:02 AM
Hi gurus, I have a Form with some controls, some of them are my own. The GUI text is shown in English US. This application is for our customer in Japan that ask to change the application GUI language to Japanese. I have never done such a thing, but I have heard that in .NET/C# over WinXP it...more >>

How to add double quotations to a string
Posted by Kondapanaidu at 4/10/2006 2:33:03 AM
Hi, I am using C#V1.1. How to add double quotations to a string. If I go with "\"" the back slash is going to be added to the assigned string. EX: string str="naidu" + "\"" + "GK" + "\""; The o/p for this is naidu\"GK"\ But I need the o/p like naidu"GK" Thanks in advance ...more >>

dynamically created radio buttons
Posted by Mike P at 4/10/2006 1:29:28 AM
I am working with some code where a number of contacts are taken from a table and then added to a page with a radio button to the right of each one where the name of each radio button has the contact key appended. RadioButton rbtn = new RadioButton(); rbtn.ID = "btn" + ds.Tabl...more >>

Retrieve the selected folder and entered file name from SaveFileDialog
Posted by Allen at 4/10/2006 1:02:16 AM
Hi, I want to retrieve the selected folder and entered file name from the SaveFilsDialog. The user is able to create or selected a different folder during the dialog displayed. If user enters "a/b/c/d" in the "File name:" box, then the SaveFileDialog.FileName will return "Path\a\b\c\d" as the...more >>

Saving dynamically created RichTextBox text
Posted by AxOn at 4/10/2006 12:55:56 AM
Hi, I have an application with a Save function. I want to be able to have several tabs(each containing a RichTextBox, created at runtime) open in a tabControl and save the text from each RichTextBox one at a time. The plain text is loaded into the RichTextBoxes via an openFile funktion that c...more >>

Saving attachments from outlook express to Sql server table
Posted by Vipin Kumar at 4/10/2006 12:51:01 AM
Hi All, I want to store all the attachment's name from outlook express to the sql server database table using C#. Is there a way around to do this. Should i use the .psi files for that. How could i do it. Could anyone give me a hint, so that i can go to the way. Thanks in advance. Vipin K...more >>

Deep Copy via Serialization
Posted by Magnus at 4/10/2006 12:10:12 AM
Hi, I've tried to to a deep copy of an serializable object (generated by creating a xml Schema and then genrate classes with xsd.exe) using serialization (xmlSerializer) When I'm using a memory stream to serialize and deserialize, it fails when trying to deserialize it (at position {0,0} But...more >>

Novice question about inherited constructors
Posted by Oleg Subachev at 4/10/2006 12:00:00 AM
I am moving from Delphi to C# and hve encountered the problem: I have the following classes and form Load event handler: public class class1 { public string S; public class1( string aS ) { S = aS; } } public class class2 : class1 { } private void Form1_Load(object send...more >>

CreateApplicationContext thread take 50% cpu
Posted by Droopy at 4/10/2006 12:00:00 AM
Hi, When I start my application, I notice that it takes 50% CPU in idle status ! I used Process Explorer from Sysinternals to find what thread is consuming that much CPU. Only 1 thread is consuming the whole 50% : "mscorwks.dll! CreateApplicationContext". To be complete : .. I am using...more >>

Explicit virtual interfaces
Posted by amaca at 4/10/2006 12:00:00 AM
This does what I expect (as it should, it's from Hoffman and Kruger's C# Unleashed): public interface ISpeak { void Speak(); } public abstract class Animal : ISpeak { public abstract void Speak(); } public class Dog : Animal { ...more >>

Asking for Job?
Posted by Khaled Hussein at 4/10/2006 12:00:00 AM
Hi every body, I am working as freelancer, and I wanted to start posting my CV and ask for job offers... But as I know that this is a public newsgroups so I am not allowed to do all what comes up to my mind. I wanted to ask about the rules. Am I allowed to post my CV in here, and ask for a j...more >>

first & last row in datagrid
Posted by beachboy at 4/10/2006 12:00:00 AM
any most fast method that we can know the idicate the first row and last row in datagrid? ..NET 1.1 Thanks in advanced. ...more >>

How to get text content of PDF file?
Posted by Mateusz [PEYN] Adamus at 4/10/2006 12:00:00 AM
Hi I'd like to get text content of a PDF file. how can I achieve that? best regards Mateusz [PEYN] Adamus http://adamus.home.pl...more >>

How to import COM interface - IPersistFile?
Posted by Plamen at 4/10/2006 12:00:00 AM
Hi , I need to change the ToolTip in Windows explorer that is shown when the cursor is over a file. Here is how it should work: you create a class that imports IPersistFile and IQueryInfo. After adding some registry values when you move the cursor over some file in Win Explorer, the shell will c...more >>


DevelopmentNow Blog