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

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

a dot or cross ;)
Posted by Jarod at 4/21/2006 11:33:43 PM
Hey I need a program that will display a red dot or a cross in the middle of the screen. But it must display it in games ;) So it will work as a aim marker( or what is called ? ;) Is it hard to do ? Jarod ...more >>

drawing alpha-blended images
Posted by David at 4/21/2006 11:16:18 PM
Hello... i want to draw on my form PNG file with alpha-blended transparency. so i use this code: Graphics canvas = e.Graphics; Image Image = Image.FromFile(@".\Dragon.png"); canvas.DrawImage(Image, 0, 0, Image.Size.Width, Image.Size.Height); the problem is, what alpha-blending do...more >>

Beginner question on access modifiers
Posted by Frank at 4/21/2006 7:03:28 PM
I have a form implemented as shown below. If I define the tp_ data member as private it is always null in the Click event handler. When I remove private and let it use the default access ( which I think is private ) then it is ok ( non null ) in the Click handler. I don't understand why? ...more >>

Context menu persisting beyond its scope
Posted by Paul E Collins at 4/21/2006 6:53:05 PM
A context menu is created in the scope of the RightClick event, but it continues to be displayed after that event handler terminates - i.e. after it has gone out of scope. The code works correctly, but I feel a bit odd about it. Is there anything to watch out for here? By the way, the reaso...more >>

About using inderface IComparable
Posted by Tony Johansson at 4/21/2006 5:53:05 PM
Hello! When this method foo is called parameter car is passed. When this Sort in the Array class is called is it nessesary that all cars is of the same type. I know that the IComparable interface must be implemented but could the vector car contains SAAB, VOLVO, PORCHE and FORD. I mean ...more >>

C# as a programming language
Posted by Dave at 4/21/2006 4:18:37 PM
I want to spend two minutes on my soapbox. I love C#. I am so productive in it it's ridiculous. But it's so easy to write code that uses poor design principles. Example: just making variables public instead of using properties. Another example: passing references to forms to other cl...more >>

C# coding guidelines: use "this." or not when referring to member fields/properties within the object?
Posted by Dave at 4/21/2006 4:12:44 PM
I'm never quite sure whether to use "this." or not when referring to fields or properties in the same class. It obviously works just fine without it but sometimes I wonder if using this. consistently may make the code easier to understand for someone else, etc. Using "this." makes it immedia...more >>

Setting OWC11 Spreadsheet Font Properties
Posted by RBChallenger at 4/21/2006 3:39:47 PM
Can anyone tell me how to set the font properties in an embedded OWC1 excel speradsheet. You can get to the font properties vi spreadSheet.Cells.Font.<Property>, however if I want to set th porperty Size I cannot simply say .Size = x; and I ahve been unable t find the accessor method to set the...more >>



Predicates are awesome
Posted by sklett at 4/21/2006 3:35:18 PM
I've finally had the time to make use or predicates and convert a bunch of ugly loops over to predicates. SO much cleaner. Anyway, my question is if there are plans (or maybe already existing) to add List<> function that would call a predicate on every item like a process. For example: pub...more >>

Killing stray GDI objects
Posted by jislord NO[at]SPAM gmail.com at 4/21/2006 3:26:45 PM
C# noob alert... I am using a third party dll file to do some processing on rtf files. This dll however leaks GDI objects like there is no tomorrow. It crosses the threshold of 10000 objects after processing just a 100 files. While I can work with the developers on the third party team for a ...more >>

mmx and friends with C# ?
Posted by Sebastian_Krämer at 4/21/2006 3:18:04 PM
Hi there! I was wondering if it is possible to (manually, on code level) use optimizations like mmx, sse etc with C#. The idea came up at some place where /unsafe is already used. Somehow I have the feeling that it isn't possible though. :-/ Second: I read somewhere that the C# (or JIT?)...more >>

I don't understand this error.
Posted by eric at 4/21/2006 3:06:49 PM
I have a method that queries a database table, to retrieve possible format codes. The method is as follows: public ArrayList GetDate(string frameSize, string partType) { ArrayList alAllFormats = new ArrayList(); ArrayList alDisplayFormats = new ArrayList(); OracleCommand cmdHe...more >>

Error Using WMI to Get List of Shared Folders on the Server
Posted by lecnac at 4/21/2006 2:16:00 PM
Here's some details: Server and workstation both in the same workgroup Logged into server as local Administrator Logged into workstation as a local user that is only in the Users group The local user on the workstation is also defined with same name and password on the server (and only in the...more >>

which library we have to use for using assembly codes in c#
Posted by yasin at 4/21/2006 2:12:25 PM
is there any internet site for assembly examples in c# ...more >>

copy NameValueCollection instance
Posted by John A Grandy at 4/21/2006 2:11:36 PM
Does .NET provide a mechanism to copy the contents of one NameValueCollection instance to another ? ...more >>

Question from a test
Posted by Doru Roman at 4/21/2006 1:35:34 PM
Hello, I got a test and some of the questions were: A collection a files, which is the basic unit of .NET programming, is called: 1. package 2. assembly 3. library 4. copybook I chose 3. Every attribute must have at least one of the following: 1. comment 2. constructor 3. virtua...more >>

Debug Mode issue
Posted by Tom at 4/21/2006 1:15:02 PM
While in debug mode in my CMS application, I wanted to check a value so I set a break statement and in the immediate window I entered: ? parentnav and hit the Enter key. Since this is an object I got the first 99 lines or so followed by this: <More... (The first 100 of 134 items were disp...more >>

Checkered background for images with varying Alpha
Posted by illegal.prime NO[at]SPAM gmail.com at 4/21/2006 1:09:14 PM
Hi all, I'm looking for the right way to create a checkered background in a PictureBox. I will be applying various images to this PictureBox and I want to to see the checkered background based on the level of alpha in the image. I have an algorithm that will traverse a bitmap's pixel and on a...more >>

Using keyword
Posted by INeedADip at 4/21/2006 1:07:32 PM
Are the using statements at the top of each .cs file mainly for UI and type compatibility, or do they actually create dependencies for each page. When I create a new aspx page the following using statements are included be default: using System; using System.Data; using System.Configuration...more >>

Port Scan - Socket Connect
Posted by dan kisting at 4/21/2006 12:36:30 PM
Hi, I wrote a chat program and it uses Sockets to connect. There is no intentional port scan going on, however I am seeing tons of port scans on that port in our firewall, and it (the firewall) continues to operate around 35% CPU utilization during peak hours. Is there anything I should loo...more >>

How to get app name?
Posted by Richard Lewis Haggard at 4/21/2006 12:05:03 PM
How can an assembly get the name of the application that is executing it? -- Richard Lewis Haggard www.Haggard-And-Associates.com ...more >>

Taskbar behavior and appearance
Posted by michael sorens at 4/21/2006 11:56:45 AM
(1) By setting an icon in my Windows Form properties, I successfully display my custom icon when my application is executed. However, as soon as I open the Options form in my application--now having two windows open--they are grouped on the taskbar, but with a generic icon. Both my main ...more >>

OLEDB exception on some machines
Posted by jasco4617 NO[at]SPAM gmail.com at 4/21/2006 11:55:05 AM
I am writing an application that runs as a service and utilizes the ..NET Framework v2.0. I am using an access database and OLE as my data access driver. On the machines I am developing this application on and my own personal machine everything works fine. However, when I try and run the ser...more >>

Adding delegate function vs adding new delegate to event
Posted by Dave Booker at 4/21/2006 11:38:03 AM
If we have: public delegate void Test(string s); public event Test testevent; public void log(string s) {...} What is the difference between: testevent += log; and testevent += new Test(log); I always used the former, but all the examples I'm encountering in ...more >>

How to disable IE cache in VS 2005 Webbrowser control
Posted by cweeks at 4/21/2006 11:36:10 AM
Prior to .NET 2.0 the WebBrowser control had a method Navigate2 that took in its second parameter a switch to disable reading the page from the local IE cache. I want to be able to do this in a VS 2005 C# Express app but I don't see anything in the Navigate signature that would let me do this. ...more >>

Garbage Collection For ASP.NET's Website (w3wp.exe)
Posted by news.citenet.net at 4/21/2006 11:35:59 AM
I developed a few pages on a website by using C# ASP.NET and SQL 2000 Server on SBS Windows 2003 server. The memory keep occupied, even I run System.GC.Collect() function inside the proect. I don't know why. Can anyone help? ...more >>

Load webpage
Posted by Esteban at 4/21/2006 9:50:55 AM
Hi, I would like to know if there's a way to load a webpage, like www.google.ca on a CSharp app then execute a query like a search on the string "csharp" on the google's text area, then execute the search and load the new webpage(results) so i can now extract the information i want to put on ...more >>

Move tab to top right
Posted by Stormy at 4/21/2006 9:41:10 AM
I want to create a tab control and I want tabs on the top right side. current TabAlignment only provides Top, Bottom, Left and Right. Please help. Thanks ...more >>

Callback with unsafe double* to double[] Problem :
Posted by BlueTrin at 4/21/2006 9:29:12 AM
I am using a DLL written in C, it uses some pointers on functions, I have defined a wrapper around it in C# which uses some delegates: #region Delegates and Marshalling to call solvopt public delegate double funCallback(double[] x); public delegate double funcCallback(double[] x); public de...more >>

Dlinq question
Posted by hammad.awan_nospam NO[at]SPAM gmail.com at 4/21/2006 8:53:41 AM
Question concerning deferred evalution. If one has a customer table and an orders table in the database and the latter table has a customer id assocatiated with it, when a query is executed like this: IEnumerable<Customer> customers = from c in db.Customers where c.CustomerId == customerId s...more >>

Progress Bar
Posted by Diogo Alves - Software Developer at 4/21/2006 8:32:02 AM
Hi, I am having a giant headache because a progress bar on a statusStrip. Ok I will describe all the details to get help from anyone.... I have a MainForm, this form as a a component that is a menuPanel in the left and content a panel in the right, in the panel I am loading forms... wh...more >>

Export To Excel
Posted by Jiro Hidaka at 4/21/2006 8:21:02 AM
Hello, I would like to know of a fast way to export data source data into an Excel sheet. I found a way from C# Corner(Query Tool to Excel using C# and .NET) which is a neat little way of exporting dataset data to an excel using the Excel COM object. This works fine but the problem is...more >>

Exception Handling Question
Posted by Chuck Cobb at 4/21/2006 7:40:14 AM
I'm implementing a centralized exception handling routine using the Enterprise Library Exception Management Application Block. I trap all unhandled exceptions to one place using the following method: // --- Create an Exception Handler for Thread Exceptions ---------------- Application.Thr...more >>

Changing Application Title at runtime
Posted by gmccallum at 4/21/2006 7:10:02 AM
Is there a way to change the title of the application at run-time in C#. That is, the title that is shown in task manager. For example, in VB you would do something like: App.Title = "something new" Any Ideas? G McCallum ...more >>

ReDrawing of Bitmap is not smooth :(
Posted by Khadim at 4/21/2006 7:06:21 AM
Friends, The problem I am facing is that when my form resizes or is loaded (invalidated), the background image of my form (which i have drawn through GDI+ and also by putting a picture box on the form) is redrawn several times which cause it to flicker a lot. setstyles(controlstyles.doublebuf...more >>

DataSet to a Custom Collection object
Posted by npaulus NO[at]SPAM hotmail.com at 4/21/2006 4:18:56 AM
Hi, DataSets are usually resource heavy. Instead of having to pass them from my middle tier to my presentation layer I was wondering if anyone has developed a custom collection object that is less resource heavy and can be passed lightweight to the presentation layer. Thanks, NJ ...more >>

Debug between C++ and C#
Posted by Steven Blair at 4/21/2006 4:11:29 AM
I have a C++ application using a C# dll. I cant seem to step into my C# dll from the C++. Is it possible to do this? Steven *** Sent via Developersdex http://www.developersdex.com ***...more >>

ListView image problem
Posted by TheJediMessiah at 4/21/2006 3:29:14 AM
Hi, I have a single column listview in which I want the first row to display an image and the following rows display some text. The image is displayed correctly, being aligned to the left of the column but the text in the rows below appear after the end of the image. For example +--------...more >>

Available applications in Taskmanager
Posted by Kondapanaidu at 4/21/2006 3:22:40 AM
Hi, I am using C#.NETV1.1 How will we list which are the applications running under a task manager. Thanks in advance *** Sent via Developersdex http://www.developersdex.com ***...more >>

Background Image in Listbox
Posted by Kits at 4/21/2006 3:02:18 AM
Hi, Is it possible to put a background image in a listBox control?? How can this be done? Specifically I would like to display an image in the are of a listbox which is not occuppied by any listbox items (alternatively if I could get rid of this region altogether or make it transparent.. just...more >>

Serializable TypeConverter
Posted by ChriChri at 4/21/2006 2:06:18 AM
I have an error message telling me my class must be Seriazible, but I made it already Serializable ... Have you some ideas of what to do ? May I change the TypeConverter and how ? Thanks ...more >>

ServiceController.GetServices( other pc )
Posted by Bram Hoefnagel at 4/21/2006 12:56:10 AM
Hi, On the 1.1 framework I couldn't find a solution to get a list of services from an other PC. Only a list of services on My local PC. (witch is strange i guess, as you look to the MSDN doc.) But does someone know a way of getting a list of services on an 'other' pc in the 2.0 framework. ...more >>

List COM ports
Posted by Joachim at 4/21/2006 12:44:02 AM
How can I find out what COM ports that exists on my computer?...more >>

detecting when a form is minimizing
Posted by Lee at 4/21/2006 12:00:00 AM
Hi, How do I detect when a form is minimizing? specifically when a user clicks the show desktop button on the taskbar, rather than the minimize button on a form. thanks in advance ...more >>

Business Rule (Engine) vs Data Validation
Posted by kids_pro at 4/21/2006 12:00:00 AM
What is the different between Business rule & data validation? How much impact does it give in OOP concept? Thanks, Kid...more >>

Documentation: Still nDoc or ?
Posted by Henrik Dahl at 4/21/2006 12:00:00 AM
Hello! Does VS 2005 offer good features for documentation or is nDoc still the way to go? Best regards, Henrik Dahl ...more >>

XmlElement Move up & down
Posted by beachboy at 4/21/2006 12:00:00 AM
How I can Move up or down XmlElement? Please advise. Thanks in advanced. ...more >>


DevelopmentNow Blog