Psst! Did you know DevelopmentNow is a mobile web site design agency?

Contact us for help mobilizing your site, or to sign up for our beta Mobile Web SDK!


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# > august 2007

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

Cursor positioning in a TextBox
Posted by Lilith at 8/31/2007 7:43:41 PM
I have a text box I use to update a list of actions as they occur over a long time. My current method is to accumulate the list string inside the monitoring function (so I can write it out to file on exit) and push it out to the text box as the string changes. In essence I'm shoving a new stri...more >>

Closing out threads
Posted by Lilith at 8/31/2007 7:26:37 PM
Maybe I'm making some assumptions about how threads work. I have a form that, on the press of a button, starts monitoring some SMTP connections. On occasions I make changes while the thread is running in the background. To reload the changed options I have to exit the function the thread is r...more >>

Object Hash of Contents
Posted by Evan Camilleri at 8/31/2007 6:58:51 PM
What is the fastest way to get the 'hash' (or CRC32 or whatever) of the contents of an object i don't care what's inside, I just want the 'hash' of its contents (not to mixed with object.GetHashCode() which gives a hash code of an instance, I want the hash of the data contents) Evan ...more >>

Object to Memory Stream
Posted by Evan Camilleri at 8/31/2007 6:53:12 PM
How can I trasform (as fast as possible) an object to a binary memory stream? Evan ...more >>

line with numbers
Posted by vinnie at 8/31/2007 6:29:42 PM
Using asp.net with C#, how can show on the left side of my page the line's numbers? ...more >>

jgjkghlkk
Posted by bobby at 8/31/2007 6:16:01 PM
jhfjhgjk...more >>

string
Posted by bobby at 8/31/2007 5:40:03 PM
jghkghkjkl...more >>

file copy question
Posted by Jassim Rahma at 8/31/2007 5:37:25 PM
hello, i want to know how can i copy a file in a way if it was stopped for a reason it can continue from the last point just like what torrents and file download managers do? thanks.. ...more >>



Strange behaviour
Posted by Michele at 8/31/2007 5:26:09 PM
Please forgive me for the neverending code down here but I cannot find a= = rational explanation of the output of this simple program (really!). Soluzione class has a double[,] field to represent a matrix. A method = named init() fills this matrix with random numbers. The main constructor...more >>

Find the lowest value in an array
Posted by ThomasT22 at 8/31/2007 5:22:00 PM
Hello, I have an array that holds 4 values ( they contain random numbers). I would like to find the lowest value (if there is a tie i would like to find one of the tie.) then remove that value. I am new to Programming and C#. Thanks for any help you can provide Thomas...more >>

Asynchronous Programming Patterns and Techniques - No Concensus?
Posted by Frankie at 8/31/2007 4:57:27 PM
For the first time with my .NET programming endeavors I need to add asynchronous processing capabilities to a library. Before this I was using old-fashioned callbacks. Anyway I was just now doing a bunch of research on my alternatives before I begin to write code. My question below is of a ...more >>

Proposal: allow IEnumerator on foreach loop
Posted by cody at 8/31/2007 4:51:12 PM
Currently it is only legal to use types which has a method named GetEnumerator to be used in a foreach loop. This makes it impossible to use the same Enumerator after and before a foreach loop, because GetEnumerator always returns a new one. My proposal would allow the following scenario: ...more >>

Why can we use foreach without IEnumerator/IEnumerable
Posted by cody at 8/31/2007 1:37:39 PM
Why was this design decision to use this kind of "duck typing" in that case? All you have to do is have a method GetEnumerator() which returns an object providing Current and MoveNext(). IEnumerator and IEnumerable are not necessary. Why is that? And what are these interface good for then? J...more >>

ListViews SelectedIndexChanged Event Options
Posted by ArunDhaJ at 8/31/2007 12:56:06 PM
Hi Friends, I'm using .Net1.1. The SelectedIndexChanged event is generated twice when i change the selection. I think this is because the event is triggered when an item loses focus and the other item gains focus. I want this event to be triggered only once. Plz help me in solving this ...more >>

optional parameter in function definitions?
Posted by WebBuilder451 at 8/31/2007 12:24:03 PM
I'll ask, how do you do it? -- (i''ll be asking a lot of these, but I find C# totally way cooler than vb and there''s no go''n back!!!) thanks (as always) kes...more >>

Button Down State
Posted by shahoo at 8/31/2007 11:43:32 AM
Hi, I want to simulate the two buttons in a scroll bar, i.e, use two buttons and when the user clicks on them and holds the button, I should scroll. My problem is when the button is clicked, It scrolls once not for the time the button is down. Can anyone help me with that please? ...more >>

Pinvoke question: Am I causing this stack overflow?
Posted by Tom Allen at 8/31/2007 10:52:01 AM
Hi, TIA for any help. (Thanks, Mattias Sjögren for your help yesterday! ) I am developing a C# wrapper for a 3rd party API. It processes buffers from a video stream (file) and is structured where the initialization function passes in two callback methods (my code) that the API calls to su...more >>

Program runs under debug mode but stalls in normal mode
Posted by Jothishankar at 8/31/2007 9:29:20 AM
Hi, I am new to c#. I am trying to build an application that does backup of files to an external hard disk. My application behaves strangely. When i run the application under debug mode (F5), it works properly. But when i run it in normal mode (Ctrl+F5) the program stalls in the middle. ...more >>

Worker thread exits when from loads. Why?
Posted by DaTurk at 8/31/2007 9:01:18 AM
Hi, I have this windows app that I'm working on. When it loads it instantiates this object which creates a thread to read data and send it to the form. My problem is, is that I want to keep this thread around for the lifetime of the object, reading and sending data to the from, but it seems...more >>

Taborder
Posted by Michele Len at 8/31/2007 8:50:01 AM
Is possible to know witch is taborder of a control on fly. Because tabindex is difference of taborder Thanks...more >>

ClearQuest API for PERL and VB and NOT FOR C#?
Posted by RocketMan at 8/31/2007 7:58:15 AM
Why would ClearQuest's API manual only show VB and PERL examples? Has anyone used it for C#? ...more >>

C# question getting data from a GridviewRowDataBound
Posted by WebBuilder451 at 8/31/2007 7:58:07 AM
This is what i'm using and it seems way too complicated!! for finding a data item. I hope some one has a better way? private void fn_setRankingColor(GridViewRow gvr) { Label lbl = gvr.FindControl("lbl_RANKINGTODAY") as Label; if ((Int32)((DataRowView)gvr.DataItem).Row["RN...more >>

assembly search path
Posted by DeveloperX at 8/31/2007 7:45:04 AM
I've a shared add in written in C#. It works on the dev machine fine with VS2003 installed, but not on a machine without VS. We've been doing lots of research, and my current concern (discovered using filemon) is that it looks in the app base directory. In this case the app base directory is the...more >>

Stress Testing
Posted by ESmith at 8/31/2007 7:43:20 AM
I need to stress test an application I've developed - are there any libraries/classes that can do things such as limit RAM available, Disk Space, etc. to help determine the system limits? Since I'm developing on a higher end system, I hope that there are either commerical or free utilities ...more >>

YOU MUST KNOW THIS MAN
Posted by abdo911 at 8/31/2007 7:25:46 AM
Allow me to share with you here some information about one man his name is muhammad. In The Name Of Allaah, Most Gracious, Most Merciful YOU MUST KNOW THIS MAN MUHAMMAD (May peace and blessings of God Almighty be upon him) You may be an atheist or an agnostic; or you may belong to anyon...more >>

simulate shortcut key
Posted by rodchar at 8/31/2007 7:20:00 AM
hey all, in my code-behind windows project (vs2005) i was wondering if you can simulate the pressing of key combinations (i.e. Alt + S)? thanks, rodchar...more >>

Application Hosting - Socket App
Posted by Mark at 8/31/2007 5:59:16 AM
Hi all, I've been doing some socket programming for a while and can get a server with multiple clients working fine on my development machine, but what does one need to do in order to have the server application hosted somewhere on the internet? These are more low-scale apps that I don't...more >>

Solutions for Combining Flash pages with ASP.net and VB.Net
Posted by Bond at 8/31/2007 5:41:28 AM
Hi friend I just wanna know how to Combine Fash pages or dreamviwer pages with ASP.Net or VB.Net Page and how to use the AD Rotator Component in ASP.Net thanking you Jitesh tolar http://www.intelcs.com/IT-Companies ...more >>

Please help me Out to Create Session in VB.net/ASp.net
Posted by Bond at 8/31/2007 5:36:14 AM
Hi friends, I need to write a program , where i need to track the Session of each user by using Session ID . I request u all to please provide me the exact coding of using Session ID for validation purpose and to make it avalible on every web page. thank you Jitesh tolar http://w...more >>

Remotely get current page of IE
Posted by Dan Pavel at 8/31/2007 3:36:36 AM
Hi, Is there a way to get remotely, in a intranet, the pages(url) that are open on IE on the computers in the network ? I searched the net but I can't find any info. Thanks, Dan *** Sent via Developersdex http://www.developersdex.com ***...more >>

How to create new file with fixed size
Posted by nano2k at 8/31/2007 2:59:18 AM
Hi For some purposes, I need to create a new binary file and to allocate a fixed length for that file on the disk. I need something like File.Create(string fileName, long initialSizeInBytes). Is there a framework/system method to do that or should I create the file and then fill it until the...more >>

Refresh "parent" form after filling out child popUp form?
Posted by Bob at 8/31/2007 2:06:50 AM
Hello folks! I have a form and when users fill in the form they normally fill in a simple text box. But when they can add several items...such as people on a project, I use a pop up form and they can add as many project members as they like. But after they add the member through the po...more >>

TCP connection to MAC address
Posted by Nicolas Noakes at 8/31/2007 1:49:37 AM
Hello, I would like to convert to following process to code. Any advice is welcome. I have a hardware device which requires the this procedure to set it's IP address. First create an static ARP entry for the device's MAC address and the desired IP address. Then telnet to this IP address on...more >>

SelectSingleNode throwing exception:
Posted by Anup Daware at 8/31/2007 1:25:13 AM
Hi, I have following XML which I need to modify and invoke a http request I need to select a node but I am getting "Namespace Manager or XsltContext needed. This query has a prefix, variable, or user-defined function." Error I am trying to access the <CUSTOMER/> tag with following code: ...more >>

Casting a Windows Handle. Can it be Done?
Posted by ink at 8/31/2007 12:00:00 AM
Hi all, If I have a Windows 32 pointer to and object (Handle) and I know what that object is (Button) can I some how cast that pointer to a type of System.Windows.Forms.Button and then use its methods and properties? I am using C# compact framework 2.0 I have obtained the handle using t...more >>

Properties and configuration
Posted by Jan Eliasen at 8/31/2007 12:00:00 AM
Hi I am having some problems reading configuration values from a configuration file, using C# 2.0. I have programmed a Windows Service, and this part goes well - it runs nicely. Now, the Windows Service must call a Web Service every now and then. I have added the web reference, and made ...more >>

Suppressing compilation warnings
Posted by Claire at 8/31/2007 12:00:00 AM
Visual Studio 2005 In my setup project, I've needed to include external setup files required to install a manufacturers smart card reader drivers. This collection of files includes those needed for 32 and 64 bit installs. Every time I compile my project (even in debug mode where the setup proje...more >>

Setup project
Posted by Claire at 8/31/2007 12:00:00 AM
"The project that you are attempting to add to source control may cause other source control users to have difficulty opening this solution or getting newer versions of it. To avoid this problem, add the project from a location below the binding root of the other source controlled projects in ...more >>

Which comes first?
Posted by Mike at 8/30/2007 10:43:49 PM
Which comes first? The database schema or class design? I'm used to developing the database tables and fields based on the functional requirements of an application, so it makes sense to me to model my objects on the database schema, and their methods on the SQL/stored procs. Most of what...more >>

Invoking System.Diagnostics.Process Start and changing the parent process
Posted by Dax at 8/30/2007 8:11:49 PM
Does anyone know if there's a means by which I can invoke a Process.Start, then detach the process from the calling process. I suppose in a nutshell I'm asking if there's a way I can add the new process to the "explorer" process. Thanks! ...more >>

properly disposing of filestream
Posted by Bob at 8/30/2007 8:09:48 PM
Hi, I am getting an error "The process cannot access the file because it is being used by another process" when I debug a program more than once. The file is being opened for append access with a FileStream. I have implemented IDisposable with the following code, am I doing something wrong or...more >>

Accessing controls on another form
Posted by vbtrying at 8/30/2007 6:28:00 PM
Background: I have a windows form called 'frmMain'. On this form, I have a LABEL control called 'lblWorkStatus', and it's property is set to PUBLIC. On another form, I have a process that checks on the status of a project that our company is working on. Programmatically, if the status changes...more >>

new form not responding
Posted by Achilles____ at 8/30/2007 5:42:00 PM
Im finding problem with this code. When i try to display the newindow, its not responding. It does create the new window, but doesnt respond at all. Just stays blank. I'm fairly new to c#(just a weeks experience), so it could be some basic issue that im not aware of. Please let me know i...more >>

Using reflection to unsubscribe an event
Posted by pedrito at 8/30/2007 5:35:48 PM
I have a library I'm using that has a lapsed listener issue. I figured I'd just sneak in and do the unsubscription myself since I don't expect it to be fixed any time soon. So, I have the control whose event its subscribed to and it's subscribed to the VisibleChanged event and has an event ...more >>

RegisterWindowMessage
Posted by Dansk at 8/30/2007 5:14:37 PM
Hi, I'm looking for the RegisterWindowMessage function in the .Net framework. Well,... I just can't find it. Do I have to dllimport it? TIA, Dansk...more >>

VS2005 Resource Editor - How to make new line from string resource?
Posted by Peter Hartlén at 8/30/2007 4:34:57 PM
I understand that the\n and \r only means something to the C# compiler so when retrieving a line like "Hello\r\nWorld" from a resource file (localized form or self made resource file), it prints the text as just like it was written. Is there any easy way to introduce a newline (tab etc.) in...more >>

Correct usage of the volatile keyword
Posted by Zuma at 8/30/2007 4:25:30 PM
Assuming I have a class like the following; public class Family { private *volatile* Person _child; public Person Child { get { return _child; } set { _child = value; } } } An instance of this class is shared by multiple threads in a multiprocessor syst...more >>

rescale a range of numbers
Posted by Joe at 8/30/2007 3:28:15 PM
I have a range from say 26.43534 - 234.24 and a value of 118.12. I need to change this range to 0 - 255 and find out where my value falls within it (so the value also needs to be rescaled). I thought there was a way to do this by adding 255 but I can't remember how. Any suggestions? -J...more >>

Another question about the listview control
Posted by Dom at 8/30/2007 2:37:29 PM
how do I programmatically select an item in the listview item? In the Listbox, I would just do "ListBox1.SelectedIndex = x". But the only thing similar in the listview is the SelectedIndices Collection, and that is "get" only. ...more >>

Moving project from VS2003 - VS2005 Crystal reports and setup project
Posted by Claire at 8/30/2007 2:18:36 PM
Im transferring a visual studio 2003 project to Visual Studio 2005. The solution includes a windows installation project. With 2003 creating the setup got complicated with the crystal reports part and I had to include several merge projects plus obtain a license key. Is it the same with 2005? I...more >>


DevelopmentNow Blog