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 2005 > threads for tuesday february 22

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

How to use reflection to list array values
Posted by Manfred Braun at 2/22/2005 11:26:16 PM
Hi All, I try to list the values from an objects array member: [ one of a's member is an array] FieldInfo[] fis = a.GetType().GetFields(BindingFlags.Public | BindingFlags.Instance); for(int i = 0; i < fis.Length; i++) { Console.WriteLine("Name:{0},Value:{1}", fis[i].Name,...more >>

Determine context menu event
Posted by Ryan Joseph So at 2/22/2005 11:12:45 PM
When you right click your mouse on the textbox it will popup a contextmenu then you can either cut, copy, paste. Is there a way to determine what process did the user choose on the context menu? And is it possible to override it meaning cancelling the process in the code. *** Sent via Deve...more >>

C# Newbie: Filling custom shapes
Posted by Steve at 2/22/2005 10:53:09 PM
Hi, I'm playing about with custom controls. I've used DrawArc to draw part of a circle, then DrawLine to connect the ends of the arc. I'm happy with the results of this, but I would now like to fill it in with a given color. How would I go about this? I can't seem to find anything which w...more >>

ListView vs CheckListBox
Posted by MikeY at 2/22/2005 10:23:00 PM
Hopefully someone can help me on this. I am using C#, making Windows forms. I have created a listView with checkbox's. I have enabled the checkboxes under the properties, and all the data, checkbox's and icons are displayed as they are meant to be. My problem is this, I am trying to achieve ...more >>

Converting html data written as a Image (In Sql Server) back to html ?
Posted by KK at 2/22/2005 9:32:19 PM
Hi, I need to save certain content to SQL server and then use SQL Server indexing facility to search. SQL Server have recomended using Image data type with a filter type (for .htm, .doc etc..) Now, because of this I save normal html content also in binary format in the Image field. When...more >>

Pass char* to C# callback function
Posted by SB at 2/22/2005 9:01:05 PM
What is the proper way to pass a character array (char *) from a "C" dll to a C# method (delegate) in my app? Getting the dll (which simulates a third party dll) to call my delegate works fine. However, as soon as I try to add any "char *" parameters, I start getting exceptions in my C# app....more >>

are there guidlines for NUnit friendly classes?
Posted by Julia at 2/22/2005 8:19:42 PM
Hi, We are going to invest in testing and I wonder are there any guidelines to design NUnit friendly classes? Should I consider at all ease of use in unit testing when designing my classes? Thanks in advance. Note that I am using NUnit to test my classes I am not doing TDD for now. ...more >>

WindowsControlLibrary vs ClassLibrary
Posted by Rene at 2/22/2005 8:08:03 PM
I notice that VS lets you choose to create a WindowsControlLibrary and ClassLibrary, I created a class library and then added a user control and it let me do that. I am assuming that the opposite will work too. So why tow projects types when it appears you can do the same thing in both ...more >>



Why can't I inherit from DateTime?
Posted by Frank Rizzo at 2/22/2005 6:25:32 PM
Any ideas?...more >>

Run Self-extracting exe
Posted by wenz at 2/22/2005 5:55:02 PM
Hi I have an exe which is actually a self-extracting zip file that i would like to run to extract all the files. I have the code showing how to use the j# classes and library to extract zip files however it looks like these work on zip files only, not exe. Does anyone know how to get around...more >>

Adding a mnemonic to a C# Button
Posted by Donal Kelly at 2/22/2005 5:15:17 PM
hi, I'm building a GUI in C# and I want the buttons to have a mnemonic character attached to the button. I cannot seem to do this in C#, where it was very simple to do in Visual C++. Thanks, donal ...more >>

Drawing a rectangle on a web page
Posted by Ryan at 2/22/2005 5:11:13 PM
Hello, I'm trying to draw a rectangle on a web page which contains a picture. Following is the function for a similar windows application. private void ZoomIn_Click(object sender, System.Web.UI.ImageClickEventArgs e) { System.Drawing.Graphics g ; g = Graphics.FromHwnd(this.MapImage.H...more >>

Please why?
Posted by AntoS at 2/22/2005 4:55:59 PM
This is the first row of my page: <%@ Page Language="C#" codebehind="mypage.aspx.cs" Inherits="mypage.mypage" autoeventwireup="false" %> on my pc where I developed, it works perfect, I got also a database local. I put it on an other PC and it does not work any more, it says: " Could not l...more >>

C# and Crystal Report 9
Posted by vickie at 2/22/2005 4:12:33 PM
I have a sql server7 database using C#. The system runs fine until the user try to run a report. I get the following error: Object reference not set to an instance of an object. Description: An unhandled exception occurred during the execution of the current web request. Please review the sta...more >>

data search
Posted by Hrvoje Voda at 2/22/2005 3:46:54 PM
What is wrong with this search? I always get ALL data from table. dataSet.Tables[Group.Text ].DefaultView.RowFilter= "Name = " + "'" + textBoxName.Text + "'" ; gridSearch.Table=db.dataSet.Cookies ; Hrcko ...more >>

Arithmatic
Posted by Harry at 2/22/2005 3:31:30 PM
Hi, I wonder whether anyone could help me to do a maths calculation? I have three boxes which take numeric values double PPrice = Convert.ToDouble(txtPurchasePrice.Text); double BCost = Convert.ToDouble(txtBuildCost.Text); double Morg = Convert.ToDouble(txtMortgage.Text); As each box ha...more >>

A way to transfer a query string for SQL Server to one for another database?
Posted by Quentin Huo at 2/22/2005 3:23:48 PM
Hi: If I have a query string for retrieving data from SQL Server database, is there a way to transfer it to a query string for retrieving data from Oracle or any other database like mySQL...? I mean by a program. I am working on C#. Thanks Q. ...more >>

DataGrid on WinForm
Posted by Vai2000 at 2/22/2005 3:23:38 PM
Hi All, I have a dataview binded to a datagrid. I do some filter on the view, how can I get the filtered list displayed on the DG in my code The DG is on Winform TIA ...more >>

How to get an Object by it's name?
Posted by Michael Stahl at 2/22/2005 3:06:26 PM
What I want to do: I want to have a class which is reading an .ini file and manipulate the application with the data from the ini file. What I have now: An ini file: [textBox1] Text=Hallo Dock=none ForeColor=red A class with: object iwill=null; parentType = this.GetType(); Syste...more >>

byte[] to string
Posted by jim at 2/22/2005 2:29:06 PM
What is the best performing way to convert a byte array (not a signed byte array) to a string? Currently, I convert it to char[] and then to string. ...more >>

SQL Parameters
Posted by freddy at 2/22/2005 2:25:04 PM
I would like to learn how th create and pass sql parameter in ado.net using c#. Any books that you can recommend or websites...more >>

What was MS thinking
Posted by Pete Davis at 2/22/2005 1:39:17 PM
Okay, someone tell me I'm making a mistake here: I need to create my own CurrencyManager class derived from BindingManagerBase. As far as I can tell this is impossible to do. The MSDN docs say, erroneously: --- Notes to Inheritors: When you inherit from BindingManagerBase, you must o...more >>

SerialPort & Visual C# 2005 Express
Posted by Richie Carey at 2/22/2005 12:33:33 PM
Here's my problem. I'm using Visual C# 2005 Express for a small project that requires simple AT modem commands to be sent to an external serial device. The device requires 2400 baud, no parity, 8 data bits, and 1 stop bit. Should be easy enough, except that I cannot get the SerialPort compo...more >>

Passing strings between webforms
Posted by Newbie at 2/22/2005 12:21:01 PM
How do I pass string values from one webform to another?...more >>

.Net toolbars
Posted by Abhishek at 2/22/2005 12:19:12 PM
Hi! I was creating a toolbar for my application in C# I want to create the toolbar which should have very similar to look n feel as the one that is displayed in .net while writing the code. I mean the toolbar should be floating I do not want to use any third party tools. I beleive this should ...more >>

Display System.Byte[] text data
Posted by smilly at 2/22/2005 12:01:02 PM
This field is bound to a image data type in SQL server that is used to house big amounts of text how can I output the text data because right now I am getting System.Byte[] ...more >>

cannot convert type system.web.ui.webcontrols.unit to double
Posted by Praveen at 2/22/2005 11:43:04 AM
How to get rid of this error...more >>

Wizard
Posted by Rogerio Jun at 2/22/2005 11:41:02 AM
I want to develop a wizard. In Delphi it's very easy, I use a TNOTEBOOK and TPANEL, but in C# not exist a NOTEBOOK component. Anybody have a sugestion ?...more >>

variable length FIFO Queue with constant total element value.
Posted by worli at 2/22/2005 11:12:39 AM
Hi All, I have a strange requirement. I have a dynamic input numeric data stream e.g. 2, 2, 4, 5 etc.... ( each input number range from 1 to 10 ). lets take a simple case where all inputs will have same value = 1 ( which may not be the case ) I need to create a FIFO queue in which at any giv...more >>

Time of day
Posted by rehiaa at 2/22/2005 11:11:04 AM
I want to show 13:06 (six minutes past one o'clock day) in a label on a form The code: DateTime d1 = DateTime.Now; this.lblTime.Text = d1.ToString(); gives med date ansd time. How do I format this to the expected result 13:06? regards rehiaa ...more >>

Have same way to send e-mail in DNS?
Posted by Retf at 2/22/2005 11:10:14 AM
Hi All, Have same way to send e-mail in DNS? This is possible? I did get the world cast from fairlogic and this software have two ways to send e-mail, the first is: SMTP and the second is DNS. Can anyone help-me to understand this process: DNS. Thanks ...more >>

Visual C#.NET IDE-Component window
Posted by Terry A. at 2/22/2005 10:09:02 AM
When I use the Form.cs[Design] tab all that is visible is the window that holds the components that are dragged to the form. I am unable to get a view of my form. Do you have any suggestions?...more >>

Accessing the same data from multiple forms using C#
Posted by Sam Berry at 2/22/2005 9:55:05 AM
I am in need of some guidance on asscessing the same data from multiple forms. I tried using a collection, but everytime that I try to access the collection, I have to use the new word. colStuff ns = new colStuff When I try to access the items in the collection, they are not there (ie the va...more >>

asyncronous Socket and EndAccept()
Posted by il RicercatoreSbadato at 2/22/2005 9:34:30 AM
title: asyncronous Socket and EndAccept() question: hi to all, I am working with a server that uses the sockets in a asyncronous way. When I want to STOP the server I do the following: - serverMainSocket.EndAccept(); - serverMainSocket.Shutdown(SocketShutdown.Both); - serverMainSocket.Clo...more >>

Show binary file into the page
Posted by Josema at 2/22/2005 9:33:03 AM
Hi, I have to show a pdf when a page is load... I have a byte[] variable with the pdf... I try to make a Response.BinaryWrite(variable) but i cant open the pdf... How could i make it? -- Thanks Regards. Josema...more >>

Select TreeNode on Right-Click
Posted by paradox at 2/22/2005 9:08:38 AM
How can I go about having a TreeNode selected when I right click? I tried using the Click event, but the event does not pass in the node that was clicked. Currently you have to left click a node in order to select it. I want to be able to write click and bring up a context menu with only certa...more >>

convert to utf-8, part II
Posted by Albert Jan at 2/22/2005 9:06:25 AM
Hi, in my quest to properly display email messages I have overcome the problem of decoding strings like "=?GB2312?B?s8q5q8u+vq3A7aGissbO8bK/w8W1xNK7t+LQxQ==?=" (which appears to be an 'encoded-word' as is explained in rfc2047), by using Convert.FromBase64String as Stefen kindly suggested ...more >>

What's the best way to validate a CSV file
Posted by Ali-R at 2/22/2005 9:04:32 AM
Hi all, I am getting a CSV file like this from our client: "C1","2","12344","Mr","John","Chan","05/07/1976"......... I need to validate **each filed value** against a set of rules ,for instance for "05/07/1976" ,I need to make sure that it's in the right format ,It's not later than today...more >>

Winforms Datagrid Cell Text
Posted by Vinny Vinn at 2/22/2005 8:55:13 AM
Any ideas on how i can bold the text within a specific cell of a winforms datagrid?i have used DataGridColumnStyle for an entire column,however currently i need just the text of a specific cell to be bold? Thanks...more >>

checking form for control changes
Posted by gl at 2/22/2005 8:51:07 AM
I was wondering how you could check a form for changes within it's controls (or possibly what event to program under). For instance, if i have a panel on a form with a bunch of combo and text box controls in it, how could i call a method whenever any of the controls (combo or text) changed? I ...more >>

Parser for CSV files
Posted by Ali-R at 2/22/2005 8:32:28 AM
Hi, Is there a parser which parses CSV files? Thanks for your help. Reza ...more >>

Xml: Finding the right node to modify
Posted by TT (Tom Tempelaere) at 2/22/2005 8:31:08 AM
Hey there, I'm having trouble finding the right XPath expression. The XML file I'm parsing contains an element Heads which contains sereveral Head elements. These Head elements have several Row sub-elements. Heads ->(0..*)Head -> ...subelements... -> (0..*)Row The problem I have is tha...more >>

Exception and logging component
Posted by Ali-R at 2/22/2005 8:27:10 AM
I'm using a .Net application to execute DTS packages within Sqlserver,I need to have very customizable and powerful Exception maangement systems which loggs different issues happend in the DTS package with my own errorCode. Can somebody give me some ideas? Thanks ...more >>

file i/o question
Posted by eat_spam NO[at]SPAM nlsa.com at 2/22/2005 8:16:34 AM
I'm just learning C# so please excuse me if this is a dumb question. In Delphi, you can declare, read, and write files of type TMyRecord, where TMyRecord is a record structure that you have declared. I can't find anything similar in C#. Can C# only read/write files that are primitive types? I...more >>

Navigating back to the previous webpage
Posted by Newbie at 2/22/2005 8:13:02 AM
Hello! I'm trying to figure out how to go back to the previous webpage without using the code below since the directory structure is hardcoded. It should work just like clicking the "Back" button on Internet Explorer. private void Button5_Click(object sender, System.EventArgs e) { R...more >>

connection pool errors
Posted by Phil Townsend at 2/22/2005 7:58:48 AM
While we have switched to the Application.Data block to improve connection management, we are still experiencing connection pool errors on occasions. I have been careful to explicitly close connections. Furthermore, for added insurance, I am calling close() and dispose() on the connection object...more >>

Xml: Modifying and saving Xml document problem.
Posted by TT (Tom Tempelaere) at 2/22/2005 7:31:05 AM
Hi there, I load an Xml document into an XmlDocument object. I look up some nodes using SelectNodes/SelectSingleNode, and I modify the InnerText property. After this I call the XmlDocument.Save method on the XmlDocument object, BUT, the changes are NOT written! The resulting Xml document is...more >>

From byte[] to float and back again
Posted by Kenny ODell at 2/22/2005 7:21:06 AM
I do not know how to convert from a byte array to a float, and back again. I read data from a serial port into a byte[] (entire command structure which I parse). I am able to sift the data and isolate the information I want, in this case a structure that contains a bunch of floats and longs....more >>

How to exchange method with a web services of customers Class ?
Posted by kejeiri NO[at]SPAM yahoo.fr at 2/22/2005 7:02:35 AM
As I know, in the Web Services context using VB.net we can serialize all attributes of any class just including it at a head of the web method like that: ---------- <WebMethod(Description:=" this is just the beginning of the jocke :-)"), XmlInclude(GetType(MyClass1)), XmlInclude(GetType(MyClas...more >>

version of .net + folder browser
Posted by juli jul at 2/22/2005 5:58:07 AM
Hello ,I am working with ..Net Framework 1.1 - Version:1.1.4322 and Development Enviroment2003 - Version 7.1.3088. Is this version of .Net supposed to have a normal folder browser or might be that the version is the reason I don't have a normal folder browser? If not,which control could I...more >>

Attributes and Events
Posted by mra at 2/22/2005 4:41:04 AM
I want to receive a notification (via an event), whenever a property of a class is modified. Of course, this would be possible if i write code such as the following to EACH "set" part of each property: if(Modified != null) Modified(this, EventArgs.Empty); //Modified is an event Yet, this...more >>

IIS Licensing question
Posted by Nadav at 2/22/2005 4:09:02 AM
Hi, I wonder... is there a limit for the maximal concurrent users for a certain IIS server? If indeed there is, does this limitation depends of the type of server it runs on ( e.g. DataCenter, Enhanced server, ... ) is it possible to extend the number of licenses for a cerain computer? ...more >>

builds ok, won't run:Visual Studio cannot debug ... .dll is not an
Posted by adolf garlic at 2/22/2005 2:31:03 AM
hi, i'm having problems running something in vs.net (it builds ok with no errors or warnings) scenario: - c# dll class library is used to log events to perf mon/counters - interop is used by vb6/com+ to call the dll - winform test harness with simple buttons to call methods on dll ...more >>

Border colour of flat button
Posted by redneon at 2/22/2005 1:53:04 AM
Is it possible to change the border colour of a button whos FlatStyle is set to Flat? It's be nice to be able to change the width of the border too. Any ideas? Darrell ...more >>

Ftp functionality
Posted by Nadav at 2/22/2005 1:25:01 AM
Hi, I am about to create a .NET based ftp server, is there any existing infrastructure / samples that demonstrate how to achive that? Any samples or pointers will be appreciated... -- Nadav http://www.ddevel.com...more >>


DevelopmentNow Blog