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# > april 2007 > threads for thursday april 26

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

DB Connection Class!
Posted by Adam Knight at 4/26/2007 10:33:34 PM
Hi all, I am wanting to create a re-useable class to manage db connections in an app. This is what i have so far: using System; using System.Data; using System.Data.SqlClient; using System.Configuration; public class DBUtil { public DBUtil() { } public s...more >>


Finding what caused TextBox.Text to change?
Posted by Matt B at 4/26/2007 9:19:44 PM
This seems like it has probably been covered many times before, but I'm having a hard time finding any discussion about it (probably just searching the wrong terms). Is there a way to capture whether the Text of a TextBox has been changed by code or the user. I don't care if the Text is chang...more >>

stringOperand + null = ?
Posted by Mark Chambers at 4/26/2007 7:55:55 PM
Hi there, In the expression A + B where A is a string and B isn't, I know that "B.ToString()" will be called and the results concatenated. If B is null however does the standard guarantee that "String.Empty" will be used instead. Thanks. ...more >>

NullReference Exception inside remoting
Posted by Dan Holmes at 4/26/2007 4:28:02 PM
I traced this all the to the domain boundary. I also but a breakpoint in the server. That was never hit. It happens after it leaves the client but before it calls into the "add" method in the server. I don't know how to debug this any further. exact error message and code follows thi...more >>

Editing code while debugger is running.
Posted by Zytan at 4/26/2007 4:11:09 PM
I cannot stand being unable to change the code while the debugger is running. Is there a way to do this? thanks, Zytan ...more >>

Set Startup Parameters for a C# App
Posted by E G at 4/26/2007 3:49:21 PM
Hi, I'm developing a C# app that monitors the data feed for a single stock. I want to start multiple instances of app dynamically passing the stock symbols to instances as they start up. Any ideas on how I can do this? Thanks in advance, EG *** Sent via Developersdex http://www.devel...more >>

Threads, InvokeRequired & Form Controls
Posted by Bill McCormick at 4/26/2007 3:29:44 PM
Hello, A timer control (I think) runs in another thread apart from a main form. In the OnTick event, you can update some form control with no worries. I'm making an AsyncronousServer class that runs in a separate thread and I'd like to have server generated events (OnListen, OnConnect, O...more >>

VS2005 sp1 IDE bug ?
Posted by Sagaert Johan at 4/26/2007 3:16:30 PM
Hi I have a problem in the form designer , when i SINGLE click a control in the forms designer the IDE sometimes generates code for the default event. I recently updated to sp1 and i think this is the reason Any suggestions ? ...more >>



Get the control that fired the context menu
Posted by Robert Mago at 4/26/2007 3:15:47 PM
I have a scenario where a user can click on a textbox, a context menu is displayed and he can select a particular text from the list. Then, that text will be appended to the textbox. Thus i have several textboxes, that share the same context menu since the text is common, and all the items ...more >>

Simultaneous Sounds
Posted by rlrcstr NO[at]SPAM newsgroups.nospam at 4/26/2007 2:59:58 PM
I'm using the .Net 2.0 SoundPlayer class for the sound effects in my = app. But it doesn't seem to allow simultaneous sounds... I'm even = executing the instantiation and play on a separate thread. But sound = two never gets played. Anyone have much experience with this? Thanks. J...more >>

Delegates list
Posted by Lubomir at 4/26/2007 2:58:01 PM
Hi, I have method that should according an input argument (a collection) call the appropriate callback delegate. I am using a list, where I store a struct with fields: delegate, input argument. To invoke a proper delegate I have to go through this dictionary, compare input argument an...more >>

Constructing ValueTypes via Reflection
Posted by dmcdougald NO[at]SPAM openspan.com at 4/26/2007 2:53:01 PM
I have scenario where I need to create an object of an unknown type. Reference types work fine. I call Type.GetConstructors(), let the user pick a ConstructorInfo and then call ConstructorInfo.Invoke(). However, for the value types I have tested (like Int32) GetConstructors doesn't return any...more >>

Flatten two tables in DataGridView?
Posted by Burt at 4/26/2007 2:45:35 PM
I have a db with two tables, Parent and Child. A Parent will always have 1 or 2 children: Child1, Child2, or both children. I'm writing a C# windows app over these tables. The user, in a datagridview, will be able to view, update, etc. the data. Problem is, I have to flatten the two tables int...more >>

Connecting to events via Reflection
Posted by dmcdougald NO[at]SPAM openspan.com at 4/26/2007 2:43:20 PM
I posted a month or so ago and never got a response. So I'm trying again. I just moved over to C#2. In 1.1 I implemented a generic event handler strategy by emitting a handler of the correct signature type. However, with Covariance/Contravariance in C#2 I hoped to clean things up. Since...more >>

Dns.GetHostByAddress works. Dns.GetHostEntry fails. why?
Posted by Steve Richter at 4/26/2007 2:33:03 PM
I am using Dns.GetHostByAddress and Dns.Resolve to successfully resolve and IP address to an IPEndPoint. IPEndPoint ep = null; IPAddress ipAddr = IPAddress.Parse(m_sRemoteHost); ep = new IPEndPoint(Dns.GetHostByAddress(ipAddr).AddressList[0], m_iRemotePort); // ep = n...more >>

are attributes inherited
Posted by Dan Holmes at 4/26/2007 2:15:14 PM
Say i have: [Serializable] public class A { } public class B : A { } does B need the serializable attribute as well? dan...more >>

Inheritance question
Posted by RSH at 4/26/2007 2:04:15 PM
Hi, I am working on some general OOP constructs and I was wondering if I could get some guidance. I have an instance where I have a Base Abstract Class, and 4 Derived classes. I now need to make a list class that will store the objects. My question is how do I go about creating the lis...more >>

Disable items from an inherited class?
Posted by Steven Garrad at 4/26/2007 1:49:45 PM
Hi All I have a custom class that is derived from the PictureBox class. One of the properties from the PictureBox class is "SizeMode" and in my custom class I want to disable the user from being able to modify this. How can I remove this property from my class? Thanks, Steve ...more >>

C# Project reference .lib files
Posted by sean.j.gage NO[at]SPAM gmail.com at 4/26/2007 1:25:03 PM
Is it possible to reference .lib files in a C# project? Or is there process that can make a .lib file accessible from a C# project? Cheers! ...more >>

TryParse Throwing An Exception Using ClickOnce
Posted by nautonnier at 4/26/2007 1:21:45 PM
Hello All, I'm validating a textbox to make sure it contains only a whole number so I'm using Int32.TryParse. It works fine when I test it on a local winform app. However, when I transfer the code to my project that's using ClickOnce, it throws an error. Here's the code that's identical in ...more >>

Converting VB.NET to C#.NET
Posted by zacks NO[at]SPAM construction-imaging.com at 4/26/2007 1:18:47 PM
I am converting a VB.NET application to C#.NET and I have ran into a situation that I cannot so far find an answer to. Retrieving data with an ODBCDataReader, I could issue a rdr.Read method call and then refernce the columns with the rdr("columnname") function. Seems that C# does not allow acce...more >>

Any ACL experts?
Posted by andrewbb NO[at]SPAM gmail.com at 4/26/2007 1:10:32 PM
Fairly new to ACLs and I'm not understanding a behavior. I am moving a folder, modifying its ACL, and then eventually moving it back to its original location. And I can't seem to get the ACL back to the original. Original: Root folder has explicit full rights ACE for a user account. All s...more >>

Need help - Console.WriteLine(rdr[0]);
Posted by Learner at 4/26/2007 10:55:36 AM
Hello, I am using Visual Studion.net 2003 to run and test a small program that supposed to be tested in a word document. I got the connection and using a data reader to read the data. It executes fine but I don't see the results in command prompt beacuase I use VS.net 2003 to run the program...more >>

Need help - Console.WriteLine(rdr[0]);
Posted by Learner at 4/26/2007 10:46:24 AM
Hello, I am using Visual Studion.net 2003 to run and test a small program that supposed to be tested in a word document. I got the connection and using a data reader to read the data. It executes fine but I don't see the results in command prompt beacuase I use VS.net 2003 to run the program...more >>

Class Library & Localization
Posted by Michael Morse at 4/26/2007 10:40:01 AM
Hi Everyone, I've been tasked with building a messaging service for a custom app that supports localization. Within the app itself people will be able to specify the languge of their choice and therefore can switch at run time. However, the UI layer will send the locale of choice to my c...more >>

Settings.settings and custom types
Posted by Rob L at 4/26/2007 10:38:01 AM
I am trying to use a custom type inside settings.settings. When I create my class, I am able to add it in as the type and the value ends up showing as XML data. If I change any of the values in my class, the values do not update the settings file. Can anyone provide any insight and/or sampl...more >>

Geting meta data from Web Service
Posted by Dylan at 4/26/2007 10:07:02 AM
Hello, I was trying to do a WCF tutorial (http://wcf.netfx3.com/content/ BuildingHelloWorld.aspx). I need to get the meta data from my service usin svcutil.exe why is not working? Please see below: E:\Program Files\Microsoft SDKs\Windows\v6.0\Bin>svcutil http://localhost/hello?wsdl Micr...more >>

Form Reference
Posted by Mike J at 4/26/2007 10:00:22 AM
Hi I have a Form with textbox controls on it and a run button The Run button Starts a Class that does some work against our Sql Database In a Loop During this time i want to update the windows form for current status of this Object running Iam havein problems referencing back to the form i...more >>

Repainting a DataGridView for CellFormatting events
Posted by michael sorens at 4/26/2007 9:42:01 AM
I have an event handler on the CellFormatting event of a DataGridView. This event handler highlights cells that are below a certain threshold. This threshold value may change based on user actions. Once changed, any new cells that scroll into view will use the new threshold value, but how coul...more >>

MDI document indexing
Posted by Syd Kahn at 4/26/2007 9:40:48 AM
I have a simple need. scan bills into the computer, ocr them, use c# to build some simple screen that would allow copy/paste from the ocr into author, and a few keywords. this would be updated into the file on the hard drive (in the summary tab on the file>properties) why am i not findi...more >>

Another P Invoke Question
Posted by ba.hons at 4/26/2007 9:33:11 AM
Hello, I have another method in a DLL which i am trying to use and i keep getting null reference exception can anyone shed any light on this. int GetConnectedControllers(char * controllers , int controllersSize) which should return buffer of chars which indicates readers connected. which ...more >>

how to make a new data connection to naothor .ent data profider
Posted by GS at 4/26/2007 9:31:23 AM
In the Data explorer, how can I add another .net data provider?. I know the path and the dlls? I already tried adding the reference in the project solution ...more >>

Executing string from C#
Posted by ronaldgranados NO[at]SPAM gmail.com at 4/26/2007 9:17:24 AM
Hi, I developed an application that generates code to be dinamically execute with reflection. When I used reflection everything seems to work fine until I saw a handle and memory leak. Researching in the web I found several news that explaine memory leaks and handle leaks with reflection. N...more >>

Simple question on constructor
Posted by DBC User at 4/26/2007 9:11:52 AM
I have 2 constructors in my class, first one with no paramter and the second one is with a paramter. I want the later constructor to use the first constructor and do some more with the parameter. How can I do this? eg: public const() { //do base work } public const(string data) { ...more >>

Way too many Stored Procedure Parameters
Posted by Sam Shrefler at 4/26/2007 8:26:46 AM
I have a database table that contains approx 150 columns per row. I need to update all 150 columns at once. To create a stored procedure will cause me to have to create 150 sqlParameters....Rows will only be updated one at a time. Does anyone else have any thoughts on the best way to handle t...more >>

DataView RowFilter: using distinct
Posted by randy1200 at 4/26/2007 7:44:04 AM
I have the following line of code (.NET 2.0): myDataView.RowFilter = "SELECT DISTINCT CYCLE_DATE"; where CYCLE_DATE is one of my column names. This throws the following exception: Syntax error: Missing operand after 'DISTINCT' operator. Any suggestions on what this is really trying to ...more >>

P Invoke Question
Posted by ba.hons at 4/26/2007 6:29:34 AM
Hello, I have started to use an old WIN32 API to develop an application and am having trouble executing one of the DLL's methods. int ContactController(char *ipHostName, int port) I have my code as follows: [DllImport("MYDLL.dll", SetLastError = true, CharSet = CharSet.Auto)] stat...more >>

Object reference error on EnumChildWindows
Posted by prithvis.mohanty NO[at]SPAM gmail.com at 4/26/2007 6:29:08 AM
using System; using System.Drawing; using System.ComponentModel; using System.Windows.Forms; using System.Runtime.InteropServices; using System.Text; using System.Collections; using System.Diagnostics; public delegate bool IECallBack(int hwnd, int lParam); public delegate bool IEChildCall...more >>

10 steps to an easy web site mock-up
Posted by stormogulen at 4/26/2007 4:04:23 AM
Hi, I'm presented with the task of making a quick mockup of an entire ecommerce site (with user administration, shopping basket and whatnot). I've previously been involved in developing a number of sites of the same size, and have gotten used to a certain way of doing things, ie. a number ...more >>

Context Menu for a Notify Icon won't Owner Draw
Posted by liubin at 4/26/2007 3:08:57 AM
I'm trying to create a context menu that pops up upon right clicking the notify icon of my application. The menu works great with plain text... no problem. My problem is that I want to add some sparkle by displaying a different highlighting scheme for the individual mouse over events and ...more >>

how to transfer element from datagridview to treeview?
Posted by dotnetnari at 4/26/2007 2:44:04 AM
hi, how to drag and drop element from datagridview to treeview? \ Thks.... ...more >>

Web Service
Posted by Adarsh at 4/26/2007 2:34:01 AM
Thanks Shiva you helped me to solve that problem.But i have one more problem Now I am able to create the web service successfully, I have a doubt after creating the web service, need we to debug it? After creating the web service I created the C# windows application, and Added my the web servi...more >>

Oddity with 'protected internal' and derivation
Posted by Clive Dixon at 4/26/2007 12:00:00 AM
I am refactoring some code to move some base classes into a separate assembly. One of these base classes has a member property which is 'protected internal'. However when I move these base classes to another assembly, the compiler complains that the override in the derived class, also declar...more >>

Getting a users default printer
Posted by Glenn at 4/26/2007 12:00:00 AM
Hi We have a ASP.net app which calls into a web service which allow users to print stuff. At the moment they have to specify the printer. Apparently this is too much for our users, so I was wondering if there's a way of getting the default printer from their user profile? TIA Glenn...more >>

Strong Name
Posted by Michael Voss at 4/26/2007 12:00:00 AM
Hello! I have to sign my assembly (WinForms C# 1.1) with a string name. Unfortulately, I'm forced to reference another assembly (no COMInterop Wrapper) not being signed with a strong name. This results in an compiler error preventing my assembly from being build. I cannot influence anything o...more >>

Problem with timers
Posted by Ole at 4/26/2007 12:00:00 AM
Hi, Is it possible to change a threading timers delay and interval from another threading timers callback routine? Thanks Ole ...more >>

Problem sending message with attachment >100kb
Posted by Gregor at 4/26/2007 12:00:00 AM
Hi, I got a service (written in C#) that sends out messages to a third party system. The messages contain encoded attachments. Everything works fine as long as the messages are small (say < 100kb). When I try to send message >100kb I get an expception stating: "The underlying connection w...more >>

Sending message to another window
Posted by Jeff Williams at 4/26/2007 12:00:00 AM
I have an application using dial monitors which is used in an aution room. The auctioneer has a form showing details of the current lot number. As he changes to the next lot number I need to send a message to a form on the other monitor to change to picture to this new lot. Shat is the be...more >>


DevelopmentNow Blog