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 2007 > threads for monday february 12

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

AppendChild of diff document
Posted by Praveen at 2/12/2007 11:29:21 PM
Trying to select a node 'E' from XML document 'ParentXML' and append the same to another xml document 'ChildXML' string MyXMLStr="<R><E A='1'/></R>"; XmlDocument ParentXML= new XmlDocument(); ParentXML.LoadXml(MyXMLStr); XmlDocument ChildXML = new XmlDocument(); ChildXML.LoadXml(...more >>

ContextSwitchDeadlock Problem
Posted by Kalpana at 2/12/2007 11:00:27 PM
Hi, As iam working on convertion of C#1.1 to 2.0. Iam facing a problem (screen is flickered) while opening and closing any artifacts. When i tried to debug it is througing ContextSwitchDeadlock MDA exception i.e. The CLR has been unable to transition from COM context 0x1a0768 to COM ...more >>

VS2005 crashes when getting latest version
Posted by retroman80s at 2/12/2007 9:57:40 PM
Everytime I get latest version of my solution or project( with a large number of files), my VS2005 ide shutsdown with no warnings or errors. Anyone else experience the same thing? Any solutions? This is the version I'm using: Visual Studio 2005 Team Suite Retroman80s **************** Every...more >>

Random and MessageBox
Posted by Muffin at 2/12/2007 8:21:35 PM
I hope somebody can show me why I need to have a messagebox to get "random" numbers in my example. If I comment out the message box call that is in RollAbility() the numbers generated are not random , otherwise it works fine. I really would like to get rid of the messagebox call. thx sta...more >>

Controlling Column Heights
Posted by toddcarew NO[at]SPAM gmail.com at 2/12/2007 8:18:53 PM
I have a database with 10 to 15 "stories" in it per "issue" of a newsletter. I need the newsletter formated so that when it is printed (from an online browser) it is presented in 2 columns on the page approximatly 3.5" wide each. I can set up the page so that there is the 2 columns with out ...more >>

Do any microsoft buildtime dependancies C#/C/c++/VB/etc. need to be updated for the 2007 policy on daylight savings time?
Posted by Daniel at 2/12/2007 7:49:51 PM
Do any microsoft buildtime dependancies C#/C/c++/VB/etc. need to be updated for the 2007 policy on daylight savings time? I know the OS needs to be updated but I care now about C libraries, .net binaries, etc. that microsoft maintains which have coded in them logic around datetime. e.g. the C...more >>

Is any .net updated required for the new daylight savigns time, or just update the OS is all that is needed? Do DateTime objects need to be updated in
Posted by Daniel at 2/12/2007 7:41:05 PM
Is any .net updated required for the new daylight savigns time, or just update the OS is all that is needed? Do DateTime objects need to be updated in .net runtime? ...more >>

Help - Creating a function to deal with null parameters
Posted by (pjarvis NO[at]SPAM man.ac.uk) at 2/12/2007 7:08:12 PM
Hi guys, Say for example i have a hypothetical function taking 4 parameters such as the one below: public void InsertRow(char gender, double decimalAge, double height, double weight) { //Adds data into a MySQL database } If i have a piece of data missing such as height, but i still w...more >>



Set message subject here ...
Posted by (pjarvis NO[at]SPAM man.ac.uk) at 2/12/2007 7:05:56 PM
Hi guys, Say for example i have a hypothetical function taking 4 parameters such as the one below: public void InsertRow(char gender, double decimalAge, double height, double weight) { //Adds data into a MySQL database } If i have a piece of data missing such as height, but i still w...more >>

marshal byte[] to unsigned int* through P/Invoke
Posted by nicewenyan NO[at]SPAM hotmail.com at 2/12/2007 6:48:46 PM
I want to pass a managed c# byte (8 bit) array into a unmanaged c++ function: extern "C" void AddData(unsigned int* data); I use P/Invoke on managed side to do the marshaling as following: [DllImport("Test.dll", EntryPoint = "AddData")] public static extern int AddData(IntPtr data); by...more >>

Why property does not appear in TEST Container :-(
Posted by --== Alain ==-- at 2/12/2007 6:26:20 PM
Hi, I have a huge problem... My property does not appear in the "propertyGrid" of "test Container", when i test my custom control. Here is the custom control code : namespace ARListView.Design { [DesignTimeVisible(true), ToolboxItem(true), ToolboxBitmap(typeof(ARListView.Desi...more >>

SMTP and POP3 Healthy
Posted by Thom Little at 2/12/2007 6:23:40 PM
I want to check if a remote server is healthy. For FTP and HTTP ports I use ... public static string Connect( string hoist, int port ) { try { IPAddress[] ipa = Dns.GetHostAddresses( host ); Socket s = new Socket( AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp ...more >>

Flipped Grdivew control?
Posted by spitapps at 2/12/2007 6:02:39 PM
In a traditional gridview control the items inserted(bind) into the control are rows and the data is in columns. I have a customer who wants the data fields as rows and the columns as the items being inserted(bind). I have never seen a gridview control displayed in this fashion but would like ...more >>

Problem with debugging after code changes
Posted by chandu at 2/12/2007 5:50:52 PM
Hello, if create a new project is visual studio 2005 C# windows application. If i run the application First time VS allows me to debug the code. if i made any changes to code and debug again it is not possible to debug. if i put the cursor on the break point giving the tooltip message as "Th...more >>

Conceptual question--How do collections store objects in .NET ?
Posted by Kevin at 2/12/2007 5:35:15 PM
I'm missing a basic understanding of how .net stores objects in a collection. For example, I have an object called "dog", and I would like to create and populate a List<> of these. For example:. dog poodle =new dog("small", "white", 1); dog shepherd =new dog("big", "brown", 2); dog la...more >>

Worker thread preventing application shutdown
Posted by Bill Davidson at 2/12/2007 4:57:30 PM
All: I have a problem in which a worker thread in my (.dll) assembly isn't allowing the main (.exe) assembly from terminating. Here's the scenario: 1) App.Exe is launched. 2) App.Exe calls into my .dll (Sub.Dll) This call causes the method in Sub.Dll to spawn a worker thread tha...more >>

System.Runtime.Serialization.DataContractAttribute is missing
Posted by semedao at 2/12/2007 4:28:09 PM
Hi , I want to use some NET 3 class like System.Runtime.Serialization.DataContractAttribute however after installing .net 3 I still can't see this class maybe I missed some installation ? can some one tell me what I should look for ? (also to merge the MSDN help with the net 3) (Xp sp2 , vis...more >>

How do I restore a corrupted user.config file?
Posted by Jeremy Chaney at 2/12/2007 4:15:51 PM
It appears that my user.config file got corrupted causing my "InitializeComponent" routine to throw the exception "Root element is missing." when I start my app. I figure I can just go into Explorer and delete the file to get things working again, but I'd rather just catch the exception and re...more >>

IQueryInfo driving me insane
Posted by rose.kevin NO[at]SPAM gmail.com at 2/12/2007 3:44:49 PM
Hi I am trying to make a little tool tip box pop up when you hover the mouse over one of our custom filetypes in Windows explorer. And it is slowly driving me insane. I have a created a dll, with this as the code: using System; using System.IO; using System.Runtime.InteropServices; us...more >>

High(er) speed thumbnail generation
Posted by dean.greg NO[at]SPAM gmail.com at 2/12/2007 3:36:20 PM
Im looking for a way to generate thumbnails from an image as fast as possible. Currently I'm using GDI+ however going from 1024x768 to 100x100 takes too long. I'd imagine the whole process can be optimized by using hardware acceleration (ie DirectX), however I am not all that familar with the ...more >>

Find DataRow in DataGridView
Posted by Rainer Queck at 2/12/2007 3:18:32 PM
Hello NG, what would be the best way to locate a DataRrow in a DataGridView? I have by DataTable.Select a bunch of DataRows from a DataTable (which is the data source to the DataGridView). Now I would like to give those related DataGridViewRows a different BackColor. Thanks for hints and...more >>

System.Transactions and database locking.
Posted by Allan Ebdrup at 2/12/2007 2:32:18 PM
I've implemented transactions in my dotNet 2.0 project using System.Transactions and TransactionScope. --- TransactionOptions options = new TransactionOptions(); options.IsolationLevel = System.Transactions.IsolationLevel.Serializable; options.Timeout = new TimeSpan(0, 5, 0); using (Transacti...more >>

Fastest way to load data
Posted by Sehboo at 2/12/2007 1:22:27 PM
I have to call a stored procedure which returns about 1000 rows with about 5 fields (most of them are int). What is the fastest way to load this data? if I just do DataTable.Load, then is it fast? or should I do something else? Thanks ...more >>

USB Disk speed testing in C#
Posted by sturnfie NO[at]SPAM gmail.com at 2/12/2007 12:45:26 PM
Hi all, I am attempting to write a tool that would get (via something of a stopwatch action) the amount of time it takes to copy a file from a local disk to a connected USB drive on a Windows XP machine. When I run this tool, I am getting average speeds that are faster than what is theoreti...more >>

form1.commandsTableAdapter.Fill(form1.fixed1DataSet.Commands);
Posted by Chris at 2/12/2007 12:44:01 PM
I am trying to "fill" the dataset form another form. So, after I update some records from form2, I want to refill (if you will) the dataset on form 1 datagridview. The code below won't work. Any ideas> form1.commandsTableAdapter.Fill(form1.fixed1DataSet.Commands); If I use THIS, on form fo...more >>

Manifest Files & VS2005
Posted by John Bowman at 2/12/2007 11:59:34 AM
Hi All, I originally sent this to the dotnet.security ng, but no repsonse in 5 days. Hopefully, someone here can explain to me what's going on. I'm fairly new to .NET app security and manifests. I'm working with a test app: "MyApp.exe". Couple Q's: 1) When I turn on the security projec...more >>

How can I change the default namespace in an Outlook-AddIn Project
Posted by Christof Nordiek at 2/12/2007 11:59:12 AM
Hi all, I'm working on an Outlook-AddIn with VSTO 2005. I'd like to change the default namespace to something like "Componyname.Projectgroup.Addinname". But in the property page the default namespace input is disabled. Why is this so? And, how can I change the defaultnamespace used. thx ...more >>

How to decode 'safe' html back to original raw text?
Posted by Richard Lewis Haggard at 2/12/2007 11:43:47 AM
Is it possible to use features from XmlDocument to unescape text back to its original raw text format after it has been escaped to handle non-HTML compliant character strings? I have code that serializes text to an XML file and then deserializes back to text. If the user enters XML illegal ...more >>

Change text box position on the web form
Posted by Alan T at 2/12/2007 11:35:38 AM
I just put 2 text boxes on a web form but they are side by side, I have no way to reposition them. ...more >>

single class, hashtable, multiple threads
Posted by hharry at 2/12/2007 11:08:50 AM
Hello All, I have a single class windows service that includes a function that runs in the ThreadPool. The class contains a hashtable which is declared in the main thread. What is the recommended method of updating a variable declared in the main thread from a spawned threadpool thread ? ...more >>

App config Files
Posted by DaveP at 2/12/2007 11:03:21 AM
Hi all... Looking for some advice We have alot of services in vb6 and im re-writing them in c#...they all use xml files for start up config i want to write a class to support these files... is the best way to build collection object from the xml files thanks DaveP ...more >>

How do I resize Tooltip text or ToolStrip Text ?
Posted by Vinamra Agrawal at 2/12/2007 10:50:02 AM
I want to increase font size of a tooltip or a toolstrip menu on mouse hover or mouse click. It is changeable or not ? What alternative can be used in its place?...more >>

Newbie question -- is there a "#include" in csharp?
Posted by Dom at 2/12/2007 10:39:53 AM
Teaching myself cSharp. In other languages (c++, etc), I generally put important parameters into a single file. Then, if a module requires those parameters, I "include" them in the module. I have that same need in c#, but how is it done? All I can think of is: Create a class with just cons...more >>

WPF/Avalon: Adding Controls During Runtime
Posted by hufaunder NO[at]SPAM yahoo.com at 2/12/2007 10:24:30 AM
I have to present inputs (textbox, combobox, etc) that are not known during design time. In the past this was pretty simple to do. You just add a new control to the Controls property of a form. How can I achieve the same thing with WPF? Thanks ...more >>

Windows Service question
Posted by Yoavo at 2/12/2007 10:14:06 AM
Hi, I wrote a windows service using c#. Is there a way to start the service automatically after it has been installed ? Yoav. ...more >>

Update statement won't work
Posted by Slavan at 2/12/2007 9:50:58 AM
I have an update statement that I'm executing against Oracle database from my C# code and it won't work. UPDATE MenuCaptions SET Caption = N@Caption WHERE MenuId = @MenuId AND CultureId = @CultureId Caption is an nvarchar type. MenuId and CultureId are integers. I get Exception with the fol...more >>

unload a form
Posted by Chris at 2/12/2007 9:28:00 AM
How do I unload a form in C#? ...more >>

Database Problem
Posted by Chris at 2/12/2007 8:32:00 AM
I have a table bound to a datagridview on main form. A second form updates one of the look up tables that includes look-up values. One of the datagridview columns is a combobox on main form that gets its values form this look up table. What I add new loopup values from the second form and ...more >>

How to add a task from my C# app into scheduled tasks?
Posted by Chris at 2/12/2007 8:31:02 AM
I am developing my app. I want to creat an installation wizard that would be able to add a new entry (for my app) into scheduled tasks applet in control panel. Is it possible?...more >>

USB
Posted by Ole at 2/12/2007 7:52:41 AM
Is it possible to control an USB port from C# (I'm using the standard USB host controller driver from CW)? Thanks Ole ...more >>

An interesting/annoying problem involving callbacks and native C and C#
Posted by per9000 at 2/12/2007 7:39:58 AM
An interesting/annoying problem. I created a small example to provoke an exception I keep getting. Basically I have a C-struct (Container) with a function-pointer in it. I perform repeated calls to the function in the container. I allocate (and free in c) arrays to get garbage collection in bo...more >>

C# Form Handeling Multi-key press
Posted by Kbalz at 2/12/2007 7:19:32 AM
I have a Form that is performing a wizard-like step system (using TabControl), and I need a key combination (like ControlKey + A + T) to be caught and show a secret admin TabPage. I tried to add an event handler to the form to catch a key that I press and change a label to the key I press with...more >>

What is this pattern called?
Posted by phillipwei NO[at]SPAM gmail.com at 2/12/2007 7:14:49 AM
You have a class that's returning an immutable set of objects that are the "same" objects. If you were for some reason representing the alphabet as full-fledged objects, and each time you requested "A" it would return the exact same object "A". Or is this so basic it's not really a "pattern"?...more >>

Immutable Lists
Posted by phillipwei NO[at]SPAM gmail.com at 2/12/2007 7:08:21 AM
What's the best way to achieve this, or is this a bad idea? ...more >>

question about UICulture in asp.net
Posted by Alex at 2/12/2007 6:45:22 AM
I have a question about asp.net. I'm trying to create a multilingual site with resources and stuff, it works ok, but what is the difference between using: UICulture = "en" or using Thread.CurrentThread.CurrentUICulture = new CultureInfo("en"); ?! Both work well. (i have a base page where i ...more >>

Why binary formatted data creaetd problem on firewall?
Posted by archana at 2/12/2007 6:32:29 AM
Hi all, I am new to remoting. I heard that binary formatted data will not work through firewall. And soap formatted data will work Can anyone tell me why is it so? thanks in advance. ...more >>

Derived Dictionary serialization: please help me find the error in this simple code snippet
Posted by pamela fluente at 2/12/2007 6:03:10 AM
Hi, please find below a very simple code snippet which is giving me the following error: System.Runtime.Serialization.SerializationException was unhandled Message="The constructor to deserialize an object of type 'WindowsApplication10.Form1+DictionaryExt`2[System.String,WindowsApplication1...more >>

c# app to check web status...
Posted by trint at 2/12/2007 5:57:06 AM
Recently the host for our website has been going down for unknown reasons like three or four times a week, which obviously means that we are loosing business during the down time. Any one know ideas how I can check our site status with a c# application every few minutes or so to keep a log of in...more >>

Win Control question
Posted by BlueTrin at 2/12/2007 4:03:51 AM
I would need to find a control that can show some text on multiple line and columns, data would be organized by line and the user could sort by column. It is the same kind of control than in the detailled view in Windows Explorer when you sort by details. Anybody know the name of this contr...more >>

Windows form label border...
Posted by Joneleth at 2/12/2007 3:22:46 AM
Hi, sorry for that kind of a silly question, but j just got crazy finding a way to display a transparent label with a SIMPLE white border on a form with a dark backgrond color. I'd like to achieve that without writing any code such as handle the OnPaint event or anything like that (if possibl...more >>

Usage of zip compression in my app
Posted by Chris at 2/12/2007 3:18:01 AM
My application generates a few text files. I want to use zip compression (built in Windows XP) to compress these files in my application. Is it possible?...more >>

Instanz_einer_Klasse_l=F6schen
Posted by Karl Heinz at 2/12/2007 2:23:29 AM
Hallo NG, wie kann ich am einfachsten eine Instanz einer eigenen Klasse l=F6schen? Ich habe ein Klasse, die mir Picture-Boxes in eine Form l=E4dt. Ich m=F6chte nun diese Instanz mit den zugeh=F6rigen PictureBoxes l=F6schen. Wie kann man dieses am einfachsten realisieren? Ich habe das ganze ...more >>

What WebRequestMethods.Ftp.ListDirectoryDetails returns?
Posted by newscorrespondent NO[at]SPAM charter.net at 2/12/2007 1:34:58 AM
When I as for a list of the details for a directory what comes back? Columns 000-009 appear to be attributes. from Windows documentation h Hidden file s System file e Encrypted r Read-only a File ready for archiving c Compressed p Reparse point Columns 011-013 are a number but what doe...more >>

How to discover the CLR version that is running an assembly???
Posted by Bob Rock at 2/12/2007 12:24:43 AM
Hello, how can I discover at runtime the version of the CLR that is running an assembly??? Is there maybe some class + method to get this info in the reflection namespace? Thanks. Regards, Bob Rock ...more >>


DevelopmentNow Blog