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# > october 2006

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

Unloaded Assembly still occours in parent AppDomain
Posted by Basti at 10/31/2006 11:48:15 PM
Hello, I'm working with .Net 2.0. I tried to get attributes of an unloaded assembly. So, the sole way I know is to create a new child application domain, in this app domain I load the assembly, read out the attributes, and unload the child app domain. But in this moment, I load the assembly int...more >>


GridView Maximum Data
Posted by Badis at 10/31/2006 11:25:01 PM
Hi, I'm tyring to display data on my gridview but when the data Exceeds "154161" record the gridview doesn't display it..!!? Cheers ...more >>

Thread Message Loop in C#?
Posted by gilbert NO[at]SPAM gmail at 10/31/2006 9:58:41 PM
Hello! I am writing an application that would like to make use of a thread message queue, like the one provided in MFC. In MFC, the message poster calls the function PostThreadMessage. The receiving thread receives the message and process it. Therefore, the caller and callee thread are diff...more >>

Silly question?
Posted by C# Beginner at 10/31/2006 9:30:25 PM
Hi there, This question might be silly to you, but anyway... How can I move a control at runtime? Object.Location.X = 48; doesn't seem to work. Do I really need the code "Object.Location = new System.Drawing.Point(48,...)??? thnx ...more >>

use any enumerator as function parameter
Posted by ajmastrean NO[at]SPAM gmail.com at 10/31/2006 9:09:43 PM
I have a bunch of enumerators. I need to pass them into a function that is designed to write all values of any enumerator to the console. For instance... public enum Days : int { Sunday = 1, Monday, Tuesday } public enum Colors : int { red = 1, blue, green } ...more >>

Problems with Interop in C#
Posted by John Olbert at 10/31/2006 6:41:01 PM
Subject: Problems with Interop in C# We are having problems using Interop with a Vb6 ActiveX Dll in C# code in Net2 using Vs2005. Below are the signatures of the method that is the problem. It is the last argument (e.g., "out obj" in C#) that is returned corrupted. It should be an array of...more >>

Strange behaviour when raising an event in FileSystemWatcher event handler......
Posted by Asko Telinen at 10/31/2006 3:50:14 PM
Hi all. I ran into quite strange problem concerning the event raising inside FileSystemWatcher Delete event. First, i would like to describe a bit my environment. I have main GUI application, which uses other class libraries. One lib, called Utils.dll contains custom collection implemen...more >>

Datagrid -Scrollbars , Freezing rows
Posted by ZS at 10/31/2006 2:44:01 PM
Hi, I'm using Visual studio 2003. I was wondering if there was a way to freeze the first 2 rows of a datagrid. So if the user scrolls to the last datarow is there a way for the user to still be able to view the first 2 rows? Something like Excel's freeze rows.. thanks -ZS...more >>



Try Catch Overkill
Posted by pigeonrandle at 10/31/2006 2:13:40 PM
Hi, Does this bit of code represent complete overkill?! try { //create a treenode TreeNode tn = new TreeNode(); //add it to a treeview tv.Nodes.Add(tn); //do some other stuff } catch (Exception ee) //something weird has happened { try { //try to remove the tre...more >>

2 Data Bound List Boxes
Posted by Weste at 10/31/2006 2:06:02 PM
I have 2 list boxes bound to a database. The 1st list box displays services ordered by the customer. I want the 2nd list box to display services not yet ordered by the customer. For example. My services are A, B, C, D and the customer has ordered A and B. List box 1 should show A, B List...more >>

loop index in a foreach
Posted by Wilfried Mestdagh at 10/31/2006 2:04:42 PM
Hi, Is it possible to get the current loop index in a foreach block ? -- rgds, Wilfried [MapPoint MVP] http://www.mestdagh.biz...more >>

DataGridView, getting the dirty value of a cell when editing
Posted by news.microsoft.com at 10/31/2006 1:50:47 PM
Hi guys, I have a problem with the DataGridView. I want to catch the value of a cell when the user is editing it. Actually, I can't figure if there is an event or a property to get this value. For example, when the user type something on a cell, I want to display what he wrote on another...more >>

"Cloning" a project
Posted by davetelling at 10/31/2006 1:44:01 PM
I have been using VS-C# Express for a little bit, and I have a project that I want to "clone" so that I can make changes without affecting the original version. I would like to be able to make a new project, but keep the code & whatever else is necessary from the old project. When I tried this...more >>

Unmanaged code
Posted by Jason at 10/31/2006 1:01:39 PM
Hello I've got a DLL from a 3rd party vendor and they wrote the DLL in C++ so I can't just easily add a reference to it. How do I add that dll, to my C# application? Any idea, examples? ...more >>

partial classes
Posted by Phil Townsend at 10/31/2006 12:50:42 PM
Hello, I have come to like just about everything in VS2005 except for the "partial class" feature. Sometimes when I add a control to a web form, it is not referenced in the partial class [no Intellisense]. Before VS2005 I could simply add my own reference, now I can't. Where can I find the ot...more >>

How can I set affinity ofthe Word.Application object to one proces
Posted by theTone at 10/31/2006 11:17:01 AM
Hi all, We have noticed that using the Word OLE is much slower on dual processor machines. Limiting the processor affinity to one processor helps. So, I want to set the affinity in my C# code. I succeeded with the following code: oWord = new Word.Application(); Process[] wordProcesse...more >>

Why VS2005.IDE adds app.config to C# Class Library projects?
Posted by Maxwell2006 at 10/31/2006 11:15:13 AM
Hi, As far as I know, a class library project cannot have any app.config dedicated to itself and it always depends on the main application to provide the .config settings. Based on above, I am confused when I see that VS2005 adds an app.config file upon I add a web service to my dll cl...more >>

ADO.NET explanation of deleting rows from DB please?
Posted by sherifffruitfly at 10/31/2006 10:58:19 AM
Hi, I want to delete rows from my database. So I download them to a dataset, and then discover the following. This does not work: dataset["tablename"].Rows.Clear(); dataadapter.Update(dataset, "tablename"); This does work: foreach (DataRow dr in dataset["tablename"].Rows) { dr.d...more >>

Is this an example of Polymorphism?
Posted by jm at 10/31/2006 10:55:46 AM
I was reading about the provider model and found that providers have a definition, the contract, that all provider implementations must have. Is this an example of polymorphic behavior because there is a definition (either an abstract class or an interface) and each implementation has a differ...more >>

Writing A Web Browser.... Sort of...
Posted by rlrcstr NO[at]SPAM newsgroups.nospam at 10/31/2006 10:46:53 AM
I need to write a control for a SharePoint installation that can act as = a proxy for web requests in order to host existing porlets in a = SharePoint window. Basically, I need to be able to initiate a request to a portlet server = including customized information in the HTTP request header. ...more >>

Creating a list of objects with unique identifiers
Posted by Danny Liberty at 10/31/2006 10:28:51 AM
I need some opionions on an issue here... Suppose I want to keep a collection of objects, each need to be uniquely identified by a number. This number has no meaning as long as it's unique, so it should be automatically generated for each new object. One more requirement is keeping the objects i...more >>

Direct Memory Access Help
Posted by O.B. at 10/31/2006 10:17:15 AM
Given the two following structures: [StructLayout(LayoutKind.Explicit, Size=16)] public struct Articulation { [FieldOffset(0)] public byte typeDesignator; // 1 byte [FieldOffset(1)] public byte changeIndicator; // 1 byte [FieldOffset(2)] public Unsigned16 attachmentID; // 2 by...more >>

How do I show/hide columns in ListView?
Posted by MrNobody at 10/31/2006 10:09:02 AM
what's the trick in showing/hiding columns in ListView's Details view mode? I can change a columns width to 0 and it effectively makes it disappear but then you can actually resize the column to bring it back into view. Is there any way to disable resizing for just that one column? Any o...more >>

DateTime string formatting for Oracle db?
Posted by sherifffruitfly at 10/31/2006 9:45:57 AM
Hi, God I hate datetime string formatting... How do I get a string of the form "04-Oct-2006", for example, from a DateTime object? Thanks a jillion, cdj ...more >>

Display PDF file in a Winform app
Posted by Frank Rizzo at 10/31/2006 9:09:53 AM
I need to display PDF documents in my vs2005 winform app. What are my choices? I can't seem to find a 3rd party PDF viewer control? Is Adobe ActiveX control my only choice? Thanks....more >>

Add a member to Command object
Posted by hardieca NO[at]SPAM hotmail.com at 10/31/2006 8:28:26 AM
Good morning, I am creating a CMS which I would like to support multiple DBs for its back-end. I have taken the approach of using DBProviderFactories to keep my code flexible enough so that I can switch backends simply by changing the provider and connection strings stored in my App.config fi...more >>

reference type
Posted by vincente13 NO[at]SPAM gmail.com at 10/31/2006 7:46:02 AM
i understand that in csharp "string" and "object" are reference type... For e.g. in this case myString is passed to a method and it changes the value of the string.. if string is a reference type, isnt it passed to the method by reference and the second WriteLine should be "edited" instead of ...more >>

RegEx to find a word not enclosed in paranthesis
Posted by vmoreau NO[at]SPAM gmail.com at 10/31/2006 7:40:35 AM
I have a text and I need to find a Word that are not enclosed in paranthesis. Can it be done with a regex? Is someone could help me? I am not familar with regex... Example looking for WORD: (there is a WORD in ( my string WORD )) and * WORD * to (find WORD) and * WORD * Should give me the ...more >>

RegEx to find a word not enclosed in paranthesis
Posted by vmoreau NO[at]SPAM gmail.com at 10/31/2006 7:40:28 AM
I have a text and I need to find a Word that are not enclosed in paranthesis. Can it be done with a regex? Is someone could help me? I am not familar with regex... Example looking for WORD: (there is a WORD in ( my string WORD )) and * WORD * to (find WORD) and * WORD * Should give me the ...more >>

Failure to Send email
Posted by NW Technicals at 10/31/2006 7:23:27 AM
I am trying to send email using this fucntion can you guys help me finding the mistake I am using my Gmail Credentials and the only exception error I get is Failure sending email Any help is greatly appreciated ===================== MailMessage mailMessage = new MailMessage(); tr...more >>

locks within locks
Posted by DaTurk at 10/31/2006 7:16:01 AM
I have a question concerning nested locks. I just noticed that I have an object declared in my parent class that I use as the lock. But what I noticed is that in one of the childs methods, I lock that object, then while still in the critical section I call one of my inherited methods, and lock...more >>

How do you handle clipped content in custom user control?
Posted by MrNobody at 10/31/2006 5:47:01 AM
IF I am making a custom user control which draws stuff that might exceed its boundaries, can I get the user control to handle the scrolling for me? The AutoScroll property doesn't seem to be doing it. Do I have to set some special Size so it knows it's supposed to scroll? Currently by defau...more >>

How to get one control in middle to fill but not overlap bottom st
Posted by MrNobody at 10/31/2006 5:27:01 AM
I want to have a window where there is a strip on the bottom which stays fixed height but can stretch left and right, and always anchored to bottom border. Almost like status bar but it's going to be a plac eI put a bunch of regular controls. Then I want the main area to have a list view whic...more >>

Chm
Posted by Alisa at 10/31/2006 3:31:49 AM
Is there a way to create a chm file dynamicaly? for example merge 2 html files together to create a chm file? or 2 chm files? Are there any c# object that can read the chm file? ...more >>

Same class existing in multiple assemblies
Posted by bhattpiyush NO[at]SPAM gmail.com at 10/31/2006 3:31:35 AM
Hi All, I have a class Transaction in 2 different assemblies having different namespaces totally. I have an ASP.Net(1.1) page. In the codebehind .cs file I references/imports one of those assemblies in using statement and use the class from that assembly. However this page gives compilat...more >>

Find the owning thread of a lock in debug
Posted by Olie at 10/31/2006 3:27:06 AM
How do you determine the owning thread of a lock in debug and Visual Studio. This is easy to do in c++ because the critical section has a member variable with the thread ID. I have not found any way to do this in C#. The closest I have found is SyncBlk but this seems a bit complicated and len...more >>

Returning good old string parameters with Type.InvokeMember
Posted by Marek at 10/31/2006 3:23:02 AM
Hi I need to be able to return a string from a VB6 method: Public Sub GetMessageAsParameter(ByRef message As String) message = "GetMessageAsParameter worked!" End Sub which is implemented inside an ActiveX DLL. I need to do this using late binding so I am trying to do it with code like...more >>

Detecting when a network is connected
Posted by Joachim at 10/31/2006 3:11:02 AM
I know how to detect when a network cable has been plugged in or out, but how can I detect when an IP address has been received through DHCP? I e how to detect when the small "connecting to network" icon in the notification area beside the clock turns to a "connected to network" icon?...more >>

Memory consumption of generic lists
Posted by Hannes at 10/31/2006 2:33:24 AM
Hi guys! I use a generic list which, once filled, will not change. It contains a few 100'000 entries, so I'd like to limit its memory consumption. If I set its capacity to its count after filling it, does the extra unused memory (due to its probably high capacity by this time) get freed up do ...more >>

main returning errorlevel & exceptions
Posted by Jeroen at 10/31/2006 1:43:08 AM
Here's the situation. My program will be able to start with an argument (a path to a file) and then run a batch of commands in that file. So if an argument is provided to the main method, the program logic moves to the classes/methods that execute the batch (instead of s normal, GUI driven progr...more >>

Force closing UDP port
Posted by pavel.orehov NO[at]SPAM gmail.com at 10/31/2006 1:06:40 AM
Hi, I am using UDP protocol for communication in my application in C#. I am using UdpClient class. The problem is that sometimes the UDP port remains opened/stucked even if I close the application and restart the computer. Hence, I can't start this port again and I get an exception. So I w...more >>

Serialization issue
Posted by charlyBrown NO[at]SPAM invalid.com at 10/31/2006 12:36:11 AM
Greetings, We migrated our application for dotnet 1.1 to dotnet 2.0 and are generating xml files with serialization. These generated files are thus used in a unix batch and here is the problem It seems that before : Header generated in 1.1 <positions xmlns:xsd="http://www.w3.org/2001/XMLS...more >>

how to init my static variable like Java
Posted by Wu JianHua at 10/31/2006 12:00:00 AM
Hi£¬ I am new to C#, in Java I can code as following. class MyClass { public static MyClass C1 = null; public static MyClass C2 = null; private MyClass { } static { // init C1 and C2 here. } ...... } How to code in C#, please help m...more >>

call an event handler
Posted by Wilfried Mestdagh at 10/31/2006 12:00:00 AM
Hi, I want to execute (call) an eventhandler of an object. In this case a menu item. I want to see which item is checked and the checked one has to execute the Click event handler, as it was clicked. But I'm a little lost on how to call it. ToolStripMenuItem item; for (int i = 0; i < vi...more >>

Generic ICollection and interfaces
Posted by Allan Ebdrup at 10/31/2006 12:00:00 AM
I have a public sealed Class A that implements the interface I. Now I want to pass an ICollection<A> as a parameter to a method that takes a parameter of the type ICollection<I> but I get the error: Can't convert from System.Collections.Generic<A> to System.Collections.Generic<I> Shouldn'...more >>

How to get Procees USERNAME (Local/Remote)
Posted by Manu at 10/31/2006 12:00:00 AM
Hi, How to get the USERNMAE of all the process which are running on local /remote system. I have go through the "System.Diagnostics.Process class" but I couldn't find any useful information. It's there any way to get this information without WMI. Apart from this to get the Command Line ...more >>

VS 2005 TS Opens a form in changed state?!
Posted by Leon_Amirreza at 10/31/2006 12:00:00 AM
When I double click the form icon in the solution Explorer It Opens the form with an * in its name tab (and indicates that the form has been changed since last save action) HUH ?!?!? I hadnt had even a chance to change somthing Any1 knows what is wrong and how to solve it?!?! ...more >>

BMB.CurrentChanged gets fired just once or twice?!
Posted by Leon_Amirreza at 10/31/2006 12:00:00 AM
I have installed a hanlder for this event: this.BindingContext[dataSetCurriculumsCourses, "TableInstitutes"].CurrentChanged ..... void FormCurriculumsCoursesInstitutes_CurrentItemChanged(object sender, EventArgs e) { this.Text += "1"; } at runtime just "11" will appeare in the...more >>

Easy VB.NET > C# port question
Posted by nime at 10/30/2006 11:04:52 PM
I tried to port from VB to C# and now I'm stuck. I couldn't convert the VB line readdata = dt.Rows(0)(data) as C#: return dt.Rows[0][data]; Error detail: Error 1 Cannot implicitly convert type 'object' to 'string'. An explicit conversion exists (are you missing ...more >>

Custom reporting engine.
Posted by Ibrahim. at 10/30/2006 10:24:01 PM
Hello, I want to build a custom reporting engine in .NET. Wht are the consideration and I need to provide the user design facilty at run time. Thanks, ...more >>


DevelopmentNow Blog