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# > january 2006 > threads for tuesday january 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

Can you run a foreach in reverse order?
Posted by Fabio Cannizzo at 1/24/2006 11:26:06 PM
Is it possible to do something similar to the STL iterators, i.e. to execute a foreach loop in reverse order? Thanks, Fabio ...more >>


imbed variables in text inside of MessageBox(
Posted by generallee5686 at 1/24/2006 9:31:47 PM
Just a quick question, im just taking a C# class. Is there a way to have a variable inside a text string like: Console.Write("Answer: {0}",answer); But instead do it inside of a MessageBox.Show( Thanks...more >>

Starting servive but how to set proper priviledges
Posted by Benny W at 1/24/2006 8:54:46 PM
Hello, I'm trying to start a monitor Windows server in my standalone Window PC. I use code like following: handle = ServiceWin32.OpenServiceA(SCManagerHandle, "MonitorServive", ServiceWin32.ACCESS_TYPE.SERVICE_ALL_ACCESS); if (handle < 1) ...more >>

String processing bug in .net 2?
Posted by greg.merideth NO[at]SPAM gmail.com at 1/24/2006 8:31:52 PM
There's an automated email an application generates, that we've found a wierd processing bug(?) with in .net 2.0 The app has the following lines. There are 20 lines above that use "\n\r" that wrap just fine: [20] message.Body += "EONE\n\r"; [21] message.Body += "Name [{0}] Reg# [{1}] Owne...more >>

Is there a better way for "AppActivate"
Posted by scottt at 1/24/2006 8:26:02 PM
Hello All, I am trying to use SendKeys to send some keystrokes to another application. I am using the VB Runtime reference to use the following line in my C# program: Microsoft.VisualBasic.Interaction.AppActivate(pid); Afterwards I am using the SendKeys.Send() function to send some keyst...more >>

evaluate string as a method call
Posted by netnet at 1/24/2006 7:36:47 PM
Is it possible to evaluate a string as a method name? Something like this: Session[methodToExecute] = "loadFormFormACompany"; This is what I would like to do.... eval(Session[methodToExecute]+"()") Anyone have any ideas? Thanks Sean ...more >>

How to start app by clicking file?
Posted by Brett Romero at 1/24/2006 5:37:23 PM
I'd like to start my app by double clicking a file. Via the file extension, it should know the app to load. The file will contain several IDs in XML, which my gets data off of and loads into a datagrid relevant to these IDs. Here is what I'm not sure on. 1.) How does the OS or what ever is ...more >>

Simple ErrorProvider question
Posted by Doug Handler at 1/24/2006 4:25:07 PM
I've never used this little control, but found a reason too. So, I want to prevent the user from moving on, until the error condition has been satisified. I have a textbox and raise the Validated event that does the errorchecking. If an error exists, i don't want the user to move on, what's...more >>



Point into a ClosedCurve
Posted by Sergio at 1/24/2006 3:57:17 PM
Hello, I'm developing an application that manages some kind of shapes. One of those shapes is an drawn using Graphics.DrawClosedCurve() function. I want to know if the user has selected a coordinate inside this draw or not, but I don't know how to do it. Any idea? Thank you...more >>

How to access an object from an event?
Posted by Doru Roman at 1/24/2006 3:51:41 PM
Hi, I have a class MyClass and in the Button1_click() event I create an instance of that class MyClass myc = new MyClass(); In another event I want to access myc for serialization purposes. Let's say it is Buton2_click() event . How do I access myc object as it is invisible in the But...more >>

UI in a Windows Service
Posted by eric at 1/24/2006 2:10:10 PM
Alright, I have been looking around trying to figure out a way to solve my problem and I'm a little confused. I have a Windows Service that sits and listens to the serial port for information. Upon receiving it, the Service formats the data accordingly and then requires input from the user via...more >>

Function to filter cursed words
Posted by John at 1/24/2006 1:19:58 PM
Hi, I was asked to create a function to detect cursed words in user's input and reject user's input if found, does anybody know existing codes I can use? TIA ...more >>

application settings and least privilege users
Posted by Justin Creasy at 1/24/2006 1:17:21 PM
Hello, I am trying to add the ability to save my applications settings for each user. I was just wondering what the best method is to do this. The only requirement is that any user account (user, power user, admin) will have this capability. I would also prefer to have some measure of security, ...more >>

convert int to string
Posted by moondaddy at 1/24/2006 12:17:30 PM
How do I get the string representation of an int? for example int var1 = 2; string var2 = var1.ToString; I'm wanting var2 to be "2" I get the compile error: Error 1 Cannot convert method group 'ToString' to non-delegate type 'string'. Did you intend to invoke the method? Thanks. ...more >>

Taskbar event listening to OS messages via Win32 API?
Posted by JDeats at 1/24/2006 12:07:04 PM
I have a Windows Forms application in which I need to be able to trap on an event when the application itself has lost focus (e.g. if the user clicks on another application they have opened on the task bar and that application comes into focus -or- if the go to the Start menu and launch another ...more >>

Interface Question
Posted by walt.stoneburner NO[at]SPAM gmail.com at 1/24/2006 11:45:48 AM
Why does aliasing an interface fail at runtime? SAMPLE WORKING CODE ... IHTMLDocument2 doc = (IHTMLDocument2) browser.Document; ... BROKEN CODE public interface IFooBar : IHTMLDocument2 { } ... IFooBar doc = (IFooBar) browser.Document; ... The broken code example compil...more >>

Unable to invoking method via reflection
Posted by cartoper NO[at]SPAM gmail.com at 1/24/2006 11:43:19 AM
I am currently doing some R&D. The objective is to learn how to invoke methods via reflection using the InvokeMember method. The InvokeMember method throws an exception: Method 'ReflectionTest.Originator.AddToA' not found. Here is the code: using System; using System.Diagnostics; usin...more >>

WebBrowser.DocumentText problem
Posted by myzm at 1/24/2006 11:42:36 AM
Hello there, I use webbrowser loading a web page and want to display the html file in a RichtextBox. I find out that the size of the DocumentText is far less than the actual size of the html file. So there are only part of the html file is showed in the RichtextBox. Anyone has idea about this ...more >>

newbie c# doubt
Posted by stony at 1/24/2006 11:42:12 AM
here is the code ---- using System; class Values { static void Main() { int valueOne = 10; int valueTwo = 20; if ( valueOne > valueTwo ) { Console.WriteLine( "ValueOne: {0} larger than ValueTwo: {1}", valueOne, valueT...more >>

Assembly.Load() exception
Posted by Steve at 1/24/2006 11:27:46 AM
I'm playing with late binding and trying a very simple test to load an assembly In my "Host" application I have this code: <code> string modulePath = @"C:\PMDRepository\Tools\ManfBusProcMgr\Modules\TestModule\bin\Debug\TestModule"; Assembly a = Assembly.Load(modulePath); </code> ...more >>

C# static, is this correct?
Posted by Maya at 1/24/2006 9:15:36 AM
Hello guys, in C#, is using "static" would be the most proper way to get around calling methods located in different classes? for instance, a method caller in class A wouldn't see a method in class B unless that method is declared as public static. This works fine (i guess!) for me, and i have...more >>

Outlook 2003 COM Add-In Using Office Style
Posted by Nays at 1/24/2006 9:12:14 AM
Hello I am writing a COM Add-In for Outlook 2003 that will have a number of forms. I would like these to be styled like Office 2003 and not just XP style. Is this possible by somehow referencing the Microsoft.Office.Core library? Any help on this would be very appreciated. Thanks Jame...more >>

RegEx e greedy
Posted by RicercatoreSbadato at 1/24/2006 9:08:38 AM
Con C# funziona l'implementazione del LAZY STAR ? ad esmepio per (.*?ciao.*?) ...more >>

advice needed for modularized development
Posted by Steve at 1/24/2006 8:39:39 AM
Hi, I am sitting down to design our next set of internal apps. I would like to approach this in a way that would allow me to break logical parts of the application that handle specific tasks into modules. For example, assuming we have 4 main tasks to accomplish: - Printing - Editing - ...more >>

Bar Code in the Report Designer?
Posted by osmarjunior at 1/24/2006 8:31:13 AM
Is there any component to work with bar codes in the report designer, ou some way to accomplish this task? I'm using VS2005. Thanks. Osmar. ...more >>

Running in a DOS Window Question from a Newbie with C# Express
Posted by Pastor Hank at 1/24/2006 8:13:03 AM
I have been able to create a simple C# program that actually works..(well sorta...) it can reach the internet, it does what I want it to do, BUT it runs in the 'cmd' window and the reports also go to the 'cmd' window (almost like a telnet)....could someone please tell me what settings I have w...more >>

Determining Dropdown Value Problem
Posted by Mike Collins at 1/24/2006 7:26:02 AM
I cannot get the correct drop down list value from a drop down I have on my web form. I get the initial value that was loaded in the list. It was asked by someone else what the autopostback was set to...it is set to false. Can someone show me what I am doing wrong and tell me the correct ...more >>

Changed class
Posted by GTi at 1/24/2006 6:59:22 AM
I'm trying to build a class that can track changes to itself. Class MyClass { public int value1=0; public int value2=0; private int oldvalue1=0; private int oldvalue2=0; public void WhatIsChanged() { if(oldvalue1!=value1) Console.WriteLine("value1 is changed"); if(oldvalue2!=valu...more >>

Extract an icon from an imagelist
Posted by Udi at 1/24/2006 4:57:33 AM
Hi, I have an imagelist initialized in design time with several icons files (.ico). However, when I need to extract an icon (Image) from the Imagelist, I can't convert it back to an icon: statusBarPanel1.Icon = imageList1.Images[0]; // cast/as don't work // Cannot convert type 'System.Drawin...more >>

Share folder.
Posted by Itay at 1/24/2006 2:05:17 AM
Hi All , Is there a way to determine whether a folder is being shared with c# ? Thanks , Itay. ...more >>

ListBox and class instances
Posted by Mr. Bean at 1/24/2006 12:38:38 AM
Hello, I'm making a small app that loads users from an xml file. After loading the data, new instances of a custom users class are initalized and at the same time a listbox items are initialized with the users. My question is when the listbox is changed how could I update a property or know th...more >>

Query Process on a terminal server
Posted by Hans at 1/24/2006 12:14:01 AM
Hi, I want to allow users to start my application only once. To do so, I use Process[] Processes = Process.GetProcessesByName("MyApp"); to get all processes running on the machine and compair to the current process ID. This is OK for single user machines, however, it is not OK on a ...more >>

Array search
Posted by cyrvb at 1/24/2006 12:11:19 AM
Hello, I'm a very very newbie in C# I did start 2 days ago, I get Visual Stuido 2005 C# I try to understand how to manage the arrays I did write this int[] tempo=new int[3]; int[,] list = { { 1, 2, 3 } , { 11,12,13} }; int[] search = { 15, 123, 12 }; I have to goals here My ma...more >>

Ndoc help
Posted by rony.vainblat NO[at]SPAM gmail.com at 1/24/2006 12:01:28 AM
hi, i am looking for an examles , how to make my own tags in nDoc . can any one help me , please. ...more >>

Interfaces in C#
Posted by Stephan Zaubzer at 1/24/2006 12:00:00 AM
Hi I am very confused the way C# deals with interfaces in contrast to Java! One example: There exists the ICloneable Interface which is for example implemented in the SQLParameter class. But why does the only method of this interface not appear in the SQLParameter class? That does not make an...more >>

Add system menu to form with FormBorderStyle = None
Posted by Mark Ingram at 1/24/2006 12:00:00 AM
Hi, ive got a form with FormBorderStyle set to None (i am using custom regions to determine the shape of the form). But i would like to be able to display the standard system menu when the user right clicks the application in the taskbar. How can i do this?...more >>

Whats the best way to pass raw datablocks between C# objects
Posted by SHB-MSDN NO[at]SPAM newsgroup.nospam at 1/24/2006 12:00:00 AM
Hi, In our system we get image buffers through a native dll as void*. We want to manage several of this blocks by C# objects an pass them wen needed to a native image processing library. What is the best way to do this? Can I just declare a unsafe pointer as member of a class? Best re...more >>

Scrollable Control Scroll Bars
Posted by Paul Cheetham at 1/24/2006 12:00:00 AM
Hi, I have created a control derived from a Scrollable control. Can anyone tell me how I can get a reference to the scroll bars, so that I can manipulate the positions in code? If I enumerate the child controls they don't show, but there bust be a way of accessing them. This is causi...more >>

How to know if a doc file has password?
Posted by Kevin at 1/24/2006 12:00:00 AM
Hi! How to know if a .doc file has password? Thanks! ...more >>

Export to Excel
Posted by Arvind R at 1/24/2006 12:00:00 AM
how to ask saveas dialog before writing the data to the excel file? right now im able to save in c drive or any other specified location only. any solution will be a great help! System.Text.StringBuilder sbrHTML=new System.Text.StringBuilder(""); //StringBuilder sbrHTML = new StringBuilder...more >>

Can we get the list of COM+ Applications using System.ServiceProcess
Posted by SenthilVel at 1/24/2006 12:00:00 AM
Hi We use System.ServiceProcess.ServiceController class is used to get the list of windows services installed in a particular machine. Also we use System.ServiceProcess.ServiceController.GetServices("IIS") to get the control on the IIS .. In the same way can we get the List of services...more >>


DevelopmentNow Blog