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# > may 2007 > threads for wednesday may 9

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

general thanks
Posted by Mike J at 5/9/2007 11:54:27 PM
Thank you all for you invaluable help learning c3 MJ ...more >>


Is Partial Class feature required
Posted by Dara P at 5/9/2007 11:29:00 PM
Would like to know from the crowd that why do we require a Partial Class. By having such feature aren't we going out of the scope of Entity Concept. Help me to understand in what context this feature is better and when it is not. Thanks for reading -- Never say, Give up...more >>

generic method that tests if array contains a value
Posted by Steve Richter at 5/9/2007 10:10:48 PM
Is it possible to write a generic method which returns true or false, depending on if the array contains a value? Is there already a framework method that provides this functionality? the following code does not compile. Error is: Operator == cannot be applied to operands of type T and T. ...more >>

Event Viewer Logging - Add a new overall type
Posted by Steven Nagy at 5/9/2007 7:26:50 PM
Hi, I have Enterprise Library and am using the Logging Application block successfully to log to the Event log. Currently I can only put enteries into the existing event viewer types (Application, Security, etc). Application is best for me currently. But I would like to add a new overall typ...more >>

rounding float toward zero?
Posted by Yasin cepeci at 5/9/2007 6:23:41 PM
Converting single to int Rounds the upper number if the part after dot is bigger than 0,5. But I want to discard the value after dot. ...more >>

csharp IDE long lines to code to multiline
Posted by Peted at 5/9/2007 5:40:44 PM
Hi, im using csharp express 2005. I have a problem in the IDE, when i have along line of code or a long line of text in a static string, i want to make it multi line for easir readability, but using <return> or <shift return> dosnt seem to allow for breaking long code lines into mutliline a...more >>

Fire up a click event inside a control
Posted by Tao at 5/9/2007 5:36:16 PM
hi.. group I have a user control A. How can I manually fire up an event (e.g. MouseClick) in A. That is the code looks like: class A : UserControl { private void Fireup() { //fire up an mouse click event. } } thanks ...more >>

Remote debug
Posted by Jo at 5/9/2007 4:48:35 PM
Hi all, Any one has experience to debug managed app on a remote machine. My app is built in .NET 2003. TIA, Jo ...more >>



Unexpected behavior of MeasureString
Posted by matko at 5/9/2007 4:21:48 PM
When the height of some text is to be calculated, I get different height values depending on where transformation is done. This only occurs for some fonts. F.ex., when height is calculated for Verdana, the size is the same no matter where transformation is done. With Times New Roman, size differ...more >>

How to report an error to microsoft?
Posted by Lloyd Dupont at 5/9/2007 4:19:11 PM
On "some client's computer" the folowing C# code: == XmlDocument doc = new XmlDocument(); .... doc.Save(Application.LocalUserAppDataPath + "config.config"); == throw the following error: == Exception : System.IO.IOException Message : Unknown error "-1". Stack : at System.IO.__Er...more >>

IStream.Read()
Posted by Peter Larsen [] at 5/9/2007 3:40:52 PM
Hi, I have a problem using System.Runtime.InteropServices.ComTypes.IStream. Sample using the Read() method: if (IStreamObject != null) { IntPtr readBytes = IntPtr.Zero; IStreamObject.Read(buffer, size, readBytes); R...more >>

preventing html encoding by server control
Posted by Amie at 5/9/2007 3:11:46 PM
Hi, It seems asp.net controls automatically encode the attribute values. For example, I need to have whitespace in OPTION tag. After binding data to the dropdownlist, the source html has the following: <option value="1">&amp;nbsp; North America</option> Also, when I assign an attribute ...more >>

Compiling an .NET v1.1 executable with MS VS 2005
Posted by Nikola Skoric at 5/9/2007 2:42:21 PM
The problem is really quite straightforward: I develop my applications in Microsoft Visual C# 2005 Express Edition, and I need to run the application on Windows XP which have .NET Framework version 1.1 installed, and installing .NET Framework 2.0 is not an option. And, I can't believe what ...more >>

How to connect .NET Server with JAVA?
Posted by privateson NO[at]SPAM hotmail.com at 5/9/2007 2:35:15 PM
Hi guys, I am a coop student. We are going to convert a C# program into Java. My question is: Does anyone of you know how to connect .Net Server with Java? Since the business logic is inside the .Net server, we need a way to connect to the .Net server to get information we need. Thank ...more >>

First chance exceptions...
Posted by at 5/9/2007 2:24:39 PM
VStudio 2005 Pro. In the Immediate window for a running application I continually see lines like A first chance exception of type'System.Runtime.InteropServices.COMException' occured in [program name.exe] These lines do not cause the application to stop functioning. I have also notic...more >>

Reflection Issue / Question
Posted by knightrider NO[at]SPAM motogpcircuit.com at 5/9/2007 2:23:22 PM
I am trying to iterate through all of the assemblies in the share that is our production source code repository and gather information about the assemblies (number of classes and methods contained in each). My problem is that many of the assemblies reference other assemblies that causes the ca...more >>

LoginStatus Control
Posted by Jimbo at 5/9/2007 1:14:42 PM
Hi, I am using a LoginStatus Control in a c# based .aspx page. The page includes some dynamically created controls. These are set up automatically, depending on what is in the Request object. My page works fine until I click on my logout link. This seems to cause the OnInit and Page_Loa...more >>

IL Security
Posted by ewingate NO[at]SPAM gmail.com at 5/9/2007 1:13:47 PM
It seems that C#.Net is not especially secure. What I mean is that if I were to write an application in C# and then try to sell this application, someone else could just come along and decompile it and steal my code. Am I missing something here or is this the way that the .Net framework actually...more >>

Find control name though object sender?
Posted by VMI at 5/9/2007 12:48:11 PM
In my Windows Form, is it possible to get the control name through object sender in an event handler? For example, in private void dataGridView_zip_KeyPress(object sender, KeyPressEventArgs e), how can I know that the sender is "dataGridView_zip" ? Thanks. VS2005 2.0 ...more >>

closing Modal Form inside form
Posted by Phil at 5/9/2007 12:31:00 PM
I have a modal form (ShowDialog()) that I may want to close when a user clicks a button. I already have an OK and Cancel button, so I can't use those options, but I want it to function just like an OK button press. See Example: private void add_Click(object sender, EventArgs e) {...more >>

PostMessage/PeekMessage and interop
Posted by SeeSharp Bint at 5/9/2007 11:53:32 AM
Hi I'm using some of the definitions I found pinvoke.net for PostMessage and PeekMessage as follows [return: MarshalAs(UnmanagedType.Bool)] [DllImport("user32.dll", SetLastError = true)] public static extern bool PostMessage( HandleRef hWnd,// handle to destination window UInt32 Msg, // ...more >>

How can i make the horizontal scroll scroll to end of page?
Posted by trint at 5/9/2007 11:53:13 AM
I have a series of gridviews (1 thru 6). At about gridview 3, I need the page to horizontally scroll to the end. Any help is appreciated. Thanks, Trint ...more >>

Need To Disable Horizontal Scrolling - Why Is HScroll Property Ignored?
Posted by j0rd4n at 5/9/2007 11:37:24 AM
I have a user control that needs to allow vertical scrolling but not horizontal scrolling. In the user control's resize event, I need to adjust the size of all the children controls. For this to work correctly, I need the AutoScroll to not enable the horizontal scrollbar. After researching ...more >>

need advice on how to best do this
Posted by Peted at 5/9/2007 10:39:48 AM
Hi Looking for advice on best way to implement this idea I have a form with 10 text boxes, and one button. when user clicks button i want to transmit info in text boxes to a device, but i only want to transmit data from textboxes that user has changed data in since last button click ...more >>

2 different threads checking on same variable scenario
Posted by David at 5/9/2007 10:17:51 AM
I am trying to get this straight in my head so I can implement. I wrote a small utility some time ago in c# that utilized a handful of threads. That scenario was one main thread manually spawning a handfull of worker threads, then waiting for all of them to complete before moving on. I bel...more >>

Structure in CSharp
Posted by Yatin Patel at 5/9/2007 10:11:01 AM
Hi, I have a structure written in C++ / VC.NET and would like to convert that into CSharp. I am not getting any success. Can any of you please help me out. Following is the structure in C++: struct R_OMNI_LINK_MESSAGE { unsigned char MessageLength; ...more >>

What can be stored in application settings?
Posted by Ray Mitchell at 5/9/2007 10:03:00 AM
I've been toying with the idea that it might be nicer to store all my settings as application settings rather than having to play games with saving and restoring from an external file. However, my data to be saved is represented by several structures that contain all kinds of things. In lo...more >>

StatusStrip control alignment
Posted by Tim Kelley at 5/9/2007 9:42:31 AM
I have placed a Status Strip on my form and added two controls (progress bar and a status label). Is there a way to right align one of the controls so they are not right next to each other? I would like the progress bar on the right side of the status strip. I tried setting the alignment pr...more >>

Webservice with optional parameters
Posted by Sam Shrefler at 5/9/2007 8:56:52 AM
I'm working on creating a WebService / WebMethod to receive a record in real time from another system. The record contains about 20 fields. 10 of which aren't required. I was planning on just making a method with 20 parameters. But, I see there is no way to make an "optional" c# parameter. ...more >>

Run code entered in textbox
Posted by jed NO[at]SPAM auto-soft.co.za at 5/9/2007 8:32:25 AM
I want to enter code in a textbox and then be able to execute that code.How can i convert the text in the textbox to code that can be executed? ...more >>

FindAll method with List<T> generic class
Posted by Abhishek at 5/9/2007 8:31:06 AM
Hi I am using a generic list in my program to have a list of objects stored. I want to compare all the objects in this list with object of another class and find all the objects which meet the criteria. To make it more specific I have a class Employee and a class Salary which look like Emplo...more >>

Missing csc.exe
Posted by lospinoj at 5/9/2007 8:05:00 AM
I'm a complete beginer here. I started with an installation of .Net 2.0, managed to locate csc.exe in c:\windows\Microsoft.NET\Framework\v2.0, I then insatlled Visual Studio 2005, which I believe pulled in an installation of ..Net 3.0, but the newer version does not have csc.exe. Does .Net ...more >>

Index of last item clicked on in a MultiSimple list box
Posted by Joachim at 5/9/2007 7:11:01 AM
How can I find the index of last item clicked on in a MultiSimple list box?...more >>

New to Delegates. Having Issues
Posted by SAL at 5/9/2007 7:07:04 AM
I have not used Delegates before and I am having trouble using them in my app. Here is what I am doing. 1. I have created a C# InterOp Dll that I make calls to, that in turn calls methods in a 3rd party WIN32 API dll. My InterOp complies fine with no errors. Here is the lines of code whe...more >>

Using reflection to get instance name
Posted by Jason Reynolds at 5/9/2007 7:07:03 AM
(using .net 2.0) Say you have a class structure like this: class Address .... end class class Person FirstName LastName MailingAddress as Address BillingAddress as Address end class I'm using reflection to pull out the values at runtime, but I'm having trouble when I dive into a...more >>

Stringbuilder vs Strings
Posted by Dara P at 5/9/2007 6:39:00 AM
Can some one suggest me as why StringBuilder class is better than Strings? -- Never say, Give up...more >>

Share settings between my two systems
Posted by Timoti at 5/9/2007 5:46:00 AM
Can any one tell me about how i can share my Desktop VS settings match with the laptop settings.. So that both my systems will be of same configurations and don't have to find the difficulty when giving some demos -- God bless you for the help...more >>

Performance tuning
Posted by atlaste at 5/9/2007 5:09:31 AM
Hi, I'm currently developing an application that uses a lot of computational power, disk access and memory caching (to be more exact: an information retrieval platform). In these kind of applications the last thing that remains is bare performance tuning. So for example, you can do an 'if t...more >>

select from dataset
Posted by justanothernewbie804 NO[at]SPAM yahoo.com at 5/9/2007 4:48:24 AM
hi all. I have a dataset and would like to do something like "select distinct field1, field2 from fields" against the dataset. I do not have the option of creating a new database table and selecting from that table. Nor do I have the option of changing how the dataset is populated. I need to...more >>

Drop outlook item (message) in own application
Posted by Alexander Kommer at 5/9/2007 3:52:00 AM
Hi, I´m developing a feature in a application with the following specification: In the first step, the application should be able to store messages out of outlook, which are dropped on a tree view. This message should be stored as ..msg file. In future, this should be able for alle ob...more >>

newbie iheritance
Posted by jed NO[at]SPAM auto-soft.co.za at 5/9/2007 3:22:48 AM
Can you prevent a class from being inherited? if you can please give some code ...more >>

Threading - Problem with Invoking between forms.
Posted by gwoodhouse NO[at]SPAM gmail.com at 5/9/2007 2:43:00 AM
Hello all, I have an application at the moment which uses forms. The main form (which has ALOT of things going on it in) also happens to do alot of network proccess's which ive put in Threads. DUring refactoring i decided i wanted to seperate as much non-form related logical from the main p...more >>

Creating a tree with generics
Posted by Polaris431 at 5/9/2007 1:52:34 AM
I need to implement a tree structure that can accept various types of classes or structs. When the tree is created, all of its nodes are based on a single type and not a mixture of types. Generics seem to be the solution. However when I look at the System.Collections.Generic namespace, there i...more >>


DevelopmentNow Blog