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# > june 2006 > threads for monday june 12

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

TVM_GETITEM - HELP in C#!!
Posted by emerson.suguimoto NO[at]SPAM gmail.com at 6/12/2006 11:42:38 PM
Hello I can't figure out how to make my SendMessage work with TVM_GETITEM in C#. There is no way it works! I=B4ve tried everything possible! I could get every item handle... but I still dont know how to make it work! [DllImport("User32.dll")] public static extern IntPtr Fi...more >>


c dll to c#
Posted by Arda Zuber at 6/12/2006 11:20:01 PM
Hi everyone. I have a .dll that i want to call from a c# source. But i can't figure out a way... Here are the .dll's input variables and the definition. extern "C" void _stdcall MyFunc(unsigned char var1[100], int length, unsigned long *arrFinal) And I want to call it by [DllImport(path...more >>

Using time for scheduling task.
Posted by archana at 6/12/2006 9:34:20 PM
Hi all, I want to develop one windows service in which i want to provide some scheduling facility. What i want is to take start time frm one xml file and then at that specified start time. Which timer should i use in windows service to start particular process at user specified time. ...more >>

Adding new items to an arraylist
Posted by Extremest at 6/12/2006 7:47:13 PM
Is there a way to add new items to an arraylist witht he indexer? like with a normal array I can just do like array[x] = new. What I have read with arraylist it will throw an exception if I try to do this. Or is there a way to find out how many things are actually in an array without it count...more >>

ASP C# - Compiler Error Message: CS0030
Posted by WayDownUnder at 6/12/2006 7:44:01 PM
Hello , When I run my application in Visual Studion everthing works ok. But when I publish to our web server i get the error Compiler Error Message: CS0030 I am trying to open a popUP window with the following code <a href="javascript:OpenCalendar('<%= txtBedpAdmissionDate.Client...more >>

Looking for practice programming problems
Posted by antoan at 6/12/2006 6:35:42 PM
Hi, I am looking for C# practice/interview programming problems and NOT general framework explanatory questions. The ones I've come across I find a wee bit easy. I'd like to find material that tests not just technicality or knowledge of the language but also one's problem solving abiliti...more >>

Get Windows directory
Posted by perspolis at 6/12/2006 5:49:56 PM
Hi How can I get name of Windows directory in c# without using API?? ...more >>

Argument Exception with Double.CompareTo
Posted by Brian Richards at 6/12/2006 5:35:14 PM
This code throws an exception: Double foo = 1.0; Console.WriteLine(((IComparable)foo).CompareTo(1)); But this does not: Double foo = 1.0; Console.WriteLine(foo.CompareTo(1)); Does anyone know why? I'm assuming it has to do with the way Double implements IComparable and it's trying t...more >>



Session
Posted by BSGY at 6/12/2006 5:14:17 PM
Hello, There are 2 projects in our Solutions. Project1; Session("abc") = 1 Project2; dim x as string = Session("abc") x as nothing in this sample. Why ??? Can i use a session in my solutions (like share) ? Thanks, ...more >>

How to know when tablestyle changes?
Posted by Brett Romero at 6/12/2006 5:01:26 PM
If I have a customDataGrid (.NET 1.1) with several tablestyles loaded, how can I tell when the user switches between tablestyles? I want to do this from inside the datagrid. I have tried this event, this.TableStyles.CollectionChanged, but that doesn't do it. I allow the user to switch betwe...more >>

Generating very large string in C#
Posted by Dukkov NO[at]SPAM yahoo.com at 6/12/2006 4:59:09 PM
Hi Folks, I need to generate a very large string (1 MB or so) in my C# code, so I can test the code. What is the most elegant way to do so? Thanks! Dim ...more >>

Inch / Metric value
Posted by Rainer Queck at 6/12/2006 4:06:11 PM
Hi NG, in a dataset.datatable I have rows, containing metric data as doubles. I need to display/edit these values in textboxes depending on the culture (Metric/Inch). Is there something like a built in conversion functionality for that in the framework / visualstudio or do I have to do these...more >>

System.ComponentModel.Win32Exception
Posted by Giulio Petrucci at 6/12/2006 3:56:46 PM
Hi everybody, I wrote a Windows Service with VS2005, then I compiled it for FW1.1 using MSBee, obtaining no compiler errors. I tried to install it using the "InstallUtil.exe" command in the FW1.1 installation directory but the installation process failed and I got a System.ComponentModel.Win3...more >>

Anchor and scaling
Posted by Daniel at 6/12/2006 3:15:11 PM
Hey guys I acnhored my control to the bottom right corner of my form. That when when i resize the form the control stays int he correct place. The only problem is it doesn't resize the control , so the form gets smaller and my control although in the right place remains too big. How do...more >>

Accessing Web Application Cache in Class Library
Posted by Fred Nelson at 6/12/2006 2:58:25 PM
Hi: Newby Question (hopefully): I would very much like to be able to read and update application cache values directly in a class library. I have added the reference to my class lib: using System.Web.Caching; however this doesn't work - is there a way to do this? The command: Ca...more >>

Asynch Sockets over UDP: How do you Know when a socket dissconnects
Posted by DaTurk at 6/12/2006 2:53:14 PM
I have this application that has one sender, and multiple receivers, the receivers are subscribing to a multicast group to which the sender is sending information synchronously, while the receivers are receiving asynchronously. My issue, is that if the if the receiver's socket disconnects for a...more >>

Moving files with large file names into Recycle Bin
Posted by avalain NO[at]SPAM gmail.com at 6/12/2006 2:48:43 PM
Hi, I am trying to delete files programmatically and put them in the Recycle Bin. I am using SHFileOperation and everything works fine, except when I try to delete files with more than 10 characters in the name (not including the extension). So if the file is named "testerfile.jpg" it will work....more >>

RegEx to get parms from URL
Posted by Dave at 6/12/2006 2:27:02 PM
Given a URL of http://Somthing/Somthing.asp?parm1=val1&parm2=val2&parm3=val3 I'm trying to create an expression that gives me: parm1=val1 parm2=val2 parm3=val3 As either distinct group values (Match (str).Groups) or as captures of a group (Match (str).Groups[1].Captures) I've tried @"...more >>

Dump SQL Server database to XML through C#
Posted by Jenden0 NO[at]SPAM gmail.com at 6/12/2006 2:20:09 PM
Ok, I'm trying to dump an SQL Server 2005 database to XML via C#, and I'm having some troubles. I'm relatively new to the whole .net thing, so there may be some stupid/basic questions/assumptions involved. The first way I thought about doing it was dumping the entire dataset to XML. However,...more >>

DateTime Comparision
Posted by ajs at 6/12/2006 1:35:42 PM
I have a process that verifies that a server is running. If the server stops responding I send an email to a support person. Now I want to add a downtime indicator so that my code does not send mail if the sever has a scheduled downtime say, Sunday at 23:00 for 4 hrs. Is there an easy way t...more >>

Custom Control Event
Posted by Marc Solé at 6/12/2006 1:32:43 PM
Hello to everybody. I have a little problem with a Custom Control that I have created. The thing is that in my control, when I click a button, it should create another object in the main form. My control is located in a TabPage, and I want that when the user clicks a button, a new tabPage i...more >>

alternatives to unboxing..
Posted by gökhan at 6/12/2006 1:28:33 PM
Hi! I fear this question might be too basic, however being a c++ veteran I have trouble to get a good desing in c# running. // a base class class Vector{}; // inherited class class VectorChild:Vector{}; class VectorChildChild:VectorChild{}; // some other class class A { public void ve...more >>

Using BITS to upload a file.
Posted by UJ at 6/12/2006 1:25:20 PM
I'm using the MS wrapper for BITS (Microsoft.MSDN.Samples.BITS) and I don't see any way to upload a file. Does anybody know of how to do that? TIA - Jeff ...more >>

Deserialize in constructor
Posted by jhcorey NO[at]SPAM yahoo.com at 6/12/2006 12:52:16 PM
I have this method in class Foo: public Foo DeserializeXML(string sXML) { XmlSerializer serializer = new XmlSerializer(typeof(Foo)); StringReader sr = new StringReader(sXML); return (Foo)serializer.Deserialize(sr); } which seems to work fine if I do this: Foo myFoo = ne...more >>

Drawing over child controls
Posted by R2D2 at 6/12/2006 12:49:02 PM
Hello, I am trying to get a form to draw arrows linking 2 list boxes to each other. I can write the code to draw the arrows / make them follow the boxes around when they are dragged around the form, however, the form always draws the arrow under the child controls. I was wondering if anyo...more >>

Forms Authentication -- A doubt ?
Posted by vivekian at 6/12/2006 12:33:49 PM
Hi , When using forms authentication in .Net , was wondering how can it be made sure that when a page load to a page say default.aspx is made , that it has been redirected from a page say login.aspx and not a direct hit to the page. Thanks, vivekian ...more >>

Application Data Caching
Posted by Fred Nelson at 6/12/2006 12:28:50 PM
Hi: This is probably a newby question however I can't figure it out! I'm trying to use application data caching in a web application. I have read an article on 4 guys from rolla that shows the following syntax: Write: Cache["key"] = value; Read: value = Cache["key"] - or - value ...more >>

Database: table field casting problem
Posted by Jim Stools at 6/12/2006 11:33:16 AM
Int16 iValue = (Int16) dr["Portfolio_Number"]; The field name is "Portfolio" and it is a Int16 - however I get an error: "Specified cast is not valid". Any ideas -- Thanks in advance. ...more >>

Validate SQL Expression
Posted by Kevin at 6/12/2006 11:26:21 AM
Hi! How to validate a SQL Expression in C#? Thanks! ...more >>

Comparison of 2 GetValue() calls seems incorrect
Posted by Byron at 6/12/2006 11:16:02 AM
I have a class that stores values of various types in public properties with private fields behind them. In addition to the field that is accessed through the public properties there is another private field by the same name, preceded with _Old that holds the previous value. So a public prop...more >>

foreach
Posted by Michael Brown at 6/12/2006 10:06:40 AM
Hi there. Can anybody comment on the efficiency of the following technique: foreach (SomeItem Item in SomeNativeDotNet.Collection) { // Whatever } My concern is that the "Collection" property itself may be invoked on each iteration rather than being called just once at the outset of "...more >>

Multiple Thread Problem
Posted by va_acharya at 6/12/2006 7:50:16 AM
I have a timer control on a windows form. From the tick event(t1_tick) am creating an object of a thread which is calling a function test() which is an empty function void test(){}. Timer interval is 5 secs, s after evey 5 seconds it checks whether the thread object is null o not. If it is not...more >>

Give a value with the sign \ to a string variable.
Posted by Niron kag at 6/12/2006 7:41:02 AM
Hello! I want to give a value with the sign \ to a string variable. The problem is that the program always add the sign @ before the variable. The next line gives me : @"Name\shai" string str = "Name\\shai"; I want str to be only: "Name\shai" . How can I do it? Thanks in advance....more >>

Auto-Updates using MSI
Posted by reshugoyal NO[at]SPAM gmail.com at 6/12/2006 6:50:04 AM
Hi, I need to implement Auto Updates in my application wherein I will be installing the application using msi. First time I will be installing it through CD.( Directly running the MSI file) Next time any of my clients run the application and if newer version is available(which has to be speci...more >>

AntiAliased Form
Posted by Just close your eyes and see at 6/12/2006 6:31:02 AM
Hi All i had made a borderless and shaped window using this code public Form1() { this.FormBorderStyle=FormBorderStyle.None; } protected override void OnPaint(PaintEventArgs e) { e.Graphics.SmoothingMode=SmoothingMode.AntiAlias; GraphicsPath GP=new GraphicsPath(); //Codeing to get any s...more >>

C#, dao, optional parameters and Seek method
Posted by info NO[at]SPAM pstruh.cz at 6/12/2006 6:27:41 AM
I need to use DAO in one of my applications. It was too hard to pass through by optional parameters for several methods, but now I'm totally lost at DAO seek method (the main method for key s). The method has a next declaration: Sub Seek(Comparison As String, Key1, [Key2], [Key3], [Key4], [Key...more >>

Very confused with CellSet
Posted by jhcorey NO[at]SPAM yahoo.com at 6/12/2006 6:05:22 AM
I have the code below that works fine. Note that CellSet does not have a constructor, so I don't have a default way of initializing it. If I try to do something else in the catch block, either ExceptionManager.Publish(ex); or simply commenting out the line, I get a compile error: "Use ...more >>

Visual Styles
Posted by MLM450 NO[at]SPAM hotmail.com at 6/12/2006 5:51:47 AM
I want to use visual styles in my app, but it is causing a problem with a DLL I use. Is there a way to disable visual styles for that DLL? I do not have access to the code for the DLL. The DLL's developer is aware of the problem but will not have a fix ready in time for me. ...more >>

.Net 2.0 classes very buggy?
Posted by Ryan at 6/12/2006 5:31:38 AM
Hi all, I'm playing with Lutz Roeders Reflector and have found several areas where I think there are issues in the framework libraries. I can't see how the following should work as expected and the compiler gives me an error on the 'text1 = text1...' line. Is it really this buggy (this partic...more >>

Professional Web Designs
Posted by arvyly at 6/12/2006 4:58:58 AM
Professional Web Designs Professional Web design and other web development is what wicked innovations specialized. Internet Marketing - Website Traffic - SEO Tips. Internet marketing solutions, marketing tips for increased web site traffic, professional web templates, affordable web hosting...more >>

Thread DataSlot
Posted by b.fokke NO[at]SPAM gmail.com at 6/12/2006 4:47:56 AM
The Thread class exposes AllocateNamedDataSlot() and AllocateDataSlot() methods which allow allocating memory for thread-specific data. How is this different from encapsulating each running thread in a class and using that class to store the data? Bram Fokke Utrecht, the Netherlands ...more >>

Process StandardInput Limitations ?
Posted by [ripper] at 6/12/2006 3:28:29 AM
Hello, I'm building a software to interface with an .exe that will parse a text file (a lex program build in cygwin that works great when it's executed on it's own). The OutputXML is more than 150 000 characters and the software always bugs at the 20479 character, it just seems to hang and no...more >>

Threading in C#
Posted by venkat at 6/12/2006 2:38:29 AM
Hi, I have a page that calls a sql procedure and it runs for 20 - 40 min. I use usual threading for this page. <code>Thread objthread = new Thread(new ThreadStart(ticketingThread)); objthread.Start();</code> As i dont know when it will end. i never abort the thread. what happens is when us...more >>

Threading in C#
Posted by venkat at 6/12/2006 2:38:28 AM
Hi, I have a page that calls a sql procedure and it runs for 20 - 40 min. I use usual threading for this page. <code>Thread objthread = new Thread(new ThreadStart(ticketingThread)); objthread.Start();</code> As i dont know when it will end. i never abort the thread. what happens is when us...more >>

Find and select a item in datagridview using value (don have the i
Posted by Lars E. Nes at 6/12/2006 12:49:02 AM
Hi all. I would like to automaticly select a item in a datagridview using the value of column[0]. I do not have the index. Just the value (which is a string). How can this be done? Thanks....more >>

problem switching from my program to another task
Posted by KeyboardSurfer at 6/12/2006 12:35:31 AM
I am still having problems with switching thru tasks in such a way that it will work properly for me ... here is the basic information and a code snippet follows below .. My program is running and I need to switch to another (directx based) program already running as a task. The code I have ...more >>

Instrumentation suggestions
Posted by Marc Gravell at 6/12/2006 12:00:00 AM
Has anybody got any recommendations for good quality instrumentation performance / usage trackers for C# (2.0) code? Ideally that doesn't require exhaustive manual insertion into source? I don't mind whether it plugs into the IL directly, or requires a bespoke build etc. Going back a few years...more >>

Installing Assembly in GAC
Posted by Dylan Parry at 6/12/2006 12:00:00 AM
Hi folks, I've written an application that (in a very cut down form) looks like this: namespace Opus2.Page { public class Admin : System.Web.UI.Page { public void Page_Load(object sender, EventArgs e) { ... } ... } } I have compil...more >>

Using NAnt RC4 to build .Net 1.1 Code
Posted by SenthilVel at 6/12/2006 12:00:00 AM
Hi I am in a conversion project of Code from .Net 1.1 -->.Net 2.0 . 1. I am going to build all my projects with NAnt RC4 version and also with VS2005 to check the affected Areas. 2. I have both the Versions of my code in my machine, 1.1 and 2.0. 3. My requirement is to use NAnt RC4 version...more >>

XmlValidationReader and xs:AnyType
Posted by Soren S. Jorgensen at 6/12/2006 12:00:00 AM
Hi, I'm using .NET 1.1 Under a specific node in my XML schema I want user of my app to have the ability to put in any XML he/she chooses. So I defined this parent node as xs:AnyType. The rest of the XML file should be validated against the schema using the XmlValidationReader - but t...more >>

Cannot use Dataset Designer
Posted by Ian Semmel at 6/12/2006 12:00:00 AM
While making changes to my database etc, something stuffed up and when I try to use dataset designer I get the message Failed to load dataset because of the following error 'Unable to find connection 'QfrsConnectionString (Settings)1' for object 'Settings'. The connection string could not ...more >>


DevelopmentNow Blog