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 2004 > threads for wednesday september 8

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

Does [MethodImpl(MethodImplOptions.Synchronized)] lock the entire object?
Posted by Seeker at 9/8/2004 11:04:59 PM
Hello, I've read conflicting posts about [MethodImpl(MethodImplOptions.Synchronized)]. Does it or does it not lock the entire object? In my simple test it appears to block just the method but I wouldn't exactly call my meager test conclusive... thanks, Scott ...more >>

what is watch window really showing
Posted by Neil at 9/8/2004 10:52:09 PM
Hi, If I have the code line "DateTime d1 = DateTime.Now;" and look at d1 in the watch window, I thought I'd only see the properties of the DateTime object variable d1. However I seem to be seeing lots of other properties and objects - can anyone explain what these are and where they c...more >>

how to add to an Array?
Posted by typeMisMatch at 9/8/2004 10:35:01 PM
Hi, This may sound simple, here is my problem. I have a couple classes, Class1, Class2, Class3. Class1 has a collection of Class2 and Class3. Right now those collections are defined as ArrayLists. This is a problem because when you reference them eg: Class1.Class2s[index] you just get a...more >>

Is it possible to embed a zipped text file, then unzip or read from it at runtime?
Posted by Yogi_Bear_79 at 9/8/2004 9:59:00 PM
pardon my ignorance as I am a self-taught hobbyist programmer. I am curious after reading up on SharpZipLib. Can I embed a zipped txt file in my program? Then either read from within the zip file or unzip and read it? I currently have an embedded text file that contains a list that is rea...more >>

Struct Vs Classes
Posted by Ashish Sheth at 9/8/2004 8:55:42 PM
Hi Gurus, In C# why struct can't be inherited from another struct, just like a class can be inherited from another class? another question is all struct by default are inherited from System.Object class, how this is possible when it is not allowed to derive a struct from a class? and System.Obje...more >>

.ascx and Session
Posted by ousta at 9/8/2004 8:03:21 PM
Hi All, How apply Session[""] to .ascx files? Thx. ...more >>

Convert
Posted by Peter Osawa at 9/8/2004 6:44:30 PM
Hi, I want to parse a string char by char... This is the I do it with VB For i=1 To Len(strCadena) strResultado = Replace(strResultado,Mid(strCadena),1) Next i TIA...more >>

Can i call EndInvoke before an Asynchronously action ended?
Posted by Julia at 9/8/2004 6:04:27 PM
Hi, I am using Asynchronously Delegates,and I wonder Can I call EndInvoke to end the processing before THE Asynchronously action ended? Thanks. ...more >>



Thread safety ??
Posted by Support at 9/8/2004 6:01:56 PM
This doubt is regarding synchronisation question in Singleton pattern code of C# I had created a class as public sealed class SecuriteManager { private static volatile SecurityManager instance; private static object syncRoot = new Object(); private SecurityManager() { } ...more >>

[Q]How to call RasGetErrorString in the RASAPI
Posted by stuie_norris NO[at]SPAM yahoo.com.au at 9/8/2004 6:01:17 PM
Hello Group, I am trying retreive a string with error information from the RASAPI using C#. Currently I am always getting blank string returned from the call to RasGetErrorString, even though the command returns success indicating success. From the msdn doco the RasGetErrorString API (v...more >>

Including help
Posted by Diego F. at 9/8/2004 5:57:24 PM
Hello. I need to include help to a C# Windows Application. How do I start in Visual Studio 2003? Regards, Diego F. ...more >>

My kingdom for a ThreadPool Join
Posted by Novice at 9/8/2004 5:47:12 PM
I come from the land of Java and C++** where it is relatively easy to create a pool of threads, send them off to a task, then call the join method and await all of their completion. However, I cannot for the life of me figure out how to get this relatively simple concept working in .net - spe...more >>

Questin on Delgates
Posted by jw56578 NO[at]SPAM gmail.com at 9/8/2004 5:07:01 PM
I've read a basic tutorial on delegates but am still unclear about them. Can someone explain what the point of using them is. I don't completely understand them yet nor the reason for their use. Thanks...more >>

sqlConnection question
Posted by Mike D at 9/8/2004 4:46:40 PM
I hate to be a newbie but I am trying to write an C# web application with multiple Web Forms. Once a user selects a row from a datagrid, the primary key is passed to the next window and so on. The sqlConnections on all the windows point to a SQL 2000 Test database. How do I go about creating...more >>

XmlSchemaElement.SchemaType returns null - bug?
Posted by eXavier at 9/8/2004 4:43:17 PM
Hi all, I wrote some generator of classes from XSD files but encountred = unexpected (for me) values in parsed DOM. First I load XSD with XmlSchema.Read() method, then iterate through = XmlSchemaElements. I have a function IsComplex() which return bool value if it has simple content (e.g. typ...more >>

Constructor calling a constructor
Posted by Roger Webb at 9/8/2004 4:37:43 PM
How do you go about calling a constructor in the same class from another constructor? (see below) - Roger ie. public class1() { Does some general initialization } public class1(string Thing1) { /// Call class1() for general initialization /// set a property to Thing1 } ...more >>

Build Comment Web Pages...
Posted by Osvaldo Bisignano at 9/8/2004 3:51:59 PM
Is there any way to specify some other XML file for this command? This is my case: I'm planning to use a program that generates an XML documentation file FOR VB6 projects in pretty the same way VS does. (The program is VBDOX). But I need to transform that xml information in HTML format, ideal...more >>

Way to start a number of threads and then block until they finish?
Posted by Novice at 9/8/2004 3:47:02 PM
Hi all, I have written some code that invokes a method a few hundred times and then it immediately finishes. I would like it to instead: 1. start the hundreds of threads (asynchronously) 2. Then block until all threads have finished executing Currently I have something like the following: ...more >>

ListBox Items not Updating/Refreshing
Posted by gdbjohnson-AT-yahoo-dot-ca-nospamplz at 9/8/2004 3:15:10 PM
I have a ListBox built of a simple custom object for the ListItems used to be able to hold a Data Value, and a Display Value, with accessors for each. I have overridden the ToString method to display the Display value. (Two examples that I have seen, including an MS example, suggest ...more >>

other table that stores data differently than ADO.Net datatable?
Posted by VMI at 9/8/2004 3:00:05 PM
We have this huge application that's based on storing tons of data on a dataTable. The only problem we're having is that storing LOTS of data (1 million records) into a datatable will slow down the system since all this data will be stored in memory. The performance is really affected with this. ...more >>

Why my C# helloworld program use 16Mb of RaM ?
Posted by elpako at 9/8/2004 2:32:37 PM
and how to fix it ?...more >>

Compressing soap content
Posted by Dante at 9/8/2004 2:31:06 PM
I have developed a PHP web service that runs on a linux machine. I have also developed a windows forms client to the web service in C#. The only problem that I'm having is that the data that I send to the web service is too large. For one, the server denies any post greater than 8 MB. It also...more >>

In the following example, is the use of 'volatile' not needed.
Posted by Hasani (remove nospam from address) at 9/8/2004 1:53:48 PM
Assume that this is running on a multiprocessor machine and multiple threads are invoking both methods of the class below. Since I lock access to the _value member, there should be no reason for me to mark _value as volitle. Though, by marking it as volatile i will know that the program never ...more >>

Test if font is installed?
Posted by VMI at 9/8/2004 1:49:04 PM
How can i test if a certain font is installed? Thanks. ...more >>

I want have a groubox , that is resizeable by the user at Runtime with the mouse
Posted by Peter Stojkovic at 9/8/2004 1:41:08 PM
I want inherit a new Groupbox , that is resizeable by the user with the mouse at runtime What I have to do ?? Peter ...more >>

newbie: cleanup ?
Posted by dtdev at 9/8/2004 1:39:06 PM
hi again, If i create ex. an array with the "new()" operator - am i responsible for cleaning it up again just like in C++ ? ive seen examples where no cleanup is done, and ive seen examples where people set the pointer's to NULL - but ? Thanks. ...more >>

wired ico
Posted by Brian at 9/8/2004 1:36:34 PM
Some small things about ico make me very confused. I want give my winform app a new icon. I designed it but visual studio insisted to use the default one. Isn't the icon's format 32 x 32? 2nd, I try to display a small icon for my app at taskbar like the following codes: ...more >>

DataAdapters/DataSets
Posted by Adam Clauss at 9/8/2004 1:20:00 PM
Alright, as much as I've done CSharp, I've done very little with databases with it. So I'm just kind of messing around with, learning how it works. I am using the ADO.NET adapter provided with MySQL in a very simple web application. I have the connection, data adapter, and typed datasets create...more >>

Searching in a dataset
Posted by Mojtaba Faridzad at 9/8/2004 1:12:22 PM
Hi, I don't know how I can search in a dataset. I can trace the table by DataRow and foreach loop. but you may know a better way. I have a datagrid and a textbox. when user type a string in textbox, I need to search in datagird and change the current record to the found record. thanks ...more >>

PPT => Bitmaps
Posted by Sascha Kerschhofer at 9/8/2004 1:00:48 PM
Hello everyone, does somebody knows how I can extract Bitmaps from a Powerpoint file (one per slide)? I found some ressources which opens Powerpoint as application and controls it programmatically. But I am looking for a way to do this without the help of Powerpoint itself. Would I need a kind...more >>

DNS Records
Posted by Roger Webb at 9/8/2004 12:54:38 PM
Is there a way in C# to get the DNS records for a domain? - Roger ...more >>

Serialize using an interface?
Posted by Julia at 9/8/2004 12:41:28 PM
Hi, I have an two classes derived from ICommand interface for example SubscribeCommand,and RetryCommand i want to do the following ICommand command1=new SubscribeCommand() ICommand command2=new RetryCommand() Now i want to Serialize both command1 and command2 to a string is ...more >>

HtmlInputRadioButton Value
Posted by Fabian at 9/8/2004 12:40:25 PM
I create HtmlInputRadionButton objects dynamically in codebihind. The buttons have the same name. Now I need the value of the checked button. Is there a way to get this? Thanks for help! Fabian ...more >>

Manipulating Outlook Express Folders (both Mail and News)
Posted by Mike Sobeiski at 9/8/2004 12:35:04 PM
Hi There! How do I manipulate folders in Outlook Express (Not Outlook)? I need to read messages in the mail folders as well as newsgroups. I've search on the net but all I found is how to send mails using Outlook Express. But what I need is to read messages :P Please provide some pointers...more >>

Hex assignment Error???
Posted by Darryn Ross at 9/8/2004 12:34:51 PM
Hi Why can't i assign the following value to a integer constant? private const int WM_KEYDOWN = &H100 ; the error message i am getting is C:\Dev\Cls.cs(99): The name 'H100' does not exist in the class or namespace 'MyDLL.MyClass' Regards Darryn ...more >>

Dynamic Properties Question do I have to use drag drop controls?
Posted by john_20_28_2000 NO[at]SPAM yahoo.com at 9/8/2004 12:31:51 PM
I am using (trying) dynamic properties to store a database connection. However, I don't have a connection object on the form. I just do a OdbcConnection in my code. So I can't use the VS IDE to set up my Dynamic Properties. Can I still use Dynamic Properties? Or am I required to set up obje...more >>

Manipulating Outlook Express Folders (both Mail and News)
Posted by Don Wash at 9/8/2004 12:31:30 PM
Hi There! How do I manipulate folders in Outlook Express (Not Outlook)? I need to read messages in the mail folders as well as newsgroups. I've search on the net but all I found is how to send mails using Outlook Express. But what I need is to read messages :P Please provide some pointe...more >>

windows service
Posted by Ivan G. at 9/8/2004 12:23:36 PM
Hi. How to write to network share located on another computer from windows service? Service runs under LocalService account. Thanx. ...more >>

Update table using bound text box
Posted by jonesg NO[at]SPAM boystown.org at 9/8/2004 12:13:39 PM
Hi, I'm trying to update a sql database from a web form using text boxes. I'm trying to learn C# on my own so I am at a complete loss. I created my sql connection, data adapter, dataset and data view in the visual studio designer. I'm trying to keep a history of the record so instead of editi...more >>

namespace question (.mpr.)
Posted by matt.raffel NO[at]SPAM mindspring.com at 9/8/2004 12:05:19 PM
I want to include ManagementObjectSearcher class in my code. According to MSND I need to add using System.Management to my C# file. But I dont have a Management name space in system. I'm using VS.NET2003 with Framework 1.1. What namespace am I suppose to use to get the use ManagementObjec...more >>

xml schema to the ui not to file
Posted by Keith Henderson at 9/8/2004 12:02:40 PM
this writes the dataset to a file --> ds.WriteXmlSchema("c:\\mySchema.xsd"); how do i instead write it to the winform, say in a text box? then once its on the screen i want the user to be able to click saveas and everything in the textbox can get written to a xsd file. how do i do that? ...more >>

how to make C# code work with C++ (6.0/evc)
Posted by Amadej at 9/8/2004 11:54:02 AM
Hello everyone, let me explain the situation. We have an old application written in C++ (embedded visual c), and I wrote a new component for it (communication component with a custom protocol) in .NET. Now we need to make the program and the component work together, which of course is a proble...more >>

conversion c#-bytearray to c++-char*
Posted by Ekim at 9/8/2004 11:49:32 AM
hy to all, I'm accessing a function from a managed-c++-dll within my c#-application. Therefore I encountered following troubles: In my c#-app I have got a byte[]-array, which should somehow be mapped to a char* in my managed-c++-function. Here is the prototype: ---------------------- managed...more >>

Will Garbage Collection in .Net to collect COM memory.
Posted by John Sun at 9/8/2004 11:32:33 AM
Dear Group Gurus, If I use a COM class in my C# code, will the memory used by COM object be garbage collected, or do I have to manually collect it. Thanks, John ...more >>

Problems With Form
Posted by FAAD at 9/8/2004 10:57:01 AM
hi, i have a form linked to a microsoft SQl Server db (a Hospital System), i have bind the controls on the form, i have written the update command, created navigation buttons,i have included form validation so that user inputs the must fields, now when i run the application its runs properly b...more >>

Serializing inherited objects
Posted by Mark Saccomandi at 9/8/2004 10:49:02 AM
Hi, I'm extending a serializable class I made. The new class adds some features that cannot be serialized automatically, this means that I have to implement the ISerializable interface for my new class. What happens is that I do serialize what I have written within the GetObjectData method, bu...more >>

Data access application block 3
Posted by Eric Sabine at 9/8/2004 10:44:17 AM
Has anyone seen a link yet to the DAAB 3? I'm told it's posted _somewhere_ ...more >>

Create update package
Posted by Richard Hallgren at 9/8/2004 10:43:40 AM
Hi, I have a solution that includes a deployment project. The solution contains a database file (access). Now I'd like to exclude the database and only deploy an updated version of the other files - so far so good. Hence, all the old files, except the database, should be written over and re...more >>

function passing / inheritice ?
Posted by dtdev at 9/8/2004 10:29:26 AM
hi, Im new to C# - ive have my background in c/c++ - and somethings are abit new to me, so havent really gotten the total feel of the laguage yet. I have a situation which i really have no idea to solve in c# - what i do, is that i have a MAIN form, which subsequently calls several other for...more >>

Loop through components in a form?
Posted by Dante at 9/8/2004 9:52:44 AM
Does anyone know of a way to loop through all components of a certain type in a form. Not all of the components are within the same container. They actually are on separate tab pages. Thanks. ...more >>

X.ToString()???
Posted by Darryn Ross at 9/8/2004 9:35:28 AM
Hi, I am wondering how i can "1,000.00" displayed in a windows label instead of "1000.00" double i = 1000.00 string str = i.ToString("F2") i understand that the code above will display "1000.00" in the windows label but i need to show "1,000.00" is there a way of formatting this to be d...more >>

Mail client
Posted by Scott B (Was New Guy) at 9/8/2004 9:12:55 AM
I am trying to build a mail client similar to OE for gmail.... Basically I have everything working, but I need some help / suggestions for my Message Grid. I don't think I want to use the .net DataGrid, but not sure what other good options there are. Any suggestions? ...more >>

exe on server
Posted by Frank at 9/8/2004 9:09:05 AM
hi I have an exe on a server, how can I configure this to access certain files/resources on client machines which connect to the server using Code Access Security in an intranet. I will be knowing the machines /users who will be needing this thanks...more >>

Do something while copying
Posted by carmen at 9/8/2004 8:49:32 AM
Is it possible to show some movement in the screen while copying a file? I tried to use a timer that change the position of an image but when I start the copy of a file from diskette all is stopped until the copy finishes. Any ideas? Thank you ...more >>

how to add image files to .resx
Posted by Steve at 9/8/2004 8:48:35 AM
Hello, According to my C# book, I can add a .resx file to my project by going to the Project menu, Add New/Assembly Resource File... I want to add 6 icon files, one.ico, two.ico...six.ico. I got as far as adding the Resource1.resx file. I now see a table like thing with the titlel "D...more >>

dataGrid1.TableStyles.Remove(tblStyle); ?
Posted by Ralf at 9/8/2004 8:26:49 AM
Hi NG, if there a way to Clear a DataGrid dataGrid1.TableStyles.Clear(); or dataGrid1.TableStyles.Remove(tblStyle); or dataGrid1.TableStyles.RemoveAt(intDG); or not work!? dataGrid1.TableStyles[0].GridColumnStyles.RemoveAt(0); this work fine but i need to remove the rows an after r...more >>

ctor as place for database call??
Posted by hazz at 9/8/2004 7:01:34 AM
I know it violates alot of design rules but is it possible to have an ADO.NET database query in a constructor? As cheesy as that sounds, it may simplify an otherwise very complex design in a remodel project. thx. -greg ...more >>

which software is good for convert images (like jpeg format) to ico files?
Posted by Jessie at 9/8/2004 4:23:13 AM
I heard a tool named any2icon. What's your favorite? ...more >>

Multi-selection datagrid rows
Posted by Ubi at 9/8/2004 3:49:05 AM
hello, i'm using a dataview to filter my table. how can i get a index (for the original table) of the selected rows (there can be more than 1). please help...more >>

Obtain a Window/Application Handle
Posted by kim d at 9/8/2004 3:41:01 AM
Hi, I know already this is a really stupid question but how do you obtain a handle to an application or a window in C#. Formerly I used Application.Handle in Delphi so I'm looking for the equivalent in C# TIA kim...more >>

so many simple questions - how can I call the functions of my 1st cs file in 2nd cs file
Posted by Jessie at 9/8/2004 3:24:27 AM
I defined some functions in one .cs file, i.e. ShowHelp(). Now I need use them in my other cs files. How to do that? This is a WinForm application. Thanks. ...more >>

using Response.Redirect
Posted by Mike P at 9/8/2004 3:23:13 AM
I want write a method to send several strings to a webpage using Response.Redirect (I'm trying to find out why my website keeps crashing). If I write a method to do this I can obviously only do a redirect once before the code in the method will finish executing. How can do this? Would I ne...more >>

Reading File in Background Threads
Posted by Cool Guy at 9/8/2004 3:20:27 AM
I use the following method to read a file: static byte[] ReadFile(string path) { FileStream stream = new FileStream(path, FileMode.Open); BinaryReader reader = new BinaryReader(stream); byte[] result = reader.ReadBytes((int)stream.Length); reader.Close(); return result...more >>

Read a large file and write files
Posted by CJ at 9/8/2004 12:47:02 AM
Hello! I want to read a large text file (100 mb) and from with in the file i want to take out some lines on a spesific kriteria and make new files. eks. inputfile: 123 hello.. 123 more... 124 text.. 125 text outputfiles 123.txt: 123 hello.. 123 more.. 125.txt: text ca...more >>

DIME SOAP dead ?
Posted by Bernard D at 9/8/2004 12:36:05 AM
Someone here wrote that MS has dropped its commitment to DIME (see link below). I could not find any other info on this from googling around. Has MS made this public anywhere? Links would be appreaciated. And, if DIME is to be dropped, what will be used instead for file attachments with SOAP?...more >>

Nested Struct Bug??
Posted by Rene at 9/8/2004 12:18:38 AM
Please help me, add a button to a new for and copy and paste the simple code below. According to me, the last message box in the Click event of the button should popup a "123" but instead it pops up a "0". Why?? Is this a bug?? Thank you. ---------------- CODE TO COPY ---------------- publ...more >>

Flow Chart Controls
Posted by Daemon at 9/8/2004 12:13:08 AM
Hi All, I am going to use C#.Net to write an application which can let the user to design work flow diagrams within the application. So I think I have to acquire and employ some flow chart controls. Do any those of you have such valuable experience in doing the similar task? Any referal for...more >>


DevelopmentNow Blog