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# > march 2007 > threads for friday march 23

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

Regex - dynamically creating pattern issue
Posted by Deanna at 3/23/2007 5:54:34 PM
I'm trying to use Regex.Replace to replace a single word in a string, but I have to pass in the string. It won't ever match, but if I hard- code the word it works fine. Please help!! string stringToAlter = "ab cd ef gh"; // --- Pattern entered as string works fine string pat1 = @"\bcd\b";...more >>


Global user type definition
Posted by Ole at 3/23/2007 4:39:47 PM
Hi, Is it possible to create a type that I can import in any solution and user control etc so that it can be used the same way as system types (like Int32, String etc.)? Thanks, Ole ...more >>

Delegates/events
Posted by Peter Larsen [] at 3/23/2007 4:37:19 PM
Hi, I have a problem passing an event in a method call. Please see the following sample: //This class holds information about listeners (in MyEvent). public class First { public event EventHandler<EventArgs> MyEvent; } //This class could be a worker-thread. public class Second...more >>

Very odd Sort problem when modifying DGV bound data
Posted by sklett at 3/23/2007 3:10:33 PM
(I posted this in a databinding NG, but it's a VERY low traffic NG so I thought I would post here as well. I hope no one minds too much, if you do I'm sorry) I have a DGV that is bound to a DataTable that is loaded during application startup. I can sort with all the columns and everything ...more >>

Serialize Buffer Length
Posted by Andrew Robinson at 3/23/2007 2:54:54 PM
I am using the folllowing code to serialize a [serializable] object to a byte array (byte[]). It works fine, but my resulting array is size is being rounded up to the next largest 32768 boundary. How can I complete the serialization without incurring the extra bytes. I know there is a simpl...more >>

how to scroll WebBrowser
Posted by Zytan at 3/23/2007 2:20:37 PM
This page http://www.codeproject.com/miscctrl/scrollbrowser.asp claims it can be done like so, in VB (and thus C#, I presume): m_browser.Document.Body.ScrollTop = 100; But, this does not work. I've already tried sending WM_VSCROLL with SB_BOTTOM, and it doesn't work. It must be possible, ...more >>

Adding text layer to PDF
Posted by Peter Hemmingsen at 3/23/2007 1:44:45 PM
I'm looking for a tool to programmatically add an invisible text layer to an existing PDF page. I have a multipage PDF file and for each page I also have a corresponding text representation (in a separate file per page). I need to write an application that add this text page to each of th...more >>

problem w/ returned char pointer from unmanaged c++ dll
Posted by C0d3r at 3/23/2007 1:23:07 PM
have an unmanaged C++ DLL with following method: the DLL interface for unmanaged C++ is: SendCommand(void *h, char *c, char *d, char *b); the declaration in C# is: [DllImport("test.dll", CharSet = CharSet.Ansi, EntryPoint = "SendCommand")] unsafe public static extern char* SendCommand(void*...more >>



WebBrowser.DocumentText being set stays on about:blank sometimes
Posted by Zytan at 3/23/2007 1:14:34 PM
I have a WebBroswer control, and I set the HTML it will display via DocumentText, which takes a a string. This shows the HTML code from the string in the control. But, sometimes, the WebBrowser shows nothing. Clicking 'view source' shows: "<HTML></HTML>", and the filename is called "about_bla...more >>

Why the @ ?
Posted by tshad at 3/23/2007 1:05:08 PM
In my sample program I have the following: File.Create(@"c:\newfile.zip") Why does it use an @ sign? I don't normally have to do that in my code to open a file. Thanks, Tom ...more >>

export data from Microsoft Access to csv
Posted by bbdobuddy at 3/23/2007 12:45:13 PM
Hi, How do I export data from an Access query or table to a csv file? Thanks in advance ...more >>

code to retrieve binary field from Sql Server
Posted by scottrm at 3/23/2007 10:53:24 AM
I have some code to read the contents of a varbinary(max) field in SQL Server 2005. It is working ok I just wanted to know if anyone had any comments on it's efficiency. Code to read from the field using (SqlDataReader reader = cmd.ExecuteReader(CommandBehavior.SequentialAccess)) ...more >>

Regular Expression
Posted by Shawn B. at 3/23/2007 9:26:29 AM
Greetings, Given the following string: eid=6;mid={S:mid};peid={S:peid};pname={S:pname};;happy={R:happy} What regular expression would I write to match the ";" but not the ";;". I want to write a replace regex to replace the ";" with another character and the ";;" with a ";". Tha...more >>

C# - Calling unmanaged DLL from managed C# code.
Posted by rkpat at 3/23/2007 9:20:05 AM
I have a DLL that i'm interfacing with that's in C++. here's the interface defn: SendCommand(void *h, char *cmd, char *data, char *respbuffer); here's the wrapper for the dll call in my C# code: [DllImport("test.dll", CharSet = CharSet.Ansi, EntryPoint = "SendCommand")] unsafe public static ...more >>

Constructors
Posted by DeveloperX at 3/23/2007 7:54:39 AM
In an attempt to solve a problem further down I suggested the problem might be caused by a missing constructor. Now, this led me to the conclusion that I don't fully understand constructors, or have made lots of assumptions. Things I (think) know, please correct as necessary: Constructors are...more >>

Getting DataRow information off a DataGrid (Database)
Posted by Marc at 3/23/2007 6:42:02 AM
In Visual Studio 2005, I am developing a Windows Mobile application, using Mobile SQL 2005. I need Data from a Database to be shown in a DataGrid, this works. But now I want to be able to get the Data of the selected DataRow, for instance, I want to display the value of the "Klant" column of ...more >>

Web: Re-binding A DropDownList Within A DetailsView
Posted by 47computers NO[at]SPAM gmail.com at 3/23/2007 6:26:08 AM
Hello. I'm having a bit of difficulty with some DropDownList controls within templates in a DetailsView on my web form. Basically, I have a form where a user is building a "location profile" with a handful of fields. Two of the controls are a DropDownList of countries and a DropDownList of st...more >>

set placement of content holder?
Posted by Josh Nikle at 3/23/2007 5:56:40 AM
is it possible to set the placement of a content holder within a master page? my set up is a div with a table in it, which in turn has the content holder in it. i've tried setting the vertical align property of the div to top, and the valign properties of both the <tr> and <td> to top without ...more >>

UK postcode validation
Posted by Mike P at 3/23/2007 5:24:27 AM
Can anybody tell me what are the valid formats for UK postcodes? As far as I am aware postcodes can be 6-7 characters long (excluding spaces) and the first part of the postcode can be 3-4 chars long and the second part can only be 3 chars long. Am I missing any other valid formats? *** Sent ...more >>

FileSystemWatch and AppDomain.Unload
Posted by Tao at 3/23/2007 3:15:48 AM
hi.. group, A wired question about FileSystemWatcher and Unload an AppDomain. I have a class A which creates class B. When B is created, B loads an AppDomain and execute some functions on the load AppDomain. B monitors disk to see if some files chang. If some file changes, B will try t...more >>

TCP application - Synchronization issue??
Posted by Amit at 3/23/2007 2:48:55 AM
Hi I am developing an application in C#. The application creates a TCPListener object and listens to (incoming) data on a particular port. A simulator hardware writes data to this port. My application reads the data and process it and generates some results for display. The TCPListener obje...more >>

Method to Unpack byte array into a UInt64
Posted by stuie_norris NO[at]SPAM yahoo.com.au at 3/23/2007 2:11:28 AM
Hi Group I am trying to write a method to unpack a byte array into an Uint64. But the results are wrong. public static void UnpackUint64(ref UInt64 dst, byte[] Data, ref uint Index) { dst = Data[Index++]; dst += (UInt64)((Data[Index++] & 0xffffffff)...more >>

a little help with application setting?! [ConfigurationErrorsException!]
Posted by giddy at 3/23/2007 12:31:18 AM
Hi , I'm probably just doing something a little silly. I get a System.Configuration.ConfigurationErrorsException! This is my config file: <configSections> <section name="qConfig" type="QuickBuild.QConfig , QuickBuild" /> </configSections> <qConfig PathToDevEnv="D:\Microsoft Visual ...more >>


DevelopmentNow Blog