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# > october 2005 > threads for friday october 21

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

how to over ride operator []?
Posted by Richard Lewis Haggard at 10/21/2005 10:36:29 PM
What is the syntax to over ride the array index operator '[]'? I want to derive a class from CollectionBase and have it encapsulate an array of another class I'm working with. Among other things, it needs to over ride the [] operator but I don't seem to be able to get the syntax quite right...more >>


how to persist keyboard navigation indicators
Posted by Stefan at 10/21/2005 10:32:32 PM
I'd like to display the keyboard navigation indicators in my C# application without the user having to press the Alt key and regardless of the machines global setting (Hide keyboard navigation indicators until I use the ALT key)... Is there a way to programatically turn on/off keyboard navigat...more >>

Persisiting the call stack / heap etc.
Posted by Anders K. Jacobsen [DK] at 10/21/2005 9:48:08 PM
Hey. Is it possible somehow to persist the call stack, heap, program data...everything. Then at a later time load it again and continue work. The idea is actually to send it all over network in a pervasive research project, so that one program can be used on one computer and "instantly" c...more >>

Instantiating from an Interface?
Posted by Scott Johnson at 10/21/2005 8:15:16 PM
I thought interfaces have no implementation so how can I create a DataReader from an IDataReader Interface and use it similarly to how I would use an OleDBDataReader? How is it that the block of code below actually functions? Does IDataReader have an implementation or not? Thanks in advance. ...more >>

How to put sorting arrow in List View header?
Posted by Dino Buljubasic at 10/21/2005 8:01:13 PM
A simple way to do this is VB.NET is like this: lvwIndex.Columns.Item(e.Column).Text = _ strColHeaderNOArrow & " " & ChrW(&H25B2) I tried to do the same in C# like: lvwProvinces.Columns[e.Column].Text = lvwProvinces.Columns[e.Column].Text + " " + '\u25BC'; however, it displays a...more >>

There is an error in XML document
Posted by Jeff at 10/21/2005 7:26:30 PM
Hello I am creating a web client in c#. I use the "Add a Web Reference" wizard to read a WSDL file, then I simply call the method for the remote service. I get the floowing error returned when I make the call.: There is an error in XML document (1,454) The source of the error is System.Xml ...more >>

"Out of Memory" on Graphics.FromImage()
Posted by yotaxp NO[at]SPAM gmail.com at 10/21/2005 5:35:19 PM
Hello, all. This line has been pestering me, and I can't seem to figure out why the problem is occuring. I'm trying to paint a GraphicsPath onto a Bitmap, using the Graphics class, but it always seems to crash, and throw the "Out of Memory" exception when it comes to the point I need the crea...more >>

Converting String to Enum Value
Posted by Robert W. at 10/21/2005 4:10:02 PM
In a posting earlier this year I found a simple approach to convert a string to a particular Enum value. The one line solution looked like this: MyEnum ConvertedString = (MyEnum) Enum.Parse(typeof(MyEnum), MyString, true); This is fine if one wants to hardcode each and every Enum in an If-E...more >>



Class method doesn't seem to work
Posted by tshad at 10/21/2005 3:37:01 PM
I have a class: ******************************************* public class DecimalType { private decimal first = 0; //original data private decimal data = 0; //current data public bool nullFirst = false; //original Data null public bool nullData = false; ...more >>

Exception Handling Question: Event Logging
Posted by ETL at 10/21/2005 3:01:24 PM
Hi, I think this question has an easy answer but I can't seem to find anything online that lists best practices for my problem. I have a C# app that uses an exception handling tree similar to the following. Try { blah blah blah.... } catch(UnauthorizedAccessException noAuth){} catch(In...more >>

vb to cs converter?
Posted by TheMadHatter at 10/21/2005 2:39:02 PM
does anybody know of a half decent converter????? I tried the "VBConversions VB.Net to C# Converter" with less than satisfactory results, and an unnecisary hole in the bank. ...more >>

Trap Key Press Events
Posted by Rich at 10/21/2005 1:51:05 PM
Hi, I would like to setup some events tied to the function keys but I'm not sure where to start; any help would be greatly appreciated....more >>

Random No generation problems
Posted by Roy Gourgi at 10/21/2005 1:40:56 PM
Hi, How do I invoke the random number generator that was suggested by a few people. Ideally, what I would like to do is to instantiate the random no. generator with a seed value that does not repeat the values and that can be called from any class, as I have to call the random number genera...more >>

class inaccessible
Posted by tshad at 10/21/2005 1:17:34 PM
I am getting a message for my objects that say: testNulls.cs(13,33): error CS0122: 'FtsData.IntType.IntType()' is inaccessible due to its protection level I have a class calling objects out of another class, but same namespace. This is the class that gets the error: ******************...more >>

c# - Automatically displaying SubReports in New Tab Pages
Posted by Master.Shankar NO[at]SPAM gmail.com at 10/21/2005 12:16:20 PM
Hello Friends, I am working on a C# windows Application which generates a crystal report . There is a subreport embedded in the main report . I want this subreport to open automatically in a new tab when the main report is generated and displayed. As of now , since it is an OnDemand report, it ...more >>

Turn Caps Lock On
Posted by Mike L at 10/21/2005 12:10:03 PM
How do I turn Caps Lock on, when my form opens?...more >>

OpenFileDialog: selecting more than 200 files
Posted by Olaf Baeyens at 10/21/2005 11:48:58 AM
In .NET v1.1 I am trying to select multiple files using OpenFileDialog like this OpenFileDialog openFileDialog=new OpenFileDialog(); openFileDialog.Multiselect=true; i f(openFileDialog.ShowDialog() == DialogResult.OK) { ... } Now I discover that there is a hardcoded limit of 200 files...more >>

Which item did I right-click in a multiselect listview
Posted by Dave at 10/21/2005 11:35:05 AM
I have a multiselect listview with an associated context menu. If the user selects several items in the list and then right-clicks one of them is it possible to tell in the handler which item was right-clicked? -- Dave...more >>

resize window - lock
Posted by piotrek at 10/21/2005 11:27:50 AM
Is there a posibility to totally lock posibility to resize window? And to force application not to display a both sided arrow that allows user to resize window? Even when i set maximum and minumum window size the arrow is still visible. Thanks PK ...more >>

XmlSerializing Base Classes
Posted by farseer at 10/21/2005 11:21:32 AM
let's say i have the following class that was generated using XSD.exe: [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "2.0.50727.26")] [System.SerializableAttribute()] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute(...more >>

plse let me know good books for Design Patterns in C#<eom>
Posted by B Deepak at 10/21/2005 10:37:00 AM

short can't arithmetic with constant?
Posted by sd at 10/21/2005 10:27:55 AM
short Total=11; short Index=Total-1; will occurs the following error: error CS0266: Cannot implicitly convert type 'int' to 'short'. An explicit conversion exists (are you missing a cast?) and this is correct: short Index=(short)(Total-1); A bit ugly... ...more >>

FileSystemWatcher Question
Posted by Krish at 10/21/2005 10:16:40 AM
Hello Gurus, Pardon me for asking dumb question... I wrote small csharp program to watch a folder for any created text file... When i try to run through debugger and stop after " watcher.EnableRaisingEvents = true;", i manually drag and drop windows text file and this program doesnt seem...more >>

Problems with nant
Posted by Ireneus Broncel at 10/21/2005 10:16:24 AM
Maybe I am wrong here, but I have a problem with nant that I don't unterstand, I'm trying to compile an example ConsoleApp Project with net-1.1, and get the errror: log4net:ERROR LogLog: Exception while reading ConfigurationSettings. Check your .config file is well formed XML. System.Confi...more >>

Avoiding Identity Impersonate
Posted by John Smith at 10/21/2005 9:47:02 AM
Hey folks, I'm trying to use the HttpWebResponse object in an ASP application, but I get a 401 unauthorized error on this line: HttpWebResponse response = (HttpWebResponse)webRequest.GetResponse(); I have: identity impersonate = true authentication mode = windows IIS set to ...more >>

Run COM+ app from asp.net
Posted by James Geurts at 10/21/2005 9:45:05 AM
Hi all, I hope this is the correct group to post this to. If not, I apologize. I have an asp.net (c#) project that needs to talk to a COM object. the COM object is actually an .exe that requires elevated permissions to execute. I have tried to set the ASPNET account permissions for th...more >>

Encription is too long - Advice please
Posted by Washington at 10/21/2005 9:44:31 AM
Hi, I am using MD5, SHA1, SHA256, SHA384, SHA512 and results are: I am using Encryption data with salt example (http://www.obviex.com/samples/EncryptionWithSalt.aspx) Everything works and results are: MD5 : G+bfg1UoPgaSVABFpLFZzxQ+h6WZkw== SHA1 : gi4jz/elgpXY9fvxAo/HOMw9XPc80aZYEg== ...more >>

Observer pattern in dotNet 2.0
Posted by Allan Ebdrup at 10/21/2005 9:32:39 AM
Is it possible to listen to when a constructor is called or when a property is set on a object, without having to implement changes in the observed objects class, in dotNet 2.0? It would be very effective for implementing a Model View Control architecture. Perhaps some stuff could be generate...more >>

Custom Mouse Cursor
Posted by Tim at 10/21/2005 9:16:18 AM
Hi, I would like to create a custom mouse cursor for my print preview page. I want to use a bitmap of a magnifiying glass with a plus in it. Pretty standard stuff. How do I change the cursor? I found the code below but I just get the default mouse cursor dragging around the bitmap whi...more >>

Select all the text in a textbox on enter
Posted by Mike L at 10/21/2005 9:10:02 AM
On enter of my Street Text box, I want all the text in the text box to be selected. At first it works, but if you click with the mouse pointer in the textbox, and then tab out of the text box, then tab back in, the cursor is where the last place the user clicked in the text box. I want all t...more >>

To Clone or Not To Clone?
Posted by Brian Keating at 10/21/2005 9:07:03 AM
Hi there, Consider this from MSDN *Notes to Inheritors When you derive from DataGridViewCheckBoxCell and add new properties to the derived class, be sure to override the Clone method to copy the new properties during cloning operations. You should also call the base class's Clone method so t...more >>

Checking if certain processes are running, on a certain machine
Posted by Paul Aspinall at 10/21/2005 8:52:21 AM
Hi I want to write a piece of code, that will check if a particular service is running on a particular machine. Can someone give me a pointer as to which classes would be useful?? Any sample code would be appreciated Thanks ...more >>

Creating a crystal report from a dataset
Posted by Jo Segers at 10/21/2005 8:39:28 AM
Hi, How can I create a crystal report from a dataset? I tried to do it like this: this.reportDocument.Load(@"C:\CrystalReportSequenceKetting.rpt"); this.reportDocument.SetDataSource(ds); But then the sql I used to design the report is used for the reportdata. Thanks in advance, Jo...more >>

How do you Pass an array of Objects from C# to VB6 (interop)
Posted by Williams.sam NO[at]SPAM gmail.com at 10/21/2005 8:07:14 AM
I am wondering if there is a way (maybe via Marshalling ) to pass an array of Objects of some C# defined class to VB. I am already launching a C# form from VB with simple call backs using a basic interface. Now what I need is nice way to pass back an array of a certain type of class. //Some ...more >>

wmf files not conveting correctly
Posted by Ian Jagger at 10/21/2005 7:18:02 AM
Hi, I am trying to convert a group of wmf files to gif files. Easy you'd think? I'm using the following code: Image img = Image.FromFile (this.tbxFilename.Text); string filename = this.tbxFilename.Text.Replace ("wmf", "gif"); img.Save (filename, ImageFormat.Gif); When I look at the gif...more >>

do web.config permanent in a Setup Project
Posted by EdwinSlyfingster at 10/21/2005 6:07:01 AM
How can I do to web.config to be permanent(Wont be unistalled)? thanks....more >>

Changing the background color of tabcontrol
Posted by Iconoclast at 10/21/2005 5:09:03 AM
Hello friends, I am new to Vs.net and C# development environment... I wanted to know, how to change the background color of tabcontrol (which is set bydefault to systemcolor.control).. i want to set it to something like a khaki or steel blue... there isnt a backcolor property for tabcontrol,...more >>

Problems running a .net exe from a network drive.
Posted by Jesper at 10/21/2005 5:07:05 AM
Hi, I am experiencing some problems running a .net exe placed on a network drive. File IO operations and access to reg db results in access denied exceptions. If I run the same program from a location locally on my machine I do not have any problems... Anyone who knows why? rgds Jesper...more >>

How to extend an enum
Posted by ssg31415926 at 10/21/2005 3:35:16 AM
I have an abstract base class with an enum which is passed into a method. I want my derived classes to be able to add new values to the enum without having to redefine it and I want to be able to pass them into the method defined into the base class. Is there a way to do this. E.g. abstr...more >>

branch prediction and C#???
Posted by news.microsoft.com at 10/21/2005 2:02:31 AM
In my engineering class we're discussing microprocessor branch predictors. Is it possible to write a Windows application (anything whatsoever) that would allow me see how branch prediction is done in C# or if it implements some type of Branch Target Buffer? Any help would be appreciated. Th...more >>

CallConvCdecl class
Posted by apm at 10/21/2005 1:20:31 AM
How can the CallConvCdecl class be used? MSDN says it is for compiler writers. Can a mere mortal use it? ...more >>

How is something like the interface to itunes created?
Posted by D at 10/21/2005 1:14:42 AM
Was just curious if anyone knew how they created the cool interface ( I'm just talking about the stainless steel looking one with round butttons). Looks like it could be .net thing. thanks ...more >>

Internal Server Error when creating web application
Posted by unni12 NO[at]SPAM gmail.com at 10/21/2005 12:41:19 AM
Hi When i try to create one web application project i got internal server error. How can i overcome this. Expecting your reply Thanks UK ...more >>

ormapper where clause failed for datetime datatype if UI and sqlserver has different culture
Posted by virendra.chandra at 10/21/2005 12:21:36 AM
hi guys, this is virendra. I am in big trouble to handle date situation using where clause. i am using ormapper. if the sqlserver and application server has different date format(different culture) then i am getting a error. datetime overflow. How i can handle this situation. ex: DateT...more >>

for loop
Posted by Arjen at 10/21/2005 12:02:01 AM
Hi, I'm using multiple times the for loop in my application. All times I start with int i = 0. VS says that I can only use the i once. So, now I'm using i, j, h and x... is there a better way?... I like to use the same variable or an other method. Thanks! ...more >>

how to get more detail while enum the network adapters?
Posted by Ari at 10/21/2005 12:00:00 AM
hi all, I try to use the shell32 to enum the network adapters that installed on my computer, it works, but I want to get more details about them, such as the device's type, device's name ..., how shall I do else? I use the code as follow: const string folderPathStr = "{7007ACC7...more >>

how cud I get the content of word document programmatically?<eom>
Posted by B Deepak at 10/21/2005 12:00:00 AM


DevelopmentNow Blog