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# > july 2006 > threads for friday july 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

Converting byte array to short array?
Posted by Ole at 7/7/2006 11:21:45 PM
Hi, Is there a better / faster way to convert a byte array to a short array than to use Convert.toInt16(bytearray, i) in a loop? Thanks Ole ...more >>

Download, Edit file and then Upload file again
Posted by abhanjee NO[at]SPAM hotmail.com at 7/7/2006 10:30:45 PM
Hello, I am a newbie and am developing an application for work. I have figured out how to upload a file attachment to the SQL database and download the same file using C# and Visual Studio. However, the user wants to download and edit a file and then upload the same file back to the databas...more >>

BIG encoding and UTF8?
Posted by EmeraldShield at 7/7/2006 9:56:06 PM
We have an application that uses UTF8 everywhere to load / save / process documents. One of our clients is having a problem with BIG Encoded files being trashed after running through our app. Indeed I have verified that if I go to a website in Taiwan and save the file in BIG5 and then just...more >>

Finding parameter values in an Exception
Posted by chris at 7/7/2006 6:49:47 PM
I am sure I am overlooking something simple, but here goes. In the global.asax file I have some code in the Application_Error method that reads information out of the current exception and emails it to me. I want to see what the parameter values are for the method throwing the exception. I am...more >>

about override
Posted by Tony Johansson at 7/7/2006 4:20:36 PM
Hello! I have noticed that you can write this override in two different ways. You can either write in this way public override string ToString() { return something; } OR IN THIS WAY override public string ToString() { return something; } Is this two way exactly the same t...more >>

Jpg sequence to MPG
Posted by Kladrian at 7/7/2006 4:11:45 PM
Hi, how can I create a mpg file from a sequence of JPG files ? thnx to all ...more >>

Mdi bug ?
Posted by Fab at 7/7/2006 3:56:08 PM
Hi, I have a mdi container form named Form1, and two child forms named Form2 and Form3. I open Form1, then Form2 and Form3. I minimize Form2. I close Form 3. Then i can't close Form1 anymore ! In fact, if i have a child Form minimised while i close another one, i can't close anymore th...more >>

cast from decimal to int
Posted by Dan Holmes at 7/7/2006 3:55:11 PM
i have a datareader that pulls a field of type numeric(18, 0). the debugger shows the field as {decimal}. I want to cast it to an int. This doesn't work (int)dr["field1"]:. Is that because the definition of the column would overflow an int? So i would have to do something like int.Parse(...more >>



Charts from Excel 2002 to Word 2002 with C#
Posted by stocki at 7/7/2006 3:44:03 PM
Hi Everybody, one of my C# apps copies charts from an Excel workbook into a table in a word document. ((Excel.ChartObject) myGraphicsWorksheet.ChartObjects(1)).Copy(); myvalue = Word.WdPasteDataType.wdPasteMetafilePicture; myOutRange.PasteSpecial( ref mymissingValue, ref mymissingValue, ref...more >>

XmlAttribute question
Posted by chris.dannemiller NO[at]SPAM gmail.com at 7/7/2006 3:42:59 PM
I have the following situation class A { public class B { int serlize; public int Serlize { get {...} set {...} } } private B somthing; [XmlAttribute("B")] public B Somthing { get{...} set{...more >>

Dynamic Creation of unmanaged COM
Posted by Steven at 7/7/2006 3:31:01 PM
Could anyone please let me know the syntax from dynamically creating an instance of an unmanaged com object in C#. I want to do this because I have several unmamanged com objects and I do not know at compile time which object I will need. Cheers...more >>

2.0: writing assembly for SQL Server 2005
Posted by R.A.M. at 7/7/2006 3:24:28 PM
Hello, I am learning .NET 2.0. I need to write an assembly to be added to SQL Server 2005 database DemoSQLServer, with stored procedures. According to one of my books I wrote (Demo.cs): using System; using System.Collections.Generic; using System.Text; using System.Data.Sql; using System.D...more >>

PLZ Help, copy checked listview items to another listview
Posted by Tim.Geiges NO[at]SPAM gmail.com at 7/7/2006 3:12:57 PM
This seems like ti should be very simple but I am sort of a newb and this one is killing me I am just trying to copy all the items that are checked in listView2 over to listView1 when a button is clicked. can anyone give me an example please? Thank you for your time, Tim ...more >>

How to inherit if base class is burned?
Posted by Brett Romero at 7/7/2006 3:12:35 PM
Say I have several classes that have implemented the same code to do something. Perhaps its connection information. They all have inherited some class and not necessarily the same one. I'd like to take the duplicated code and reuse it. I can't put it into ClassA, for example, and allow these ...more >>

New to C#
Posted by Earl at 7/7/2006 2:25:10 PM
C# is not my native tongue, but I'm trying to do something real simple like make a report viewer an owned form by an MDI container. This should be the equivalent of VB.Net, but when calling this procedure the form never loads, the app doesn't crash, but the thread exits with error 0. While I d...more >>

Windows service start problems
Posted by Scewbedew at 7/7/2006 2:13:01 PM
Being a newbie on C# managed services, I've probably done something horribly wrong here... The intent is to create a windows service that runs under the SYSTEM account. I have created a service according to available examples in MSDN, and I have used the Installutil.exe to install the servi...more >>

New to C# :
Posted by mohamed.alam78 NO[at]SPAM gmail.com at 7/7/2006 2:00:25 PM
Hi Everyone, Iam new to C# and have done coding in C before. Need help in finding a good book/s to get started and also are there any exercises which one can workout to get hold of coding. Please Help Thanks in Advance !!! ...more >>

ADODB.Stream equivalent in C# for retreaving records in CSV format
Posted by Fresh_Air_Rider NO[at]SPAM Hotmail.com at 7/7/2006 1:41:41 PM
Hi In the "good old" Classic ASP days, I used to stream records from a SQL Server database out to the user's browser in CSV format by using a combination of COALESCE and the ADODB.Stream object. The trouble is that I'm not really sure how to do this in C# 2005. This was a very useful tech...more >>

Filesystemwatcher securityexception
Posted by E Stafford at 7/7/2006 1:12:40 PM
I am using Visual C# Express and trying to place a FileSystemWatcher in my app. after adding it and trying to run it throws an exception from InitiateComponents(). system.security.SecurityException request failed. Any Idea how to fix this...? already tried a couple things with no success. ...more >>

meta-generics
Posted by Wiktor Zychla [C# MVP] at 7/7/2006 1:11:27 PM
suppose I have a class class MyContainter { List<something1> list1; List<something2> list2; ... List<somethingn> listn; othertype1 otherfield1; ... othertypek otherfieldk; } as you can see there are plenty of generics instantiated with different types. what I wish ...more >>

Image upload
Posted by Michael at 7/7/2006 12:40:02 PM
Hello, I want to write a componant that helps a user upload an image or file. I want something like you see on yahoo's image upload page. It has to work on mac and windows. Can anyone help me get started? Is there any sample code? Thanks, Michael...more >>

Edit Image program? GDI+?
Posted by Michael at 7/7/2006 12:08:02 PM
Hello, I want to write a program in C# that will allow the user to select an image from their hard drive and edit it. I need to do simple editing, like red-eye reduction, crop, rotate, etc. Not to complicated. Can anyone point me in the right direction? Is there any sample code out there...more >>

replacing strange characters pulled from db field
Posted by vtxr1300 at 7/7/2006 11:41:01 AM
I have a description field where people are putting in all kinds of non html characters. When they're being pulled from the db, they're coming out like =E2=80=A2 or &#61553; or any number of things. Does anyone have a C# function written that would fix these? It's for a C# v1 project, not v2....more >>

Can "InitializeComponent()" info be captured
Posted by Larry Smith at 7/7/2006 11:28:31 AM
Hi there, Don't know if I picked the correct NGs or not but maybe someone can steer me in the right direction. Does anyone know if a class exists to capture the same info now wrapped in "InitializeComponent()". I want to capture all form details for a given form at design time (properties a...more >>

Remoting and Robotics
Posted by Padu at 7/7/2006 11:25:29 AM
Hi, I'm developing a remote control panel for a mobile robot I'm developing. The robot carries a PC that runs a C# app to control the platform. The robot's PC has a wi-fi card. I'm not concerned with range issues now. Now I want to create an application that will reside on my laptop that w...more >>

Logic Error
Posted by C# newbie with big problems at 7/7/2006 11:01:52 AM
Ok, I am building a product configurator which works quite well except for a few bugs. It has a couple of listboxes and a checked list box. Now the checked list box holds upgrades for products listed in a different listbox and these upgrades are grouped by category so for example if you select a...more >>

vb to c# question
Posted by djc at 7/7/2006 8:55:45 AM
in vb there is a With construct. It supposedly speeds things up. By caching, I assume, it eliminates having to travel several levels in a hierarchy using the dot operator. Is there a C# equivalent of this? A quick look at VS help only brought up VB stuff for it. With ObjectVar .this ...more >>

How does a process find its user
Posted by Dave at 7/7/2006 8:25:02 AM
Is it possible in .NET2.0 to find the user that the current process is running under without going through the whole WMI palaver? I tried looking at ProcessStartInfo.UserName but that was empty - I presume that's more for new starting processes than examining the current one. -- Dave...more >>

ComboBox display value width
Posted by BrianDH at 7/7/2006 8:06:01 AM
Hi Is there a way to have the view/display width different from the width as it sits on the form? Thanks Brian...more >>

Icon with VS 2003 != VS 2005 ?
Posted by ozzy66 at 7/7/2006 8:03:38 AM
Heya NG, I've got a little confusing configuration scenario: I've created a simple windows form in c# with Visual Studio 2003.NET and simultaneously with VS 2005. I've designed an Icon as well in both Studios and attached it to the forms via the properties window. I've changed the project...more >>

Race Conditions in C# Eventing?
Posted by Karsten Schramm at 7/7/2006 8:02:51 AM
Hi, in VB.Net I fire an event very simply: RaiseEvent(MyEvent) 'Fire&Forget The same in C# looks like if(MyEvent != null) //check, if someone's listening { MyEvent(); //Fire } What happens in a multithreaded environment? The moment after I checked MyEvent the last listener could...more >>

standard notation for variables in business class
Posted by Mike P at 7/7/2006 7:55:59 AM
What is the accepted notation for variables/properties in a business class? I've seen some in camel casing and some in pascal casing, some prefixed by m or something else. *** Sent via Developersdex http://www.developersdex.com ***...more >>

Transactions
Posted by asadikhan NO[at]SPAM gmail.com at 7/7/2006 7:52:47 AM
Hi, I have a program that massages the data in an access database. I have a total of about ten methods, each one of which has one or two OleDbCommand objects that are executed. So in the whole application I have about 10-12 OleDbCommand objects. Note however that I only have an OleDbConnectio...more >>

contract/interface c# system achitecture
Posted by Firefly at 7/7/2006 4:24:02 AM
Hi, I have a C++ background and am new to C#. At the moment I'm working on a project where I want to define a contract for users of my library. I have done this by creating a interface dll project containing the contract for the clients. To implement the interface I created a second dll p...more >>

Namespace convention help please
Posted by mrpubnight NO[at]SPAM hotmail.com at 7/7/2006 3:58:28 AM
Hi everyone, just hoping to get some opinions from those who have been using/creating namespaces for a while. Currently I have our namespace as follows: CompanyName.Location.Client.Class So for class DMRequest I may do something like this: ABC.Base.DMRequestBase -> base cl...more >>

Is C# appropriate for this ?
Posted by Bit byte at 7/7/2006 3:34:12 AM
I have a task which involves downloading data from some web pages. There is a lot of messing about with forms (clicking buttons, selecting icons etc) as well as pasrsing HTML to extract tables from the resulting web page. I am torn as to whether to do this in PHP (or *shudder* Perl) or C#. I ...more >>

Why can't I seal a single indexer?
Posted by Ole Nielsby at 7/7/2006 3:20:33 AM
I'm having a strange problem with sealing virtual indexers. Looks like a compiler error to me - or have I overlooked some obscure statement in the specs? I have two virtual indexers in the same class, one of them by string, the other by int. The weird thing is, if I seal one of them, I ca...more >>

question about binary file access
Posted by Bit byte at 7/7/2006 3:18:41 AM
If I write data from structures to a binary file in C#, can I read back the file using "unmanaged" C++ ? ...more >>

will C# be perfomant enough for the next problem (HW programming)???
Posted by drgonzo120 at 7/7/2006 2:43:13 AM
hello, A buddy of me made a modification on a TB-303 synthesizer (made in 1982) so it is possible to program the synth via a parallel port connector. He made a program in qbasic and he wants a "modern" GUI. I am doing a course in C# and want to program translate the thing to C#. Here is his...more >>

While we are discussing the new operator, different question about it...
Posted by Stephan Rose at 7/7/2006 1:37:52 AM
I am currently working on an EDA app and heavily working on squeezing the last bits of performance out of it. Going as far as sending batches of geometry to the video card while still processing geometry to get some parallization going. Though at least on my hardware, this does not buy me much. ...more >>

Initialising array of struct KeyValuePair<TKey,TValue>
Posted by Russell Hind at 7/7/2006 12:00:00 AM
I want to create an array of key value pairs. This code compiles fine: KeyValuePair<string, object>[] kvps = { new KeyValuePair<string,object>( "int", 5 ), new KeyValuePair<string,object>( "string", "robot") }; But is their no shorthand to this such as KeyValuePair<string,object...more >>

ListView
Posted by Alan T at 7/7/2006 12:00:00 AM
How do I define 3 coloumns display as: Name, Address, Phone ? ...more >>

hashtable
Posted by Vikas Kumar at 7/7/2006 12:00:00 AM
Hashtable 7/7/2006 2:37 AM I have this Hasttable windowList Hashtable windowList = new Hashtable(); To this Hashtable I add a form with a string as key in the following manner. The string is decided at runtime. FormX frm = new FormX(); frm.Show(); windowList.add("Form1",frm); Now I ...more >>

TreeNodes search
Posted by Alan T at 7/7/2006 12:00:00 AM
I want to search the whole tree of a root node if one node has a tag value is matched. I have added tree nodes into a tree view with tag value is assigned to each node. If I want to find out the node has tag value say 10, how do I search thro' the whole tree ? ...more >>

Clever string replacement in collection
Posted by Sjaakie at 7/7/2006 12:00:00 AM
I need to replace parts of a string, in a collection deserialized from an XML file, with values from another collection. Is there another, more clever/faster/better, method than the loops below? TIA foreach (StringObject x in (StringObjectCollection)xc) { foreach (Replacemen...more >>

GDI+ Glass Table effect
Posted by JezB at 7/7/2006 12:00:00 AM
I have an image of an object which I display on a form. I'd like to use GDI+ to display a gradually-fading reflection of this image (on a white or coloured background) underneath so that the effect is like the object sitting on a glass table. Any idea how I'd achieve this ? ...more >>

URL in C# Windows form project
Posted by Jason Huang at 7/7/2006 12:00:00 AM
Hi, In my C# Windows form project, I want to verify that if a file http://myip/myfile.doc exists, how am I supposed to do? (the myip is a specific public IP) Thanks for help. Jason ...more >>

System.Management How?
Posted by Rainer Queck at 7/7/2006 12:00:00 AM
Hi NG, I am trying to get system information like Windows Registration Number / Mac-Address. Asking Mr. Googles I found out, that WMI is what I need. In the MSDN Library I found (might not be translated correctly from german to english) : "How to : prepare the IDE for use of WMI .NET" ...more >>


DevelopmentNow Blog