Groups | Blog | Home


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# > december 2004 > threads for wednesday december 1

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 31

Writing MSMQ Listener as Windows Service in C#
Posted by Vimal at 12/1/2004 11:26:45 PM
Hi, Can any one tell me how to write a msmq listener as a windows service in C#? Thanks in Advance, Vimal ...more >>


About KeyEventArgs
Posted by Chaoxiang at 12/1/2004 10:49:04 PM
the KeyEventArgs.KeyCode is readonly, so I want to override it. How to do it? I create a class, public class ExteKeyEventArgs : KeyEventArgs { ExteKeyEventArgs(Keys keys) } but it has a error, the error said, the method KeyEventArgs has not over ride(error CS1501). What's wrong? T...more >>

MSChart enhancement
Posted by Steven Nagy at 12/1/2004 9:20:15 PM
Hi all, Is there a more interactive .NET component that does what the MSChart does? Perhaps someone has developed something similar that is available or for sale. My requirement is for a reusable component that plots line graphs with up to 10 lines at once, with the ability to switch on/off...more >>

MSChart enhancement
Posted by Steven Nagy at 12/1/2004 9:19:51 PM
Hi all, Is there a more interactive .NET component that does what the MSChart does? Perhaps someone has developed something similar that is available or for sale. My requirement is for a reusable component that plots line graphs with up to 10 lines at once, with the ability to switch on/off...more >>

how to get a copy of ref type object
Posted by lion at 12/1/2004 8:41:04 PM
in .net, if you set annstance-A of a class equal to another instance-B, a pointer will add to B, but if i want to create a copy of B instead of pointer, how to operate? Note:serialization isn't permitted 3x...more >>

StreamWriter, FileStream, StreamReader - How to know if they are closed
Posted by McFly Racing at 12/1/2004 8:28:27 PM
I am using a StreamWriter a FileStream and a StreamReader. In the event I have an error I want to check in my finally block and close these if they are not already closed. How will I know if they are already closed before trying to close them again? Thank you. ...more >>

The syntax free feature of C# and VB.NET
Posted by Jacky Luk at 12/1/2004 6:28:32 PM
I'm having a question... I have been programming for years with VS6, now want to switch to the .NET languages, I know VB.NET is quite easy, but what about C#? In C++, you have to remember a lot of "settings" before you get to the "fruit" of the program, is that what the C# language is all about, ...more >>

Working with system.DateTime
Posted by Bredal Jensen at 12/1/2004 5:46:05 PM
Hello, For some reasons tha t i won't mention here, i need to format my system datetime object in the following form : yyyMMMDD_HHMM. How can i achieve this in C# . Many thanks in advance JB ...more >>



installing Visual Studio .NET on XP Pro system
Posted by Tim923 at 12/1/2004 4:50:12 PM
installing Visual Studio .NET on XP Pro system: I have the 6 CDs and I'm about ready to install. My system has already been updated with the high priority and optional updates, including service pack 1,2 and framework stuff (so I could run C# executables at home). Would that cause a proble...more >>

Stopping Expand/Collpase behaviour whenever you double-click ona Tree Node
Posted by Saradhi at 12/1/2004 4:49:51 PM
This is a multi-part message in MIME format. ------=_NextPart_000_000E_01C4D7C5.C6EEE290 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable I am facing a problem with the TreeView in C#. Whenever I double click on a TreeNode, I am opening another fo...more >>

Question regarding MDIParent form and child forms
Posted by Jon Pope at 12/1/2004 4:34:58 PM
I've got an MDI Parent which hosts several child forms. When the application closes (either through a File|Exit call or by clicking on the "X" in the upper right corner), I check to see if any of the children are "dirty" and display a "Save\Save All\Save None" form similar to Query Analyzer...more >>

Is it possible to disable events?
Posted by ORC at 12/1/2004 4:30:58 PM
Hi, Is it possible to disable an event like e.g. disabling: private void textBox1_TextChanged(object....) ? Thanks, Ole ...more >>

help with lastname regex in c# code
Posted by de NO[at]SPAM networld.com at 12/1/2004 4:27:54 PM
Regex regex = new Regex("/[a-zA-Z '-]/"); Match match; match = regex.Match(this.LastName.Text); if(!match.Success) { sb.Append("Last name invalid. "); returnValue=false; } with the input "jones", match.Success always fails. Is there something wrong with my regular exp...more >>

how to restrict user mouse in a certain area?
Posted by Fei Li at 12/1/2004 4:19:06 PM
Hi, Suppose my form has menu, tool bar, tool panel and drawing panel. How to restrict user mouse, say, in the area of tool bar and drawing panel? Thanks ...more >>

Superfluous labels
Posted by newsgroupie at 12/1/2004 4:09:59 PM
Hi Newsgroupies, Is there any way to prevent superfluous label members being automatically added to a Webforms code-behind file? For example... protected System.Web.UI.WebControls.Label Label19; ....where 'Label19' is just a 'decoration' text field on the webform. Many thanks, ...more >>

detailed file information (not icon) using shell32 pinvoke
Posted by Craig at 12/1/2004 3:49:03 PM
I've seen many examples of how to call SHGetFileInfo in shell32.dll to get a files associated icon, but I can't find anywhere how to get the file information (size, last date modified, etc, etc) out of shell32 using pinvoke. I have however seen how to get this information using COM: Shell32....more >>

Printing and setting Page Sizes
Posted by John Smith at 12/1/2004 3:28:47 PM
Hey folks, I'm trying to print from a c# windows application using System.Drawing.Printing. My problem is that it doesn't matter what I put in for papersize, it always ignores what I tell it and always prints out the same thing. Landscape works though. Does anyone see any problems with this...more >>

Detect whether I am being run from a Console application ?
Posted by Barry Mossman at 12/1/2004 3:28:35 PM
Hi, can I detect whether my class is running within the context of a Console application, vs say a WinForm's application ? also does anyone know whether the compiler or runtime is smart enough to avoid the overhead of writing to the console if it is not visible, eg I am running inside a ...more >>

ListBox - Items collections and DataSource
Posted by Prasad at 12/1/2004 2:43:01 PM
Hey All, I am having a little trouble with the ListBox's Items collection property. I am populating the ListBox with data contained in an SQL table using SQLDataAdapter and DataSet. I have set the "DataSource", "DisplayMember", and "ValueMember" properties of the ListBox correctly like b...more >>

String / Version Compare
Posted by MDB at 12/1/2004 2:33:42 PM
Hello All, Is there a easy way (meaning not spliting on each . ) to compare version strings to find out which is greater? For example 001.001.002 is greater than 001.001.001 ...more >>

Performance - 0 ticks ???
Posted by Tamir Khason at 12/1/2004 2:23:57 PM
Follow the code I have to check the performance double a = r.Next(9)*1e307; DateTime d = DateTime.Now; double b = Math.Pow(a,1/(double)100); TimeSpan tm = DateTime.Now - d; Console.WriteLine("{0}---{1}",b,tm.Ticks); The return value is 0 Ticks - IT CAN NOT BE !!! What is the proble...more >>

C# language bot
Posted by Ryu at 12/1/2004 2:22:23 PM
I would like to create a bot that retrieves html files. How do I determine if the html is in english or some other language like what the rest of the search engine bots are able to do. ...more >>

nullable value types in C# 2005
Posted by John Wood at 12/1/2004 2:21:07 PM
I was just looking at an article about using nullable value types. (value types that can effectively have no value and not be set). The syntax is to append a question-mark to the value type in the declaration, eg: int? age; I don't like that much, I think it would be much more consist...more >>

Regex question: Retrieve group names in code?
Posted by Jeff Johnson [MVP: VB] at 12/1/2004 2:17:32 PM
[Pardon the crossposting, but it seemed appropriate given the lack of a dedicated group] Is there any way to retrieve the name of a capture group from the classes provided in the RegularExpressions namespace? GroupCollection implements ICollection and IEnumerable, not IDictionary, so there ...more >>

checking status of individual bits in C#
Posted by Daniel Passwater via DotNetMonster.com at 12/1/2004 1:53:10 PM
I'm receiving a byte that contains the pass/fail test results of multiple tests. The first six bits are set. I need to read each of them separately. Is there an elegant way to do this? Thanks in advance for any and all help. -- Message posted via http://www.dotnetmonster.com...more >>

Saving a MS Word document in a string
Posted by Andrew Inwards at 12/1/2004 1:48:41 PM
Is it possible to save a MS Word document in a string? I suspect not because Ive tried saving it in using various encoding formats and it always gets corrupted. Thanks Andrew ...more >>

Writing to an Excel file
Posted by John Sutor at 12/1/2004 1:46:57 PM
I want to write a row of cell values to Excel, does anyone have a code example of how to do this? *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it!...more >>

Advanced - C# SQL Trigger Question
Posted by ChrisN at 12/1/2004 1:32:03 PM
Hello all, I have a quick question. I'm using a C# object to commit new rows to a database. In the database I have an INSERT Trigger watching values come in. If the record to be committed fails the trigger's test, the trigger rolls back the INSERT command and no changes are made to the da...more >>

System idling?
Posted by Joerg Battermann at 12/1/2004 1:12:38 PM
Hello there, I was wondering whether / how it is possible to check whether the system is idle or not to only start a specific task when enough system ressources are available... Any ideas, hints/links? :) Best regards / MfG, -- Joerg Battermann jb@justBE.com http://www.justBE.com ...more >>

LPCTSTR in DLLImport in C#
Posted by ORC at 12/1/2004 1:02:36 PM
Hi, I have been Googling a lot trying to solve following problem, but without success, so now I hope someone here will be able to help me (I have done a lot of DLLImports but never where I had to import a LPCTSTR ): In a native DLL: void TestFunc(LPCTSTR TestString) { TestString = TEX...more >>

Testing identifier names for validity
Posted by Wavemaker at 12/1/2004 12:56:10 PM
I was wondering if there is way in the .NET framework to test if a string represents a valid identifier name for the C# language. I want to write a program that will generate code based on user input. Part of the program's job will be to use names provided by the user to name classes, method...more >>

problem handling backspace key
Posted by C# at 12/1/2004 12:48:32 PM
I have a richtextbox that i am copying to an invisible richtextbox . during the keydown and keypress events i am inserting HTML tags into the invisble richtextbox along with the origional text. The only problem i am running into is when the user presses the backspace and delete key i have a ...more >>

force evaluation on string or character
Posted by Faraz at 12/1/2004 12:25:05 PM
Hi, I am working with DOM and I need to do the following: <sequence> <element name="input1" type="string"/> <element name="input2" type="string"/> <element name="input3" type="string"/> </sequence> The problem is...more >>

Alias names
Posted by Kimmo Laine at 12/1/2004 12:21:39 PM
Hi, i try to define alias and then use it in another file like this: // ---------- // file: a.cs using System; using MyAlias = MyNamespace.MyClass; namespace MyNamespace { public class MyClass { public MyClass() { . . . } } } // ---------- // file: b.cs namespace MyN...more >>

DLLs in C#, legacy code concerns
Posted by Andrew S. Giles at 12/1/2004 12:19:10 PM
OK, I just want to make sure I am correct in the following statements, and then to get some advice as to how I should proceed. First, is it accurate to say that in order for C# to use a DLL, the classes and members exposed must utilize a COM interface? I tried adding a refernce to a DLL th...more >>

Copying Directory / Subdirectory and Files
Posted by Amos Soma at 12/1/2004 12:11:05 PM
Does anyone know the easiest way, in C#, to copy all directories and files starting with some root directory? For example, how might I copy all files and directories starting with 'C:\Program Files\' to some destination directory. Thanks. ...more >>

How to document the code?
Posted by Giox at 12/1/2004 11:54:44 AM
HEllo everybody, I have to realize the documentation for my software and I would like to create a doc or rtf file. However I'm using the software ndoc that seems very useful for chm files, but there is not way to export the documentation in word format. Is there some other tool? for C I used...more >>

Problem with SqlCommand and T-SQL transaction
Posted by Andre Ranieri at 12/1/2004 11:17:05 AM
I'm having trouble with what should be a simple task; beginning and committing T-SQL transactions using the SQLClient. I'm using a SqlCommand (cmd) to begin the transaction and delete records from two tables. if both records are successfully deleted, I'd like to commit the transaction. Ev...more >>

Rename a file
Posted by Randy at 12/1/2004 11:03:36 AM
Ok, something simple like this shouldn't be so hard to find. I'm confounded as to why the File class doesn't have a Rename method. Can someone please tell me how to rename a file in C#? Thanks ...more >>

Creating a control
Posted by Stephen at 12/1/2004 8:41:02 AM
Hey everyone I've spent the last week developing a paging solution so as I can navigate sucessfully through a datagrid. Using all of the following: - Page Numbers First and Last Page Next and Previous Page Next 5 and Previous 5 pages. The navigation has been taken well and it was suggested ...more >>

DataBase
Posted by John.Arthur NO[at]SPAM gmail.com at 12/1/2004 8:19:17 AM
Hi, I need to create a small application that uses a file to write and store some data and then uses this data. What I actually need to know is it posible to create this as a database and create tables in it, and then read info from this tables with "select" - some kind of a database, but I n...more >>

Simple 2.0 Question
Posted by Sahil Malik at 12/1/2004 7:40:48 AM
Okay so in Whidbey, (C#) if I add a class library, and I name it as MyClassLibrary.Foo, the namespace it puts in is MyClassLibrary_Foo. I've been changing those back from underscore to . but I am wondering if I shouldn't. Can anyone explain? - Sahil Malik http://dotnetjunkies.com/web...more >>

Executing an application inside a Service
Posted by Chakkaradeep at 12/1/2004 7:05:02 AM
Hi all, i have written a Service,now i want to execute another application (for eg;calc.exe) in the service....how will i perform it??... i tried using this.... /**************Executing a Process code starts here**************/ System.Diagnostics.Process proc = new System.Diagnostics.Pro...more >>

try
Posted by URA at 12/1/2004 6:59:56 AM
this msg is try...more >>

which way of return is better?
Posted by killkennyhouse NO[at]SPAM hotmail.com at 12/1/2004 6:29:39 AM
hi, just wondering which way of coding is considered better? This style where the two returns aren't interconnected by an else statement in the if seems to be very popular these day, where use ch: public static bool IsProfileLoaded() { EditProfile ep = (EditProfile)BLL.TicketConte...more >>

Encryption
Posted by HateBSOD at 12/1/2004 6:27:31 AM
How does one encrypt a binary file, I have it working with just text any samples or website recomendations would be helpful. Also When you encrypt a file with DES and then want to zip it, the file does not get compressed, but with pgp the file gets compressed. Does AES also compress? Thanks,...more >>

How to Decode iso-8859-1 text
Posted by oblondin.ext NO[at]SPAM rd.francetelecom.com at 12/1/2004 6:11:32 AM
I receive from a pop server messages with encoding title. How can I decode this title which is encoded into 8859 Olivier Blondin. olivier.blondin@libertysurf.fr...more >>

Raise a UI (like GotFocus) event back to remoting client
Posted by Mark Overstreet at 12/1/2004 5:47:01 AM
I am writing an app that needs to contain an object model that allows it to be controlled similiar to something like Word. However, I am writing this in C# and all managed code. I know that I can use remoting to talk to the UI components but I need an example of how to create an event when s...more >>

populate treeview from databas
Posted by Mike at 12/1/2004 5:45:04 AM
how can i populate a treeview from a database? websites with examples would help....more >>

Displays Excel Cells to web page C#
Posted by sunstarwu NO[at]SPAM yahoo.com at 12/1/2004 5:34:49 AM
Hi, I need to display certain cells from an Excel spreadsheet to a webpage. For example; across the A,B,C columns I will have locations named (Eg London, Leeds etc) and across the 1,2,3 rows I will have the same locations (eg London, Leeds etc). Like you see in maps they include distances ...more >>

Interaction with Message box from Web site
Posted by Rob Manger at 12/1/2004 4:38:57 AM
Hi All, I have a problem I would love to be able to solve easily. I want to be able to display a MessageBox from an ascx page with yes and no buttons, then process the result from withing the ASCX code. Considering the following psuedocode, I want the messagebox to appear at <<Prompt>>. Is...more >>

how to refer a control from another class
Posted by Jess at 12/1/2004 2:25:03 AM
hi, I am doing a windows application. I have this basic problem: I have a class Form1 got a label from another class B i want to display some text in the label in form 1 in class B, the code i write is this >Form1 a = new Form1; >a.label1.Text = "hello"; but there s no text appear...more >>

file deletable?, shortcuts, .mdb file backup
Posted by David Krmpotic at 12/1/2004 1:37:29 AM
Hi All!! Could you please help me with three problems: 1. I would like to have a procedure that returned true if the file is writtable=deletable.. I tried everything but so far the only way I can really tell if the file can be delete is to actually try to delete it and catch an exception...more >>

Invokation of Form.Paint
Posted by Jesper at 12/1/2004 12:25:01 AM
Hi, Is there a way like in MFC's InvalidateRect function to call some function that in turns will fire a forms Paint event. The Paint event is fired automatically when you e.g. rezise your form - can you invoke this call manually if the basis of what needs to be painted is altered. best ...more >>

Struct vs. Class
Posted by dimension at 12/1/2004 12:15:09 AM
If my intentions are to create objects that encapsulates data rows in a table, is it better to use a Struct or Class? Based on what i read, if my objects will simply have get and set methods, Struct is may be better...but i am looking for some advise from the experts on this? Assumptions: i...more >>

linking Form's ComboBox to DataGridViewComboBox
Posted by dimension at 12/1/2004 12:05:03 AM
Hi, i have one question and one opinion i seek. please assist if you can. I am using VS2005 beta. 1) I have two tables with the following columns Security: security_id, name, symbol, exchange_id Exchange: exchange_id, symbol, name 2) I have a Form that contains a combobox (cb1) and DataViewGr...more >>


DevelopmentNow Blog