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# > may 2007 > threads for wednesday may 2

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

When worlds collide - a settings story
Posted by joshua NO[at]SPAM bee_eff_dubya_dee.co.uk at 5/2/2007 11:52:12 PM
Ok - so I havn't posted on here for a very long time. Hope everyone is ok and I'm glad to see this place still exists outside the MS web-news reader. Usenet for the win and all that. The problem I am having - and I'm pretty sure I'm going to get a bit of a laughing at - is that I have written...more >>

Getting info from excel.
Posted by Falcon at 5/2/2007 11:44:55 PM
I'm displaying an Excel spreadsheet using a data gird control in a winform using oleDB objects and so far Data is displaying correctly. I'm having difficulties getting cell style information for each cell in the xls file (Excel spreadsheet) . Does anyone have an idea how to pull that informa...more >>

New to C#
Posted by gsx NO[at]SPAM gsxnet.com at 5/2/2007 11:38:15 PM
Just asking for some advice. I am a VS C++ developer. I develope using the WIN32 API, and frankly I love developing with C++. I do not program for MFC, MFC is pretty lame. In fact I have always steered clear of any managed code programming. However, I started messing with windows forms/.net a...more >>

How to read the message of a system event log
Posted by SteveT at 5/2/2007 9:56:03 PM
Under Vista, my program, when reading the system event log, will not show the message saying I don't have the right permission. All I wisht to do is read the event log and show the error messages. Do I need to somehow use EventLogPermission? I can't find any examples of how to use it proper...more >>

HELP: Allowing a user to design the layout of form
Posted by ER at 5/2/2007 9:28:30 PM
Hi There I am looking for some pointers on the best way to allow a user to modify the layout and components of a form. They would be able to add buttons and change the position, color etc. Preferably some pointers for WPF. Thanks Evil R ...more >>

Group Radio Buttons Without GroupBox or Panel.
Posted by Sin Jeong-hun at 5/2/2007 8:11:48 PM
Suppose there are 4 radion buttons on the form. There's no groupbox or panel to seperate them. By default, the 4 radio buttons are mutually exclusive. Is it possible to group them into two groups? For example, Gender ( )rb1 ( )rb2 Marital status ( )rb3 ( )rb4 On HTML, I could group them de...more >>

nested class in lieu of private fields
Posted by bill tie at 5/2/2007 4:20:01 PM
I'm perusing a class that seems to utilize a nested class for private fields. In a nutshell, it looks as follows: public class Foo { public Property1 { get/set Bar.field1 } public Property2 { get/set Bar.field2 } public class Bar { public field1;...more >>

does my stream contain valid XML?
Posted by LJB at 5/2/2007 3:59:55 PM
If I read a text file from disk into a stream how can I tell if it might already be valid XML? I'm writing an app to compare two XML files one of which may need conversion to XML first. My app will do the conversion when necessary. I plan to call XMLdiffView, from http://msdn2.microsoft.com/...more >>



TextBox/ForLoop Help
Posted by Claude Grecea at 5/2/2007 3:58:15 PM
If anyone could help, I would greatly appreciated. I am using a "For Loop" and thru each complete iteration I would like it to stop and ask for user input, but I would not like to use a MessageBox. Instead, I would like to use a Textbox. Is there a way for me to accomplish this? Thanks in a...more >>

C++ Friendship in C#
Posted by Mike Gleason jr Couturier at 5/2/2007 3:37:10 PM
Hi, I would like class B to access private members of class A for optimisation reasons... To be specific. B instanciates A and should initializes A's members to some values. But the public interface of A shouldn't expose A's member variables. Is there a way to do this in C#? I've already...more >>

Difference between is and .GetType() == typeof(class)
Posted by iCeCLoW at 5/2/2007 3:20:56 PM
What is the difference between doing this: if (myClass is Class) { //Do something here } and this?: if (myClass.GetType() =3D=3D typeof(Class)) { //Do something here } Because in some cases the first expression evaluates to false but the second expression remains true. When ...more >>

How would you handle needed "System" class/table/form in application?
Posted by Ronald S. Cook at 5/2/2007 3:12:56 PM
I'm just curious how you would handle this. In the cable industry, Comcast is referred to as an "MSO" (multiple systems operator) meaning they own many cable systems. Therefore a solution must be architected to accommodate "System" as an entity. This means a table in the database named System,...more >>

How to retrieve a session value
Posted by Robert Dufour at 5/2/2007 2:53:08 PM
In vb I can retrieve a session variable in a web site as follows. Dim myvar as string MyVar = Session.Item("VarName").ToString But In C# there is no item property to use. How do you retrieve the value of a session item in C#? Thanks for any help Bob ...more >>

Strange Datareader error
Posted by Johnny Jörgensen at 5/2/2007 2:37:31 PM
I've got an error that I simply cannot locate: I've got a form in which I use a datareader object to read information from a db. After the read, I close the reader and I dispose of both the reader and the command object (but don't close the connection which is public in the solution). Th...more >>

Writing out to a .config file.
Posted by Mufasa at 5/2/2007 2:18:38 PM
I know in .Net 1.1 you can't write out to an app.config file but I thought you can in 2.0. Can somebody please post code that will show how to write to the config file? TIA - Jeff. ...more >>

ListBox SelectItem
Posted by Dom at 5/2/2007 1:55:53 PM
I populate a ListBox in the Form's Load event. I want to select a default item, but apparently, I can't do that in the Load Event. (I remember that was a problem in VB also). Where is the best place to do this? In general, what are the order of events in CSharp? In VB we had the I LOATHE ...more >>

Connection String Object
Posted by deciacco at 5/2/2007 1:50:40 PM
I want to create a ConnectionString class. I don't think there is one already in the framework, although there not being one seems strage too. Should I inherit from some other class or implement some interface, or simply make it a standalone object. Any ideas? Thanks! ...more >>

Alternate Row Color for entire grid
Posted by B. at 5/2/2007 1:12:20 PM
I am able to set the alternate row color using AlternatingRowsDefaultCellStyle. however, if my grid is not fully filled, the alternate row color will not apply for blank rows. How can I fill the blank rows with alternate color as well. Thanks. ...more >>

DataTable.Merge()
Posted by mj2736 NO[at]SPAM yahoo.com at 5/2/2007 12:46:00 PM
I'm a little confused about DataTable.Merge(). I have two DataTable objects with the same structure - dtOrig and dtCurrent. The end result I'm trying to achieve is to get all the rows in dtCurrent that are in some way different from the corresponding rows in dtOrig so those new/ modified/deleted...more >>

Regular expression - how to differentiate between > and >=
Posted by Peter at 5/2/2007 12:18:31 PM
Hi, I could not find a group dealing with just regular expressions. This groups seems to answer such questions. Hence I am posting it here. In my grammar, I need to differentiate between GT and GE. GE is defined as ">=" GT is defined as ">[^=]" The problem is, GT now picks up things su...more >>

Windows Firewall
Posted by chris.dannemiller NO[at]SPAM gmail.com at 5/2/2007 11:32:40 AM
I am looking to perform the following actions 1. Detect if the Windows Firewall exists, and is enabled, if it is not the case no action will be taken. 2. See if the application and ports are already Exceptions if so do nothing. 3. Post a message to the user that the...more >>

DateTime problem
Posted by SandpointGuy at 5/2/2007 9:59:03 AM
(.net 2.0) Why is it that a DateTime's intellisense shows "Now" as a property when not in a control structure, but if I declare a new instance within an if{} block it doesnt support "now"? Thanks, Mark DateTime x1 = DateTime.Now; // correctly appears if (true) { DateTime x2 = DateT...more >>

Texbox.Text from form A to Form B
Posted by freddy at 5/2/2007 9:48:11 AM
I am learning c# and I have a problem. I would like to enter a username in form A textbox and have it apper in form B testbox. I have something like this frmlaptopChk laptop = new frmlaptopChk(); txtusername.Text = laptop.txtUsername.Text (); and when i run it, I get inaccess...more >>

Windows Services + Remoting
Posted by Diogo Alves - Software Developer at 5/2/2007 9:35:12 AM
greetings, I've created a service that is being used as a server, basically i have 1 DLL, one service and one client. I'm using TcpChannel to talk to the server, so I call the functions directly from the client to the server. Now I have a long process that the server will deal when the ...more >>

HD-DVD key cracked.
Posted by lidettesfu NO[at]SPAM yahoo.com at 5/2/2007 9:04:47 AM
HD-DVD key has been cracked. Get the hex here: http://www.speedateauction.com/blog/blog_detail.asp?blog_id=1354&user_id=100915 I have never seen a hex so beautiful as this. ...more >>

registry
Posted by Desmond at 5/2/2007 8:45:42 AM
I know this is not .net related. I have searched with windows XP groups and they are forign all i want to know using windows XP is this ------ Ok so I don't know the registy. I am trying to add a key that has been created in notepad and saved as a .reg file. here it is [HKEY_LOCAL_MACHIN...more >>

Listview question
Posted by DBC User at 5/2/2007 7:10:31 AM
I have list view with 5 listview items and I want to show the first show to the user but user should not able to select the rows, it is should be already selected and checked, but user should not unselect it or uncheck it. Is it possible to do that with the listview? Thanks. ...more >>

debugging at class level ??
Posted by Chris Peeters at 5/2/2007 5:51:34 AM
hi, How can one set a conditional-breakpoint not linked to any particular statement in a method but rather at class level so to speak ? I'd like to break into debugging mode when e.g. the enabled-property of a button belonging to a form changes, but not in any particular method. thank you...more >>

Regulat expression question
Posted by mamin NO[at]SPAM o2.pl at 5/2/2007 5:39:25 AM
Hi, I have the following string: "Data source=(local);Initial catalog=GeomelioDaneEwidencyjne;User ID=aaa;Password=bbbbb;" I need to get values of User ID from it. (aaa), how can I do it using regular expressions? ...more >>

Create C# controls names at runtime
Posted by Matt at 5/2/2007 5:18:25 AM
Hi all, I'm trying to create a system where it reads a number of records from a database and then creates a row in the GUI that contains a single field from the database and a button that has a reference to the record. This way, once the task has been accomplished, the button can be pressed ...more >>

Getting .NET form to respond to Excel window events
Posted by sethnkendall NO[at]SPAM gmail.com at 5/2/2007 5:12:31 AM
Hi, I am writing a COM add-in for Excel using c#. Everything works fine, but I am trying to get the some finishing touches sorted out and one of them is bugging me and I cannot see anything written on the web trying to achieve this: My add-in displays a couple of windows forms and some of ...more >>

System.Net.WebClient DownloadString File Size Issue
Posted by Mike at 5/2/2007 3:06:13 AM
I am using PowerShell to download an XML file into a string using the DownloadString(URI) method of System.Net.WebClient object. Sample commands below: $Result = $Null; $WebClient = new-object System.Net.WebClient; $WebClient.Encoding = [System.Text.Encoding]::Default; $WebClient.Proxy = [Sy...more >>

Minimize without Maximize
Posted by David Jackson at 5/2/2007 12:00:00 AM
Hello, I have a WinForms app (VS.NET 2005 + SP1) where the FormBorderStyle of the main form is set to FixedDialog. I've added a NotifyIcon, so have set the form's MinimizeBox property to true; This enables the form's minimize button, obviously, and the NotifyIcon stuff is working. ...more >>

Binding control property to class property?
Posted by Johnny Jörgensen at 5/2/2007 12:00:00 AM
Can anybody help me with this problem, please: I've got a class public MyClass { private string m_TextValue = ""; public void SetValues() { m_TextValue = "Test"; } public string TextValue { get { return m_TextValue; } set {...more >>

convert an object to string and back (in a culture independent fashion)
Posted by Lloyd Dupont at 5/2/2007 12:00:00 AM
to store user preference in our application we have an 'hand written' XML file. (as opposed to XmlSerializer written one, which crash sometimes, on some user's computer, for some unknown reason.. but I'm digressing) In this XML file I store object value, which I convert to string (when writ...more >>

Managing sound in .NET
Posted by Nobody at 5/2/2007 12:00:00 AM
Hi all, It seems there's no way to record sound file with the 2.0 framework. Does anybody knows how to easily do it? Thanks in advance ...more >>

Q: Advice / Tip on inheritance.
Posted by Martin Arvidsson, Visual Systems AB at 5/2/2007 12:00:00 AM
Hi! I am going to create a common form for use on reporting. It may also be possible that i add functionality to the form that the report forms are inherited from, such as buttons, etc. I want this to become available in the inherited forms. Thats the easy part. But, are there any trap...more >>

default button gray color
Posted by Peted at 5/2/2007 12:00:00 AM
I have a winform in c#, with some default buttons. The default face color of these buttons is a nice shade of light grey, basicly the default button color you see on ms apps. I want the button to go color red when it is depressed and return to the nice grey shade it has when it is up i know...more >>


DevelopmentNow Blog