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# > july 2003 > threads for wednesday july 30

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

Maths & Rounding
Posted by Daisy at 7/30/2003 9:43:46 PM
Something simple, I'm sure. My code: System.Windows.Forms.MessageBox.Show(((Int32)Math.Ceiling(1966 / 100)).ToString()); I'm expecting 20, but getting 19. What am I doing wrong? Thanks -- Daisy The Cow Now playing: Tomcraft - Loneliness [Radio] ...more >>

Assembly and C#?
Posted by Andre at 7/30/2003 9:11:18 PM
Just wondering.. since we can have C modules being called in from C#... can we then make assembly (x86 assembly) calls from C#? If so, can someone please give me an example of how that's possible? Thanks -Andre ...more >>

Accessing System Menu from C#
Posted by TB at 7/30/2003 4:50:51 PM
For a simple form without its own menu I wanted to add an "About..." command to the system menu as I would for an old MFC/C++ application. However I cannot find out how to access the system menu other than to toggle it on/off via the ControlBox property. Is this simply a .NET style bei...more >>

DirectoryEntry
Posted by Potiguar Faga Catalan at 7/30/2003 4:39:30 PM
I would like to know wich is the most appropriate newsgroup to post messages regarding DirectoryEntry class issues? Thanks in advance Potiguar ...more >>

SSE and MMX support in the JIT compiler
Posted by Andre at 7/30/2003 4:06:43 PM
Hi, I was wondering if anyone knows whether the JIT compiler supports SSE/SSE2 instructions? Thanks -Andre ...more >>

Disposing and Nulling.
Posted by 455 at 7/30/2003 4:00:29 PM
Hello. I'm quite new to C# and am wondering which things I need to clean up when my code completes, if any at all. For example... Assembly a = Assembly.Load(ServiceName); Type mm = a.GetType(AssemblyName); object o = Activator.CreateInstance(mm); bject [] par = new object[] {xDoc}...more >>

Error Reading Configuration Settings
Posted by Guogang at 7/30/2003 3:49:01 PM
Hi, I am deploying a project to a laptop. It works fine on my development computer, and I have tested once a few weeks ago. However, this time, the program can not start at all. After some digging, I find that it stops right at the following line (this line is part of the function called by...more >>

Stack Overflow?
Posted by David N. at 7/30/2003 3:37:27 PM
My small C# application, running on a Windows 2003 server machine with 512 RAM and 80 gigabytes of diskspace, always bombs out with the following error: >> Fatal stack overfollow error. What can I do to fix this error? ...more >>



User Interface
Posted by J. Marcelo Barbieri at 7/30/2003 3:23:42 PM
I've sorted many difficulties, but couldn't manage these ones: 1)I have textboxes in my form with MaxLenth property set. How can I configure them to automatically chance focus to the next one when the maximum lengh is reached? 2)How can I use the "Enter" key to tab from one textbox t...more >>

C# on 98
Posted by Mike at 7/30/2003 3:20:57 PM
Can I develope and run C# apps on win 98 with PWS if i create web apps? ...more >>

Get Physical location
Posted by Dani Peer at 7/30/2003 2:54:18 PM
Hi, I build a COM interop DLL. I want that this dll will be able to get it's PHYSICAL LOCATION since I need it to read an XML file. How can I get the Physical location. Directory.GetCurrentDirectory() returns working directory. Any solutions ? Dani ...more >>

NULL values
Posted by jfish13 NO[at]SPAM snip.net at 7/30/2003 2:45:20 PM
How are people handling NULL values for value types. Descriptions of problem Say you have a typical method with the signature: public int InsertPerson(string firstName, string lastName, int personCategoryID) Now say you only want the firstName and lastName parameters to be required and...more >>

Parent
Posted by rino at 7/30/2003 2:34:15 PM
How can I call word from my application as PARENT ? My application is a MDIparent program and when I call the Word, it isn't parent.....!! Thank's a lot .. ...more >>

Microsoft Office Add-in (C#) ?
Posted by Benne at 7/30/2003 2:33:09 PM
Does anyone have some samplecode, to make add-ins in Office ? I want to make a c# project, compile it and make an install package, which adds functionality (extra menuitems) to Word / Excel ? Thanks, Benne ...more >>

pointers
Posted by J. Marcelo Barbieri at 7/30/2003 2:31:20 PM
Can I use pointer in C# the same way I used to do in C++? ...more >>

Memory
Posted by J. Marcelo Barbieri at 7/30/2003 2:22:12 PM
In the following array instantiation, what will be the memory space allocated in the Heap? object[] myarray = new object[10]; thanks a lot. ...more >>

foreach - IEnumerable vs Property
Posted by J. Marcelo Barbieri at 7/30/2003 2:20:48 PM
I managed to do a foreach to go through all the elements in class2 using a public property, as you can find bellow. I know I could obtain the same result implementing the IEnumerable interface, but what would be the difference??? thanks, namespace IndexerTest { class Class...more >>

Splash Screen
Posted by Mori at 7/30/2003 2:04:03 PM
Hi, I have a splash screen that displays on screen before my main GUI. The splash screen appears in front of any other windows that happen to be open at the time but when my main GUI finally appears, it is behind the topmost window, whether it is an open folder or Outlook Express or whatever...more >>

Default Property
Posted by Shawn B. at 7/30/2003 1:57:45 PM
How do I set a default property in C#? In VB we use the default keyword before the property. Thanks, Shawn ...more >>

Modifying Existing Data
Posted by MikeY at 7/30/2003 1:47:08 PM
Hi everyone, Using C#, Windows forms. I am trying to learn how to modify existing data with in MSDE table/fields. If anyone could help me out with my code, I would appreciate it. My code is as follows: private void btnEmpModify_Click(object sender, System.EventArgs e) { DataTable thisTable...more >>

class visibility
Posted by Franz at 7/30/2003 1:42:23 PM
How can I create a class which is private in a namespace? i.e. all classes in the same namspace can access to that class, while other classes outside the namespace don't have the accessibility. -- My C++ and C# ( Traditional Chinese ) Web Site : www.franzwong.com/Home.php ...more >>

launch batch file in a WebMethod
Posted by amy at 7/30/2003 1:04:44 PM
the following is my WebMethod (GetPrc) to launch a batch file which will take about 10 seconds to be processed. I get the "The page cannot be displayed...HTTP 500 - Internal server error" for both do-real-job hello.bat and the empty hello.bat file. [WebMethod] public string GetPrc( str...more >>

Getting Field Value with Reflection?
Posted by info NO[at]SPAM fretweb.com at 7/30/2003 12:51:05 PM
Hello, I'm currently using reflection to get some data from an assembly created from a web form that has elements such as a DataGrid, DataSet, etc. I also have a label control. Getting the fields, methods, etc is no problem but where I'm having difficulty is obtaining the text value assigne...more >>

C# Question
Posted by Jason MacKenzie at 7/30/2003 12:46:26 PM
I'm new to C#. Can someone please explain to me what the second line means? I'm trying to change it to VB.Net. Thanks for any help. Jason MacKenzie int iUAC = (int)deUser.Properties["userAccountControl"].Value; aAccountLocked = ((iUAC (int)ActiveDs.ADS_USER_FLAG.ADS_UF_LOCKOUT) != 0...more >>

Text Color
Posted by Randy at 7/30/2003 11:56:20 AM
Hello All, I want to change the color of a string mid way into the string. Example: Say I have a string "This is a test" What I want to do is have "test" a different color from the rest of the string. Is there any way to do this? Thanks ...more >>

How to send Date from modeless Dialog to main form?
Posted by Marian Heddesheimer at 7/30/2003 11:51:55 AM
Hi, I have a C# main form which creates a new non-modal Dialog. From the modal Dialog I can update data via a public attribute from the Dialog, but how do I notify the main window that data has changed? In MFC I just used SendMessage to send a WM_NOTIFY. Is there an equivalent in plain c# o...more >>

C# equivalent to C's #define
Posted by Scott at 7/30/2003 11:42:25 AM
What is the equivalent way to #define a variable and value in C#? I am porting a program with multiple #define's as such: #define TIFF_VERSION 42 #define TIFF_BIGENDIAN 0x4d4d #define TIFF_LITTLEENDIAN 0x4949 C# supports #define but not adding a value to it. Is there a better ...more >>

C# xml documentation - list tag problem
Posted by Marty McDonald at 7/30/2003 11:15:18 AM
I use the following, and then use Visual Studio's "Tools", "Build Comment Web Pages". But on the generated pages, the list elements don't show up as lists, just text that wrap around. Am I doing anything wrong? Thanks... Following is a cut & paste from MS documentation that, when copied into my ...more >>

SQL Server @@identity Problem
Posted by Micheal at 7/30/2003 10:53:01 AM
The below code does _not_ work! The datatype for the autoincrement value is INT in SQL Server 2000. The strange thing is that if I use a 'decimal' it works (using .NET framework 1.1) --------------------------------------------------------- string sql = "insert into sports (name) value ('tes...more >>

xmlNode auf xmlElement casten
Posted by andrej at 7/30/2003 10:48:46 AM
hi, ich habe eine anwendung, welche ein xml document erstellt. um festzustellen, ob ein element bereits vorhanden ist,=20 verwende ich die funktion=20 selectsinglenode( ....) diese funktion liefert mir ein element des typs node.=20 das xmlNode kann aber nicht wirklich viel. z.b Attri...more >>

C# extended stored procedures?
Posted by JJ at 7/30/2003 10:40:27 AM
Can I write an extended stored procedure using C#? I see most are written C/C++. I have a app I am designing and I need a UDF to raise custom errors. The only way I can see doing this is by having the function call an xp that will raise the error for me since the UDF can raise it direct...more >>

Overloading operator== and comparing to null
Posted by Paul Lyons at 7/30/2003 9:43:45 AM
Not sure how I've not come across this before... I've overloaded operator == for one of my classes using the following code. public static bool operator ==(Stock x, Stock y) { return x.Equals(y); } public override bool Equals(object obj) { Stock queryObject = null; if (obj...more >>

Build Errors on C# Console App
Posted by dm_dal at 7/30/2003 9:27:24 AM
I'm trying to compile the FileSystemWatcher example on MSDN but it won't compile and gives the following build error: 1) An object reference is required for the nonstatic field, method, or property 'FileWatcherDaemon.fileWatcher.OnChanged(object, System.IO.FileSystemEventArgs)' This is g...more >>

C# equivalent for IntStr()
Posted by warwulfi NO[at]SPAM aol.com at 7/30/2003 8:59:50 AM
Hi, I'm currently working on automated tests where we formerly used Visual Test. Is there anywhere an equivalent to the IntStr(string a, string b) function? It does exist in VB, but apparently not in C# ? Is there any special reason or convenient replacement ? thx , Ulf...more >>

loop through listbox values
Posted by yue at 7/30/2003 8:22:31 AM
Hi, How do I loop through listbox items? Thanks, yue...more >>

RegistryKey function
Posted by R A at 7/30/2003 7:50:06 AM
Hi I write the registry value using the following: Size size = new Size (100, 500); Key.SetValue (ClientSizeName, size); How can I retreive the value back to a Size type? When I use System.Type t = Key.GetValue (ClientSizeName).GetType (); It comes back as a string, and thats ok b...more >>

BackColor on MDI container
Posted by Bergsvein Vollan at 7/30/2003 6:39:38 AM
I have a form with a certain BackColor. I'd like it to be an MDIContainer but as soon as I set the IsMDIContainer property to true my BackColor becomes gray. Isnt it possible to have an MDIContainer with a colored background? Bergsvein Vollan...more >>

Cutting and Pasting
Posted by Abe Frohnman at 7/30/2003 6:25:15 AM
Hey all, I have another task I'm trying to find the solution for. I have a text box that I want to cut and paste text into, from a menu. This is the code I have so far: private void menuItem6_Click(object sender, System.EventArgs e) { if (textBoxDescription.ContainsFocus) { ...more >>

DateTime Comparison
Posted by yue at 7/30/2003 5:39:04 AM
Hello, I want to compare 07/29/2003 to System.DateTime.Now I never get a match. I suspect it has something to do with the timestamp after the date. How do I get rid of the timestamp? Or better yet, how do I get the dates to compare just on the date. ie I want 07/30/2003 compared to 07...more >>

C# .NET compiler
Posted by Sebastijan Vacun at 7/30/2003 5:08:56 AM
Does anybody know, if there exists any compiler for C#? like javac compiler for java I want to program in UltraEdit and have just compiler to build a project. Thanks in advance. best regards, Sebastijan...more >>

How to convert a DateTime to a long
Posted by Vicki Carlsen at 7/30/2003 5:06:59 AM
Hi, What is the easiest way to convert a DateTime object to a long?? - And the other way back?? (For database use) Regards, Vicki ...more >>

ANN: Future of .NET, Whidbey, Orcas
Posted by Thomas Scheidegger [MVP] at 7/30/2003 2:54:24 AM
Some new details to the next .NET and Visual Studio.NET versions: http://www.microsoft.com/presspass/press/2003/Jul03/07-29InnovationListPR.asp New 'Roadmap' up to 2005 ! http://msdn.microsoft.com/vstudio/productinfo/roadmap.aspx -- Thomas Scheidegger - MVP .NET - 'NETMaster' ...more >>

Exit an Application
Posted by Rajesh Abraham at 7/30/2003 2:38:37 AM
I have a form, which is getting some settings from the App.config in the form load. If the Key doesn't exist, I need to close the application after trapping the error. I tried Application.Exit() and Form.Close() neither seems to be the right one. Thanks, Rajesh Abraham Chacko...more >>

Code to launch brower?
Posted by Abe Frohnman at 7/30/2003 1:33:45 AM
I'm looking for code that will launch the default browser to a webpage when an event occurs. Specifically, when an item is selected from the menu. Can anyone point me in the right direction? ...more >>

Integers in ArrayList
Posted by Jesper at 7/30/2003 12:57:35 AM
Hi, How, I would like to make a collection of integers. As an integer is not a class I can't figure out how to store it in a collection. The list will be generated dynamically. Any suggestions. int i = new int() i = 5; arrayList.Add(i) ... Seems to compile, but is this a reccomended ...more >>

Dynamic arrays
Posted by Dusty at 7/30/2003 12:17:40 AM
How can I make my dynamic array ? I'm curios how the ArrayList does it. For example: string[] s = new string[16]; and later I want to expand this array to more than 16 elements without loosing previous data (like ReDim in VB). Any ideas ? ...more >>

Theoretical Question : Explicit Object 'Destruction'
Posted by jdn at 7/30/2003 12:13:10 AM
I've read various things about this and am not sure what the 'best practice' (hate that phrase but there you go) procedure is. Suppose in a class I have something like: Object myObject; where Object is some class I've created. I do things with myObject. Instantiate it, pass data to an...more >>

2 questions I hope make sense
Posted by Mike at 7/30/2003 12:00:29 AM
1. I am creating a project that will have many c# files (100+). I want to split this project up into modules but I am not sure what the best way would be. I was thinking of creating a blank project and creating other projects inside this blank project where each one of these projects wo...more >>


DevelopmentNow Blog