Groups | Blog | Home


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# > june 2006 > threads for thursday june 22

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

IClonable deep vs shallow, best practise
Posted by bonk at 6/22/2006 11:19:35 PM
I have come across the need to distinguish between the creation of a deep and a shallow copy and with great interest I have read this article: http://blogs.msdn.com/brada/archive/2004/05/03/125427.aspx This artivle seems to hint that I should not use System.IClonable but instead define my o...more >>


SqlBulkCopy problem
Posted by GB at 6/22/2006 11:17:17 PM
Hello: I am developing C# project, using ADO .NET 2.0 to connect to SQL Server 2005. I created a DataTable from scratch, and then use SqlBulkCopy to insert it into an empty table in a SQL Server 2005 table. The datatable I created from scratch matches exactly the empty SQL Server 2005 table. ...more >>

multiple elements conditional on if
Posted by gordon at 6/22/2006 11:10:14 PM
Hi I am trying to set some elements to values depending on the selection in a test box. The first possible value that can be selected should set fmttest1= "", fmttest2=" to " and fmttest3="". The second value that can be selected from the test box should set the fmttest1 ="From ", fmttest...more >>

serial port read - returns before finished?
Posted by Ole at 6/22/2006 6:56:55 PM
I got a problem with serial port read which I use like this: sp.Read (byteBuffer, 0, 100); but the problem is that it returns before it has read the 100 bytes - is there a way to set up the port in a syncronious state so that it wont return before it has finished? And no - I can't use the ...more >>

Define my own data type
Posted by Just D at 6/22/2006 6:10:41 PM
All, It was possible before in Pascal, C++, etc. to define our custom data type or redefine the existing type, like in Turbo Pascal we could assume that shortint is int and use all references to shortint like all these variables became int. How can we define our own user data type in C# ...more >>

Unused exception variables causing warnings
Posted by aioe.cjb.net at 6/22/2006 5:32:47 PM
So, I was planning on ridding my VS2005 solution of all warnings, but the ones sounding "The variable 'ex' is declared but never used" in catch-blocks, are causing a headache. I have several cases of code like this: try { // Some code } catch (Exception ex) { LogTool.Log("Error d...more >>

PrintDocument and Resolution
Posted by Steve at 6/22/2006 4:51:02 PM
I'm trying real hard to set the printer resolution for a PrintDocument. It appears that the printer is already set to 300 x 300 dpi, which is JUST what I want. But the Margins and PrintableArea properties of the PageSettings in the Print handler are reporting values that indicate 100 dpi, fo...more >>

(More info) EnableVisualStyles breaks my program!
Posted by Michael A. Covington at 6/22/2006 4:24:07 PM
Further to previous post... I have a big, complex program which works fine as long as I don't call EnableVisualStyles. If I do this: Application.EnableVisualStyles(); Application.DoEvents(); Application.Run(new FormOpeningMenu()); then in one of my subordinate forms, which consits of...more >>



IDataErrorInfo Interface
Posted by Brian at 6/22/2006 4:03:53 PM
I really want to use the IDataErrorInfo interface. I'm using it now in combination with an ErrorProvider and this seems really good. But the downside: IDataErrorInfo wants to use a string indexer on my class. No big deal, but now I have a class where I want to use my own string indexer. ...more >>

ListView Header Color
Posted by Adrian at 6/22/2006 3:59:13 PM
Is there a simple way to give the column headers of a list view a fore color? Thanks, Adrian. ...more >>

STDole image to bitmap
Posted by Craig at 6/22/2006 3:21:20 PM
I am using the msvidctl to capture display input on my pc from a tv card. I would like to press a button to capture an image, so use the "capture" method of the msvidctl object but am unable to assing this to a bitmap. I get the following error. Error 2 Cannot implicitly convert type 'stdol...more >>

HttpRequest (well known by now..) error
Posted by objectref at 6/22/2006 3:20:57 PM
Hi, does anybody have found a working solution for this HttpRequest error : "ServerProtocolViolation/The server committed a protocol violation. Section=ResponseStatusLine" i tried the solution regarding the app.config file, by puting there the following <?xml version="1.0" encoding="ut...more >>

Does 2.0 still require ODP.NET to connect to Oracle?
Posted by D. Patrick at 6/22/2006 2:21:08 PM
I need to connect to an Oracle database. I've never done it before. I see that with framework 1.1 you had to download ODP.NET from Oracle's site in order for the framework classes to even work. I tried that quickly, but the file is 400 MB, and the the installation asks for all kinds of th...more >>

Retrieve file on a Sharepoint Document Library using other credent
Posted by Peter S. at 6/22/2006 2:06:02 PM
There are some files in a Sharepoint document library that I need to access from a C# Webcontrol. The problem is that when the user runs the ASP.NET webpage they will be coming in with a non-privileged account. In the C# program I would like to access the Document Library (using my credentials)...more >>

OpenFileDialog for Web
Posted by VMI at 6/22/2006 1:32:02 PM
Is it possible to add an OpenFileDialog control for the Web? I'm really looking for something where the user can choose the directory in their local machine. My first thought was to use the OpenFileDialog for this. I have VS.Net 2003 v1.1. Thanks....more >>

Code Reuse
Posted by Bob Weiner at 6/22/2006 12:45:28 PM
Hi, I am an IT person who uses .Net to support our infrastructure. Since I have been doing this for a while it would be a misnomer for classify myself as a newbie; perpetual amatuer seems more appropriate. Notwithstanding, I am tired of cutting and pasting code and moving classes from o...more >>

Difficulty creating netmodule from .dll with csc
Posted by wheresjim at 6/22/2006 11:14:08 AM
I am trying this project out: http://www.codeproject.com/useritems/javacsharp.asp I am having difficulty building parts of it with Visual Studio .NET 2003 because of a post-build step that attempts to create a netmodule from a .dll using the following command: csc /debug /t:module "$(OutD...more >>

<Ping> Nicholas Paldino <Ping>
Posted by ChrisM at 6/22/2006 11:04:36 AM
Hello Nicolas, Wrt the problem I posted yesterday about my textbox causing the Button_Click event to fire. You said you'd only believe it if you saw it, and asked for sample code Just to let you know, if you're still interested, that I've posted an example in the original thread (Weird For...more >>

Difference between try{}catch{} and try{}catch(Exception e){} ?
Posted by Mr Flibble at 6/22/2006 10:18:45 AM
Are try { //something } catch { // } And try { //something } catch (Exception e) { // } The same ? The first one will catch all exceptions and the second will catch all exceptions of type Exception which since it's the base type of all Exceptions will catch everything....more >>

Connection Pooling and Preparing Commands
Posted by Joanna Carter [TeamB] at 6/22/2006 10:14:24 AM
Hi Folks I am just trying to get my head around whether I can use a single SQLConnection for the life of the application or whether I should create it only when needed. I want to create cached SQLCommand objects that are then prepared to reduce subsequent execution time, but these can't ...more >>

Application templates.
Posted by UJ at 6/22/2006 9:50:06 AM
A friend of mine is trying to create a Windows Service in VS 2K5 and he doesn't have the windows service under the choices. Yet I do. He has had VS for a long time. I installed it this week. We both have Pro. Anybody know why this would happen? Is there someplace you can download the templa...more >>

C#, Webforms, Javascript, and scraping
Posted by Essial at 6/22/2006 9:44:59 AM
I have written a fairly simple application in C# that loops through the forms, and all the children of all the forms, and have generated a tree view with all the properties. All this works good and well. But now I have a new problem. Some websites have javascript menus (which can be embedded or ...more >>

How can I pass an XmlDocument as a value type?
Posted by William at 6/22/2006 9:37:31 AM
I would like to pass an XmlDocument to a method as a non-referenced object. Can this be done? ...more >>

Program problem, seems simple...
Posted by Scooby at 6/22/2006 9:17:33 AM
Okay, I'm a noob at C# and microsoft's IDE, but have a fairly long history of programming (with, cough, Delphi). I'm writing a mobile app in C# with Visual Studio 2005. I think there must be something fundamental that I'm missing and could use a pointer in the right direction. Below is a ...more >>

Memory increase over time
Posted by Benny at 6/22/2006 9:12:30 AM
I am having a memory problem with my application. Plain and simple all the program does is runs through a bunch of images and prints them to a PCL Printer. The first part of the application that I am noticing the memory increase is when its scanning the specified directory I get an error like th...more >>

How to save html page using C#
Posted by fmakopo NO[at]SPAM investec.co.za at 6/22/2006 8:29:48 AM
I am trying to save html page using C# because i want to save the page on the server not on the client side. I can do that using Javascript the problem that i am having i want to save the page on the server. ...more >>

FileIOPermission question
Posted by schaf at 6/22/2006 8:28:13 AM
Hi NG ! I have the following piece of code below. the first try/catch part would return true although I do not have permission to access this computer. The second try/catch part would return false. Do I misunderstand the meaning of FileIOPermission ? >From MSDN: "Controls the ability to access ...more >>

Countries ...
Posted by Jacek Jurkowski at 6/22/2006 8:22:24 AM
Does anybody knows the location of Countries list ready to paste to an application Combo Box items... ?...more >>

Need som quick advice
Posted by encoad NO[at]SPAM gmail.com at 6/22/2006 8:10:11 AM
Hi everyone, I'm new to C# and I am building website which allows users to fill out various forms. All is going well, however I'm having a bit of trouble with one particular issue. The main page enables users to enter information, and connect to other pages where they can enter additional ...more >>

Convert VB to C#, Operator "Or"
Posted by ano at 6/22/2006 7:31:01 AM
Hi, I have converted this VB code to C# but I got this error: "Operator '||' cannot be applied to operands of type 'int' and 'short'" Is VB allow to use Operator "Or" with 'int'? If yes, how to do this in c#? Thanks, VB: Private Const SERVICE_ALL_ACCESS = (STANDARD_RIGHTS_REQUIRED O...more >>

Response.Redirect
Posted by Dave at 6/22/2006 7:20:19 AM
Is there a way to do a Response.Redirect and do a popup on the redirect? ...more >>

Textbox resize problem
Posted by ramhog at 6/22/2006 6:57:22 AM
Hello all, I am trying to resize a textbox to exactly fit the contents. The method I am using gets it close but it is just a little bit too small. Could someone tell me where I am going wrong here please? /* SYSTEM GENERATED FOR THE TEXTBOX */ // // txt // this.txt.BorderStyle = System.Wi...more >>

usable of typeof
Posted by laurent.sass NO[at]SPAM gmail.com at 6/22/2006 6:23:38 AM
Hello, I have made this code in a class private static Type[] Etats = new Type[] { typeof(Transition1), typeof(Transition2), typeof(Transition3) } i with with an indice of a table, calling a static method. for helping me, all my transactions are inherited about an Transa...more >>

XML Serialization of a list of objects
Posted by Rob Banfield at 6/22/2006 6:07:48 AM
Hi all, I'm building an app which allows a user to create an ordered list containing sometimes many thousands of objects, each of which he chooses from a set of objects pre-defined within the app. The user can save his list, and internally the program will serialize public fields of the obj...more >>

Very peculiar problem with GetHostByAddress on W98
Posted by Dave at 6/22/2006 3:37:02 AM
I don't suppose anyone will be able to help with this, it's most odd. I use IPHostEntry hostInfo = GetHostByAddress(ipAddress) to resolve an IP address to a name (in this case it is actually the local computer, if that's relevant). The call is made on several occasions as the program runs, the...more >>

how to limit textbox to text only
Posted by Avi G at 6/22/2006 2:18:02 AM
Hi, what is the code to limit a textbox that will accept only text and not number private void button1_Click(object sender, EventArgs e) { if (textBox1.Text = "numbers") { // do something } } thanks...more >>

Convert FieldInfo to Dictionary<string, string>
Posted by Wilson at 6/22/2006 2:11:02 AM
Hi, How do get the Dictioanry object from FiedlInfo ? my code : fieldInfo = this.GetType().GetField("dictioanry1"); ??Dictionary<string, string> dicTemp1 = (Dictionary<string, string>)fieldInfo; Thanks Wilson ...more >>

Class/Form scope question
Posted by Kim at 6/22/2006 1:58:13 AM
Like http://groups.google.dk/group/microsoft.public.dotnet.languages.csharp/browse_thread/thread/1ac280aaeed78de0/ and http://groups.google.dk/group/microsoft.public.dotnet.languages.csharp/browse_thread/thread/f7fea4d944b12bf0/ am I trying to access something in a form in one class from another...more >>

Class instantiation from Type
Posted by tommasop NO[at]SPAM gmail.com at 6/22/2006 12:58:18 AM
I'm developing a custom server control that should take a datasource and its Type and from its Type instantiate internal objects to display data. MyServerComponent mySrv = new MyServerComponent(); mySrv.DataSource = My.NewsManager.GetObjects(); mySrv.ObjectType = typeof(News); Internally I...more >>

Strange behavior using TextWriter in release version
Posted by D at 6/22/2006 12:23:31 AM
I have a winforms app that I'm reading some records from a datareader and writing them out to a file like so SqlDataReader dataReader = sqlCommand.ExecuteReader(); TextWriter textWriter = new StreamWriter(strFileName); while(drReader.Read()) { strRecord = ////// strRecord building stuff...more >>


DevelopmentNow Blog