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# > march 2005 > threads for tuesday march 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 31

ItemCollections and custom UserControl...
Posted by Tinus at 3/1/2005 11:44:22 PM
Hello all, [I've been programming in C# for several months now, so bare with me... I'm still a newbie] I've create a custom control (UserControl) and have a custom Item Collection. The control is a custom calendar which is draw using the Graphics Rectangle etc. functions. It is drawn when ...more >>


datagrid
Posted by aylin_sk at 3/1/2005 11:17:03 PM
I'm trying to list my data into my datagrid creating stored procedures in oracle db..My data includes questions for a survey....It's simple but i cant see my datagrid in my web form..I'm now going to send all my codes...Please help me finding an exact solution... private void Page_Load(obje...more >>

runtime Polymorphism ?????
Posted by LP at 3/1/2005 11:15:00 PM
Hi, I understand the concept/definition of polymorphism. But what does the term "runtime polymorphism" mean? I was asked to define it during a technical interview. I gave a guy vanilla definition of polymorphism, but he insisted on runtime. Did I miss a new buzzword while I was sick with the flu ...more >>

.net Control id and javascript problem
Posted by sarunnio NO[at]SPAM gmail.com at 3/1/2005 10:56:02 PM
Hi, I 've tried to work around with this long times ago. I have a template and the page loaded inside. When loading the page,the control ID contained with the page will be automatically generated by ASP.NET as shown below <input name="_PageTemplate:BodyPlaceHolder:txtEndDate" id="_PageTem...more >>

serialize the Arryalist to XML format
Posted by suresh NO[at]SPAM flourishsystems.com at 3/1/2005 10:55:55 PM
Hai EveryBody, I am doing serialize the Arryalist to XML format,But the Arraylist contains collections of object,At the time of serialization it show the error on the XML file "Only one top level element is allowed in an XML document". How can I serialize the arraylist to xml. ...more >>

Image in DataGrid Column (WinForms)
Posted by Charlie NO[at]SPAM CBFC at 3/1/2005 10:41:53 PM
Hi: Can anyone point me to an example of a DataGridColumnStyle object that displays an image? Thanks, Charlie ...more >>

C# 2005 Beta 1, MdiWindowListItem not cleared when children Maximized.
Posted by Lee Benfield at 3/1/2005 10:40:04 PM
Anyone seen the following odd behaviour? (not found it in FAQs etc) Create a simple project, two forms, first is MDI parent with a MenuStrip, (File->New and Windows menu items). Set MdiWindowListItem for the MenuStrip to be WindowsToolStripMenuItem, (or whatever you called the 'Windows' item...more >>

Calendar with Culture Info
Posted by reidarT at 3/1/2005 10:39:16 PM
Is it possible to control the calendar with Culture Info. Actually the name of the days and months. And how do I activate it_ regards Reihaa ...more >>



How to check whether the text in a textbox is a hex?Thanks
Posted by pcserver at 3/1/2005 9:42:15 PM
If i want to limit the users to input only 0-9 and A-F/a-f, how can i do it?thanks ...more >>

WinForms question - probably an easy one
Posted by Bernd at 3/1/2005 9:10:15 PM
Hi, i have a little problem which is bugging me since a few days. I am using various Forms in my application and now i came to a realy strange situation. The main app is a Form, when a certain userinteraction occours i open another Form. I will call it the second Form from now on. I have...more >>

Is the GAC dynamic?
Posted by julien at 3/1/2005 8:37:23 PM
Hello, I have one 2 more questions about the GAC: 1/If I had a dll to be shared in the GAC directory, will it be loaded when a program will try to find it? Or do I have to load it manually using the command line tool? 2/If I change the config file to change the version mapping, will it be a...more >>

How to free an object ?
Posted by craigkenisston NO[at]SPAM hotmail.com at 3/1/2005 6:33:00 PM
Hi, I've read recently some comments regarding one should always release the objects when they're not longer to be used, regardless they are going to be recollected by the GC at some point. So, I have a tiny class library with some utilities, Im descending my classes directly from Object ...more >>

Multi-threading problem!
Posted by Vadivel Kumar at 3/1/2005 6:12:58 PM
I have some hundred files (or webpages, just for example sake) which i have to process for some business logic. I have to read this files and do some thing as per the given requirement. I thought of using threads to do this. So, i tried to create some 10 threads which concurrently read th...more >>

File Synchro (Checksum, Fragments, ...)
Posted by Cybertof at 3/1/2005 6:09:29 PM
Hello, What would be the best way to synchronise 2 big files ? The files have only small modifications (not more than 10Kb changed / added insided). It would a bad choice to transfer 5Mb regarding only 10Kb of changes. If only a few bytes are added/modified it's does not worth it to tran...more >>

.NET object calling by names.
Posted by Alexander Cherny at 3/1/2005 5:54:22 PM
it's possible to call COM-object methods by their names, using CoCreateInstance(), QueryInterface(), GetIDsOfNames(), etc. is there any chance to call .NET object the same way - by name of an object, a method, a parameter? thank you. --- Alex Cherny ...more >>

SetSelected on listbox working oddly
Posted by Peter Mancini at 3/1/2005 5:12:56 PM
I have a simple winform with a listbox on it. I dynamically load the box with integers (the years 1975 to present.) This works fine and I can see the box has all of the items present. I then do a mylistbox.SetSelected(0,true) so that the first item starts off selected. It is a MultiSimpl...more >>

Debug a C# COM object from VS 6.0 C++ client
Posted by Craig at 3/1/2005 5:09:57 PM
I've been writing C# code for maybe as much as 2 weeks now. The code I'm writing is exposed as a garden variety COM object that VC++ 6.0 and VB 6.0 can use. Coincidentally my COM development track record is also 2 weeks long. :-) The time has come to debug down into the C# COM object from a ...more >>

Creating archive files
Posted by JezB at 3/1/2005 5:05:03 PM
From a windows application, I want to provide an "archive" facility which will scan a specific directory and put specific files into some single "Archive file", a bit like a zip-file I guess, but more windows standard. Then I want to provide a function "Import from Archive" which will accept ...more >>

C# interop object for passing large buffers
Posted by Doug Taylor at 3/1/2005 5:03:27 PM
I'm VERY new to C# and still a bit clumsy with COM. I'm tasked to use C# to design and create an object that can be called from VC6, VB6, and .NET applications (and possibly even from plain old C). My object will open very large images (100's of MB big) and pass areas of the image back to th...more >>

DateTimePicker in DataGrid
Posted by Marty at 3/1/2005 4:27:46 PM
Is it possible to have a DateTimePicker in a DataGrid control date column? If so, can you please include some code. Thanks. ...more >>

How to bind data with radio button?
Posted by Karl at 3/1/2005 4:27:02 PM
Hi experts, In my application, I have a employee table containing a gender field which has value "M", "F". I bind gender field to the "checked" property of a group of 2 radio buttons. I hope to show radio button for Male checked when underneath data is "M" and radio button for Female checke...more >>

The Property Page.Session
Posted by Nad at 3/1/2005 4:09:04 PM
Good day, I have a question about the Page.Session property used in ASP.NET This property is defined as follows: public virtual HttpSessionState Session {get;} and HttpSessionState is a sealed class derived from System.Object and it has two indexers one integer and on string. For example...more >>

Attribute
Posted by Polo at 3/1/2005 3:50:23 PM
Hi, I define a CustomAttribute public class CustomAttribute : Attribute { ... public Something() { ??? Ow can I retrieve the instance or type that host this attribute } } I apply it on a class [CustomAttribute()] public class Test { } ...more >>

opinions with OnXXX overrides.
Posted by Peter Rilling at 3/1/2005 1:40:34 PM
I would like people's opinions. Many classes have an Onxxx that actually invokes the registered event handlers. A derived class can override these methods rather then registering an event. The consequence of this is that the overridden class must call the parents' method so that events are di...more >>

VB6 talks to .NET code
Posted by David Kao at 3/1/2005 1:33:06 PM
HI All: The project I am currently working on is using VB6 talks to a EXE in C#. From VB6 I have no trouble to communicate with that C# code. But I am having trouble to communicate the C# code which is already in memory. Thanks in advance David Kao...more >>

Authenticating domain users
Posted by Yaron at 3/1/2005 12:37:05 PM
Hi, I am writing a program that will require a user to log in using their domain account which will then take the information to a SQL Server database stored on the server and try to log in using that information. Several questions: 1) What class should I use once I have the username / ...more >>

Looking for a Currency class
Posted by Paul Wistrand at 3/1/2005 12:36:10 PM
Hi, does anyone know if there are any opensource implemenations of an Currency class for the .NET framework? ...more >>

What is the C# equivelant of the Type keyword in VB?
Posted by aaa at 3/1/2005 12:27:11 PM
if I wanted to create the following in C#: Type Blah dateTime As DateTimeStruct BlahCode As String description As String systemStatus1Str As String systemStatus2Str As String End Type How would I do this? Via a struct? ...more >>

Popup window width
Posted by Newbie at 3/1/2005 12:27:04 PM
I'm having trouble changing the width of my pop up window. Changing the width has no effect. private void LinkButton1_Click(object sender, System.EventArgs e) { string script = "<script language=\"javascript\">"; script += "var winOptions = 'fullscreen=no, channelmode=no,status=no,too...more >>

Foreign Key self-join on a DataTable
Posted by Ev at 3/1/2005 11:53:05 AM
I have a database table in SQL Server that has a self join. In C# I have a DataTable with a self-join. I have defined a foreign key constraint on the DataTable for the self join. The AcceptRejectRule is set to Cascade Table Structure: OrderID (Identity field) OrderDesc OrderParent (this is...more >>

omit the pirvate/public etc
Posted by Wilfried Mestdagh at 3/1/2005 11:53:02 AM
Hi, If you omit private / public / protected etc in a declaration then What is it ? pirvate, protected ? eg: bool test; bool check { return (something == false); } -- rgds, Wilfried http://www.mestdagh.biz...more >>

Evolution Algorithms
Posted by David Kyle at 3/1/2005 11:49:54 AM
I was hoping someone here might have some information for me. I’m interested in how start coding programs that would “evolve”. Ultimately I thought I might trying to build a program that would evolve and grow based on the outcomes of tic tac toe games. Maybe even step it up to checkers later ...more >>

passing Parameters
Posted by freddy at 3/1/2005 11:41:55 AM
ok lets say I use the insertcommand in ado.net to insert a string from the info the user rights in a textbox. The textbox name is txtName.text do I use ('" +txtname.text +"'); or do I use a parameter and if so how would I change ('" +txtname.text +"'); to a parameter Thanks...more >>

Closing a webform
Posted by Newbie at 3/1/2005 11:41:50 AM
Hi! In C# asp.net, how do I close a popup window (an aspx webform)? I have a link button handler below: private void LinkButton1_Click(object sender, System.EventArgs e) { this. //cant find a Page member function }...more >>

backgrd color combobox
Posted by Harry at 3/1/2005 10:53:46 AM
I highlight the background colour of a textbox when it has focus, is there a way to do this for the combobox eg cmbMortgage.BackColor = Color.Red; ...more >>

Error when using oledb to get to access database
Posted by kscdavefl at 3/1/2005 10:19:02 AM
When I use the OleDbDataProvider to get info from an access database I get the following error: The Microsoft Jet database engine cannot open the file 'C:\Documents and Settings\bailedl1\Desktop\Dave's Docs\DemoData.mdb'. It is already opened exclusively by another user, or you need permiss...more >>

DESCryptoServiceProvider - encryption question
Posted by ts NO[at]SPAM ck-de.net at 3/1/2005 10:12:57 AM
Hi experts, I have the following code, which works fine: ######################### C# snippet ######################################## string k = "12345678"; string input = "ABCDEFGH"; DES des_dec = new DESCryptoServiceProvider(); byte [] inbuff = ASCIIEncoding.ASCII.GetBytes(input); ...more >>

How to call C++ written ActiveX from C# ?
Posted by Michael Grabelkovsky at 3/1/2005 10:12:18 AM
I have C++ written ActiveX. It's called from Browser and works without any problem. But I haven't been succsessfull to call him from .NET (C#) environment. I'd like to see any example to understand the problem. Thanks, Michael. Additional information: 1. ActiveX was written inside VC6...more >>

data in treeview
Posted by Hrvoje Voda at 3/1/2005 9:55:44 AM
How to get data into treeview control? I'm using dataAdapter and dataSet for communication with database. Hrcko ...more >>

Very strange loop behavior?
Posted by David Veeneman at 3/1/2005 9:52:40 AM
A project that I have been working on has stopped executing loops correctly. I can add a simple loop to a class in the project, like this: for (int i = 0; i < 5; i++) { Console.Write(i); } The 'for' line will execute, then the 'Console.Write()' line, and the focus jumps to the '...more >>

Converting object to string.
Posted by bryja_klaudiusz[at]poczta[dot]fm at 3/1/2005 9:10:37 AM
Hi, How to convert object to string? I try procedure like this (when I have byte array I convert it to string): public byte[] ObjectToByteArray(Object obj) { MemoryStream fs = new MemoryStream(); BinaryFormatter formatter = new BinaryFormatter(); try { formatter.Serialize(fs, obj); ...more >>

Reading INI File
Posted by Bronislav at 3/1/2005 8:55:16 AM
I'm trying to read INI File from inside the C# I Created Class: public class clsIniFile { [DllImport("kernel32.dll", SetLastError=true)] private static extern int WritePrivateProfileStringA( string lpApplicationName, string lpKeyName, string lpString, string lpFileName); ...more >>

StackFrame GetFileName and GetFileLineNumber empty - sometimes
Posted by Lord Bah at 3/1/2005 8:44:47 AM
I've seen some other posts referring to this problem, but didn't find any solutions. We're trying to log a call stack when we have a problem, using the StackTrace and StackFrame classes in C#. They are created via new StackTrace(true) to get the debugging info and trace.GetFrame(i). Our class...more >>

Checking Hashtable value for true false
Posted by Netmonster at 3/1/2005 8:40:21 AM
Hello, Can someone tell me what I'm doing wrong? I am trying to check the value of a hashtable and I know the value will be true or false. The data is coming from a sql db column with bit as its datatype. If the DB value is 0 the hashtable in a vs.net debug shows the value of {false} Here i...more >>

C# app icon in windows explorer
Posted by WRH at 3/1/2005 8:39:18 AM
Hello This must be on a faq somewhere but despite a lot of googling I still can't resolve this issue: I have a C# app and I would like to see its icon displayed when the exe file is viewed in windows explorer. The icon is an embedded resource and displays normally in the title bar when the app ...more >>

Opening a new window
Posted by Newbie at 3/1/2005 8:29:02 AM
Hi! How do I open a new window (webpage) without closing the current webpage in C# ASP.NET? The new window (webpage) will be smaller and centered on the screen and it will contain a DataGrid. Thanks, newbie...more >>

Calling VC++ From (C# | VB) .NET
Posted by Mark Jerde at 3/1/2005 8:24:02 AM
Yesterday I posted the message below to microsoft.public.dotnet.languages.vb and microsoft.public.vc.language. The two replies are also posted. I need to write some ISO C++ functions, more information below. Is C# a better language to use than VB.NET for calling these C++ functions? If so ...more >>

Array Declaration in C# use Count instead of UpperBound
Posted by Annoyed Programmer at 3/1/2005 8:23:04 AM
Maybe this question has been addressed before, but I just stumbled with the issue so I'll post it here. Since I can remember array declaration in any language I've worked(Basic/VB/VB.NET/C/C++) was: (Example in Basic-way) Dim Arr('UpperBound') as Type Ex. Dim Arr(0) as String gives you...more >>

Assigning a value within a Dataset to a variable
Posted by Johnny at 3/1/2005 8:19:05 AM
How do I assign a value in a dataset to a variable. I have the following code that's giving me an error message: char IsTaxable; IsTaxable = dsTaxData.Tables["ShipTo"].Rows[0]["is_taxable"]; The is_taxable datatype is string and the error message that I'm receiving is "Cannot implicitly ...more >>

FileSystemWatcher OnChanged : What Changed ??
Posted by TD at 3/1/2005 8:17:47 AM
I'm watching a folder for new files. When the files arrive, I want to wait until it is done being written to and then move it. Every time I move a file into the test folder, it triggers 3 calls to the OnChanged handler. I can't tell what is changing between the 2nd and 3rd call to know whe...more >>

DateAdd
Posted by Andy at 3/1/2005 8:03:03 AM
Hello: I know DateAdd is not a part of the C# language: but I can't seem to figure out how to implement the same funtionality. I want to be do something like: dDate = DateAdd(-1, dResquestedDate) where -1 is the number of days I would like to add dRequestedDate is the date I would ...more >>

String stream in .NET???
Posted by TT (Tom Tempelaere) at 3/1/2005 7:01:08 AM
Hey there, I need a string stream, but I can't find one in .NET. I thought StringWriter would derive from Stream, alas it doesn't do so. Which leads me to my next question: What is the purpose of System.IO.StringWriter (or, what is its added value)??? It can do the same things with Strin...more >>

Get the name of the file...
Posted by Josema at 3/1/2005 6:43:04 AM
Hi, I have a class. How could i obtain the name of the file of this class (for example, if my class name is test, the name of the file is test.cs) -- Thanks Regards. Josema...more >>

version information
Posted by Wilfried Mestdagh at 3/1/2005 6:41:11 AM
Hi, I'm using C# 2005 beta. How do you put version information in the exe file, or is this not possible with this IDE ? If not possible someone knows a component that does this ? -- rgds, Wilfried http://www.mestdagh.biz...more >>

Where are the C# DirectX Samples in the latest DirectX 9.0 Feb SDK
Posted by Mike P at 3/1/2005 6:41:05 AM
Problems, problems... Im trying to create DirectX Projects within C# and to also look at the latest DirectX C# Samples. I have just installed MS Visual C# .net Standard Edition on my Windows XP Pro PC and I then installed the full DirectX 9.0 SDK (Summer 2004) & then the latest DirectX 9...more >>

Custom control with Collection
Posted by Rogerio Jun at 3/1/2005 6:35:02 AM
I create a custom control with a collection property. My question is : Can I override the method add of Collection ?...more >>

Piloting office from C#
Posted by Jesper at 3/1/2005 6:23:02 AM
Where can I find C# (not VBA) related documentation for MS office applications. Is there a SDK that I need to install. So far I've have been using examples found on the internet when e.g. creating and manipulating a word document, but I cant find documentation on the syntax. Know of any goo...more >>

how to open default mail client with attach files
Posted by vijaygparikh NO[at]SPAM gmail.com at 3/1/2005 5:44:51 AM
HI i am writting a code for open default mail client and it works fine. i want to attach a file with the default mail client but file is not attached with "mailto:" option. If any one has idea about open default mail client with attach files using "mailto:" then pls reply me. Thanks in Adv...more >>

How about Data Access Application Block
Posted by ad at 3/1/2005 4:47:01 AM
I want to develop DataBase application. How about Data Access Application Block? Is it useful? ...more >>

How to send an eMail?
Posted by Sharon at 3/1/2005 4:39:07 AM
I wish to send and email using the C#/.NET code. How to I do that? I tried using the: MailMessage + SmtpMail But using them I managed to send only to users that are in my domain. I need to send email out of my domain. How do I do that? -- Regards Sharon G. ...more >>

C# and Event Log
Posted by msuk at 3/1/2005 4:29:08 AM
All, I would like to use C# to create a new log in the event viewer using a name I desire. So along side Application, System & Security I will have a new long called CompanyXXX Log - is this possible using C#? Thanks Msuk...more >>

owner drawn listbox
Posted by Petrus at 3/1/2005 2:55:07 AM
Hi, I can't seem to figure out how to dynamically add new items with different font colors to a listbox. I have followed the ColorListBox example at http://www.codeproject.com/cs/combobox/colorlistbox.asp which i found very informative. But in the example all the items that should be added ...more >>

Collections
Posted by juli jul at 3/1/2005 2:30:51 AM
Hello, I grid and each line of it is taken from a collection,each line represents data and for each of those lines ,I have a button that when is being pressed sub data of each line wich is also from a collection-appears. The question is how can I create a sub collection to a collection? (fo...more >>

Get height of control where parent's height is 0
Posted by redneon at 3/1/2005 2:11:02 AM
I've put a load of controls on a tab page and set the height of the tab page to 0. Now it seems that every control on this tab page has had their height set to 0 too. Is there any way to get the original height of the controls without having to create new instances of them? Darrell ...more >>

Using https instead of http
Posted by saurabh_helloaish NO[at]SPAM rediffmail-dot-com.no-spam.invalid at 3/1/2005 1:41:07 AM
Hi In my application the server url starts with https. ie it is using secure connection. Now if we write server url in internet explorer then http is automatically replaced by https. But in dot net if I use https while creating HttpWebResponse object then it gives me following exception "T...more >>

What is the corresponding functions of PHP's addslashes and stripslashes() in .NET
Posted by X-Killer at 3/1/2005 1:14:42 AM
Just wondering what is the corresponding function of PHP's addslashes() in ..NET. Thanks in advance. ...more >>

getting events into c# app from a COM control - critical path help needed!
Posted by dave at 3/1/2005 12:44:01 AM
Hi, I have a COM control / server I'm trying to get events from in my c# applications. 1) I'm trying to get events in both c# console apps and in c# winform apps. 2) I can call methods on the COM control / server ok, I just don't receive any events. The method calls are definitely successful. ...more >>

How to write a control displayable on the toolbar of VS.Net IDE ?
Posted by kusanagihk NO[at]SPAM gmail.com at 3/1/2005 12:41:12 AM
To all, Does anybody got any idea of how to write a UI control that can be displayable on the ToolBar (ie. you can drag drop it on the Form just like a Button Control provided in VS.Net)? Since I need to override some functions of the Button object for the whole project afterwards; so it is m...more >>

UdpClient problems
Posted by Rick at 3/1/2005 12:01:43 AM
Hi, I'm trying to get a simple UdpClient app working. I've been looking at the MSDN info regarding UdpClient. When I set it up on my own PC and send messages to myself it works OK. If I try to send messages to another PC with another IP address I get multiple exception, the first one being ...more >>


DevelopmentNow Blog