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# > may 2004 > threads for friday may 7

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

a program of FileSystemWatcher
Posted by Jet Leung at 5/7/2004 11:45:51 PM
Hi all, I had made a windows service program for watching the bmp files in the directory and if there is a files created then the program will change its format into jpg and delete the bmp file. But how to debug this program?? I had installed it. And when I created a bmp file in that directory t...more >>


GraphicsPath
Posted by Tim Bücker at 5/7/2004 9:50:06 PM
Hello. I have a GraphicsPath path with some rectangles in it. It is now possible to transform these with a matrix but is it possible to transform just one of the rectangles, leaving the others untouched? I guess this is not possible but I want to be sure. Or someone has a neat trick to achi...more >>

Windows Service C#, timeout problem
Posted by sky_moon007 NO[at]SPAM yahoo-dot-com.no-spam.invalid at 5/7/2004 7:58:42 PM
I have made a Windows Service which download a file from a URL and unfortunately this file takes too much time to download and I need to modify the time out value. Does anybody knows how I could modify this value ? ...more >>

Faster than GDI+
Posted by Scatropolis at 5/7/2004 7:53:06 PM
Is GDI as fast as drawing gets? I'm writing a program that deals with drawing a ridiculous amount of lines and am finding GDI a little slow, or just maybe how I'm using it. I was looking at some DirectX documents and wondering if that was the way to go. Any help would be appreciated. Th...more >>

HELP: C# - ListBox.SetSelected Not Working Properly!
Posted by Andrew at 5/7/2004 6:25:06 PM
I'm having a major problem with a databound listbox in C#. In the constructor for the form I am trying to pre-select some of the items based in information in the database. When I step through the debugger it all seems to be working properly until the Load function is called, and then all my se...more >>

The type namespace.classname was not expected. Use the XmlInclude or SoapInclude attribute to specify types that are not known statically.
Posted by Bob Rock at 5/7/2004 5:56:58 PM
Hello, I have a web method that serializes a class that includes among its public fields a System.Object field to which, at runtime, I assign instances of various different classes. When XmlSerializer tries serializing this public field's real content I get a "The type namespace.classname was...more >>

DataGrid appearance.
Posted by logicalfeline at 5/7/2004 5:00:26 PM
I have a DataGrid on a form which is disabled and enabled at runtime depending on user's choices. I've noticed that when the datagrid is in enabled mode at runtime, the scrollbar is still disabled. Can't seem to figure out why.. Also, when the datagrid is disabled, I'd like there to be nothing i...more >>

Sandboxing an assembly - mysterious SecurityExceptions
Posted by Jesse McGrew at 5/7/2004 4:28:53 PM
Hi, I'm trying to create an AppDomain and use it to load an assembly with reduced permissions (e.g. the "Internet" named permission set). Unfortunately, the permissions seem to be reduced *too* much, and I can't figure out which individual permissions I need to add back to make this code ...more >>



C#-ILAsm custom attributes
Posted by Wiktor Zychla at 5/7/2004 3:40:43 PM
Hello, for some reason I need to use attributes in ILAsm code and read these attributes in C# code. My problem is with the attribute declaration inside ILAsm code. I know that I define any attribute by using ILasm's ".custom" keyword but I do not understand how to initialize the attribute ...more >>

.GetVersionInfo
Posted by Tyrone at 5/7/2004 3:31:27 PM
I want to be able to display the attributes of a jpg file using the fileversioninfo class. I have tried the following code below but it doesn't work, where am i going wrong? does it need special permissions? FileVersionInfo FileProperties = FileVersionInfo.GetVersionInfo(@"C:\test.txt"); ...more >>

Automatically capture all values posted to a web service
Posted by Hardy Wang at 5/7/2004 3:29:07 PM
Hi, I am wandering is it possible to capture all values posted (Http Post) from a web site to a web service? I would like to do something like following in web form: HttpContext ctx = HttpContext.Current; NameValueCollection forms = ctx.Request.Form; for (int i = 0; i < forms.Count; i+...more >>

How do I gently terminate a thread???
Posted by Bob Rock at 5/7/2004 3:27:15 PM
Hello, coming from win32 API I recall an ExitThread() call to gently terminate a thread from inside the same thread .... but now all I can see is an Abort call which seems to me a wrapper on the TerminateThread() Win32 API which is a brutal way to end a thread. Is there any other more gentle w...more >>

Overloading methods in interface declarations
Posted by Paul at 5/7/2004 2:21:36 PM
I have an interface that contains definintions for a method with two different signatures. For example: namespace Paul.DemoApp { public interface IHello { void sayHello(string message, Thing myThing); void sayHello(string message, DemoClass demo); } } I t...more >>

build & sourcecontrol tool recommendation for C#/.Net?
Posted by josepinchero NO[at]SPAM yahoo.com at 5/7/2004 2:20:11 PM
Hi, Our small company is growing quickly, and we need a source control and build tool for all our c# .net code. For build tool, i was thinking Nant. For source control, i was thinking perforce (for Win). Any home runs out there? Thanks!...more >>

string literal with sql
Posted by Jimbo at 5/7/2004 2:18:28 PM
Hi, why is the @ not doing it's job here? string sql = @"SELECT InvoiceLine.InvoiceLineItemRefFullName AS ["Product"], Sum(InvoiceLine.InvoiceLineQuantity) AS ["Quantity"] FROM Invoice, InvoiceLine WHERE (((Invoice.TxnID)=[InvoiceLine].[TxnID]) AND ((InvoiceLine.InvoiceLineItemRefFu...more >>

adding columns to data table
Posted by Jimbo at 5/7/2004 2:03:51 PM
Hi, I'm working on some basic analysis stuff and want to (ultimately) display my data on a chart by a month breakdown. To get each months data I need to run a separate query on the db, but I want to display all the data in a table form, basically with columns representing the month period. ...more >>

tutorial
Posted by Rodrigo at 5/7/2004 1:51:40 PM
Hello All, I want to start to study C# and I don't want to spend to much money with books a this moment. I want to know if there are some tutorials abou this language to help me with forms manipulation and instructions for beginers thanks, Rodrigo. ...more >>

How to use PARAFORMAT
Posted by SamSpade at 5/7/2004 1:46:05 PM
I defined the struct as below. When I try to asign a value to rgxTabs(0), I get an exception that rgxTabs is null. What more do I need to do?? public struct PARAFORMAT { public int cbSize; public int dwMask; public short wNumbering; public short wReserved; public...more >>

Where is my app.config file??
Posted by Adone at 5/7/2004 1:45:08 PM
I have a winforms app that I compiled and put on my client via .NET setup. I have a webservice on this app. The External address for this webservice was in the app.config file. Well I just did I search on the client and I can't find ANY app.config file. Please don't tell me this is compiled in...more >>

RichTextBox
Posted by john sutor at 5/7/2004 1:27:18 PM
Even if I have an rtb that has the ReadOnly property set to true, if I click on the control, the cursor starts blinking at the beginnig as if it were editable. If messes with the users head. How can I ensure that the control will not be able to have this cursor in it? ...more >>

Need Example; Test to see if regkey/value exists
Posted by Yogi_Bear_79 at 5/7/2004 1:01:20 PM
I've been playing with the RegistryKey class in the Microsoft.Win32 namespace. I can do various things but I can't seem to get the syntax correct to see if a value or a key exsists. I know I need to use the GetValue & OpenSubKey methods I've been trying variations on these methods with no l...more >>

Getting WINDOWS Media folder
Posted by deja NO[at]SPAM homerlex.mailshell.com at 5/7/2004 12:48:47 PM
Is there a way in C# to get the windows/media drive/location? I looked in the SpecialFolder enum but saw nothing helpful. Regards...more >>

Update DataSet's Row thru code
Posted by Happy at 5/7/2004 12:25:18 PM
hi how to update dataset's row thru code i got the new row as a data row in which the primary key remains the same but was unable update the non primary keys Thanks in Advance ...more >>

dates - subtract 12 months
Posted by Jimbo at 5/7/2004 12:21:53 PM
Anyone know how I can subtract 12 months from the current date?...more >>

should this be allowed?
Posted by Daniel Jin at 5/7/2004 12:16:01 PM
look at the sampl <pre using System class Bas public virtual void Print( Console.WriteLine( "Executing the base." ) class Derived : Bas private new void Print( Console.WriteLine( "Executing the derived." ) base.Print() public void Print2( ...more >>

MDI Children
Posted by Bill English at 5/7/2004 11:46:05 AM
Yesterday, I posted a question about accessing controls on a child form. I had trouble understanding it. I am NOT rewriting this program, and need a way to work this out the way it is. Here is exactly what I'm dealing with: I have my main form(Form1), which contains a third-party main-menu ...more >>

XSD
Posted by RS at 5/7/2004 11:31:53 AM
I have a Dataset that filled with data from a serious of flat files. Is there a way to write XML from this Dataset per predefined XSD schema? ...more >>

Help formating string
Posted by Opa at 5/7/2004 11:26:02 AM
I have a string with n number of characters. I'm trying to create another string which is exactly 12 characters having leadings zeros and the input string at the end ex: string1 = "7344", I want to format string1 such that it results another string with string1 at the end and leading zeros in fro...more >>

Maintain initial sort order with 2d array sort
Posted by Bob Dankert at 5/7/2004 11:20:19 AM
Is there any way to maintain the sort order of a sort on a 2D array? For example: I have the array: 1,a 2,a 3,f 4,a 5,s 6,a 7,z 8,b and sort it by the second column, and I get: 4,a 6,a 1,a 2,a 8,b 3,f 5,s 7,z The results I am looking for would be like: ...more >>

Absolute path
Posted by raykos at 5/7/2004 11:16:05 AM
Hello all I want to create a log in the same directory as where the .exe is, what function do I use to find out the absolute path to the .exe's directory TIA Ray K....more >>

How to serialize a dataObject
Posted by Jinlin at 5/7/2004 10:48:21 AM
Does anyone know how to serialize a dataObject. Is it possible? What I try to do in my application is to allow user drag and drop objects onto a toolbox type of thing, and try to preserve these objects (DataObject) when user quit the application, so they could drop they back to an editor leter...more >>

Windows Service as Remoting Host: Requested Service Not Found
Posted by fshawish NO[at]SPAM ade.com at 5/7/2004 10:39:01 AM
Backround: I am trying to figure out how to do the equivalant of a classic COM Local Server Singleton in .NET/C#. I created a coupld of simple Class Libs that exposes public interfaces and hosted them in a Windows Forms EXE. Create a Windows Forms client and both the Client and the Host EXEs ...more >>

Printing to a Dot Matrix Printer
Posted by Ryan Gregg at 5/7/2004 10:34:01 AM
I'm working on a project where I need to be able to print a single line at a time to a dot matrix printer. Essentially we have a log printer and each time an event occurs on the system I need to have the printer print a line that relates to what the event was. From what I can see of the printer...more >>

C# destructor called, then a method
Posted by josepinchero NO[at]SPAM yahoo.com at 5/7/2004 10:31:49 AM
Hello, We have a nunit test object. We've set breakpoints on: constructor, destructor, and a method. Constructor is called once, first. Destructor is called next. Last, the object's method is called. How would this happen?...more >>

Encoding problem
Posted by Mats-Lennart Hansson at 5/7/2004 10:31:38 AM
Hi, I want to get the ANSI value (0-255) of a character. Assume I create a character like this: string s = new string((char) 151, 1); Now I want to get the ANSI value (151) for this character. How do I do this? When using ASCII I, of course get the wrong value: byte[] arr = Encoding.AS...more >>

problem w/ returning char * from an unmanaged dll
Posted by bgibbons at 5/7/2004 10:25:35 AM
Hello, in my asp.net app I have declared the following [DllImport("UADLL.dll",EntryPoint="GetTMDataRepositoryUsage",CharSet=CharSet ..Ansi, CallingConvention = CallingConvention.Cdecl)] public static extern int GetTMDataRepositoryUsage([Out][MarshalAs(UnmanagedType.LPStr)] ref string szCompu...more >>

dlls and COM+
Posted by Mike at 5/7/2004 10:05:07 AM
Is it possible to add a folder of VB6 dll's to COM+ without haveing to do it one by one? I have a folder of about 400 VB6 dll's that I need to add under COM+ and really don't want to add them one by one, I would like to do them all in one swoop. thx ...more >>

typedef in C#?
Posted by pnp at 5/7/2004 10:03:58 AM
Is there a typedef in C# or even a substitute for it? Peter. ...more >>

Confusing NET frame work Installation
Posted by mike at 5/7/2004 10:01:19 AM
Hi, I want to learn c sharp . I am new to .net Development.I download the following 2 Installations = from the Microsoft site. 1.DownLoad A. Microsoft .NET Framework 1.1 Redistributable (23MB) B.Microsoft .NET Framework 1.1 Software Development Kit = (106). ...more >>

Datagrid Update DB?
Posted by pnp at 5/7/2004 10:00:01 AM
Hi all, I have a datagrid that connects to a DataSource through ODBC and I can't seem to make a datagrid cell update the database with the new value, when I edit that cell... How can I do this? Thanks in advance, Peter ...more >>

c++ style #define in c#
Posted by Blacky at 5/7/2004 9:57:29 AM
Hi I used to use #define in c and c++ to do this... #define Code 1 #define Name 2 then later in program strCode = List.Items[Code]; strName = List.Items[Name]; Then when ever they change around, all I changed was the defines. They would be change in code before compiling. It w...more >>

static constructor and multithreading
Posted by Marek at 5/7/2004 9:45:28 AM
Hi, I am analyzing Duwamish7 source code boundled with Visual Studio .NET 2003. Could anoybody explain why the Monitor.Enter and Monitor.Exit block is used inside a static constructor? The code can be found in Project SystemFramework within module ApplicationLog.cs. Here comes the sample. n...more >>

Socket
Posted by Qingdong Z. at 5/7/2004 9:31:01 AM
I have an asynchronous Server Socket to push data to client (Socket.BeginSend) when data is available, Meanwhile, the client socket use Synchronous Client Socket to receive the data. I have two questions on this 1. When client socket does not receive data as fast as server, does server socket queu...more >>

Spell checker
Posted by john sutor at 5/7/2004 9:09:14 AM
Does anyone know if there is a spell checking object / feature in .Net to be used with C#? ...more >>

Event from Form to Form
Posted by Frank Uray at 5/7/2004 9:06:03 AM
Hi al I am trying the following On a base form I open a new form with a treeview On the base form, there are two buttons Depending on the selection in the treeview on the new form, I like to enable or disable buttons on the base form I do not like to declare and open forms as static. Would be...more >>

Dataset to database.
Posted by sailent NO[at]SPAM hotmail.com at 5/7/2004 8:26:43 AM
Hi I am using a dataset to display my information to a user, however my dataset is in no way matching all of the fields and columns of my ms sql database, I fairly extensively modify the data so that the user can understand it from the raw table. My question is there some sort of mapping inter...more >>

ask a favor..
Posted by DotNetMania at 5/7/2004 8:12:26 AM
i'm looking for some word which uses my domain name. i have already decided this as " gdk " but i still imply the meaning this word... so could you give me some hint or advice about this word... for example, g : god of d : development k : kit please...help me...it's your turn... ...more >>

OT: Comparison of Java, Perl, PHP, C++, C#, VB in PECI survey
Posted by asj NO[at]SPAM blueboard.com at 5/7/2004 8:09:26 AM
A new informal survey shows that Java supports a much larger and faster growing book publishing ecosystem than other languages, including PHP, Perl, C++, C#, and VB. The survey (which I'll christen the Publishing Ecosystem Capacity Indicator - or PECI for short) looked at the number of books pub...more >>

Using a command to open the Device Manager
Posted by jayderk at 5/7/2004 7:58:54 AM
I was wondering if anyone knows of a way to open the device manager, OR system properties? thanks in advanced, Jay ...more >>

Scanning/rebuilding logs
Posted by raykos at 5/7/2004 7:01:05 AM
Hello all, I need to scan and rebuild logs dependent upon a certain time span, i.e. anything over 4 days older than today. The beginning of each entry is formatted yyyy/mm/dd hr:min:sec. Now, I know I can have a loop of reading in and creating a TimeSpan object from each entry, call it '...more >>

Application Blocks
Posted by Philip Townsend at 5/7/2004 6:47:59 AM
I am in the process of converting some web apps to implement the ADO application block. I have a copy the the applications on a local development server, in which I have successfully installed and referenced the application block classes. From this point the app goes to a staging server, in whic...more >>

Access VB6 Module's Methods in C#
Posted by me at 5/7/2004 6:42:12 AM
hi, i just want to ask how to access VB6 Module's methods in c#. i already converted the dll into interop assembly but i cannot invoke Module's methods thru reflection. thanks. ...more >>

DataReader GetInt32
Posted by mike parr at 5/7/2004 5:07:31 AM
When reading from a data reader I have been using code like this : if (objDataReader.Read() == true) { intNewStatus = Convert.ToInt32(objDataReader["STATUS"]); } But I've seen some code examples using GetInt32 (or GetString et...more >>

Access class fields generically
Posted by bartolin_tomislav NO[at]SPAM hotmail.com at 5/7/2004 2:57:40 AM
Hi I'm trying do create a generic base class for all of my data objects. One of the main requirements for this class is to be able to handle all common db actions without need for implementing them in inherited classes. To accomplish this I need a way to map values of class fields to corres...more >>

Reflection - IsSubclassOf
Posted by thomas at 5/7/2004 2:16:30 AM
Hi, I have three assemblies. In Assembly1 I define an abstract base class called MyBaseClass. In Assembly2 I derive a class from this MyBaseClass. If I asked in the derived class if this class is a sublass of MyBaseClass the function IsSubclassOf returns true, so this works properly. I...more >>

PDF
Posted by Jeti at 5/7/2004 1:41:03 AM
how to read PDF document via code? i found SDK at adobe.com ($200), but i really need something for free... help, please... ...more >>

Disk Management
Posted by Joe at 5/7/2004 1:34:06 AM
Hi Guys, Is it possible to create a disk management system using .NET entirely. What I mean by the above is having an application possibly a .NET windows service monitoring the disk, creating and adding users and giving them access to store a limited amount of data. The only thing w...more >>

Converting .NET dll to COM dll
Posted by KrisBabu at 5/7/2004 1:26:07 AM
Is it possible to convert a .NET dll to COM dll. Heard there is a way of doing. It is very much needed. I have to use it in VC++....more >>

Some Questions about Volatile
Posted by Eric at 5/7/2004 12:47:57 AM
I have some questions about the volatile keyword... 1) If I use the volatile keyword with a reference type such as a class like so: public volatile UserTotals totals = new UserTotals(); Are the fields of the class also protected? Or is it just the 4-8 byte reference to the object that is ...more >>


DevelopmentNow Blog