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# > march 2005 > threads for thursday march 24

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

picturebox image property
Posted by Jeff at 3/24/2005 11:58:22 PM
I've seen a couple of posts on the Internet with others having this problem, however, no one seems to have a good answer. I am working on a C# Smart Device application and have been able to browse for a PictureBox image and insert in the Visual Studio .NET 2003 PictureBox1 properties pane. No...more >>


DataGrid Width
Posted by web1110 at 3/24/2005 11:02:22 PM
Hi y'all, I have resized the columns in a DataGrid and I want to set the width of the DataGrid to fit the columns. Just summing the column widths is too short due to the grid and gray row selection column on the left. I have the widths of the columns. What other values do I need to include...more >>

Starting a C# app without a form
Posted by Paul BJ at 3/24/2005 10:43:00 PM
I have developed a mini-app that does some routine maintenance tasks on my Outlook 2003 files. For the dev process, I ran a form with just a GO button on it but now that the app is ready for testing, I want to run it without any user interface. Up until now, I have started it with: ...more >>

How can i convert to c#? (typedef void (*SWFByteOutputMethod) (byte b, void *data);)
Posted by dolzzi NO[at]SPAM esql.co.kr at 3/24/2005 8:45:54 PM
Now, i'm converting some c source to c#. Then I can't convert the following statement? Help me... typedef void (*SWFByteOutputMethod) (byte b, void *data); Following is usage of it... void writeSWFFontToMethod(SWFBlock block, SWFByteOutputMethod method, void *data)...more >>

Debugger and watch issue with strings and own defined type
Posted by Girish at 3/24/2005 8:09:54 PM
Ok, starting from the basics. Reference types and value types are all objects underneath. So, a String is an object as well. Now, when when we are debugging and we examine the contents of a String object - the debugger actually shows the value of containing string object when you keep a ...more >>

Composite Control font problem!
Posted by pnp at 3/24/2005 7:41:48 PM
I have created a coposite user control of a text box and a label. I have exposed the font of the textbox property through a property of the control but every time I try to change that through the property grid of the designer when I use the composite control in a form, after a rebuild the ch...more >>

Implicit conversion design issues
Posted by Girish at 3/24/2005 7:32:15 PM
Im trying to understand implicit type conversions from object -> string and vice versa. I have two classes, one Driver and one called StringWrapper. These are just test classes that try and emulate the pattern im trying to follow in an existing project. These are my steps: 1) I have a m...more >>

refresh()
Posted by David Sobey at 3/24/2005 7:26:56 PM
i'm calling refresh() on a custom UserControl, but for some reason other functions get processed before OnPaint. Any ideas why? cheers dave ...more >>



DataRow class derivation
Posted by André Fereau at 3/24/2005 6:47:10 PM
Hi, I wish to use a class derivated from DataRow. The rows within a table are created with the NewRow method of the DataTable class. So I writed a method NewSTMTTRNRow() in my class STMTTRNDataTable, but I have an Invalid Cast Exception in the code "return ((STMTTRNRow)(this.NewRow()));". ...more >>

Windows Forms
Posted by L at 3/24/2005 6:40:54 PM
Hi, I am writing an ftp program and I provide a form interface (say Form1) to display the status to the window. This form1 reads an ini file, which has all the settings needed to do the ftp (Ex: IP address, username, etc) and starts doing the ftp displaying corresponding messages to window...more >>

Invoking Method using Reflection
Posted by Beenish Sahar Khan at 3/24/2005 6:19:44 PM
I'm using reflection to invoke some methods, now the general patteren of the function defination is private void FunctionName( argument1 , argument2) for some functions i don't need the argument2 but for some i do...is there any way using reflection to invoke the method but omit the last ar...more >>

Changing a default property's value
Posted by cashdeskmac at 3/24/2005 4:47:02 PM
I have a string which has been assigned the value of "OneTwoThree". I have created a property because I want to be able to assign a new value to this string. I have: string numbers = "OneTwoThree"; public string StringToCompare { get { return numbers; } se...more >>

Why Windows doesn't allow to launch daemon/service in command line ??
Posted by cyshao at 3/24/2005 4:25:19 PM
Why Windows doesn't allow to launch daemon/service in command line ?? Unix/Linux can simply do that.... ...more >>

How to debug a service ?
Posted by cyshao at 3/24/2005 4:19:08 PM
How to debug a service ? Hi, friends: I created a new C# service project and wrote some log in OnStart() function. But when I type F5 to debug it, system prompt me "Can't debug a service program by debugger. Please use installutil.exe to install it." So, I tried to use " i...more >>

Accesing the Active Directory
Posted by Lalo at 3/24/2005 4:03:03 PM
Hi everybody : I need to access the Active Directory of a server (\\server01) and check if an user exists (User : user01 / Pass : pass01). First, i need to check if the user exists and then check if the password is the user's password (user01's password). Any ideas of how to do this?? T...more >>

multi-threading: locking to return a value?
Posted by Zeng at 3/24/2005 4:02:43 PM
Is the lock in these two places needed for multi-threading? I thought accessing a variable value should already be atomic. Thanks for your help or comments. bool stopping = false; public bool Stopping { get { lock (stopLock) { ...more >>

DateTimePicker and Null Values
Posted by John Smith at 3/24/2005 3:56:14 PM
Hello all: Does anyone happen to know the best way to handle null values for DateTimePickers? We have quite a few columns in our db that will not necissarily have a date for certain entries. How do you allow for this? I have tried to send a null string to the dataset but it requires a ...more >>

Can't call objects in my business layer from a console application in my solution.
Posted by Mike Malter at 3/24/2005 3:37:53 PM
I am getting a error that should not be happening when I instantiate an object from my business layer in a console application within my solution. I get an "object reference not set to an instance of an object." I checked my references and the dll's are there. I have my namespace right and ...more >>

threads in .net and protecting shared variables
Posted by Claire at 3/24/2005 3:07:08 PM
I was ok understanding threads in Delphi pre .net, but reading through a reference book and comparing it to what help file says has confused me A System.Threading.Timer thread in one class calls an event in a 2nd class as follows (fast timer) public void OnDriverSendResult(rackdetail RackD...more >>

Odd Thread Problem
Posted by NWeller at 3/24/2005 3:06:35 PM
Well, I think it is odd. I have written an application that fires off requests at a COM component written in VB6. I am creating multiple threads, one for each test. I know that the threads are being created, I know that the calls are being made to the COM component, I know that the COM...more >>

Connecting to internet..
Posted by Paras Sharma at 3/24/2005 2:56:11 PM
Hi all, this is a query more than a problem. I have a task in hand, whose scenario is as follows. i have a window application, using a button on which (say 'upload' or 'download') i need to connect to internet and then open my abcd.aspx page to process the text file passed.. The problem ...more >>

Retrieve data from WM_COPYDATA message
Posted by Sagaert Johan at 3/24/2005 2:55:03 PM
Hi How can i convert this into c# ? How can i convert the pointer to a zero terminated sctring back to a C# string object ? Best practice to declare the PCOPYDATASTRUCT in c# ? ...... case WM_COPYDATA: PCOPYDATASTRUCT poCopyData=(PCOPYDATASTRUCT)LParam; printf( "Message from program(...more >>

thread slowing down so much
Posted by Droopy at 3/24/2005 2:33:08 PM
Hi, I am writing a C# program that is calling C++ legacy code. I wrote a C++ managed wrapper for this legacy code. It seems to work well. The legacy code is handling serial (RS232 or RS422) lines. To keep a serial line "alive", i have to call regularly a function. A c# thread is calling abou...more >>

Application design consideration
Posted by Przemo at 3/24/2005 2:31:03 PM
Hi, I have two applications. One is a WinForm (in future it will be a service) and gets some data from serial port and adds them into database. It can be named as a beck-end appliacation. The second one, fron-end application, is a WebForm user interface. I would like to inform the WinForm (...more >>

Release Dates
Posted by Dilbert Does Dallas at 3/24/2005 2:13:38 PM
Can anyone point me in the direction of a list for the release dates for ..Net including all betas, RCs, 1.0 & 1.1 I don't want 'sometime in Sept 2001' I need a definite list if there is one. Cheers Interviewer ...more >>

System.Windows.Forms Namespace completely missing from my library. Any Ideas?
Posted by Rob Deacon via .NET 247 at 3/24/2005 2:12:35 PM
I am just getting into this =2ENET stuff=2E Looks really handy=2E I was= trying to run some standard tests, like throwing up a= MessageBox=2EShow("Code Hit Here - ln 124"); Just to make sure I= was building things right=2E I realize I needed to use a few things from the library to make= ...more >>

Is deriving from HybridDictionary possible?
Posted by Paul Tomlinson at 3/24/2005 2:03:49 PM
All, I have a very simple class and all I want to do is override the add and remove methods for logging, thats it. This is my class, however the only methods which I can override are equals, gethashcode and tostring. Why can't I override add and remove? using System; using System.Colle...more >>

C++ DLL used in C# project
Posted by Hermione at 3/24/2005 1:23:06 PM
Hi, We developped many Dll in C++ to use in a project developped with VC++ 6.0. Now we have another project for Pocket PC that I have to develop with C#, can I use the same DLL, and what I have to do ? Thanks...more >>

Interfaces
Posted by Demetri at 3/24/2005 1:09:06 PM
I am under the impression that an interface can not have implementation for any of it's members. I have been examining the: HttpContext.Current.User object. The User property of Current is of type IPrincipal. Yet it has a property called Identity which is of type IIdentity and that has a p...more >>

Question about Event handlers and GC
Posted by Aamir Mahmood at 3/24/2005 1:01:09 PM
Hi all, Consider the following code as just an example to understand what I want to say. My question is if a class instance subscribes one or more events of another class. If that instance which implements the event handler goes out of scope, what will happen to the instance? Will it be e...more >>

Addition and double value type question
Posted by TK at 3/24/2005 12:33:03 PM
Hello, I was calculating some percents and ended up with these two values that I swa in the debugger (amount1 and amount2 are doubles): amount1 = 4,999,999.72 amount2 = 0.28000000026077 Then, I added these two together and got 5,000,000.00 Why didn't I get a number like 5000000.0000000002...more >>

help with multitherads in C#
Posted by Julia at 3/24/2005 12:31:36 PM
Hi, I have a server which span two threads and I want to be able to signal the threads to stop in order that my server will shut down properly in the old days of winapi I did it by using a named event created by the server, a call to WaitForSingleEvent in each thread loop with the minimu...more >>

Software activation codes and storage, your thoughts please
Posted by Joe_Black at 3/24/2005 12:31:13 PM
Hi all, I have an app that I want to have activation codes for, it has plugin dll files each of which have an activation code as well. I need to generate a unique code that is specific to the machine that the software is installed on, when the user contacts the registration server the key ...more >>

update query in DataTable??
Posted by ZeroVisio at 3/24/2005 12:11:06 PM
Hi, I want to know if there is an easy way to do update a column of a row in DataTable. ...more >>

Will VS 6.0 C++ #import a TLB created by regasm?
Posted by Craig at 3/24/2005 11:55:03 AM
I have created a little C# project that produces a .DLL that is exposed as a COM object using the regasm utility from the .Net Framework. Our formal build process is all VS 6.0 C++ and VB, no .Net development components installed at all. The build is breaking on the C++ code that tries to ...more >>

Tabpages and Imagelists - I want to align the image to the left so I can display some text...
Posted by Paul Tomlinson at 3/24/2005 11:44:43 AM
Tabpages and Imagelists - I want to align the image to the left so I can display some text... All, I have a number of tabpages and on each tab page I currently have an image and some text, now ATM the image is on-top of the text, I would like to align the image to the left, is there an easy...more >>

Call a method on pressing enter after writing in a textbox
Posted by orcunbaslak NO[at]SPAM msn-dot-com.no-spam.invalid at 3/24/2005 11:36:31 AM
I have a textbox. If I write something in it and then press enter I want a specific method to be executed. How can I add this event to textBox? Thanks. Posted Via Usenet.com Premium Usenet Newsgroup Services ---------------------------------------------------------- ** SPEED ** RETEN...more >>

for loop i++ or ++i
Posted by Brian at 3/24/2005 11:25:54 AM
It's a minor thing, but I'm confused on the increment operator in a for loop. I think most usually write: for (int i = 0; i < something; i++) { .... } But, in my book (from MSPress) it shows: for (int i; i < something; ++i) { .... } From what I remember in my readings, the ++i...more >>

Cobol to .Net
Posted by Mythran at 3/24/2005 11:08:59 AM
No Cobol.Net yet? Wha?!? Anywho, hope someone is familiar enough with Cobol to help me out here. I have some files written by COBOL applications that contain COMP-3 fields (on a mainframe) that I ftp up to a network folder for processing in .Net. Anyone know if it's possible (and how) to ...more >>

Problem on DataTable.Reset() and DataGrid
Posted by Simone at 3/24/2005 10:55:40 AM
After a call to the Reset() method of a DataTable and a call to the method Datasource of the datagrid for display data of the DataTable i cannot see the rows on the Grid. Help me please. By Simon. ...more >>

Filename of picture retrieved from database?
Posted by grz01 NO[at]SPAM spray.se at 3/24/2005 10:17:26 AM
Hi, I have written a webpage, showpict.aspx, in C# that will fetch a jpg-picture from a database and display it thru a html-tag like: <img src="showpict.aspx?id=23"> where the 'id' parameter tells what picture from the db to display. Problem is, if the user e.g. rightclicks the pict...more >>

How do I send an email?
Posted by Randel Bjorkquist at 3/24/2005 10:10:17 AM
First, I'm extremely new to C# and the Microsoft Visual Studio IDE. I am in the middle of writing a small web application that communicates to a database server and sends out email confirmations. I've got the database connection going okay, but I'm having problems trying to find a good way t...more >>

regular expression - no digits
Posted by sri_san NO[at]SPAM mailcity.com at 3/24/2005 9:44:37 AM
Hello, I am a novice to regularexpressions and trying to build a regex for a string that consists of alphabets, special characters but no digits. Regex("^([a-zA-Z]!@#$%^&*?).{8,20}$") Does not seem to work for some reason. Could anyone help, pls. Sam. ...more >>

Help on DataTable.Reset() and DataGrid
Posted by Simone at 3/24/2005 9:14:05 AM
After a call to the Reset() method of a DataTable and a call to the method Datasource of the datagrid for display data of the DataTable i cannot see the rows on the Grid. Help me please. By Simon. ...more >>

How to set default properties for subclassed controls
Posted by Michael Rodriguez at 3/24/2005 9:13:17 AM
If I subclass TextBox and add my own new properties, how do I set their default values? I tried assigning them in the default constructor, but they still show as bold in the object inspector and they still get assigned in the code-behind file, neither of which would be the case if they had ...more >>

Math Troubles
Posted by Typpo at 3/24/2005 8:37:06 AM
Hi, Maybe I'm missing something: <begin code> MessageBox.Show("a = " + a + ", b = " + c + ", c = " + c); //message 1 double top = (Math.Pow(a, 2) + Math.Pow(b, 2) - Math.Pow(c, 2)); double bottom = (2.0 * a * b); MessageBox.Show("top = " + top + ", bottom = " + bottom); //message 2 ...more >>

Solution with Multiple projects -startup and shutdown
Posted by FredC at 3/24/2005 8:27:02 AM
I have a solution that contains three projects. Using the Property page, Startup Project I've defined which projects to start and the order. When running, each project presents a form or a task bar icon. Currently, when I exit any of the projects the other projects are shutdown. I would like ...more >>

Testing reachability of WebRequest.Proxy for work / home app
Posted by Tim Regan at 3/24/2005 8:18:45 AM
Hi All, I'm writing an app using WebRequest in csharp. I need the app to respond to the host PC moving from one network to another, e.g. taking a laptop home after work. Currently the WebRequest.Proxy is always picked up from the work network settings, so that the GetResponse method throws ...more >>

InitializeComponent not called
Posted by muser8 NO[at]SPAM gmail.com at 3/24/2005 8:08:31 AM
I've encountered a very bizarre situation: a form's Initialize Component is not called and excution doesn't reach the code immediately following the call to initialize component. So in the following code sample the fist message box appears but the second does not. A few quick facts: - The form...more >>

Webservices through firewall
Posted by Daniel Santana at 3/24/2005 7:21:05 AM
Anyone knows how to add web reference in C#, when the internet need authentication. The credentials for proxy is asked and I pass the information. But after all, I got this message: "The underlying connection was closed: Unable to connect to the remote server." Tks!...more >>

Managed/Unmanaged : Threading code on which side?
Posted by _R at 3/24/2005 6:36:10 AM
I'm working on a project that entails calling into a legacy C DLL. The original unmanaged test code (ancient C++) works OK, but after generating managed C++ shells for calling the DLL via C#, performance has taken a hit. I can't explain it--Smaller scale tests run OK, but stressing the code cau...more >>

yyyy-mm-dd
Posted by raisin at 3/24/2005 6:22:41 AM
is there an easy way of making a date appear in this format: yyyy-mm-dd ? thank you...more >>

Controlling Objects
Posted by FredC at 3/24/2005 5:39:04 AM
Given following code to instantiate object, how does one: 1) check a specific objects health - running, dead etc. 2) call a method in a specific object in the multiple object set 3) terminate a specific object foreach ( DataRow ConfigRow in DSWTG.Tables["TurbineConfiguration"].Rows ) { ...more >>

retrieve highest value in ArrayList
Posted by Ada at 3/24/2005 5:09:02 AM
hello folks, is there a way to retrieve the highest value in the ArrayList? let say i have a value in the array: {1, 4, 15, 3, 7} it should return a value 15 as the result. i've looked at the Sort Method ( ) but doesn't seem like it can do the job or am i missing something? ...more >>

Capturing a TAB key press event
Posted by prelugejunk NO[at]SPAM hotmail-dot-com.no-spam.invalid at 3/24/2005 3:36:06 AM
Hello, I'm trying to capture when users press the tab key. This is scrolling through different fields with tab is broken in my form. I'm not sure why, but it may have something to do with the fact that the Windows Shell is creating the form (it is defined in a DLL). I copy and pasted the form's ...more >>

Where to download the code of IssueVission
Posted by Allen at 3/24/2005 12:02:36 AM
Thank You. ...more >>

How to list down all elements of a enum?
Posted by Kimelia at 3/24/2005 12:00:00 AM
For example, I have a public enum: public enum MemberType { MEMBER_NORMAL = 0, MEMBER_VIP = 1, MEMBER_SUPERVIP = 2 } Is it possible to use a foreach (or for) statement to list out all available enum elements? e.g.: foreach (string s in MemberType) ????? Thanks ...more >>

String processing improvement
Posted by Kimelia at 3/24/2005 12:00:00 AM
I have a string variable, let say: string s; and I need to assign several lines to this string variable, so: s += "rept ioruet uroeiut oirueoi uorieuto iruetoi reoituroeuti roeutoi ureoitur oieutoire"; s += "uytuy tuytjghjlkg fhjlkghlkjhm fhm mhm gfmh mgfh rtiy triypotiry"; s += "iuygoie...more >>


DevelopmentNow Blog