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# > september 2003 > threads for tuesday september 23

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

Assembly depolyment
Posted by abdul_khatri NO[at]SPAM hotmail.com at 9/23/2003 11:41:05 PM
I am working on a .net project and need some help. The project contains different components. Each component is in its privated assembly. For e.g Component1 is a C# library project in VS.net and compiles to a dll. Similarly Component2. All components implement an interface IService which has a S...more >>


Pass parameters by ref from c# to managed c++
Posted by Pravin at 9/23/2003 11:21:06 PM
I have a function as follows in managed c++. public foo( object *objectValue) { // pseudo code below, as I don't have exact code at this very moment. if( type of objectValue is int) { objectValue = objectValue * 2; } elseif(type of objectValue is short) { ...more >>

Default type access modifier
Posted by Jacob N. Rohde at 9/23/2003 11:14:50 PM
Hi guys, I was under the assumption that the default type access modifier for classes/structs is internal. But the MCAD Study Guide (from MS even) says public?!?! (The Dr. GUI .NET tutorial from MS's site says internal!!) So which source from MS do I believe? It is internal is it not? Tha...more >>

INTERNAL ERROR -- how to deal with buggy (?) MSC# compiler ?
Posted by peterjohannsen NO[at]SPAM hotmail.com at 9/23/2003 10:26:59 PM
(Was originally, probably wrongly, posted to the vc subgroup.) (This doesn't appear to be a c# problem, but a problem with a bug in the Visual Studio c# compiler, but, any help will be welcome...) Oh, I forgot to list the error messages; I would be delighted if someone could explain how to d...more >>

mask password in c# console application?
Posted by Yang at 9/23/2003 10:17:11 PM
Hi Is it possible to mask console input in a c# console application? What I mean is: if I entered string "test" in the console, it'll echo "****"(or nothing) instead of the string "test". I've tried setting the foregroud color of the console the same as the backgroud color through native API,...more >>

Speeding up exceptions or my bad code
Posted by timothylg NO[at]SPAM hotmail.com at 9/23/2003 9:40:25 PM
I have a quick (pun intended) question for the guru's out there. I have a piece of code where I am validating the input of chancters into a cell in a datagrid. I am using the keypressed event to get the charcter that the user typed and then allowing it to be passed to the cell. Now here is t...more >>

Getting parent window reference
Posted by Rudy at 9/23/2003 9:32:05 PM
Hi Is there a way is a 'class library' to get the reference to window of application that uses the library ? I'm using class library to create a custom command for a closed source application (GeoMedia), so obviously I can't make it to pass this reference to my lib as a method parameter. ...more >>

System.InvalidCastException with UserControl and comboBox
Posted by scola NO[at]SPAM scn.org at 9/23/2003 8:57:34 PM
I have a csharp, VS 2003 solution for a winform application The application uses an object called a "matter" and the class is defined in matter.cs. I can load matter objects into a combobox Matter[] matters= v.Matters; comboBox1.Items.AddRange(matters); And I can fetch the matter o...more >>



StreamWriter and Multi-threading
Posted by José Joye at 9/23/2003 8:49:54 PM
I have 2 threads using the same StreamWriter (obtained from FileInfo.AppendText). This first thread will always use the WriteLine() method and the second thread will always use the Flush() method. At the present, I have protected the access to the StreamWriter using a Lock() section. Is this...more >>

Dynamic TreeNode creation in runtime
Posted by Ehsan at 9/23/2003 8:22:46 PM
What i want to achieve(in runtime): A root named "Home" with nodes added to it named "A","B","C" and so on til "Z". I want these subnodes named accordingly Home_A, Home_B and so on, in the code so they can be accessed like Home_G.Node.Add("bla bla"). Basicly, i'm trying to make a "Register" w...more >>

multithreading server
Posted by Dirk Reske at 9/23/2003 7:47:33 PM
Hello, how can I realize a server that starts a thread which is listening for connections. this thread have to start a new workerthread for each new connection and continues listening? some code snippets? thx ...more >>

Help with Localization
Posted by CGuy at 9/23/2003 7:46:22 PM
Hi, I'm trying to develop an ASPX page that supports multiple languages. Everything has gone well till now - 1. Created a project in VS.NET 2003 2. Added 2 resource files named Captions.resx and Captions.fr.resx for English and French cultures respectively 3. Used the follo...more >>

get executable of a process
Posted by Dirk Reske at 9/23/2003 7:05:01 PM
Hello, wenn I create a list of running processes, how can I get the name of the executable file? thanks ...more >>

Problem in Deserializing...
Posted by lucas_natraj NO[at]SPAM yahoo.com at 9/23/2003 5:52:52 PM
Well, here's the situation.. It's pretty simple; just that I can't get it to work. I have 2 Executables.. The first one is called CSharp.exe which is a simple WinForm App. I have a single button on the form which does the following OnClick. // CSharp.cs private void button1_Click(object ...more >>

Implementing MS Access capabilities into C# project
Posted by vaughn at 9/23/2003 5:43:57 PM
I would like to be able able to implement some Access capabilities into my C# project. Is that possible? One of the capabilities I would need in my project is the Import Text Wizard so I can import a text file (like in Access) into another file (an MDB). Then the user would be able to divide the...more >>

XML Serialization Of A Class With Attributes
Posted by Amy L. at 9/23/2003 5:14:41 PM
I am trying to serialize a class to xml and I havent been able to figure out how to add attributes. I am trying to get a node to look like this <alert type="pager" >True</alert> I have this so far which produces this <alert>True</alert> [XmlElement("alert")] public string Alert { g...more >>

function to remove substring from string
Posted by vaughn at 9/23/2003 4:27:15 PM
Is there a function that'll let me find a substring of a fixed size? in other words, I'd like to get a substring in position X and length Y from a string. Left or Right wouldn't work since the substring's usually in the middle. Thanks. ...more >>

Web Image in Windows Form?
Posted by Jeff Griffin at 9/23/2003 4:14:56 PM
OK, this should be my last question for the day. I have spent a couple hours on google trying to figure this out but I probibly just dont know what I really need to be searching for. I have a Windows Form program that calls a web service that will return (as a string) the full url to an image ...more >>

How can I close a file left open by another process?
Posted by vaughn at 9/23/2003 3:34:53 PM
I'm trying to access a text file that was created by another process but I keep getting the contents of the file before the external process modified it. I believe the previous process left it open and doesn't let me access it. Is it possible for me to close the file before using in order to mak...more >>

instaniate an instance "dynamically" at runtime
Posted by Action at 9/23/2003 3:30:30 PM
Let's say class parent class B : parent class C : parent ....etc. (may add later......so I don't know how many classes will there...) I wanna to let the user type in the class name and instaniate a new instance e.g. string userinput = "classB" parent temp = new SOMEFUNCTION("classB"); I...more >>

Could language compilers be a NET app?
Posted by David Frank at 9/23/2003 2:54:01 PM
There are some glimmers of off-Intel net support, I was wondering if its theoretically possible to write a language compiler that was portable to another platform? ...more >>

What is an easy way to create DateTime from a string that contains date in the following format "yyyyMMdd"?
Posted by Sasha at 9/23/2003 2:53:43 PM
Hi, What is an easy way to create DateTime from a string that contains date in the following format "yyyyMMdd"? Take care, Sasha ...more >>

Why is C# so slow in this benchmark vs Java
Posted by Ralph Mason at 9/23/2003 2:43:00 PM
I was looking at this page http://www.garret.ru/~knizhnik/dybase/doc/dybase.html And noticed running the same code (Java ported to C# using the MS tool I expect) that the C# implementation is over 50% slower than Java in all tests. Coming in at the same speed as Ruby, which isn't known for i...more >>

datareader - traversing results from a query
Posted by lakshmi at 9/23/2003 1:49:49 PM
Hi all I'm trying to traverse through the results from a query that returns more than 1 row. The data reader reads only the first row. The following code doesn't work. Let me know what's wrong. do { while(reader.read) { x += y; reader.NextResult(); } }while reader.NextR...more >>

what is 'this' keyword for?
Posted by vaughn at 9/23/2003 1:45:06 PM
What is the 'this' keyeword for? If I'm filling a textbox, what's the difference between this.textbox1.Text = "my text"; and textbox1.Text = "my text"; ? I normally use it w/o the 'this'. Thanks. ...more >>

Using SerialStream.cs under 98
Posted by brinksr NO[at]SPAM comcast.net at 9/23/2003 1:44:27 PM
In attempting to use the GotDotNet SerialStream class under Win98 a call to CreateFile("COM1",....) is failing. A call to Marshal.GetHRForLastWin32Error() returns a code of 0x80070078 ("call valid only in Win32 mode"). Does anyone know if this indicates that the CreateFile() call will just no...more >>

Still Need Help with this Problem
Posted by Wade Beasley at 9/23/2003 12:30:48 PM
I am still struggling with this problem of getting my 2 list boxes to show the initials items as being selected on the first time that I go to the Tab with the boxes on them. I am reading from my database multiple bit columns with true or false and using the listbox.SetSelected( index, true...more >>

the use of enum.
Posted by developer1996 at 9/23/2003 12:30:43 PM
Can someone please explain to me why you cannot use enum at the method level to define a type. The declaration seems to only work at the class level. From my understanding enums are classified as a user define type. I do understand that in order to define a type you have to derive it fro...more >>

convert to C#
Posted by pcPirate at 9/23/2003 12:24:20 PM
Hi, Can anyone help me to convert the following VB6 code into C#??? Declare Function SQLSetConnectOption Lib "ODBC32.DLL" (ByVal hDbc As Long, ByVal iOption As Integer, ByVal lValue As Long) As Integer Thanks in advance pcPirate ...more >>

Question on operator 'new' in c#.
Posted by Andrea at 9/23/2003 12:16:17 PM
I found in internet this example of code. I'd like to know somthing about what happens behind the scenes when these lines of code are executed: //----------- Code Snippet ---------------------------- GenericCustomer[] Customers = new GenericCustomer[2]; Customers[0] = a; Customers[1] = ...more >>

Validating a string?
Posted by Jeff Griffin at 9/23/2003 11:58:33 AM
I am looking for a good referance on how to validate a string in C#. Specifically have a string which will contain a postal code that may or may not be in the US. I need to check this string to decide wheather it is in the US or outside the US. I think all I really need to do is see if the strin...more >>

Purchasing VS.NET on eBay
Posted by John at 9/23/2003 11:37:40 AM
I think this should be on topic. Many of us here may have considered purchasing Visual Studio.NET on eBay or other web auction sites. However, I would like to issue a warning that there are some sellers who will list the 2003 promotional upgrade (for sale by Microsoft for $29), evaluation copie...more >>

Using a progress bar in the Status Bar
Posted by Vijay Balki at 9/23/2003 11:25:44 AM
I would like to have a progress bar as part of my StatusBar. This is just like in Internet Explorer, where when a page loads a progress bar becomes visible, shows progression and disappears. I would like to achieve the same in my application for fetching files. Thanks Viay ...more >>

Can an object be cast into a certain type?
Posted by cnathaide NO[at]SPAM yahoo.com at 9/23/2003 11:21:19 AM
Hi, I have a function where I would like to test whether an object is of a certain type. Here is my code so far. public bool HasValidType(Type t, object val) { try { if (t==typeof(double)) { double x = (double) val; } else if (t==typeof(System.DateTime)) { ...more >>

bootstrapper sample how ??
Posted by james at 9/23/2003 10:51:38 AM
I know this has been asked a million times, but I have read all the MS links to installing the .Net framework with a setup project and I still cannot figure it out. First of all the docs keep referring to Bootstrapper Sample, where is the Sample ??? All I can find is how to write the Settings....more >>

AppDomain.UnhandledException: Removing the default handler!
Posted by Martin Lapierre at 9/23/2003 10:44:01 AM
How can I remove the default exception handler handler? When adding a custom handler, I can't get rid of the VS.NET unhandled exception dialog. Ex: AppDomain currentDomain = AppDomain.CurrentDomain; currentDomain.UnhandledException += new UnhandledExceptionEventHandler(MyHandler); MyHan...more >>

Control Added
Posted by Marco at 9/23/2003 10:36:19 AM
Using the Layout event of a control and the AffectedControl property, how do I know if a control was added to or subtracted from the main one ? Thanx. _____ Marco ...more >>

Can Crystal Report show dynamic picture?
Posted by Sam at 9/23/2003 10:34:27 AM
Hello everyone, I have a table, which contains a picture column, I put URL info into it. "www.myweb.com/1.jpg..." I want to show this picture in my crystal report, I find some samples show the "static" picture in Crystal report, No "Dynamic" one. Can Crystal Report do that? Thanks in advanc...more >>

DataBind Problem... Help!!!
Posted by csharparchitect NO[at]SPAM hotmail.com at 9/23/2003 9:52:59 AM
I'm new at this so please bear with me. I have two webforms, for example purposes I'll say a.aspx and b.aspx... a.aspx has a datagrid populated from MS Access with all the records, including contactID. On b.aspx, I want to populate a datagrid with only one record, based on the selected row from ...more >>

StringBuilder
Posted by Alvin Bruney at 9/23/2003 9:27:07 AM
On the advice of a user, I've timed stringbuilder v string. Here are the results. Here are the numbers: Total # queries 3747 Time in Milliseconds StringBuilder: String 460.6624 320.4608 350.504 220.3168 240.3456 230.331...more >>

Unicode font in international application
Posted by Joerg at 9/23/2003 8:58:28 AM
I am in the process of creating an international GUI application with C# on ..NET1.1 (Win2k), which is supposed to implement a particular look/design. In order to achieve this, I plan amongst others to define a certain font (MS Arial Unicode) for the user controls, and provide custom controls whi...more >>

Question about Styles in Workbooks
Posted by Kalaora luc at 9/23/2003 8:39:09 AM
I transfert data in a Excel File. I want that the border of the cell in Excel have only left and right border. if i do : range.Columns.Borders.LineStyle=Excel.XlLineStyle.xlContinuous; My cell have up, down, left ,right borders. How can have only left and rigth border ? Thanks for you...more >>

[Math Sqrt] Timing Problem ???
Posted by Reiner Apke at 9/23/2003 8:38:07 AM
Hello, I have got a very strange problem with the calcualtion of the the square root (Math.Sqrt()). I calculate in a loop a lot of of diameters maxDiameter = Math.Sqrt(maxCrossSection * 4.00 / Math.PI); minDiameter = Math.Sqrt(minCrossSection * 4.00 / Math.PI); In my Visual Studio .N...more >>

Overloading Operator+
Posted by Pranav Shah at 9/23/2003 7:09:31 AM
I want to Overload operator "+" such that I can add two complex numbers and but the sum into a third one, but I only want to call the constructor 3 times. Here is the current algorithm: Declare Three complex objects: Complex a,b,c; Sum a and b and save the result in c: c = a + b; ...more >>

using MSHTML for parsing HTML files in c#
Posted by philipl NO[at]SPAM vistatec.ie at 9/23/2003 1:36:10 AM
hi, Does anyone have any sample code for this?? I can't find anything relvant at all. Please share out some code if you have any. thx...more >>


DevelopmentNow Blog