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 2006 > threads for thursday february 16

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

The DataReader and integers
Posted by Tarun Mistry at 2/16/2006 10:35:59 PM
Hello everyone, I am using the data reader to access the information within a results set and then pass this information onto the constructor of my classes. Im using the following syntax to access the information: dataReader["my_field"].ToString() This is fine, however it simple will no...more >>

PingSendAsync Method
Posted by Ciro at 2/16/2006 10:28:39 PM
Hello, i'm trying to build a simple ping application. Could someone tell me why the PingSendAsync Method (System.Net.NetworkInformation) eats 2 MB of the pagefile each time I send a ping? ...more >>

string[] to int[]
Posted by Andrew Robinson at 2/16/2006 10:14:23 PM
I have an array of string that I need to convert to an array of int. Any elegant method other than iterating through it and using int.parse() on each element? Thanks, ...more >>

Posting data using httpwebrequest.
Posted by shankararaman.s NO[at]SPAM gmail.com at 2/16/2006 10:11:06 PM
Hi, I am trying to develop an interface which will fetch all my Yahoo mails. I am not able to sign in to yahoo by posting the form with my username & password. Please find my code below and correct me where am going wrong. string result; System.Net.HttpWebRequest request,request1; Syste...more >>

Visual Studio 2005 hates me
Posted by Steven Nagy at 2/16/2006 9:43:25 PM
I've had so many problems since I started developing ASP.NET apps in VS2005. Here is just another one: Sometimes in this particular project, whenever I change the ID property of a control such as a textbox or drop down, it won't retain the value. I have to swap to HTML mode and edit the text ...more >>

Make MVP Aware Of Security Model
Posted by Jeff S at 2/16/2006 9:36:11 PM
I'm implementing the Model View Presenter (MVP) pattern in a Windows Forms application. There is a need to control which forms (views) are accessible by specific users, and for some forms (views) to enable/disable/hide controls for certain users or groups. For sake of this question, please ...more >>

3d Shapes
Posted by Jessica Weiner at 2/16/2006 9:32:25 PM
I am working o a c# application which needs to draw Solid Blocks, Spheres and Cylinders in 3D just like a CAD Program. Is there a library or a 3D Engine that can help with this stuff? I am currently looking at TrueVision3D.com Thanks. Jess ...more >>

Newby C# Web App Question - Z-INDEX Style
Posted by Fred Nelson at 2/16/2006 8:22:17 PM
Hi: I'm working on a VS2005 web application and I have what is probabably a "newby" question. In VS2003 I could drag a textbox/button/etc on to a form and position it with the mouse. I converted an app to VS2005 and this still worked. In VS2005 I can't do this. I have examined the code ...more >>



Image loading problem with GDI+ API
Posted by urneel NO[at]SPAM gmail.com at 2/16/2006 8:05:21 PM
Hi group, Iam able load image (*.bmp,&tiff, *jpg) on Cstatic box with bitmap property using GDI+ API's . problem is when tiff image of 80MB size or greater takes more time which is uncosiderable. and i wud like to reduce the size before any process. please guide me how to proceed. thank...more >>

Writing stuff
Posted by David at 2/16/2006 8:01:05 PM
Hi all, I would consider myself a fairly intermediate level programmer in C#, having come from an ASP background, though there are still big gaps in my knowledge. One such gap is writing stuff such as... HttpContext.Current.Application.Contents etc. etc. etc. Now, there are two parts...more >>

XmlHttpRequest from a Windows Application?
Posted by dave at 2/16/2006 7:56:28 PM
I want to design/develop an windows application (C#) that can query multiple websites (XmlHttpRequest), call number of 3rd party external webservices (SOAP) and parse/process the data and display it to the user. Ideally this would have been developed as a website, but due to crosss doman lim...more >>

virtual table; override; new, question
Posted by relient at 2/16/2006 7:27:17 PM
I'm learning about the virtual table in association with virtual methods. I got most of the logic and understanding down (I believe) for when you use 'override' and no 'override' or no 'new' modifier. What I'm trying to figure out now is what happens when you do use modifier 'new' on a derived c...more >>

Disable Intellisense for the class member
Posted by Just D. at 2/16/2006 7:15:06 PM
Who remember how can I disable the intellisense for one class member only? I remember that it was a special tag making the class member invisible, excluding it from the drop-down list showing by the VS when we were pointing to the object created from the class. Forgot this tag... It was someth...more >>

Doing the Right Thing when designing plugin architectures
Posted by Rune Jacobsen at 2/16/2006 7:00:14 PM
Hello all, I mailed our common hero and fellow newsgroupian Jon Skeet a question regarding his article on plugins at http://www.yoda.arachsys.com/csharp/plugin.html, and he suggested that I should post here. I was afraid to spam the group further with my silly questions, but I agree with ...more >>

newbie: How to set focus to TabPage?
Posted by deko at 2/16/2006 5:35:58 PM
I need to open FormB from a menu selection on FormA, and set the focus to a particular page in the TabControl on FormB. private void mnuScheduler_Click(object sender, EventArgs e) { FormSettings FormSettings = new FormSettings(); FormSettings.ShowDialog(); // ok. the form is open...more >>

FileNotFoundException 0x8007007E
Posted by SGRing at 2/16/2006 3:54:29 PM
I have a c# application that I'm migrating from 2003 to 2005, and I moved it to another machine. It built ok. But, when trying to run I get System.IO.FileNotFoundException was unhandled Message="The specified module could not be found. (Exception from HRESULT: 0x8007007E)" when it tries to ...more >>

Array.Sort question
Posted by Jan Smith at 2/16/2006 3:50:50 PM
I've searched the overloads for the Array.Sort method, and I haven't found a clear answer to my question. Maybe it's not in Array.Sort. Here's the question: I initialize an array X with the values 28 142 3 17 225. I can sort this array in ascending order and it will return 3 17 28 142 225...more >>

Calling Base Class' Ctor
Posted by BDB at 2/16/2006 3:21:27 PM
Hi, I'm trying to call a base class' constructor. This is giving me an error: Use of keyword 'base' is not valid in this context. .... public class B : A { B( int i ) { base( i ) //Calling A's ctor of same declaration } } Thanks, Bryan...more >>

'style' or 'preference' question
Posted by Steve at 2/16/2006 3:12:45 PM
If you wanted to get a collection of items from your BusinessObjectLayer, do you think it would be more intuitive to see something like this: <code> public class Customer { public static Customer[] GetCustomers(); } </code> or use a "Manager class like this: <code> public static c...more >>

MessageBox.Show no longer works...
Posted by John Kraft at 2/16/2006 3:11:33 PM
I'm developing a small utility for personal use using VS2003 and .NET 1.1. I use MessageBox.Show() often. Yesterday, it worked fine. Today it no longer works. I get a MessageBox with no text, and a button with no text. If I use the full blown Show() and tell it caption, icon, buttonns, e...more >>

using Microsoft.VisualBasic in c#
Posted by Avon at 2/16/2006 3:10:26 PM
Hi friends, Probably stupid question, Is it wrong or dangerous if I use some vb.net functions in c# via Microsoft.VisualBasic namespase? For example: Int32 a = Microsoft.VisualBasic.Strings.Asc("z"); Console.WriteLine(a); It is working, but I am wondering is it safe ...more >>

port blocking
Posted by JustinC at 2/16/2006 3:08:37 PM
Does anyone know of a way, using C#, to programmatically block a Windows port? I've looked into some low level solutions like NDIS, but am hoping to find something that uses C#. Any help would be greatly appreciated. ...more >>

The fastest way to determine c = (byte)a & b
Posted by Doru Roman at 2/16/2006 2:48:09 PM
Hi, What is the fastest way to evaluate manually the result in this case: int a, b, c; a = 255; b = 122; c = a & b; The only way I know is transforming each number into the binary value and then applying the & operator, then the result changed back into a decimal: 122. Is there anot...more >>

Assembly.LoadFrom throws PathTooLongException unexpectedly.
Posted by shrishjain NO[at]SPAM gmail.com at 2/16/2006 2:20:37 PM
Hi All, I call Assembly.LoadFrom("C:\\MyDir\\MyAssembly.dll")- it works fine. However when I call the following, it fails: Assembly.LoadFrom("C:\\MyDir\\..\\MyDir\\..\\MyDir\\..\\MyDir\\..\\MyDir\\..\\MyDir\\ ...\\MyDir\\..\\MyDir\\..\\MyDir\\..\\MyDir\\..\\MyDir\\..\\MyDir\\..\\MyDir\\..\...more >>

Events with Programmatically-Created Context Menu Items
Posted by Matt Harvey at 2/16/2006 1:54:23 PM
Let's say that I populate a context menu with commands from a database table using a loop, and that these commands and their number can change at any time. Is there a way to dynamically have events to fire when clicking one of the items, using generic code? For instance, let's say that the...more >>

MSBUILD <PropertyGroup> Spaces in file paths </PropertyGroup>
Posted by Pete at 2/16/2006 1:31:28 PM
I know MSBUILD doesn't like spaces in file paths when used as values of elements but I cannot find anything which documents the recommended handling etc... Any and all suggestions are appreciated. ...more >>

Like a Global
Posted by Max André Bündchen at 2/16/2006 1:26:12 PM
I'm reading the Pro C# 2005 and the .Net 2.0 Plataform by Andrew Troelsen (in time, a nice book!) and a question is in my mind. Supose that I have a WinForm application that has a login system. With the login, I take from de DB many user informations that I would use in each type (premision...more >>

Returning nulls
Posted by anonymous.user0 NO[at]SPAM gmail.com at 2/16/2006 1:24:22 PM
Whats the common/best practice for returning a "Does not exist/not found" result from a function. Imagine I've got a function: myObjectType GetById(long id); where the object may or may not be found. Currently, I just return a null. But this muddies up the calling code with null checks an...more >>

Printing problem dotmatrix printer with vb.net
Posted by sukhsinghin NO[at]SPAM gmail.com at 2/16/2006 12:48:40 PM
Hi, I am trying to print a invoice form with data from dataset using vb.net and printer is dot matrix. Invoice is a continues paper with pre-printed headers like First Name, Last Name, SSN# etc. and after each header their are some blank block like for SSN# 9 small box. I hv to print each dig...more >>

Cleanest syntax to logically AND multiple nullable boolean flags i
Posted by shawnk at 2/16/2006 12:01:29 PM
Given several nullable boolean flags; bool? l_flg_01 = true; bool? l_flg_02 = false; bool? l_flg_03 = true; bool? l_result_flg = null; I would have liked one of these syntax formats to work; // if ( l_flg_01 && l_flg_02 && l_flg_03 ) // L...more >>

Am I A Service or a Windows App?
Posted by UJ at 2/16/2006 10:49:04 AM
Is there any easy way to tell whether the program that is running is a service or a win app? TIA - Jeff. ...more >>

Pasting into single datagrid cell?
Posted by Brett Romero at 2/16/2006 9:53:41 AM
I'm trying to paste characters into a single datagrid cell. The grid has only two columns. Do I have to code something up on an event just to get these characters in? Sample code suggestions? The cells are enabled and can be edited. Thanks, Brett ...more >>

Send mail attachment
Posted by Code Monkey at 2/16/2006 9:38:28 AM
I've created a web service in .Net v2 that takes a couple of parameters (ie; to address, subject and body) that sends an email. I now want to extend this so that it can send attachments (ie; a PDF). Is this possible? If so, how does one go about doing it? Hope someone can help me out here....more >>

.NET component of MS Word ?
Posted by Chris Peeters at 2/16/2006 8:59:39 AM
hi, Does there exist a .NET component of MS Word ? The purpose is to create Word documents from within a .NET application. Rather than using the MS Word COM-component type libraries, I would like to use .NET components only So, does it exist ? thnx Chris *** Sent via Developersdex ...more >>

Modifying IIS Metabase on remote server
Posted by Raith at 2/16/2006 8:55:12 AM
Hi, I'm trying to write an application to modify certain IIS metabase entries (AllowKeepAlive, ASPProcessorThreadMax etc.) on remote web servers (Win2000 IIS5) over the network. I'm confident using it to modify the metabase on my local machine and it works great, however trying the same...more >>

Reading a BIG text file (200Mb)
Posted by ACC at 2/16/2006 7:26:42 AM
Hi! I'm developing an application to analyze some information that is inside a text file. The size of the text file goes from 50Mb to 220Mb... The text file is like a table, with "rows" and "columns", and several "cells" represent an objects in my application. What I need to do is, read ...more >>

MailAddress string format
Posted by gdodd10 NO[at]SPAM yahoo.com at 2/16/2006 7:24:45 AM
Hello, I am putting email function into a web app I am making using C#. I am struggling to find out the proper format for the string of To email addresses. I want to put multiple addresses in the string, but everything I try does not work. Here is my code: protected void SendEmail_Click(objec...more >>

Reading data on Aysnchronous socket server
Posted by Macca at 2/16/2006 7:23:28 AM
Hi, I have a synchronous socket server which my app uses to read data from clients. To test this I have a simulated client that sends 100 byte packets. I have set up the socket server so that its buffer is bigger than this. I did this expecting the data to be read in one pass. However...more >>

Calling functions between panels in WinForms C#
Posted by randy1200 at 2/16/2006 7:02:22 AM
I'm working in Visual Studio 2005 and C#. I have a WinForms application with two panels (left panel and right panel). I have a textbox on the left panel, and a button on the right panel. I'd like to have a button-press from the right panel call a function in the left panel, which might sim...more >>

Geting more info from WebException when Status is Unknown Error
Posted by Greg at 2/16/2006 7:02:21 AM
My app makes a call to a remote server (about which I know relatively little) using Webclient.UploadData. This is done once every 51/2 mins and is called by code within a worker thread. 95% of the time this works ok and I get a sane response from the server. However, every night within the same ...more >>

convert of VB fix function
Posted by Ed at 2/16/2006 6:51:31 AM
I want to convert the following VB code to C#: Dim r as datarow Dim i as integer i = fix(r("NumberField")) Fix as you may know truncates a floating point number to the right of the decimal point and returns an integer. I have tried in C#: i = convert.int32(r["NumberField"]) ' ...more >>

DataGridViewRow.Height
Posted by Yury at 2/16/2006 4:55:57 AM
Hi, I want to make row higher when it is seleceted. See following code: public partial class Form1 : Form { public Form1() { InitializeComponent(); List<Item> items = new List<Item>(); for (int i = 0; i < 100; i++) ...more >>

Get the Form names in a Solution.
Posted by ksrajalakshmi NO[at]SPAM gmail.com at 2/16/2006 4:00:34 AM
In a Solution, there may be many Windows Forms. To commit permission to all forms, i've to get the form names in the solution. Is there any proceedure for that? ...more >>

error: An object reference is required for the nonstatic field......
Posted by Beffmans at 2/16/2006 3:51:35 AM
Hi When I run this code: using System; namespace DelegateProject { public delegate void MyDelegate(string s); class Class1 { public void SayHello(string s) { Console.Write(s); } static void Main(string[] args) { MyDelegate MyInstDel = new MyDelega...more >>

Get a list of Icons on the desktop and their respective positions
Posted by Henrik at 2/16/2006 3:19:15 AM
I'm sorry to trouble you once again but somebody must know how to get a list of the desktop icons and their respective positions. I know that I have to look into shell but I have no idea how to do it...! Regards I've found this bit of vb code but I don't know how to translate it into C...more >>

Object reference not set to an instance of an object
Posted by Andrew Mercer at 2/16/2006 2:18:26 AM
I am getting the above error when attempt to set the src, height and width of an iframe in C# code. I am using this as an attempt to dynamically alter the image displayed in the iframe tag of an aspx page. Can someome please explain why I am getting the error and how it can be resolved - t...more >>

passing array from c# to COM (SAFERARRAY)
Posted by Boblemar at 2/16/2006 12:00:00 AM
Hi ! I'm getting trubles using a com component with c#. I try calling a method that take one VARIANT * parameter. In the documentation it is said that this parameter points to a SAFEARRAY of strings. I found ont the NET that the corresponding type to VARIANT is object in C#. I tryed somet...more >>

How to cast int to short
Posted by ad at 2/16/2006 12:00:00 AM
I have a custom function which accept short as parameter. for example: public void myFun(short myShor) {...} Now I have a integer (int i), I want to take as the aprameter of myFun, How can I cast i to short ? ...more >>

string manipulation
Posted by Kiran A K at 2/16/2006 12:00:00 AM
hi, can anybody give me a c# method that removes non-alphanumeric characters from a string? i would prefer it if the code uses regular expressions. ...more >>

GetProcesses() Problem
Posted by Nadav at 2/16/2006 12:00:00 AM
Hi, I'm using System.Diagnostics.Process.GetProcesses("remoteMachine") on a couple of remote machines. In some machines I get an exception: "Feature is not supported for remote machines." How can I solve this ? Thanks. ...more >>

C# Windows Form Open problem
Posted by Jason Huang at 2/16/2006 12:00:00 AM
Hi, In my C# Windows Form project application, it takes a long time to open a form at the first time, but takes short time to open it the second time. Would someone tell me how to speed up openning a form? Thanks for help. Jason ...more >>

Code generator output opens in notepad
Posted by Lasse V=e5gs=e6ther Karlsen at 2/16/2006 12:00:00 AM
I found the excellent article by Paulo Reichert at http://blogs.conchango.com/pauloreichert/archive/2005/05/21/1459.aspx, which shows how to build a code generator for Visual Studio 2005. I followed this and made a small generator that output a dummy file containing only this: namespace Tes...more >>


DevelopmentNow Blog