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 2006 > threads for wednesday may 17

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

restarting windows service from my application
Posted by ghighi at 5/17/2006 11:59:37 PM
Hello, I am working on a .Net application (aspx+webservices) that uses a windows service I created too. Sometimes, the exe linked to my service crashes (mostly runtime exception), and as a consequence my application can not work. I coult not catch or controle those exceptions, so my applicati...more >>


How to retrieve a Word document's format?
Posted by A. Chiou at 5/17/2006 11:27:02 PM
I'd apologize if this is not the right place to post this question. How do I retrieve the format, such as border, spacing, .., of a Word documentusing C#? Sample code is much appreciated....more >>

How to display 16bit dicom image
Posted by Neeraj at 5/17/2006 11:26:01 PM
hi I am working on dicom viewer. 8 bit raw dicom image working properly.But 16 bit Dicom image is not showing.What Should i have to do.You have any idea about That to convert it in 8bit . regards Neeraj ...more >>

MD5 Hash
Posted by Gary at 5/17/2006 11:17:05 PM
I found with Asp.Net, you can use this function to very easily create an MD5 hash: System.Web.Security.FormsAuthentication.HashPasswordForStoringInConfigFile( created.ToUpper(),"MD5"); Is there a similar one for Windows programs? I like that function because you don't have to convert to by...more >>

DropDownList.SelectedValue
Posted by CK at 5/17/2006 10:33:58 PM
Hi All, I have a class and one property is an Enum. I am trying to persist the DropDownList.SelectedValue to the class property. I am using job.ExpRelated = Enum.ToObject(typeof(ExperienceRelated),ddlExpRelated.SelectedValue); but it doesn't build. Any ideas anyone? Thanks All, ~CK ...more >>

arguments for a property
Posted by Z.K. at 5/17/2006 9:04:49 PM
I was wondering if it is possible to send multiple arguments to a property in C# like you can do with a method such as: public double Average(int x, int y, int z) or public double Average(params int [] numArray) I have looked through the books I have, but I see no way to send more th...more >>

Select item from a Listview
Posted by M K at 5/17/2006 7:54:31 PM
Using VS 2005 I have a listview that displays: number, name, details (in that order) when the user selects a row (single select) i want to retrieve each column in a variable. number is an int name is a string details is a string i have searched the net and could not locate an exam...more >>

Debug.Assert fails, why?
Posted by spirytuspl NO[at]SPAM hotmail.com at 5/17/2006 6:25:44 PM
I'am running this code highly threaded environment but for some reason Debug.Assert fails. Why is it and how can I stop it from happening? public class CMSShop { public int items = 0; public void inc() { items ++; } public void dec () { if ( items > 0 ) items --; Debug...more >>



Any better way to find the Clicked SubItem in a ListView ?
Posted by TheSteph at 5/17/2006 5:53:45 PM
Any way to find the Clicked SubItem in a ListView ? private int GetSubItemAtPos(ListView AListView, Point APoint) { int PositionCounter = 0; int TmpRelativeColIndex = -1; //Browse All Column by DISPLAYED INDEX for (int ColDisplayCount = 0; ColDisplayCount < AListView.Columns....more >>

Setting Properties (correction)
Posted by Tina at 5/17/2006 5:05:21 PM
(on the prior message the code snippet was wrong. this is the one that executes the set in a loop until a stack overflow occurrs) (using 1.1) I have the following property defined in an ascx control. public string Title //property { get {return this.Title; } set {this.Titl...more >>

Singleton implementation
Posted by Daniel at 5/17/2006 4:50:42 PM
Hey guys I implement my singleton by doin this at the top of the class. public static readonly DrawDetails Instance = new DrawDetails(); Then to access the instance i do DrawDetails.Instance.SomeMethod(); My query is, everytime i call that line does it call the constructor again? Or is...more >>

Looping through Enum on Page_Load
Posted by CK at 5/17/2006 4:20:29 PM
Hi All, Good morning. I had a quick question. I have a public Enum. During page load I want to loop thru the Enum and put those as items in an asp:dropdownList. Does anyone have any sample code to do this? Like a foreach loop. Thanks for any help, CK ...more >>

log4net vs EntLib vs Roll my own
Posted by Mr Flibble at 5/17/2006 3:43:59 PM
Has anyone made any kind of comparison between these methods of logging and tracing?...more >>

Complex data types in User-scoped ApplicationSettings
Posted by Dave Booker at 5/17/2006 3:28:02 PM
How are complex data types saved and restored when used as User-scoped Application Settings? For an example of what I'm trying to do that does not work, take the following: A project has a user-scoped Settings object called "TestStrings" which is of type "StringDictionary". The following ...more >>

Speed up TabControl ?
Posted by Adam Benson at 5/17/2006 3:25:37 PM
Hi, Just an idle query. I've been speed profiling some code and the following two calls seem relatively expensive, especially if you're adding a few tabs : this.Tab.TabPages.Clear(); this.Tab.TabPages.Add(tabpage); Just wondered if there was anyway of saying to the tab control "don't b...more >>

Return a boolean or raise an exception (from a LogOn method)?
Posted by Mr Flibble at 5/17/2006 2:46:37 PM
I have a class that has a LogOn method. I'm trying to think what the advantages are two approaches I have. a) Having a bool returned containing the success of the LogOn. b) Raising an exception that should be caught. I thought that exceptions should not really be raised for "expected" thi...more >>

Hiding the task bar through code.
Posted by UJ at 5/17/2006 2:22:16 PM
How can I hide the task bar through code? I essentially want to change the option to hide automatically so I can use the full screen. TIA - Jeff. ...more >>

string extraction
Posted by draku at 5/17/2006 1:31:43 PM
I'm working on credit card processing gateway and the result of the transaction is returned as pseudo XML! Nope not real XML. Any way the "XML" looks like that: <r_csp></r_csp> <r_time>Wed May 17 13:04:13 2006</r_time> <r_ref></r_ref> <r_error>SGS-002304: Credit card is expired.</r_error> <...more >>

Prevent window from beeing on the taskbar
Posted by Torben Laursen at 5/17/2006 12:50:14 PM
My windows program has a item on the taskbar as it should. But when my program opens a window inside the program that window also has a item in the taskbar. How do I prevent this so only the main program can be seen on the taskbar? Thanks Torben ...more >>

Locked buttons keep moving off the panel when displayed
Posted by Steve Teeples at 5/17/2006 12:47:02 PM
I have an inherited form that has two buttons (Done, Canel) which are inherited from the base form. Those buttons are locked. When I open my inherited form the buttons are missing. It turns out that they exist but they coordinates are about 6000 to the right of the form. If I change the ...more >>

passing by ref to C++
Posted by kiewicz at 5/17/2006 12:14:02 PM
I'm writing a function in managed C++ that takes three integer references as parameters. Passing 'ref int' from C# does not work. Is there an easy way to pass by reference from C# to C++? I saw someone on the web suggest using the percent sign on the C++ side, but that just got me a syn...more >>

Combo Box - Data and Key
Posted by rlm at 5/17/2006 12:09:36 PM
This small problem to solve involves a two table database (one parent and one child table), one winform and two combo boxes. Combo box A is populated in the Load event. Combo box A pulls data from the parent table. A second combo box (box B) will be populated (from the child table) based on da...more >>

Unable to Design Derived Forms
Posted by Paul Cheetham at 5/17/2006 11:46:40 AM
Hi, I have moved an application from VS2003 to VS2005, and I am now unable to view most of my forms in the designer. The majority of the forms in my project are derived from class PACForm, (which itself derives from System.Windows.Forms.Form) Whenever I try to open on of these forms in ...more >>

reading xml file
Posted by RR at 5/17/2006 11:16:01 AM
I'm trying to read an xml file into a dataset just like I do in my windows application. DataSet.ReadXML("filename.xml"); But no matter how I have the string file name the application errors and I get File Not Found when I debug on the emulator. Since I'm fairly new to mobile development,...more >>

Drives
Posted by joey.powell NO[at]SPAM topscene.com at 5/17/2006 10:30:13 AM
Does anyone have any information for how to determine if drives are attached via internal, USB 1.1, USB 2.0, Firewire 400, Firewire 800, etc? ...more >>

CommandArgument of a button
Posted by IndyChris at 5/17/2006 9:58:17 AM
I have a button with a CommandArgument. The function that I call has the following arguments, object sender, System.EventArgs e. Based on those how can I get the value of the CommandArgument? I've tried the following arguments, object sender, CommandEventArgs e, but they cause compilation errors...more >>

Delete a entry in the Event Log
Posted by fran at 5/17/2006 9:55:01 AM
Hello, Can I delete a entry of the event log? Thanks...more >>

Get a number with a spcific number of digits after the point
Posted by Niron kag at 5/17/2006 9:11:03 AM
Hello ! With c# ,I want to get a number with a spcific number of digits after the point , for example if the specific number is '2' : for this number 334.23523 I want to get 334.23 (2 digits after the point) How can I do it? > Thanks! ...more >>

Ineritance: Values of parent/base class
Posted by Darren.Ratcliffe NO[at]SPAM gmail.com at 5/17/2006 9:00:40 AM
Hi guys Posted what was probably a rather confusing post about this the other day, so I am going to have another go and see if I can make more sense. This sis purely a I've got a base class called animal, and from within animal you can access lots more classes such as feline, canine, repti...more >>

Font.GetHeight Method throws an ArgumentException
Posted by alexey_r NO[at]SPAM mail.ru at 5/17/2006 8:20:11 AM
MSDN (<http://msdn2.microsoft.com/en-us/library/7y237t0c.aspx>) says that this method is supposed to throw only ArgumentNullException, but this code: protected override void OnPrintPage(PrintPageEventArgs e) { base.OnPrintPage(e); Graphics gdiPage = e.Graphics; float leftMa...more >>

adding event handler in user Control
Posted by VMI at 5/17/2006 8:16:02 AM
My aspx has a user Control (a .ascx) that includes all the fields of an address (add1, city, st, etc...). How can I add an event handler to a comboBox inside the .ascx from within my aspx page? I just want to add this event handler to that instance of the comboBox. Thanks....more >>

C# 3.0 new language features
Posted by S Chapman at 5/17/2006 8:09:17 AM
In C# 3.0 there will be radical additions: (#) "select, from, where" keywords allowing to query from SQL, XML, collections, and more (Language integrated query (LINQ)) - >>Can appreciate (#) Object initialization : Customer c = new Customer(); c.Name="James"; becomes Customer c = new Custome...more >>

Image coordinates
Posted by emferrari NO[at]SPAM gmail.com at 5/17/2006 7:50:01 AM
Hi all I'm developing a windows form application that has a picturebox in which I'll load screen prints from a jpg file. I want the user to click in one point in the image and after the click fill two text boxes with the X and Y coordinates of that click, but the coordinates need to be based ...more >>

How configure Outlook/Exchange for a .PST file?
Posted by Crash at 5/17/2006 7:46:51 AM
VS 2005 ..NET 2.0 Windows Tablet XP SP2 MS Outlook 2003 I have users on tablets that work mostly disconnected. I would like to ensure that my users are configured to each have an Outlook .PST file however I haven't been able to find any setting in Outlook that configures this. Is this s...more >>

File version in filesystem
Posted by Emanuele Ornella at 5/17/2006 7:27:05 AM
I'm trying to get the version of a DLL and in general the version of a file in the filesystem. I do not find anything using System.IO.FileInfo. Well, I do not find anything at all... Any suggestion ? Thanks in advance, ema ...more >>

How do I determine my WAN address?
Posted by MrNobody at 5/17/2006 7:20:02 AM
I need to find out the IP address of my local network on the WAN. There is alot of information on getting my local machine IP address but I can't find anything for getting the IP address my network is on. I was thinking I could make a HTTP Request to a server which displays your IP address ...more >>

Outlook 2003 & DASL
Posted by Crash at 5/17/2006 7:19:14 AM
I am having a tough time finding documentation on DASL! 1) What the heck does DASL stand for - I can't even find any documentation on that? Anyway, I would like to integrate a DASL query into my C# program, in effect I would like: "select all appointments on my calendar from xx/xx/xx to xx...more >>

Threading in C# - Article (free)
Posted by joe.on.threads NO[at]SPAM gmail.com at 5/17/2006 6:48:09 AM
I've written an extensive document on threading in C#: http://www.albahari.com/threading It started out as a chapter in a book that I'm writing, but ended up outgrowing the book! So I'm making it free and maintaining it in parallel as a separate project. Any feedback would be welcome. ...more >>

show a windows form in front of an arbitrary fullscreen application
Posted by Marcus at 5/17/2006 5:50:58 AM
How do I do it in c#? My current solution works sometimes, but sometimes the form comes behind the fullscreen application. I am using the following in the forms constructor this.WindowState = FormWindowState.Normal; this.Focus(); this.BringToFront(); this.TopLevel = true; All I want ...more >>

Sorting a Datagridview
Posted by amit.vasu NO[at]SPAM gmail.com at 5/17/2006 5:32:29 AM
Hi I have a datagridview control which I am binding to a datatable. Before binding to a datatable I am adding one row in the datatable for Total and populating data in that row at runtime. Now when user click the header of the column data gets sorted. I always want the row which is displayi...more >>

console writeline
Posted by RobcPettit NO[at]SPAM yahoo.co.uk at 5/17/2006 5:27:01 AM
Hi, im using if (p.skipToEndOfNoCase("document.getElementById('hand0Evaluation').innerHTML = '") && p.extractTo("'", ref strQuote)) Console.WriteLine("Dealer = {0}", strQuote); to parse details into strQuote, this works fine and writes to command screen perfect. What Id like to do...more >>

Code to "click" a button -- is this possible?
Posted by Ben at 5/17/2006 5:12:01 AM
Hello I have frames set up in an asp.net application and need one frame to refresh another. Seeing as events need to be registered at the time the page is sent from the server, I was wondering if I could place a hidden button in a frame that would have the attribute to refresh the other. ...more >>

Converting IDataParameter to IDbDataParameter
Posted by Doug at 5/17/2006 5:04:53 AM
Hi, I am using some code that was written for common use within my company that has a Parameter object that inherits from IDataParameter. However, a whole other piece of code that we use for querying the database has methods in it that need to take in a variable of type IDbDataParameter (yes,...more >>

passing messages between threads at run time
Posted by marutha.telecom NO[at]SPAM gmail.com at 5/17/2006 3:25:20 AM
Hi, I'm very new to csharp. I'm learning basics. Is it possible to send messages to threads at runtime at c sharp? if so please guide me in doing that. Thanks is advance, marutha. ...more >>

Display Dicom Image in Viewer
Posted by Jayender at 5/17/2006 2:57:31 AM
Hello , I need to add a ActiveX control ...the Dicomviewer in ASP>net .. I am able to do it fine in C# project but not in web application I add that Dicom dll (.ocx file) in my ASP.Net form I need to access this Viewer in my C# coding so that i can add image to that Dicom Viewer. pleas...more >>

IEnumerator Usage
Posted by Leslie Sanford at 5/17/2006 1:41:31 AM
I've been kicking around an idea mostly as a thought experiment at this point. The idea is to create a thread safe collection that implements the IEnumerable interface. The enumerators it creates via the GetEnumerator method would be synchronized with the collction; if the collection changes...more >>

Creating a custom installer in VC# 2005 Express
Posted by alexey_r NO[at]SPAM mail.ru at 5/17/2006 1:37:07 AM
Hello! Most articles on the web dealing with installers in Visual Studio don't cover this, they just tell you to add a Setup Project, which is unavailable in Express edition. Any pointers on this? ...more >>

Closing Inherited User Control [Win C#]
Posted by MikeY at 5/17/2006 1:30:59 AM
Hi Everyone, I'm trying to figure out how to close my inherited user control (myKeyBoard). My Code is as follows for calling my control: HOST.I_Ctrl_KeyBoard myKeyBoard= new HOST.I_Ctrl_KeyBoard(); myKeyBoard.Location = new System.Drawing.Point(275, 305); myKeyBoard.Parent = this; myKeyBo...more >>

User Software Settings and System Software Settings in Windows Regsitry
Posted by vighnesh at 5/17/2006 12:20:06 AM
Hello EveryOne Can Anybody help in finding out What are User Software Settings and System Software Settings in Windows Registry.I mean what are all the keys that are concerned to User Software Settings as well as System Software Settings in Windows Regsitry. Thanks in Advance Regards ...more >>

NullReference Exception - Upgrade blues!
Posted by Paul Cheetham at 5/17/2006 12:00:00 AM
Hi, I have moved a fairly large project from VS2003 to VS2005, and now trying to get it running. It now compiles OK after minimal changes, but I am now getting a NullReference Exception on the following line: if (_Screen.ActiveForm == this) Both _Screen.ActiveForm and the current...more >>

Howto create tabpages dynamically?
Posted by Rainer Queck at 5/17/2006 12:00:00 AM
Hi NG, I am looking for a good way to dynamically generate a bunch of TabPages. I have a list of more or less identical object. For each of these objects I need a user interface. My thought is, to provide a TabPage for every object with controls on it to interact with them. How can that be...more >>

Auto complete a webform?
Posted by Preben Zacho at 5/17/2006 12:00:00 AM
I have created a webpage with a webform (one testbox and one button). Now I want to create a C# Windows Application that loads this webpage and auto complete the form (in other words, fills the testbox with a given value and invoke the button so the form is posted back to the webserver). Is...more >>

thread , form
Posted by Ryan Liu at 5/17/2006 12:00:00 AM
I have an thread keep running at the backgroud, if it receive an message from network, it will pop up an chat form and show the message in the chat form. Since this chat form in not pop up by main thread associated with main form, to make this chat form visible, I use Application.Run(chatForm)...more >>

what is the best priactise for updating client
Posted by Ryan Liu at 5/17/2006 12:00:00 AM
Hi, I have an Client-Server based C# application to run in an intranet. Since there are hundred of clients, what is best way to update clients? Should client use TCP/IP socket to poll new dll files from the server? What about the dll already loaded by client application? Should I write anoth...more >>

Saving PrinterSettings
Posted by Ian Semmel at 5/17/2006 12:00:00 AM
If I want to have a default printer for my app (to eliminate the need for PrintDialog all the time), what is the information I need to store. I can serialize the the PrinterSettings to a file (I guess), but if I want to store the info in the registry, what should I save and what steps should ...more >>

How to play wmv file in mobile 5.0?
Posted by RedHair at 5/17/2006 12:00:00 AM
Hi, I'm trying to develop a mobile 5.0 device app via VS 2005 + C# and Mobile 5.0 SDK, this app needs to display different wmv files based on different event, however the System.Media class is not able to be referenced to Mobile 5.0 project. How to play wmv within this environment? ...more >>


DevelopmentNow Blog