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

Fax server "Access denied" problem
Posted by Burak SARICA at 3/23/2006 11:22:08 PM
I am searching for a way to solve this problem (the below post) too. Anyone may help? I get the same error, at the Connect() line. Even i've added the ASPNET account to the fax's security tab. (in the printers and faxes control panel page.) Burak SARICA ma81x yazmýþ: > I'm trying to s...more >>


How to programmatically invoke Click event of the Button ?
Posted by Oleg Subachev at 3/23/2006 9:07:41 PM
I need to programmatically invoke from other class Click event of the Button on my Form. Button.OnClick method is protected, not public. How to perform this ? Oleg Subachev ...more >>

UML modeling engine
Posted by odwrotnie at 3/23/2006 8:05:35 PM
I have to write interface for creating UML diagrams in C#. Are there any components that can help me with drawing, mowing, resizing this boxes? Have you got any other ideas that can help me? Thank you for any help. -- Best regards, Odwrotnie....more >>

SqlCommand + T-SQL Statements
Posted by christof at 3/23/2006 7:52:19 PM
I'm trying to run this T-SQL code using SqlCommand: USE master; ALTER DATABASE AdventureWorks SET SINGLE_USER; GO I did it like that: public static int ObtainExclusiveAccess(Server srv, string database) { string cmd = @"USE master; "; cmd += "ALTER DATABASE " + ...more >>

C# SMTP mail problem
Posted by danyadler NO[at]SPAM yahoo.com at 3/23/2006 5:58:31 PM
Hi everyone, I've found this code that can send SMTP commands via sockets (25). The problem is when I send the command: "rcpt to:whatever@yahoo.com", I get a server response: "503 This mail server requires authentication ....". Is there a way to create this authentication, to make this happen...more >>

Smo + remote Backup fails...
Posted by christof at 3/23/2006 3:54:06 PM
Hello, I'm trying to do a backup by connecting to remote instance, code looks like that: using Microsoft.SqlServer.Management.Smo; using Microsoft.SqlServer.Management.Common; using System.Data.SqlClient; string connString = "Server=172.17.0.193\\SQLEXPRESS,15555; User ID=sa;Password=p...more >>

Confused by namespaces
Posted by Dylan Parry at 3/23/2006 3:22:45 PM
Hi, I've started to get a bit confused by namespaces and hierarchical organisation in general. What I want to do is something like this: Namespace MyNamespace | |- Class Foo | |- Namespace MyNamespace.Foo | | | |- Class Example | | | ...more >>

Stopping execution until an async event fires
Posted by Matthew Brown at 3/23/2006 3:15:30 PM
Hi, I am working with a COM library in which modifying almost every object is done asynchronously (because the object represent physical devices across a network somewhere on a telephone switch). Code to modify an object, such as someObject.AddProperty("blah"); will execute immediately but fi...more >>



Mapping problem with ADO.NET
Posted by none NO[at]SPAM no.com at 3/23/2006 3:03:06 PM
Hi, I'm trying to establish table mappings, and I've hit a snag. At the point to where I try to fill the schema (DB_adapter.FillSchema), I get an exception, and the message is as follows: :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: Invalid column name 'Unique_ref'. I...more >>

Cannot Add SQL Server 2005 Mobile to Pocket PC Project.
Posted by Dan Bass at 3/23/2006 2:59:46 PM
-- Installed -- Visual Studio 2005 (.Net 2.0) Sql Server 2005 Express Sql Server 2005 Mobile SDK I'm trying to add a "SQL Mobile Database" component to my Smart Device project through Visual Studio 2005. On one machine this works no problem (my laptop), but on my development machine I...more >>

Properties window - accessing collections
Posted by Steve Barnett at 3/23/2006 2:40:48 PM
I have created a user control that includes the following field: [Browsable(true)] protected TreeColumn[] columns = new TreeColumn[3]; This is accessed via an accessor as follows: pubilc TreeColumn[] Columns { get { return columns; } ...more >>

One More Question
Posted by Chuck Cobb at 3/23/2006 2:02:16 PM
Here's one more question on this topic: I am developing a CRM system using business objects...I have used the = approach we previously discussed to develop lists of business objects = for the application and it works great! For example, - Class ClientInfo defines a business object for...more >>

Visual Inheritance - How to make public inherited properties private or readonly?
Posted by Michael.Suarez NO[at]SPAM gmail.com at 3/23/2006 1:36:19 PM
Let's say I create a custom component that inherits from TextBox. Then I set the color of the textbox. Now I want it so that anyone who uses this component can not change the color. How do i make it so that the BackColor property is no longer able to be set (either at runtime or design time) for...more >>

New Thread - Pre Screening Questions for a C# developer
Posted by M.Siler at 3/23/2006 1:03:11 PM
Let me clarify from my last post. I am not using these 4 questions as the sole screening method. Currently in, the Tampa Bay area (Florida) there is an extreme shortage of C# developers. We have utilized just about every method known to man to find candidates, including employment firms (which...more >>

Session Var Question
Posted by Frank at 3/23/2006 1:01:11 PM
I am developing with VS.NET 2003 on the ASP.NET 1.1 platform. I don't know how to get around this 'Object reference not set to an instance of an object' error. How should I check to see if a session variable exists? Shouldn't just erifying that the variable does not equal null do the job? ...more >>

Q: property problem (enum)
Posted by dllhell at 3/23/2006 12:55:49 PM
hi all, I want to create a property in class (datatype=enum). In one other class I have declaration of enum: public enum enumCrep { cRep1 = 1, cRep2 = 2, } now, I want to create a property: public enumCrep ecRep { get { return this.ecRep;} set {this.ecRep = valu...more >>

@SomeFunction() ???????
Posted by TheMadHatter at 3/23/2006 12:49:34 PM
Yello, Quick Q: I used a converter to convert vb code to C# (and not very well I might add.) One of the things it did is an @ symbol to a few of the functions. I know what it means when you do it to a string, but what about a function? eg: _numberOfRecords = @BitConverter.ToInt32(foxArray,...more >>

Having Assembly entrypoint in DLL library
Posted by Shawnk at 3/23/2006 12:49:24 PM
I use two classes to manage the Main() command line (and alot of other stuff) for my prototyping environment. I tryed putting the MainClass in a DLL and just having the other class (which gets modified on a per project basis) as the 'program.cs' file (the only *.cs file). I keep getting ...more >>

getting a mac address
Posted by Dan at 3/23/2006 11:51:47 AM
Hi Does anyone know how to get the Mac address of a remote PC, using C#? I believe it's possible by deconstructing the packet received from a ping but I don't know how to do it. TIA Dan...more >>

Escape Character \e does not work
Posted by pkaeowic at 3/23/2006 10:36:44 AM
I am having a problem with the "escape" character \e. This code is in my Windows form KeyPress event. The compiler gives me "unrecognized escape sequence" even though this is documented in MSDN. Any idea if this is a bug? if (e.KeyChar == '\e') { this.Close(); }...more >>

Stopping the update of a text box while maipulatin it.
Posted by UJ at 3/23/2006 10:32:45 AM
I've got a text box that I'm going to be doing some manipulation on (selecting text, moving stuff around, that kind of thing) but I don't want/need the user to see it while it's going on. I'd like to leave the box up while I'm doing the manipulation but turn off the updating of the text box ...more >>

Pre Screening Questions for a C# developer
Posted by M.Siler at 3/23/2006 10:13:48 AM
I'm using a few employment firms to assist us in locating a few WinForms ..NET 2.0 C# developers. They are sending us everyone that claims they can program C# so my thought was to provide the firms with 4 questions that if the candidate does not score 100% then don't submit them to us. I want ...more >>

is partial property implementation possible?
Posted by Ben Voigt at 3/23/2006 9:55:09 AM
The C# Language Specification says: A virtual property declaration specifies that the accessors of the property are virtual. The virtual modifier applies to both accessors of a read-write property - it is not possible for only one accessor of a read-write property to be virtual. An abstr...more >>

Enums vs dictionaries
Posted by hardieca NO[at]SPAM hotmail.com at 3/23/2006 8:20:27 AM
Hi, I'm starting out with C#, and I'm wondering if someone could tell me what is the difference between Enums and dictionaries... My book doesn't even make reference to dictionaries, but while programming in other languages, I used dictionaries quite often. Should I move to Enums? Thanks,...more >>

List<T> Question
Posted by Sean at 3/23/2006 7:46:35 AM
I have been using List(of String) when I could easily be using a string array instead. Is it still considered best practice to use Generic list of string rather then a string array? Thanks...more >>

Simple printing app
Posted by mitch NO[at]SPAM bmtmis.demon.co.uk at 3/23/2006 7:34:10 AM
Hi, Could anyone help with the following. I have a windows form. On it I have a function (DrawCross) to draw a cross throught the centre of the form from corner to corner. The function which draws the cross takes as input a graphics object, a width and a height. So on paint I call the funct...more >>

Accessing Arraylists
Posted by Dogmar Hoffman at 3/23/2006 6:21:40 AM
Hello, ArrayList arrTestArrayList = TestArrayList.LoadTestRecords(ConnectionString,StartDate,EndDate); and it is in the same public class and namespace that I am trying to access it from. Basically, I am looking for a way to test against the value at position 6 in that arraylist like: I...more >>

Convert String in file
Posted by Ursula at 3/23/2006 6:11:30 AM
Is it possible to convert a string in a file. The problem is this: I have an object string that is a file xml and I want to pass to Deserialize function, but Deserialize function expect an object of FileStream type and the mode access. There is a function Convert.ChangeType(object value, Type...more >>

change object reference
Posted by felipecsl at 3/23/2006 5:48:46 AM
Does anyone know if there is a way to change the way the reference that is returned from an object? I need to return an object member when someone tries to retrieve "this". e.g.: //Suppose we have the object FooBar... class Foobar{ private string m_someStuff; private FooBar m_anotherI...more >>

c# code > visio diagram
Posted by Rudi at 3/23/2006 5:46:22 AM
Hi Guys and gals, I want to generate a code diagram from a c# application, but when i do the reverse engineer thing it just creates the classes from the current projec ready for you to create your own diagram, what i want it to do is to actually draw the diagram.... anyone know how??? TI...more >>

Permutations
Posted by Jose at 3/23/2006 4:20:02 AM
Hi all, I have a select list that can contain between 1 and N items. I would like to get all possible permutations of the list, i.e. combinations that a user might select. So for example if my list has the following options: Red, Yellow, Blue I would like to get the following list: Red Yel...more >>

Drawing on a panel
Posted by Chris S. at 3/23/2006 4:06:24 AM
Here's a starter for 10 - I have the following simple code: private void panel1_Paint(object sender, PaintEventArgs e) { e.Graphics.DrawRectangle(new Pen(Color.Blue), this.panel1.ClientRectangle); } Where a panel is on a form. I've always had to alter the 'rect' variable as it doesn't dr...more >>

Datagridview loading rows
Posted by Luca Beretta at 3/23/2006 3:31:27 AM
I think this a simple question but i'm breaking my brain without results. I've a datagridview bounded to a datatable, with an imagecolumn that should contain a different bitmap depending from a field in the bounded datatable. my problem is to find an event raised for each rows loaded in the ...more >>

instance control
Posted by murali NO[at]SPAM pune at 3/23/2006 3:22:33 AM
hi, I want to create a class in C# that will only have 'n' instances at any given time. If (n+1)th instance is requested, an Exception will be thrown. These instances must be maintained in a collection in the class. Note that once an instance is acquired, it can be released as well. th...more >>

aspx display romanian diacritics
Posted by george.miscalencu NO[at]SPAM gmail.com at 3/23/2006 3:19:32 AM
I'm trying to display a text from a database, text that contains Romanian diacritics (a=EEst) in a aspx page. The text has been inserted in the database using a asp application with a HTML editor with this setting: content-type=3D"text/html; charset=3Diso-8859-2" I have failed to do this. I've...more >>

NumberFormatInfo Help required
Posted by Billy at 3/23/2006 2:11:10 AM
Why do I still have to provide a 'String Format' when I have created a NumberFormatInfo object (nfi) that should display what I need. For example I have created a default NumberFormatInfo now when I use this to retrieve a decimal value in the format of '#0.00', i.e. 'string str = row.amount.Val...more >>

Multithread
Posted by amberti at 3/23/2006 1:56:09 AM
I'm trying to write a multithread application: it will get different kind of data from DB, my intention was to create different thread for each query. I tryed to use the AsyncHelper.FireAndForget method u can easily find on this goup but i wasn't lucky: I was able to crate threads but not to ...more >>

FTP using Active Mode
Posted by Jay at 3/23/2006 12:47:22 AM
Hi, I have a problem in connecting to FTP Server in Passive Mode. Actually server is behind firewall. Now can anybody tell me how to connect Server in Active Mode. Actually i want code in c# which connects FTP Server in active mode. Regards, Jay R Mehta ...more >>

Why my C# App use no more 25% of the total 4 CPUs' resources?
Posted by WangJiping NO[at]SPAM gmail.com at 3/23/2006 12:10:30 AM
is there any setting options ? ...more >>

Why use stored procedure in C#?
Posted by Jason Huang at 3/23/2006 12:00:00 AM
Hi, In my C# Windows Form application project, I have done all queries on my codes. Now I wanna try using the Stored Procedure. But I am not clear about why using the stored procedure. Would some one give me some advice? Thanks for help. Jason ...more >>

How to get calling object type in static method of Base Class
Posted by Mirek Endys at 3/23/2006 12:00:00 AM
Hello all, another problem im solving right now. I badly need to get typeof object that called static method in base classe. I did it by parameter in method Load, but i thing there should be way, how to get this information in called method. Thanks. public abstract class BaseClass { ...more >>

Context Switch Deadlock Was Detected
Posted by Ian Semmel at 3/23/2006 12:00:00 AM
I am doing a length operation reading access database and creating a sql database when I get this message. What am I supposed to do to get around it ? Thanks...more >>

Is there such C# tool ?
Posted by Oleg Subachev at 3/23/2006 12:00:00 AM
I have .cs source file with a bunch of public and internal members (classes, methods, enums ...) in it. I want to extract declarations of public members into separate file so that I can distribute this file among users as documentation. Is there such tool to extract public members form .cs sou...more >>

C# web form tutorial
Posted by Jason Huang at 3/23/2006 12:00:00 AM
Hi, I'm new to the C# web form application. Would someone give me some links regarding to the step by step or tutorials? Thanks for help. Jason ...more >>

File Encryption
Posted by Bob at 3/23/2006 12:00:00 AM
Hi, Need to protect a file which is written to a CD, the CD is then read on another machine. My App will be present on both machines and will be doing the Writing / Reading. The level of protection required is modest. We just want to make sure that the recipient of the file cannot open it exce...more >>

I get some warnings that I don't understand when building the exe file
Posted by tony at 3/23/2006 12:00:00 AM
Hello!! I use VS 2003 and C# for all class library except MeltPracCommon.dll which is C++.NET The problem is that I get these warnings when building the exe file and use my class libraries. See below for a detail description. Preparing resources... Updating references... Warning: The d...more >>

Best practice for embedding forms
Posted by Baliga, Narasimha at 3/23/2006 12:00:00 AM
Hi, I am trying to write an app which will have say a MainForm that has a TreeView and a Panel control on it. The project also has 2 other forms. Now the TreeView would have 2 nodes and on each node click one of the 2 forms will be created (if not created before) and is shown emb...more >>

URGENTCusom dialog boxes
Posted by Mustafa Rabie at 3/23/2006 12:00:00 AM
Dear All, I am writing an app that does some syncronization with a mobile device. I use the System.Threading.Thread.Sleep(15000); to sleep the main app thread for 15 sec till the sync is finished. I want to show a form "Please Wait... while syncronizing" and when it's done i close tha...more >>

How to retrieve valuèes from web.config for an assembly called by COM+
Posted by WT at 3/23/2006 12:00:00 AM
HI, I am using a system where I can write .NET 1.1 libraries assemblies that are called as extensions by a COM+ application. My question could I read values stored in an app.config file, which name to use and where to put this config file. Thanks for help. CS ...more >>

Bizarre Behaviour Console versus GUI App wrt ActiveX interop
Posted by Kevin Frey at 3/23/2006 12:00:00 AM
We have an ActiveX control that we added as a reference to a *Console* C# testbed. The testbed functions, except that: a. On VS 2003, performance is fine, but on VS 2005, performance is reduced approximately 50-fold. b. There is a huge memory leak. When the "essence" of application is c...more >>


DevelopmentNow Blog