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 2004 > threads for thursday april 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

What am I missing (TabStop)
Posted by John Baro at 4/1/2004 11:49:08 PM
Where is my TabStop property. I want to prevent tabbing to a label. In the MSDN it shows Label.TabStop Property This member supports the .NET Framework infrastructure and is not intended to be used directly from your code. And sure enough it is not accessible. HUH? BJ ...more >>

Reading a large text file line by line backwards
Posted by Amy L. at 4/1/2004 11:37:11 PM
Is there a way through .net to read a very large text file (400MB+) backwards line by line. In system.io the filestream class has a "seek" method but the only read method requires you to know how many bytes to read in. My problem is that the line length of this log file is not constant so the...more >>

Regex question
Posted by Du Dang at 4/1/2004 11:27:33 PM
Text: ===================== <script1> ***stuff A </script1> ***more stuff <script2> ***stuff B </script2> ===================== Regex: <script>[\s\S]+</script> I use "[\s\S]" intead of "." because there is newline char within the text. The regex above will give me ...more >>

WaitCursor beyond my application
Posted by seash at 4/1/2004 10:11:04 PM
H i had set WaitCursor for some processing in my application, This works fine for my Windowsform, but i want to extend this wait cursor to all other programs i.e only waitcursor(hourglass) should appear on my screen irrespective of Mouse position on any application on the screen when i move mous...more >>

How to build an (list)array of types
Posted by G.Esmeijer at 4/1/2004 9:56:42 PM
Friends Coming from vb I was used to do the following private type AnyType A as STRING B as INTEGER end Type DIM anyArray() as AnyType after giving the array a dimension like REDIM anyArray(1 to 10) I was able to access any element as follows: anyArray.A(1) =...more >>

Viewing the actual C# build process
Posted by SteveB at 4/1/2004 9:36:05 PM
Being a C++ developer, I'm not used to a build performing automagically. For instance, App.config automatically being renamed and placed in the bin\debug folder and project.en-US.resx resource files mysteriously producing satellite DLLs. Yeah this is convienent, but where in the project/IDE is this ...more >>

Pause console output
Posted by Dan Williams at 4/1/2004 8:40:28 PM
Does anyone know if its possible to pause the console output if my console app tries to write data past the current command prompt buffer? In other words, behave much like the 'more' command, in that it stops outputting and waits for the user to hit space to display the next pages worth, or en...more >>

Copying images from toolbar image list to system menu
Posted by Will Pittenger at 4/1/2004 8:01:11 PM
I have a program where I used Win32 calls to add items to my form's system menu. Now I am attempting to have those items use the same icon that the corresponding toolbar button uses. I thought that I could just access the image on the fly and send it to Windows. Trouble is that results in an ...more >>



Calls from C code
Posted by Mike at 4/1/2004 7:35:31 PM
Hi, Is it possible to call a VB/C# class' method (or module) from within a C = application? If so, is there any resource I could look at to see how to = make this work? Thanks Mike...more >>

Distribuite
Posted by Valerio Blanco y Pinol at 4/1/2004 7:34:18 PM
I have the following problem: to distribuite a project done with Visual C#, do I need to distribuite even the full (104 MB) framework or there is an easier way (as MFC) to use my project? __________________________________________________________________ Valerio Blanco y Pinol Programmer ICQ#: 3...more >>

static variables in C#
Posted by Natalia DeBow at 4/1/2004 6:37:33 PM
Hi, I have a quick question. I am using a static variable to hold an instance of the StreamWriter: private static StreamWriter sw = File.AppendText("C:\\Temp\\Test.txt"); I am curious to find out how static resources are being disposed in C#. The problem that I am having is I am opening ...more >>

Consecutive threads
Posted by choyk1 at 4/1/2004 6:26:03 PM
As shown below, the genetic algorithm is applied to consecutive objects The next calculation should not begin until the previous calculation ends However, without any code between ...., calculation thread is generated simulataneously As I monitor ts(ThreadState), it maintains constantly 'Backgro...more >>

arrays newbie
Posted by francois at 4/1/2004 6:23:58 PM
Hi, I have an ArrayList object and I want to transform it into an array like int[] I of course do not want to loop myself Then I thought that I could do the following: ArrayList list = new ArrayList .... // here fill the array with integers int j = 3; System.Type type = j.GetType()...more >>

Wrapping WinPCap
Posted by x41979 NO[at]SPAM usma.edu at 4/1/2004 5:27:28 PM
Hi, I'm a bit of a novice at this but i'm running into a few problems trying to wrap winpcap in C#. I know I can use a special socket flag to pick up all packets across an interface but this solution needs to work w/o an IP bound to the socket so winpcap is the only way to go (and so I can ge...more >>

Change name of variable
Posted by Arjen at 4/1/2004 5:15:08 PM
Hello, In my C# ASP.NET webapplication I have used these variables: tabid and tabindex. I'm using these in the code and querystring. Now I want to give these variables an other name. I tried to search/replace with VS.NET but "tabindex" is also used in forms to set the tabindex. Is there...more >>

accessing nonstatic object from static and nonstatic methods
Posted by Chris Clement at 4/1/2004 5:06:33 PM
I have been handed a project that someone else started and most of it was developed in the VS.NET design mode. For whatever reasons, when I try to make changes to the controls in VS.NET design mode, I suddenly get a ton of these errors: cs(1189): 'class.form.checkedListBox1' denotes a 'field...more >>

TypeLoad Exception
Posted by Tunga Torgal at 4/1/2004 4:43:15 PM
Hi, I'm getting an System.TypeLoadException with this type def: [StructLayout(LayoutKind.Explicit, CharSet=CharSet.Ansi)] public struct SCFEDBTxnItem { [FieldOffset(0)] public SCFEDBTxnItemHeader sHeader; [FieldOffset(0)] public SCFEDBTxnOrderItem sOrder; [FieldOffset(0)] public SCFEDBTxn...more >>

How to use SSL for TCP sockets.
Posted by Prabhu at 4/1/2004 4:35:33 PM
Can any one help me in using SSL for TCP sockets in .net ? Regards Prakash K. Prabhu ...more >>

enumeration help
Posted by Luke Smith at 4/1/2004 4:17:31 PM
i have the following enum length { metres = 0, centimetres, millimetres } By knowing the integer (0, 1 2 ....) how do i obtain the name (metres, centimetres....)?? thanks -- //remove SPAM to reply by email ...more >>

going back
Posted by ichor at 4/1/2004 3:49:15 PM
hi sometimes i edit a file and then go to another c# file .. is there any shortcut to go back to the older file (s)? coz i have so many files. i sometimes get lost ...more >>

return object from WebMethod
Posted by kids_pro at 4/1/2004 3:39:01 PM
Hi there, I try to create a webmethod in webservice by return DataView but each time I compile there is and error [WebMethod] public DataView GetAuthor(){ ..... return ds.Tables["Authors"].DefaultView; } You must implement the Add(System.Data.DataRowView) method on System.Data.D...more >>

Desktop database suggestion
Posted by Mark Rae at 4/1/2004 3:36:49 PM
Hi, I'm writing a WinForms app in C# and need to store various items of lookup data which will be accessible and maintainable by the user. I'm looking for advice as to the best way to achieve this, according to the following provisos: 1) The app must be able to "match" records according to ...more >>

Algorithm question
Posted by Home Newbie at 4/1/2004 3:20:07 PM
I have some stupid questions.... - Why would program 1 run faster than program 2? If I change the sample_size to be a larger one, program 2 made my browser frozen!! - What is the optimum value (1024 in this case) to use? Program 1: ----------- int sample_size = 5120; // 5K for (i=0;...more >>

Process User
Posted by Noah Coad [MVP .NET/C#] at 4/1/2004 3:13:20 PM
Howdy! I need to know what user is using which process on the system. "System.Diagnostics.Process.GetProcesseses" will return an array of processes, but I need to know if the process returned is owned by the current user or other users on the system (Windows 2003 Server). How is this accompl...more >>

No value given for one or more required parameters
Posted by mp at 4/1/2004 3:02:17 PM
No value given for one or more required parameters. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Data.OleDb.OleDb...more >>

Custom DataGrid and overriding ProcessCmdKey
Posted by Susanne Christe at 4/1/2004 3:00:20 PM
Hi Folks, I'm trying to override protected ProcessCmdKey function in writing my a custom MyDataGrid. I get the Keys I want, but it takes no effect to MyDataGrid, if I try for example execute myDataGrid.Select(rowNum); MessageBox.Show is coming up, but this takes no effect on Select or Foc...more >>

EBCDIC file format to byte format
Posted by R.A. at 4/1/2004 2:59:05 PM
Hi Is there some support for this file conversion in c#? Thanks ...more >>

Creating control arrays at design time.
Posted by Mark Broadbent at 4/1/2004 2:58:16 PM
In VB6 (using visual studio) it was possible to create a control array at design time by simply adding the control (e.g. textbox) and renaming it to what would become the first element e.g. Name => MyTextbox to Name => MyTextbox(1) you could then copy this control array element an...more >>

SystemInfo@AboutForm.CS
Posted by genc ymeri at 4/1/2004 2:36:14 PM
Hi, I have an About form and I need to know how to run "System Info" clicking to a button of the "About" form ????? ( "System Info" path may change from one system to another one) Thank You in advance. ...more >>

Removing datagrid row
Posted by FusionGuy at 4/1/2004 2:02:09 PM
I have a Windows Forms app with a datagrid that binds to an XML data island. Upon double-clicking a row in the grid, I want that row to simply disappear WITHOUT having to rebind. What's the easiest way to do this? Thanks. ...more >>

Battles with sorting DataGrid control.
Posted by ChrisM at 4/1/2004 12:59:35 PM
Can anyone please tell me what I'm doing wrong here. I have a Windows Form with a DataGrid on it, and I'm having real problems with the Sorting. It is easy to reproduce the problem I have. If you create a new Windows Application Put a DataGrid control on it. Put the following in the onlo...more >>

bitwise logical operations
Posted by Filip Kratochvil at 4/1/2004 12:15:49 PM
Hello all, In VB6 I'm able to do the following: If (intValue And 64) = 64 Then ... do something here ... End If where intValue is for examle 4160 (to satisfy the condition) if i have a C# consolle application with: Console.WriteLine(4160 & 64) I will get 64 as a res...more >>

casting
Posted by ichor at 4/1/2004 12:15:38 PM
hi i am wondering why my first line works but the 2nd doesnt. float f; f= Convert.ToSingle (IntegerTextBox.Text) ; f = (float) (IntegerTextBox.Text ); //ERROR cannot convert from string to float thanx ...more >>

Interface
Posted by Kannan at 4/1/2004 12:06:09 PM
hi My question might be a simple questions. I am doing C# maintanance project I have seen so many places Interface is used in my main class. But I could't not understan what is the use of Interface. Because Interface having only the Property and method declaration only. Why we have to use that...more >>

DataBinding generates exception ???
Posted by Chris at 4/1/2004 11:41:15 AM
Hi, I have a DB-table 'AirplaneTypes' that has to 2 fields that form the primary key : 'at_name' and 'at_model' both in the DB defined as type : char 15 MyWinform client : void Form_Load(...) { // m_dsAirplaneTypes1 is the DataSet DataTable myTable = m_dsAirpla...more >>

Additionally...
Posted by Nicholas Paldino [.NET/C# MVP] at 4/1/2004 11:38:51 AM
Dan Fernandez talks about some of the other changes to the Base Class Library as well here: http://blogs.msdn.com/danielfe/archive/2004/04/01/105653.aspx -- - Nicholas Paldino [.NET/C# MVP] - mvp@spam.guard.caspershouse.com ...more >>

Be very afraid.
Posted by Nicholas Paldino [.NET/C# MVP] at 4/1/2004 11:32:26 AM
Eric Gunnerson just posted this in his blog: http://blogs.msdn.com/ericgu/archive/2004/04/01/105644.aspx Be very afraid. -- - Nicholas Paldino [.NET/C# MVP] - mvp@spam.guard.caspershouse.com ...more >>

Available indexers?
Posted by jburnham NO[at]SPAM epiqsystems.com at 4/1/2004 11:28:20 AM
How does one determine what indexers are available on a given object? The only way I have found is by looking at the Object Browser. But even then it only gives a simple signature like, this[string,string]. What are those strings? </jim>...more >>

HTML format problem
Posted by Aurimas Norkevicius at 4/1/2004 11:27:11 AM
Hi, I use XML Web Control to transform data. After transformation it outputs data in the form <table cellSpacing="0" cellPadding="0" width="773" align="center" border="0"> <tr> <td vAlign="top" align="left" width="194"> <img heig...more >>

ClickOne technology for .net framework 1.1
Posted by kids_pro at 4/1/2004 11:18:28 AM
Dear all, If it possible to use clickone technology in .net framework 1.1? How to configure it? Regards ...more >>

Expiring the Page To discourage Browser BACK button
Posted by Nithi Gurusamy at 4/1/2004 10:55:40 AM
Hello All: On the click of the back button, I just want the user to see "Warning: Page Expired...". I just couldn't do it in .NET. I am not sure what I am missing. I tried everything said in the Page.Response.Cache class. Even tried the traditional way of doing things in the previous ASP vers...more >>

Docking a window to the taskbar
Posted by Richard Heyes at 4/1/2004 10:31:01 AM
I'm in the process of writing an internal ticker app. How do I dock this to the taskbar (or the sides of the screen for that matter) and have it so maximised apps don't obscure it. Something to do with setting the working area perhaps ? Thanks. -- Richard Heyes ...more >>

Searching for attributes
Posted by Wernfried Schwenkner at 4/1/2004 10:07:33 AM
I want to implement custom attributes. They can be used in several assemblies. I want these attributes to register somehow. So I need the attributes constructor to be called when an attributes is assigned to a class (in several assemblies). I found out, that the construtor is only called, w...more >>

dataset limitaion
Posted by Ramesh at 4/1/2004 9:56:10 AM
hi Dataset object having any limitation?? How many tables we can create in the data set Thanks Ramesh...more >>

Adding your own tablestyle to datagrid depending on the DataTable?
Posted by Eddie B. at 4/1/2004 9:54:32 AM
Adding your own tablestyle to datagrid depending on the DataTable? Are there any good examples? ...more >>

Regex Issue
Posted by DevBoy at 4/1/2004 9:54:23 AM
I am in need of parsing string based on characters like / or { or } or ^ However, anytime I try and run the following code I do not the proper results (It always returns the same string unparsed. Regex rx = new Regex("{"); string[] segmentData = rx.split(str); Any helpful hints? ...more >>

parse currency string to decimal
Posted by Mark at 4/1/2004 9:21:47 AM
How do you parse a currency string to a decimal? I'd like to avoid having to parse the number out, removing the $ manually. That sounds like a hack. There are times that this string will be currency and others when it will be a text integer or decimal. //This bombs because of the string havin...more >>

C# equivalent for VB Class DEFAULT method
Posted by Mortimer Schnurd at 4/1/2004 9:14:51 AM
In VB, I could assign a "Default" to a class method. In that way, a reference to the Class always returns the result of that method/property (i.e. a reference to a textbox control always returns the contents of textbox.text). What is the C# equivalent? Is it the Indexer for that class? -- J...more >>

converting from legacy COM objects
Posted by Philip Townsend at 4/1/2004 9:11:44 AM
I have a large "legacy" web application written in asp.old that relied on some COM objects. While I am aware that it is possible to use legacy COM objects within an asp.net application, is it possible to do the reverse? In other words, would it be possible to rewrite some of the legacy COM objec...more >>

datatable question
Posted by anonymous NO[at]SPAM discussions.microsoft.com at 4/1/2004 9:09:40 AM
Hello all I have a dataset which contains 3 datatables. I traverse each datatable and check the rows. I should be able to get values out of these datatables and create a new datatable? Is this possible? or does a datatable always have to be associated with a SQL query or a SQL table? Thanks...more >>

Reflection and Error Logging
Posted by ryan_timmins NO[at]SPAM hotmail.com at 4/1/2004 9:07:37 AM
I would like to write an exception handler that can write out the stacktrace and the value of the local variables for each method in the stack. I was thinking reflection might be able to do this, but I haven't found anything yet. Does anyone have any code or advice on how to do this ?...more >>

Implementing a folder object?
Posted by Dave Veeneman at 4/1/2004 8:40:22 AM
I'm puzzling over the best design for a Folder object. I have two basic domain objects; leat's call them an Apple and an Orange. The objects are maintained in separate hierarchies, and each hierarchy is organized by Folder objects. A Folder object can contain either Apples, or Oranges, or oth...more >>

Forceing a client side REFRESH
Posted by Bryan G at 4/1/2004 8:37:19 AM
I need to force the client side to refresh the page. What function do I use todo this in C# with a ASPX page? ...more >>

HELP!!! VisualStudio has gone crazy!
Posted by Stephen Johns at 4/1/2004 8:07:56 AM
VS has gone totally nuts. Every time I add a component to a form, I get this goofy "New Control:" dialog that pops up and it is HUGE! Bigger than my screen. Also, I can add a contextmenu, but I can't edit it. I try to edit and nothing happens. No error message, nothing. Also, half the t...more >>

Fields are global to all threads of a method running in a class?
Posted by webcontact NO[at]SPAM yahoo.com at 4/1/2004 8:05:14 AM
C#.Net question for everyone I have a class that has a method that i run async from the Form. This class has one field string called log. I need this since i have an event that can write to it sometimes, and not only my async method. Now im noticing this log seems to be updated by both of ...more >>

C# - Audio synchronicity . . .
Posted by Stan Shankman at 4/1/2004 7:36:41 AM
From: Stan Shankman Thursday, April 01, 2004 Greetings all, Today, while pounding out some code, I noticed I was getting vary speedy with my key-strokes. I was listening to the radio, and it eventually dawned on me that I was synchronizing my typing with the beat of the music. So, just as...more >>

Read Barcode
Posted by mudasir_ahmed NO[at]SPAM yahoo.com at 4/1/2004 7:02:53 AM
I Guys : I am working on a Application to read barcodes from a scanner and list them in a ListBox on a web page. I was wondering if any one has done a similar job. Currently I have attached the scanner to my PC and as I scan a barcode it reads and puts it on a notepad or textbox. But I ne...more >>

How do I calculate elapsed time in milliseconds?
Posted by JSmith at 4/1/2004 6:33:00 AM
I want to determine the elapsed time between two events. What is the best way to do this? ...more >>

Move the form????
Posted by simsimlhr NO[at]SPAM hotmail-dot-com.no-spam.invalid at 4/1/2004 5:19:38 AM
We can move the form While mouse is pressed over title bar.If title bar is hide.Then how can we move the form while button is pressed over the client area. Any function Thanx in advance. Qasim Raza ----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==---- http://ww...more >>

VS is adding code when compiling
Posted by jonas NO[at]SPAM bootman.se at 4/1/2004 5:15:07 AM
I have created a derived version of a normal form, e.g. called MyForm (public class MyForm : System.Windows.Forms.Form). The form is simply specifing a standard icon that we use within the company. This fairly straight forward and not a problem. We have planed to use this form as the base form t...more >>

Help please. Red jagged lines are annoying
Posted by Brian at 4/1/2004 5:09:15 AM
I was hoping that someone could tell me how to disable the red jagged lines that appear underneath incomplete code (such as strings). For instance, if you're typing a message and pause two seconds to think about the rest of the message, a red jagged line will appear to inform you that your st...more >>

Normal Distribution
Posted by littlecharva at 4/1/2004 4:16:11 AM
Hi I need to convert a complicated Excel document that's been created by some Maths boffin into a program in C#. I've been doing really well (despite my Mathematical handicap) until I hit the Excel NORMDIST(x,mean,stdDev,cumulative) function. System.Math doesn't have any functions to help me out...more >>

ListView Drag Problem
Posted by Jim McLeod at 4/1/2004 3:51:11 AM
Dear Group How am I going wrong with this drag and drop procedure.. private void ResourceList_ItemDrag(object sender, System.Windows.Forms.ItemDragEventArgs e System.Windows.Forms.ListView ListView = (System.Windows.Forms.ListView)sender System.Collections.ArrayList ListItemArrayList...more >>

new modifier problem
Posted by aza_rc NO[at]SPAM yahoo.com at 4/1/2004 2:22:38 AM
Hi, I am attempting to alter the behaviour of a base class using the new modifier. I have hit a snag and am unable to hide the base class member. The skeleton code is below, I have included an override class derivation as well that does hide the member, why override does and new doesn't I am ...more >>

BindingContext problems
Posted by Depesz at 4/1/2004 12:49:03 AM
Hi My english is not perfect... I create a simple form by the Data Form Wizard. In last window of Data Form Wizard I chose display style "Single record in individual controls". After compilng the code my application works fine. Next I add a DataGrid control to my form generated by the Data Form...more >>

Binary file datagrid
Posted by Marie at 4/1/2004 12:01:09 AM
Hello, Could you help me ?? I have to modify a binary file (containing dates) : I want to access all records ie add,delete,and modify the dates in the binary file. I do not have experience with C#, so I thought that a datagrid was the right way to do this. So I did it, load the file in t...more >>


DevelopmentNow Blog