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# > january 2006 > threads for thursday january 19

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

Silent installation of .NET 2.0 using VS 2005
Posted by S.Creek at 1/19/2006 11:51:22 PM
Hi, i am using a VS 2005 set up project ,to distribute my application, i cant find a way to silently install the 2.0 framework. Microsoft has an option to check it as pre-requisite, but then the user sees the EULA etc.. and this is basically a separated installation, i though of installing u...more >>


Tabbed (Paged) dialog in C#
Posted by Kylie at 1/19/2006 11:26:30 PM
Hi Everyone, I am going to quickly develop a C# application with the paged options dialog type. like Mozilla FireFox Options dialog box or Internet Explorer Tabbed option dialog or ... I have found a sample at http://www.differentpla.net/node/340 but the source code is not available. Does...more >>

managepermissions.aspx
Posted by Dave at 1/19/2006 11:11:02 PM
I use the following utility to manage security on my machine, http://localhost/asp.netwebadminfiles/security/permissions/managePermissions.aspx I use it to assign roles to certain folders and deny access to certain folders. How do I assign roles to folders on the machine where I'm deploying ...more >>

Document open on double-click?
Posted by David Veeneman at 1/19/2006 9:13:40 PM
I used to know how to do this--I want to double-click on a document created by my application and have the application and the document open. I have created the file association in my deployment project, and double-clicking a document does open my app. But it doesn't open the document. I re...more >>

Problem with assembly loaded at runtime
Posted by Luis Arvayo at 1/19/2006 8:53:59 PM
When I load an assembly at runtime, that is to say, a plugin DLL through Assembly.Load, an old version of the assembly is loaded. If I recompile the DLL and then copy the result to where the assembly is loaded by the main app, anyway, the old assembly is used. From where ?, I don't know. I d...more >>

Unable to Cast
Posted by Danny Ni at 1/19/2006 8:29:41 PM
Hi, I am having problem with the following code snippet: DataTable dt = getDataFromXLS(@"c:\test\Customers.xls"); //getDataFromXLS function reads an Excel file and return a sheet as a datatable for (int i=0;i<dt.Rows.Count;i++) { DataRow dr=dt.Rows[i]; int intCustomerID = (int) dr...more >>

Software protection
Posted by John at 1/19/2006 7:11:03 PM
Hi, I would like to protect my software from copying. What are best tools for it (hardware protection is not an option), do you have some reccomendation for protection or third party software that works? Thanks very much John ...more >>

moving/renaming directory to 2 levels below
Posted by Daves at 1/19/2006 6:24:11 PM
why the heck can't I use Directory.Move() to rename a directory (containing files) to a entry 2 levels below e.g. uploads/tempfiles -> uploads/tempfiles/48/003files if I do this in one line it says "part of the file name not found" bla bla so I move it in two steps but then in the second...more >>



Call an event handler on a parent form from child form
Posted by jimcolli NO[at]SPAM pacbell.net at 1/19/2006 5:45:40 PM
I have a parent form with a menu button that has a handler. I want to call this same handler when a button on a child form is clicked. I have this simplified code in the main form's Load handler. public class frmMain { private System.Windows.Forms.Button btnClickMe; private void...more >>

Convert string to Type
Posted by John Cotsell at 1/19/2006 4:46:06 PM
Basically I have a class called Dog and when using the objectdatasource I can use a string parameter to pass into the selectmethod. so I pass in a string = 'Dog' now once in the selectmethod I need to convert that string into and object of type Dog...I hope this makes sense. Do anyone know how...more >>

How do threads get entered in to?
Posted by Coder at 1/19/2006 4:29:22 PM
So there are various ways to enter a thread. Example: - Button click - Event from delegate call back. - etc... In fact, I suppose all entry points are from some form of an event. Questions: - When I click a button, does it it get blocked till the last button click is done? If so ...more >>

VS 2005 - Case Sensitivity?
Posted by gregory_may at 1/19/2006 4:13:28 PM
Is there any options in VS 2005 to better handle case issues in C# (Similar to VB.Net)? ...more >>

Trouble understanding compiler message on generic where clause
Posted by Brad Wood
I have this method declaration: private SomeType getSomething<T>( T spec ) where T: String, MemoryStream The compiler error I get is: 'string' is not a valid constraint. A type used as a constraint must be an interface, a non-sealed class or a type parameter. I don't understand what is...more >>

Unable to Copy File
Posted by MAF at 1/19/2006 3:51:11 PM
Does anyone know why in 2005 I might be getting this error everytime I try and recompile? Error 226 Unable to copy file "obj\Debug\myfile.dll" to "bin\Debug\myfile.dll". The process cannot access the file 'bin\Debug\myfile.dll' because it is being used by another process. myfile ...more >>

getting client ip in sock-client on server
Posted by Ankit Aneja at 1/19/2006 3:47:36 PM
The code of classes given below is for server to which clients connect i want to get ip address of client which has connected pls help how can i get //listen class public class listen { TcpListener server=null; Thread tcpthread=null; client[] cl=new client[3]; public list...more >>

Books, Atricles, Websites on Marshalling
Posted by bonk at 1/19/2006 3:45:20 PM
I am currently trying to write a longer article about Marshalling when using [ImportDll]. Does anyone know books, articles, or websites that cover Marshalling in Platform Invocation Services ([DllImport])?...more >>

How do I wait until myVar == true
Posted by Coder at 1/19/2006 3:43:19 PM
Howdy everybody! How do I do the following... while (myVary != true){}; Obviously I do not want to use 100% of the processor to stay in this infinite loop till myVar == true. But wait do I do? Thanks yal! - Coder ;) ...more >>

System shutdown notification
Posted by VJ at 1/19/2006 3:31:23 PM
How do I bn a notification in my program that windows operating system is shutting down or restarting? VJ ...more >>

propertygrid problem
Posted by Rainer Queck at 1/19/2006 3:16:41 PM
Hi NG, I am using a propertygrid to show the properties of a class , which among others holds a BitArray. I can select and edit this BitArray property with the "boolean listings editor" (might not be the exact name since I translated it from german) but if I later reselect this property , ...more >>

.NET Remoting DNS Caching problem?
Posted by Michael Bray at 1/19/2006 3:10:54 PM
Ok guys here's a tough one... I have a client/server application that uses remoting for communication. I am using Activator.GetObject to create a remoting instance with an URL that specifies the client machine by name. The *application* server in this case is the *remoting* client. In oth...more >>

() ?
Posted by Jarod at 1/19/2006 3:08:24 PM
Hey Intelisense give me for example list of possible choices in functions and I chose ToString but it doesn't add () so let's say it was object.ToString and we always have to type this () maybe I am really lazy but is there a way to update it to add this () ? Jarod ...more >>

snipet ?
Posted by Jarod at 1/19/2006 3:07:03 PM
Hey In my intelisense ( VS 2005 ) , when I type for example foreach I have selected in intelisense list snipet called foreach, how to chose it so it will display the snippet ? I know there is a combination od Ctrl + K + X but if intelisense displays me a snipet and it's selected maybe there i...more >>

creating a dynamic if statement via reflection
Posted by Digital Fart at 1/19/2006 3:03:50 PM
I have 3 strings containing "10" , "20", ">=" would it be possible via reflection to generate a dynamic if statement that return true or false and testing it like this if ( 10 >= 20 ) so a string becomes a test of 2 integers and how would i code this?...more >>

GetRequestStream slows down?
Posted by Jim Toth at 1/19/2006 2:50:02 PM
I have a multithreaded application that is posting XML requests to a remote web site. As more and more calls are made to HttpWebRequest.GetRequestStream, the length of time increases for each call from an initial 2-3 seconds to anywhere from 15-30 seconds. What am I doing that is causing t...more >>

Vb.Net to C# Conversion
Posted by Rajesh at 1/19/2006 2:30:50 PM
Hi guys, It wil be very helpful if sumone could give me the pros and cons,Guidelines or links for converting Vb.net projects to c#. Regards Rajesh ...more >>

Multidimension Array in C# Windows Form
Posted by Jason Huang at 1/19/2006 2:30:30 PM
Hi, I have a 2 dimension string array MyArray, how do I know the Count of the Rows and Columns in the MyArray? Thanks for help. Jason ...more >>

Need help on Regex
Posted by smileyjenny NO[at]SPAM gmail.com at 1/19/2006 2:27:36 PM
Hi, I need to replace all spaces in a square bracket with understores. Does anybody know the regular expression to do that? For example, [Employee First Name] will become [Employee_First_Name]. Thanks in advance!! ...more >>

How to create event templates using vs.net 2003
Posted by harish at 1/19/2006 2:17:17 PM
hello, I am trying to write code for form activate event and for an event of an object. Generally, you select the object/form from the top combo box in visual studio ide, and select the event you want to code for from the right combo box... which would generate a template ready to write cod...more >>

Highlight a PictureBox OnMouseEnter
Posted by Joe at 1/19/2006 2:04:11 PM
I have a PictureBox that we're using like a button. Is there a way to apply a sort of highlighting to the image in the MouseEnter event? I was thinking something like changing the color of all the pixels by a slight factor. Any suggestions? -Joe ...more >>

Generics and multi-level inheritance
Posted by Daniel Billingsley at 1/19/2006 1:52:40 PM
Let's say I have: public class RootClass<T> { public virtual T GetOne() { return default(T); } } and public class MiddleClass<T> : RootClass<MiddleClass<T>> { // A bunch of additional functionality } and public class ChildClass : MiddleClass<ChildClass> ...more >>

Why does this compile?
Posted by tni NO[at]SPAM nc.rr.com at 1/19/2006 1:39:20 PM
int x = 0; int y = 0; int z = 0; try { z = x / y; } catch (Exception) // THIS IS NOT A (DECLARATION)!!!! { } Thomas ...more >>

Duplicating Tabs
Posted by RobKinney1 at 1/19/2006 1:36:03 PM
Here is a head scratcher: I have 2 tab controls, upper and lower. LowerTabControl must be an exact duplicate of UpperTabControl only with selected tabs from the upper. For instance, I may want to duplicate tabPage1 and tabPage3 from upper and project them to the lower. Is there a way t...more >>

ANN: Doc-O-Matic 5 released - Documentation System
Posted by Markus Spoettl (toolsfactory) at 1/19/2006 1:22:22 PM
Quick Link: http://www.doc-o-matic.com http://www.doc-o-matic.com/download.shtml RENO, Nevada, -- JANUARY 2006 -- toolsfactory announces the release of Doc-O-Matic 5, a major new version of its popular documentation system. Doc-O-Matic 5 comes with an exciting array of new features such as Qu...more >>

How do I do a SendMessage like operation in C#
Posted by chris.dannemiller NO[at]SPAM gmail.com at 1/19/2006 1:11:16 PM
In VC++ When I wanted to send a message to a window from a worker thread I would use SendMessage. Events only work Semi-well in C# becuase certain GUI operations require they run in the same thread that the window exists in. Such as displaying a balloon on the tray. Does anyone know a good way t...more >>

Programmatic set GridView1 SelectedIndexChanged
Posted by Netmonster at 1/19/2006 12:33:42 PM
I am having trouble programmatically setting the SelectedIndexChanged of a GridView. Code as follows. Panel Panel1 = new Panel(); GridView g = new GridView(); ObjectDataSource o = new ObjectDataSource(); //load objectdatasource using webservice o.SelectMethod ...more >>

MessageBox shuts down program
Posted by brianbasquille NO[at]SPAM gmail.com at 1/19/2006 12:01:39 PM
Hello all, Any reason why a program would simply shut down when a MessageBox.Show() is issued? Strange behaviour as the MessageBox never actually pops up.. but running through the debugger shows it fails and shuts down at the line when the MessageBox.Show() is issued. Bear in mind i am w...more >>

Overlapping Regex matches
Posted by Jim_Kanepele NO[at]SPAM yahoo.com at 1/19/2006 11:38:43 AM
I have been looking for this all day and night. Am I right to say this is not possible with Regex? Example input string: NVNVNNRVN I'd like to match all NVN occurrences. NVNVNNRVN match 1: NVN match 2: NVN (overlaps here) Thanks for your help. Bes...more >>

list item deleted event?
Posted by Alex K. at 1/19/2006 11:26:04 AM
Hi all How do I catch an event when list item is deleted from ListBox? Is there such event? Thank you Alex...more >>

Novice: SecurityException on TableAdapter.Fill()?
Posted by Peter at 1/19/2006 11:20:01 AM
Hello, Thanks for reviewing my question. This is my first program with the new VS 2005 and I created a simple dialog with a datagrid connected to a new database I created with VS as well. this.sampleTableAdapter.Fill(this.sampleDataSet1.Teams); Error Message: System.Security.Securit...more >>

What is wrong with debugger?
Posted by Brett Romero at 1/19/2006 10:52:36 AM
I have a line of code that references a method in a .NET DLL. I can usually debug into this DLL and step through the method. With a recent update of the DLL (from some one else), I can't step into this method. I hit the line in my app, try to step into it and the debugger seems to go into the ...more >>

Best way to save a datatable into SQL server
Posted by John at 1/19/2006 10:44:44 AM
Hi, I have a datatable object in memory, the datasource is not from SQL server. I want to save this datatable into SQL server 2000, what is the best way to do it? The only way I know is to create table dynamically then loop thru datatable generate and execute an insert statement per row....more >>

Static Method Question
Posted by Doug Handler at 1/19/2006 10:19:41 AM
I have a static method that needs to assign a type to an instance of an object. What's the best way to address this? e.g. private Panel pnlMain = new Panel(); ..... public static void SetControl(Button btnInfo) { // pseudo-code - I need this to happen here - how can I do this. ...more >>

mod_rewrite
Posted by beachboy at 1/19/2006 10:03:20 AM
Do dotnet have a module as apache's mod_rewrite?? if yes, will server performance downgrade?? Thanks in advanced. ...more >>

Replace, Left, Right functions in C#
Posted by Ed Chiu at 1/19/2006 10:00:06 AM
Hi, Does C# has functions such as replace, left, right, substring for strings? Without these functions, it's not easy to process strings. TIA ...more >>

foreach or List.ForEach
Posted by Tripper at 1/19/2006 9:24:02 AM
Which is the better way to go and why? //trivial example List<string> strings = GetStrings(); foreach (string s in strings) { // some operation; } strings.ForEach( delegate(string s) { // some operation } );...more >>

Directory.Exists
Posted by Phil Barber at 1/19/2006 9:10:34 AM
using ASP.NET 1.1 int PID=(int)Session["PID"]; string FilePath=PF.GetProjectPath(PID); if(!Directory.Exists(FilePath)) Directory.CreateDirectory(FilePath); the Directory.Exists always returns false even though the Directory does in fact exist. note the FilePath string is a UNC path ...more >>

Button FlatStyle params in .NET 1.1
Posted by Janiek Buysrogge at 1/19/2006 9:00:38 AM
Hi, Is there a way to achieve the same looks for a flatstyle button in ..NET 1.1 as is done in .NET 2.0 with these properties: FlatAppearance.BorderSize = 0; FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transp...more >>

Which PInvokes aren't supported in C# or managed code?
Posted by Scottie_do at 1/19/2006 8:42:05 AM
I've heard from the CDO team that managed code is unsupported. With a site like www.pinvoke.net it's possible that I'll easily end up with a faulty application architecture that will require a rewrite after I write the darn thing. I would like to know what are the circumstances that make i...more >>

Deployment nightmares with app.config
Posted by Keith Elder at 1/19/2006 8:27:20 AM
Let's say you have a stand alone C# library project that is your datalayer. When this library compiles it will produce "My.DataLayer.dll" for example. In the project you use all the new whizbang DataSet generation tools to create some datasets, etc in your DataLayer project. When you setu...more >>

Release Compling & References
Posted by Steve B. at 1/19/2006 7:58:04 AM
I have a ADO.Net Library project (adonet.dll) in my VS solution Recently, when I Debug comple I don't get any errrors. When I Release compile to my local share network drive the compiler says it can't find the library project namespace (I build he library first) When I add the project ref...more >>

Application settings--form location and size
Posted by David Veeneman at 1/19/2006 7:53:51 AM
I'm having a problem getting design-time property binding to work with a form's size and location properties. I started with the Location property under Application Settings in the Properties window. I added a new setting ("FormLocation") using the New Application Setting dialog, and confir...more >>

Delegate / Multi-User Control Question
Posted by Doug Handler at 1/19/2006 7:28:12 AM
Hi, I have a form (Form1) that contains a tab control which one tab has a customer user control (UserControl1). When the user double-clicks on the grid hosted there a new user control is created. I have a delegate / event that passes via EventArgs the appropriate info from the grid to the ...more >>

How to get a sinlge value from a dataview?
Posted by timpera2501 at 1/19/2006 6:39:02 AM
Hi, I'm a bit new to C# and .NET and I'm struggling to find the right syntax for my problem. I am trying to figure out how to get a single value from a view? Row 0, Column 0 (the view has only one result anyway). I know how to get this from a dataset, but the syntax is not the same for...more >>

Create View on MS SQL-Server 2005 with C#
Posted by Karsten at 1/19/2006 5:13:39 AM
Hi, I want to create dynamic reports with C# and MS SQL-Server 2005 Reporting Services. Since the reporting service uses a data-table or data-view, I want to create a view dynamically. How can I create a data-view on a MS SQL-Server 2005 with C#? Thanks for your help! Karsten ...more >>

environment
Posted by Tim at 1/19/2006 4:56:11 AM
There is a vb6 standard exe. This exe makes calls to other Com dlls and dot Net dlls and exes. In this scenario, is the application running in the dot net environment or com environment? ...more >>

Cast between a function pointer and IntPtr
Posted by Abra at 1/19/2006 3:52:34 AM
I have an application where I need to send a inter-process message (a data stream) that contains among other the address of a function (member of a class). For that, I need to serialize it, so I tried to cast it to an IntPtr, but without success. And of course, on the receiever side, I need to ...more >>

marshal binary data file, written with C++, with my C# code
Posted by Vertilka at 1/19/2006 3:32:33 AM
I need to read binary data file written by C++ program, using my C# application. How do i marshal the bytes i read with my C# code to .NET types. The data is numbers (integers float doubles etc..) and strings. I looked at the Marshal class but did not know how to use it with file. Please ad...more >>

ListView Header Height
Posted by Brian Keating at 1/19/2006 3:20:03 AM
Hi there, Does anyone know how to make the header height of a ListView bigger? Should i set font or something , any ideas appreciated. Thanks Brian...more >>

Insert text into an ASPx page
Posted by Martin at 1/19/2006 3:17:03 AM
Hi New to the .NET framework, but have been on 2124C, and have come back to work to be asked to do ADO and ASPx (not covered in course!). The probelm i am having is that I have created an ASPx page with some text in, and need to add a block of text at a particular place from a database table...more >>

Experts - Very strange - Focus from one object to another
Posted by Gidi at 1/19/2006 2:33:05 AM
Hi, I've a strange problem in my form. I have a textBox which i want to get the focus when the form is loaded, so i gave it TabIndex=1 and on the load method i wrote textBox1.Focus(). I have two more dataGrids which i was able to move from one to another by clicking Enter, then i wanted to ...more >>

Reorder English text?
Posted by Asaf at 1/19/2006 1:41:02 AM
Hi, Below is a calss with function I gathered from a news group that uses GetCharacterPlacement API to reorder text. I have mixed text Hebrew/English and the function reorders the Hebrew text. I would like to reorder the English text instead the Hebrew text. How can I do that please? ...more >>

Create SID?
Posted by anders NO[at]SPAM aleborg.se at 1/19/2006 12:52:02 AM
Hi! To create a new Windows account I use this code: const int UF_PASSWD_CANT_CHANGE = 0x0040; const int UF_DONT_EXPIRE_PASSWD = 0x10000; DirectoryEntry obDirEntry = new DirectoryEntry("WinNT://" + domain); DirectoryEntries entries = obDirEntry.Children; DirectoryEntry obUser = entrie...more >>

about locating assemblies
Posted by Shiraz at 1/19/2006 12:35:04 AM
Hi It seems like none of the old posts get any follow up after a few messages, whether or not something constructive comes out of them, so I'm left with no choice but to repost an earlier question I asked. Below I've copy-pasted the log of the last post. It's an interesting problem, and it ...more >>


DevelopmentNow Blog