Groups | Blog | Home


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

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

DateTime brain teaser
Posted by Simple Simon at 2/6/2004 11:25:19 PM
Hi all, I'm struggling with an elegant way to figure out if a DateTime falls between any Firday @ 6pm and Sunday @ 9pm. For example: If i want to fax a message b/w Fri 6pm and Sun 9pm on any given time on any given day. ne1? ~Gordon...more >>

My document path
Posted by Hai Ly Hoang at 2/6/2004 11:04:20 PM
How to get the current path of "My Document Directory " ? Thanks ...more >>

saving a font
Posted by 2G at 2/6/2004 10:16:35 PM
Hi How do you install a font using c# ? Copying it into the dir won't work. Grtz. ...more >>

Simple and fast Singleton pattern for ya.
Posted by William Stacey at 2/6/2004 8:40:26 PM
FYI. /// <summary> /// Author: William Stacey /// Fast and simple way to implement a singleton pattern without resorting /// to nested classes or other static vodo. Can also be easily converted to /// allow "n" number of instances to be created. /// </summary> public class SingletonClass { ...more >>

RichTextBox Selection BackColor
Posted by Sun Of Man at 2/6/2004 8:11:06 PM
Is there anyway to set the BackColor of selected text in a RichTextBox? There's no problem doing it for the ForeColor. Thanks in advance....more >>

related to XMLSerialization
Posted by Keshav at 2/6/2004 7:58:36 PM
Hi While i'm doing XML serialization in C# class.... I have the following problem... I have an class by name "Operation" In that i have two variables Id and Name and one more enum variable Mode... Mode has got values { Manual , Automatic } I am able to make Id and Name variable as XML ...more >>

Printing a pdf file from C#
Posted by Thomas Kern at 2/6/2004 7:34:37 PM
Hello! I would like to print a PDF file from an C# windows forms application. Is it possible? What is the best way to accomplish this? Thanks. rgds, tom. ...more >>

About XMLReader - urgent
Posted by C# newbie at 2/6/2004 7:12:42 PM
Hi, 1 - Can I use XMLReader to find some data into an xml file and write or modify some data meantime? 2 - How can I get to know (during run time) the size of xml file I'm working with ? Thanks NewBie ...more >>



Does anyone know of a frontpage addin example?
Posted by bob at 2/6/2004 7:11:20 PM
Thanks ...more >>

DateTime.Now falls between two dynamic DateTimes problem
Posted by Simple Simon at 2/6/2004 6:13:59 PM
Hi all, I'm struggling with an elegant way to figure out if DateTime.Now falls between any Firday @ 6pm and Sunday @ 9pm. ne1? ~Gordon...more >>

fontname from ttf
Posted by 2G at 2/6/2004 6:03:15 PM
Hi, Is there a way to read the fontname from a ttf file which is not installed ? Grtz. ...more >>

Logging in to eBay "in code"
Posted by Sammy at 2/6/2004 5:32:01 PM
I have found it impossible to achieve this step. I tried HttpWebRequest with CookieContainer instantiated. It always returns an eBay page titled "Cookie Error" that says my browser does not accept cookies. I did set the UserAgent correctly to replicate Internet Explorer (which works perfectly wel...more >>

How to declare const Guid ?
Posted by PawelF at 2/6/2004 4:19:02 PM
I need to replace string with Guid ready to use: public const string GUID_1 =3D "CF0003D61F6E4D6AA6B17B18E5057FCD"; like=20 public const Guid ... Is there any chance to do this. pawelf...more >>

plugin architecture with c#/.net dlls
Posted by Allen Anderson at 2/6/2004 4:18:36 PM
I'm trying to write an application that takes plugins. I'd like to be able to drop a dll into my apps directory and have the app see it on loading (easy to do) then load the dll and interogate it to see if it has a particular class or interface is implemented. If so I'll call it etc. My que...more >>

Incrementally create user controls
Posted by Andla Rand at 2/6/2004 3:52:31 PM
Hi, I would appreciate if you could help me with my source code. I want to create web user controls dynamically each time i press the button. But i only get one control each time. If i use a 'for'-loop then it is no problem. public Control c1; private void Button1_Click(object sender, S...more >>

Get a copy (not a reference) of a class
Posted by ~toki at 2/6/2004 3:28:07 PM
I have a class with a custom property called Name = "pepe" When i create a copy of it (Pepe pepe = oldpepe;) And change the property of the 'new' class (pepe.Name = "pepe1") oldpepe.Name has canged to "pepe1" How can i prevent that oldpepe="pepe" changes? ...more >>

XmlDataDocument/DataSet memory usage
Posted by Derrick at 2/6/2004 3:25:44 PM
Thanks to many on this newsgroup, I now have a prototype Windows Forms C# app that reads xml documents into DataSets via XmlDataDocument, and does *stuff* with it. I basically have about 25 megs worth of xml data that I read in and operate on. Once loaded, before doing anything of substance w...more >>

What DirectX SDK Version for VC#.NET 2002?
Posted by Steve at 2/6/2004 3:21:05 PM
Hi I want to write a GUI type MIDI Windows App. using the VC#.NET 2002 Standard I have already purchased. What DirectX SDK version should I use This is just a part of my learning process, so don't want to purchase the 2003 version yet Thanks Stev http://stevelane.iuma.co ...more >>

Backward compatibility issue of Serialization
Posted by domtam NO[at]SPAM hotmail.com at 2/6/2004 3:00:13 PM
Hi everybody, I'm planning to use serialization to persist an object (and possibly its child objects) in my application. However, I'm concerned about the backward compatibility issue. I'm evaluating if we can easily resolve this issue. For example, I have a class MyClass consisting of 100 f...more >>

[Conditional("DEBUG")] or #if DEBUG
Posted by John Smith at 2/6/2004 2:30:25 PM
After reading C# documentation the Conditional attribute seemed the way to go, but after inspecting the IL it seems those methods are still there and I imagine the CLR removes them. Using #if DEBUG means the code does not even reach the IL when compiling in release mode. Is there any benefit t...more >>

Custom Actions not working
Posted by discussion NO[at]SPAM discussion.microsoft.com at 2/6/2004 2:26:42 PM
Hi, I added dotnetfx.exe to a setup project as a custom action to be installed before the main app is installed. I set the Arguments property to /q:a /c:"install /l /q" for a silent install but it complains that its already installed, then I set the Condition to check as Installed == fa...more >>

Testing the 'type' of an Object???
Posted by Darryn Ross at 2/6/2004 2:13:51 PM
Hi... I am not sure how to test the type of an object that i define object a =3D "test" ; object b =3D 1 ; object c =3D true ; how do i test each of the three objects to find out what types they = are.. e.g string, int, bool??? Regards...more >>

Multiple inheritance
Posted by Chuck Bowling at 2/6/2004 2:11:39 PM
C# newbie warning... It'll probably be easier to explain what i want in code: ------- abstract class Base { ... } class myClass : Base, System.Windows.Forms.TextBox { .... } class myClassContainer { Base myBaseClass; } ------- I know that multiple inheritance isn't...more >>

run exe from asp.net
Posted by Selen at 2/6/2004 1:55:24 PM
How can I run the program i.e.notepad.exe from asp.net c#? Thanks.. ...more >>

Extract file name from path
Posted by Kristoffer Persson at 2/6/2004 1:47:57 PM
It's probably very simple... I would like to know if there is a function similar to ExtractFileName() (I've used it in Delphi), which returns only the file name from the full path, e.g. "C:\Temp\MyFile.txt" would return "MyFile.txt". Thanks! - Kristoffer - ...more >>

time measures better resolution
Posted by Valéry Bezençon at 2/6/2004 1:45:35 PM
Hello, I would like to measure the time taken by a method to run for performance tests. I use the class DateTime and TimeSpan like this: start = DateTime.Now; ....method execution ts = DateTime.Now.Substract(start); ts is of type TimeSpan. I can get the time using ts.TotalMilisecond;...more >>

DataAdapter Update
Posted by Ruslan Shlain at 2/6/2004 1:43:51 PM
Is there a way to tell DataAdapter to continue updating if it encounters error. So, in other words once it starts to update records in the database and it fails on one of them, then it would continue updating rest of the remaining records in the dataset.? Any suggestions or samples would be ve...more >>

Getting file properties programatically
Posted by Ram [MSFT] at 2/6/2004 1:39:30 PM
Hi All, I'm trying to programatically (using c#) read the file properties = (Title, Summary, Author, Comments etc.... The stuff that shows up on the = Summary tab when you see the properties of a file). =20 FileInfo and FileSystemInfo classes expose only the standard properties = (create ti...more >>

Mouse Events ?
Posted by TM at 2/6/2004 1:34:35 PM
My Windows Form application has a ListView control, it has 3 columns. I use onMouseUp event to capture the user's x,y mouse coordinates. How do I use these X & Y to find out the excact column and the row number of thew ListView control so that I can retrieve an item in it. Example: string ls=...more >>

Namespace mapper utility
Posted by R. Ian Lee at 2/6/2004 1:26:05 PM
Does anyone know if a utility available that can iterate through all the assemblies in a project and build a single map of your namespace? What I need is something like the class view in VS.NET except that I need it for the entire solution and not broken down by individual assemblies? I know that ...more >>

Understanding XML
Posted by matt.raffel NO[at]SPAM mindspring.com at 2/6/2004 12:59:38 PM
I want to be able to use XML as my "database" for my app. I have made some classes and added the appropriate XML tags in them. eg: public class Account { [XmlElement(DataType = "AccountName")] public string m_sName; }; Now, what is the best method for reading and writing the XML?...more >>

pointer to array
Posted by adrin at 2/6/2004 12:32:49 PM
hello, how do i get an address of array(required in an unmanaged struct)? ...more >>

Connection object wrapper.
Posted by Curious George at 2/6/2004 11:57:25 AM
I would like to create a connection object wrapper for my web application. I would like my app to request a connection from my wrapper and have my wrapper function choose the best DB to connect to or fall back to. I am worried about memory clean up though. What is the best way to construct...more >>

Strange UDP Socket problem
Posted by Terry at 2/6/2004 11:51:39 AM
It's my understanding of UDP sockets that if there is a thread blocked on a "recvFrom()" call and other thread sends a UDP packet to some address, that if the machine on the other end isn't up, that the "recvFrom()" call should just continue blocking. Right? What I'm seeing is that when I sen...more >>

Any size limitation on the BinaryFormatter serialization
Posted by domtam NO[at]SPAM hotmail.com at 2/6/2004 11:17:25 AM
Hi everybody, In my application, I'm planning to use BinaryFormatter to serialize a potentially huge object to file (and, of course, deserialize back to memory later). My question is if there is any hard limit on the size of this object? Is it only limited by the amount of memory or hard-d...more >>

modular application
Posted by Saso Zagoranski at 2/6/2004 11:04:41 AM
Hi! I mentioned this in my other post today but at that time I though I had it all figured out. When I got a reply regarding my other questing I saw that I don't :) Here's my problem: I would like to have an application where I would write the core and the users could write their own ad...more >>

foreach and how to elegantly know how far one has progressed in the collection
Posted by Robert Sentgerath at 2/6/2004 10:55:56 AM
Foreach is a relative handy construct to avoid having to create the classic "for(int loop = 0; loop < collection.Length; loop++) construct. Though when I use foreach instead I do not have access to a loop variable that allows me to display a status message such as "Processing 4 out of 10". Is ...more >>

Application Setup causing errror
Posted by discussion NO[at]SPAM discussion.microsoft.com at 2/6/2004 10:36:38 AM
Hi, I am packaging up my applicaiton with a Setup build and added under custom actions-Install an exe containing a component that must be preinstalled. When I install this it says.. 1607: Unable to install InstallShield Scripting Runtime. How can I call another setup package from the ...more >>

c++ to C# using structs
Posted by markg at 2/6/2004 10:32:41 AM
Hi what is the equivalent in c# for this? Thanks typedef struct { int ID; char ProfitCenter[21]; } REPORTSPROFITCENTERS; REPORTSPROFITCENTERS myReportsProfitCenters[100]...more >>

MMS
Posted by Kate Luu at 2/6/2004 10:28:52 AM
Hi all, Is it .NET Frame Work support MMS( Multimedia Messaging Service ) ? As I did research, Open Wave did have a SDK to develop MMS but the language to use for develop is JAVA base. Any help is greatly appreciated. Kate ...more >>

IComparable Question
Posted by matt.raffel NO[at]SPAM mindspring.com at 2/6/2004 10:23:05 AM
In the first class below, I get an error that AnotherClientBaseDataRecord does not implement IComparable.CompareTo(object)...yet the second class below is implemented identicially and it does get the compile error. I'd love help understanding this :=) .... Why does this not compile publi...more >>

startig with c#
Posted by dumboo at 2/6/2004 10:19:25 AM
hi there i wanted to get started with C# but i m confused from where to start with, what i would be requiring, i have started doing google search, and found few e-books, i was looking for some help on the resources i would be requiring, i know i might get fire for that since this is the first th...more >>

Inherit from DataSet
Posted by _news NO[at]SPAM watev.com at 2/6/2004 10:13:53 AM
I need to expand the DataSet class by inheriting from it and adding functions that work on the data in the tables. However, since I can't upcast how can I get my base DataSet object assigned an actual DataSet? e.g. public class MyDataSet : DataSet { // can't do, no valid DataSet constru...more >>

good books for learning C# with Java bg?
Posted by beachboy NO[at]SPAM work at 2/6/2004 10:10:23 AM
hi all, would you pls advise any good books for learning C# (web related back-end programming) with java background? thanks for your suggestion. beachboy ...more >>

XML Search
Posted by C# newbie at 2/6/2004 10:02:54 AM
Hi Guys, What will you suggest me as search method in an XML file ? Scenario: Purpose is finding the values first. Then using some methods the program should detect attributes, parent and even object type of the searched value. For instance: user would enter (for search purpose) "Math...more >>

getting list of classes interfaces
Posted by Saso Zagoranski at 2/6/2004 9:50:58 AM
Hi! Here's my problem: Let's say I have 2 interfaces: interface Module1 { public void method1(); } interface Module2 { public void method2(); } I'm using late binding, so at compile-time I don't know which modules I'll be loading as I want to provide a simple plug-in functi...more >>

Event log property doesn't retain setting changes..
Posted by KC at 2/6/2004 9:49:28 AM
Hi, I created a new event log source and log and user WriteEntry to enter the log as follows: ' Create the source, if it does not already exist. If Not EventLog.SourceExists("MySource") Then EventLog.CreateEventSource("MySource", "MyNewLog") End If ' Cre...more >>

Best format for configuration file?
Posted by Jimbo at 2/6/2004 9:33:28 AM
What's the best format to save a configuration file? I'm currently using an INI extension and I write it like a normal ascii file. Is this the best way? I've heard of using XML to create a config file. What would be the best format? Thank you. ...more >>

streamwriter and streamreader and closing files
Posted by Jimbo at 2/6/2004 9:30:15 AM
After I read or write a file with streamreader and streamwriter and I close it with the Close method, does that automatically let go of the file so that any other process can modify it? In my form, I read from a small configuration file with streamreader and close it with streamreader.Close(). I...more >>

How do you create and set environment variables?
Posted by Ron Clarke at 2/6/2004 9:28:20 AM
I have an application that starts other processes. The app needs to create/set a few environment variables when a process starts, let the process run, then remove the environment variables when the process terminates. Looking through the C# and .NET docs, I've found how to get environment variab...more >>

"Not Responding" when reading and processing large file
Posted by Jimbo at 2/6/2004 9:22:41 AM
I'm working on a win app that reads and processes each line of an ascii file until the end of the file. Since the file's 1.6 million lines long, after a while Windows displays the "Not Responding" although the application's running fine. Is it possible to add anything that'll stop Windows from ...more >>

Eject a disk with c#
Posted by Tony at 2/6/2004 9:03:58 AM
I wish to be able to eject either a pc card or compact flash card programmatically Is there any way to achieve this in with C#? TIA Tony ...more >>

CryptoStream makes encrypted data bigger than original string
Posted by Burke Atilla at 2/6/2004 8:31:09 AM
While encrypting data with DES through CryptoStream makes encrypted data bigger than original string. if we have 8 byte key and 8 byte of data then the mode is ECB. output encrypted data is 16 bytes long. first 8 bytes is out encrypted key but last 8 byte unknown. and while decrypting if we couldn'...more >>

C declarations in C#, continued
Posted by teds NO[at]SPAM intex.com at 2/6/2004 8:00:11 AM
Hi, I finally got this C function to be called correctly from C#. char * version_chk( const char *) I needed to do the following: [DllImport( "test.dll", CallingConvention = CallingConvention.Cdecl)] public static extern IntPtr version_chk( [MarshalAs(UnmanagedT...more >>

P/Invoke help with C# declaration of C function char * func(const char *)
Posted by teds NO[at]SPAM intex.com at 2/6/2004 7:18:11 AM
Hi, I'm trying to call a C function from a DLL. The C function is declared as char * function( const char * ) I'm declaring it in C# as follows: [DllImport(@"d:\mywork\csharp\testsubs\cmosub32.dll")] public static extern string icmo_version_chk( [MarshalA...more >>

Whats the main differences with the compact framework?
Posted by Jax at 2/6/2004 5:26:08 AM
Hello everyone I am looking to produce my first pocket p.c application. What I would like to know is roughly what to expect when going to the compact framework What will I lose and what will I gain? what versions of pocket p.c is it compatable with? Just general stuff like that so I can be prepar...more >>

OnValidating Event for TextBox
Posted by BuddyWork at 2/6/2004 4:36:40 AM
Hello, How can I trigger the OnValidating event for a TextBox from another Form? Say Form1 has TextBox, Form1 is loaded modaless and Form2 is loaded Modaless but I want to run the TextBox Validating event. thanks,...more >>

Drawing error,Help!HElp!Help!!!!!!
Posted by zengou at 2/6/2004 3:56:07 AM
My application have many picturebox objects,when run it ,sometimes i will have a strange error,how to work out ,help me please!(in windows98,the error cause frequently than in windowsxp System.InvalidOperationExceptionSystem.InvalidOperationException: The object is currently in use elsewhere a...more >>

reboot
Posted by Dmitri Shvetsov at 2/6/2004 3:20:28 AM
Hi, Does somebody have an example of source code to reboot the machine (WinXP) ? Thanks, Dmitri ...more >>

Word process not terminating
Posted by martin_link75 NO[at]SPAM hotmail.com at 2/6/2004 2:32:05 AM
I'm automating word form a c# windows application for spell checking purposes. The problem is that sometimes the winword.exe process does not terminate. Any clues why? I posted some code below. /Martin ArrayList arrPositions = new ArrayList(); ArrayList arrLengths = new ArrayList(); A...more >>

calling unmanaged dll
Posted by adrin at 2/6/2004 1:05:49 AM
hello, im calling a function from an unmanaged dll which takes a ref to structure as an argument. one of the struct's fields is an address to a callback function/event(it depends on you what to choose). It works asynchronously, modyfies given structure and calls callback/event when finished....more >>


DevelopmentNow Blog