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 2007 > threads for monday january 15

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

Urgent pls
Posted by Badis at 1/15/2007 11:09:00 PM
I'm running this code to open a stream as pdf file: Response.ContentType = "application/pdf"; try { mystream = someStream....; byte[] myfile = mystream.ReadBytes((int)someStreamLenght); myfile.Length.ToString(); Response.BinaryWrite(my...more >>


Form constructor taking parameters by reference
Posted by Nikola Skoric at 1/15/2007 10:35:48 PM
I noticed that System.Windows.Forms.Form constructor treats his parameters as though they are passed by reference even if I omit the "ref" keyword. Why's (and how does he do) that? Shouldn't objects be passed by value if I don't explicitly put "ref" in parameter list? -- "Now the storm ha...more >>

inheriting the VC++ template classes into C#.net
Posted by Amu at 1/15/2007 10:24:43 PM
Hi i am stuck up in a part of project where i have to inherit the VC++ template classes into C#.net. Please provide me the solution for this . ...more >>

Failed to convert parameter value from a SqlParameter to a DateTime.
Posted by mikejacobz NO[at]SPAM gmail.com at 1/15/2007 10:17:34 PM
Hi, I am using the Enterprise Application Blocks (Data Access Application Block 2005) and all I want to do is pass in a date as a parameter to a Stored procedure. e.g [Begin C# code] private void testMe(DateTime startDate) { // Create a database object Database db = Database...more >>

What's the new thing after ActiveX?
Posted by ThunderMusic at 1/15/2007 7:39:04 PM
Hi, I need to do some graphics work from my ASP.NET 2.0 Website (can upgrade to 3.0 if really needed). Actually, I need the user to be able to draw some things in a rectangle. Some years ago I would have do it using ActiveX, but now I know MS has a new philosophy about this, probably driven t...more >>

Setting default method parameters
Posted by Mark F. at 1/15/2007 5:07:34 PM
In VC++ you can preassign a default value to an argument passed to a function. CString GetLastName(BOOL bUpper = TRUE, CString sName) { // if the flag is omitted the return string is upper case by default. } Can you do the same thing in C# methods? Thanks, Mark ...more >>

Disposable & 3rd Party Lib & GUI
Posted by davis at 1/15/2007 4:43:56 PM
Hi, I'm wrapping a 3rd party .NET 2.0 CF library which mandates Dispose be called. So, I mandate Dispose be called on my library...I follow the Disposable pattern described on MSDN...and I Dispose of the wrapped 3rd party library in there. My library is meant to be used in Forms. My q...more >>

Swap function
Posted by Jack White at 1/15/2007 4:28:35 PM
Does anyone know if an analogue to the "swap()" function found in C++ exists in C#. For those not familiar, let's say you have a function that loads some collection passed in by reference. If an error occurs while loading then the collection will be in an indeterminate state. The work-around i...more >>



Listview
Posted by Ferdinand Zaubzer at 1/15/2007 4:04:50 PM
Hello, is there any possibility to prevent a ListView from selecting an item starting with a certain letter when pressing the corresponding key? Thanks, Ferdinand...more >>

getting key pressed
Posted by Jerry at 1/15/2007 4:02:48 PM
Hello, I have put a simple form together with a lable and a textbox. I want to be able to trap the ENTER key when is pressed. So I can check the texted enetered. If correct, call up the main program, if not re-prompt for the user ID. Thanks, Jerry ...more >>

Show PDF file in program
Posted by Feldaspar at 1/15/2007 3:43:53 PM
Hi, I have included a PDF file in my project, when the user clicks a button I want that file to display, is this simple? How can I go about this? Thank you ...more >>

Where is System.ServiceModel?
Posted by Ronald S. Cook at 1/15/2007 3:25:07 PM
I am on WinXP but have downloaded .NET Framework 3.0. Isn't System.ServiceModel supposed ot be in there? It's not showing up in my list of .NET references within VS2005. Thanks, Ron ...more >>

Converting a C program to C#
Posted by Gilgamesh at 1/15/2007 3:24:02 PM
I have a program written in C which I need to convert it to C#. This program includes about six header files and it makes calls to functions which havee been defined in other C programs . How can I convert only this program to C# without bothering about other C programs used by this program? D...more >>

Implementing System.ICloneable
Posted by Stefan Hoffmann at 1/15/2007 2:42:28 PM
hi, the following implementations work: public class NullSafeCollection: System.Collections.CollectionBase, System.ICloneable { object System.IClonable.Clone() { NullSafeCollection clone = new NullSafeCollection(); for (in...more >>

Label change on MasterPages
Posted by bonokoot at 1/15/2007 1:44:01 PM
Hello, I have a MasterPage with a Label that I want to display a custom description of the page and when the user clicks to different links on my website I would like that description to change. Anyone have any examples of how to do this or a site with an example? Thanks ...more >>

how to refresh desktop items in c#
Posted by Tee at 1/15/2007 1:31:20 PM
Hi, How do i refresh windows destop in c#? currently with my c# app, it deletes an existing desktop icon and recreates a new one base on the new informations the user provided. All seems to work except the deleted icon just sitting there and disappeared as soon as i pressed F5 (or refresh)...more >>

Convert Class Object to JSON string?
Posted by quantass at 1/15/2007 1:18:39 PM
Im using C#, ASP.NET v1.1. My class contains intrinsic types, ArrayList, and XmlDocument types. Some variables have the value NULL. After usng XmlSerializer and the information on: http://www.phdcc.com/xml2json.htm I'm having issue fully converitng my class object to a javascript readable st...more >>

Compact Framework 2.0 & WM2003
Posted by Stanislav Vlasic at 1/15/2007 1:17:33 PM
Hi. I'm developing application for compact framework (windows mobile 2003) in C# and have one problem. From application, I'm connecting to FTP server and downloading some files. The problem is that I can connect to ftp only when internet connection is already established on device. If there...more >>

How random is random()?
Posted by Daniel at 1/15/2007 1:14:07 PM
Hey guys Using Random(), how random is it, is it possible to be predicted? I have a requirement for a very good random number generator. I was doing something such as: Random randomSeed = new Random((int)_seedTimer.ElapsedTicks); _random = new Random(randomSeed.Next(...more >>

Setting a controls properties from another form
Posted by surfrat_ NO[at]SPAM hotmail.com at 1/15/2007 1:01:04 PM
Hi, I have a project that loads a splash screen while initialization takes place. On the splash form is a label that I want to update with messages on what is happening with the initialization. Before the main form is loaded I show the splash screen and then try to update the splash label to ...more >>

LARGEADDRESSAWARE
Posted by Frank Rizzo at 1/15/2007 12:36:59 PM
Ok, it is easy enough to set a binary to be LARGEADDRESSAWARE. But how can I find out whether the binary has been set to LARGEADDRESSAWARE or not? Thanks....more >>

Create shallow copy of CollectionBase inherited class
Posted by Stefan Hoffmann at 1/15/2007 12:29:16 PM
hi, as i'm farely new to C#, i have some problem of creating a shallow copy of a class inherited of CollectionBase. As far as i see, i just need to copy the CollectionBase.List using the CopyTo method. Here i'm stuck: public class myCollection : System.Collections.CollectionBase {...more >>

Can the index type of an array be determined?
Posted by HÃ¥kan Johansson at 1/15/2007 12:14:07 PM
Being new to C# I wonder if the index of an array can be some other ordinal type than int? Coming from Delphi, I can determine the type of the index as well as the type of the elements, but haven't had any success with C# so far. The following example yields the compiler error: error CS0118: ...more >>

consuming unmanaged DLL from managed C#
Posted by Tremendo at 1/15/2007 11:29:53 AM
[I posted this in ...dotnet.framework.interop last week, with no luck. The question seems long, but I think that the answer should be easy and quick for someone who knows it.] Hi, I need to consume an unmanaged DLL from managed C#. The DLL is "ae766.dll". I have problems with one function in...more >>

How random is Random()
Posted by Daniel at 1/15/2007 11:12:21 AM
Hey guys Using Random(), how random is it, is it possible to be predicted? I have a requirement for a very good random number generator. I was doing something such as: Random randomSeed = new Random((int)_seedTimer.ElapsedTicks); _random = new Random(randomSeed.Nex...more >>

Filter out emailaddresses
Posted by Arjen at 1/15/2007 10:44:28 AM
Hi, I have the source of a HTML file which contains a list of contacts. Now I am looking for a tool/script which can read the file and gives me back all e-mail adresses. Can somebody help me with this? Thanks! Arjen ...more >>

Enumerators that need to be changed at runtime, avoiding exception
Posted by Daniel at 1/15/2007 10:32:16 AM
Hi guys In regards to the foreach and for loops. I am trying to avoid this exception:exception: "Collection was modified; enumeration operation may not execute. System.InvalidOperationException" The problem is i have a timer, that checks at an interval for any changes to a list if the...more >>

Custom Sort Order
Posted by Ethan Strauss at 1/15/2007 10:05:27 AM
Hi, I want to be able to create a custom sort order for a Sorted List. Specifically, I have a grid which goes from A1 to H12. The default sort gives me A10, A11, A1, A2 ... I would like to change it so that it first sorts by the alphabetical character and then the number. I have figured o...more >>

regular expression
Posted by JJ at 1/15/2007 9:49:14 AM
I need the data passed in from the textbox to be in a certain format, eg xxx-xxx or empty string. What is the regular expression syntax for that? Thanks ...more >>

Windows CBT Hooks (Help!)
Posted by andyblum NO[at]SPAM gmail.com at 1/15/2007 9:47:23 AM
I hope you can answer a question. I am writing a poker utility that tracks what windows are open and displays information about opponents that are still playing and their previous history that is stored in a game DB. It is a very cool project with Pattern Recognition (Pixel Screen SCraping to ...more >>

Using Multi threading
Posted by vishal at 1/15/2007 9:29:08 AM
hi dear i am working on .net(1.1) web service and due to delay in response i made it multi threaded but when i passed a object in function which is called on a new thread, it is throwing ObjectNullReference exception... because it is unable to get value from the property of that object.... ...more >>

Accessing from C# to an vb dll
Posted by jaume.pf NO[at]SPAM gmail.com at 1/15/2007 9:21:10 AM
Hi, I've a vb dll with a function that i want to access from C#. I'm using the following: public class library { [DllImport("myDll.dll", CharSet = CharSet.Auto, EntryPoint = "clsLibrary")] public static extern void create(); } and: library.create(); but i'm getting Sytem...more >>

detecting changes of subproperties
Posted by nicolasr at 1/15/2007 9:18:16 AM
Hi, I'm writing a custom control that has several class type properties, f.e. ImageList, List<string>, StringFormat. None of these classes seems to provide a 'Change' event. The result of this is that I don't get notified when the user edits the subproperties at design time and am unable to ...more >>

Event Handles in .ASPX (.CS)
Posted by Jake K at 1/15/2007 8:57:02 AM
In C#, where do you defined event handlers? In VB.NET you could do something like: Public Sub btnNext_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnNext.Click end sub Is there an equivalant in C#? All code written in notepad. No VStudio / Express to wo...more >>

regular expression
Posted by JJ at 1/15/2007 8:28:31 AM
I need the data passed in from the textbox to be in a certain format, eg xxx-xxx or empty string. What is the regular expression syntax for that? Thanks ...more >>

Do-Nothing WinForm App Using 4 Threads?
Posted by gsimmons at 1/15/2007 6:17:54 AM
I've been researching multi-threaded WinForms apps and thread synchronization stuff for a couple days since I'm working on refactoring a multi-threaded GUI app at work and want to be sure it's rock solid/thread-safe. I've seen all the posts about using BeginInvoke to have worker threads interact...more >>

Convert to Char[] or just use String[i]
Posted by pigeonrandle at 1/15/2007 6:11:01 AM
Quickie time! Is indexing using String[i] to get individual characters 'as quick' as converting the String to a Char[] and then using Char[i]? Is the conversion to Char[] worth the processing? In advance, i thank you, James Randle. ...more >>

RadioButton's in different containers belonging to the same group.
Posted by Velislav at 1/15/2007 6:07:38 AM
Hi, I've got 9 RadioButton's in a TableLayoutPanel container They all need to be in the same group, but 2 of them are in FlowLayoutPanel containers within the cells of the TableLayoutPanel, hence i have 1 group of 7 RadioButton's and 2 groups of 1 RadioButton and not 1 group of 9 RadioButto...more >>

deploying webform?
Posted by rcoco at 1/15/2007 4:40:30 AM
Hi, I've been working on local host to create a webform in asp.net. now I'supposed to deploy it on another server how could I do this? Thank you ...more >>

publishing problem
Posted by dani kotlar at 1/15/2007 2:22:55 AM
my solution contains xml and text files that the application uses to store and retrieve data. the text file were created automatically in the bin\debug folder and the xml is in the application folder with the ..cs files. when I publish the application using the publish wizard and and then instal...more >>

Distributing signed assemblies
Posted by stormogulen at 1/15/2007 2:11:22 AM
Hello, Just a quick question concerning signed assemblies: I have developed an application which uses a number of signed assemblies. Now I would like to distribute the source code (ie. the entire project) of the application as an example, but I do not want others to abuse the signed assemli...more >>

Using a regular expression to retrieve the text between two parentheses
Posted by Mark Rae at 1/15/2007 1:54:38 AM
Hi, Supposing I had a string made up of a person's name followed by their profession in parentheses e.g. string strText = "Tiger Woods (golfer)"; and I wanted to extract the portion of the string between the parentheses i.e. "golfer" Would a regular expression be the most efficient w...more >>

SqlDataAdapter, Stored Procedure, how to add parameter?
Posted by dawson at 1/15/2007 1:52:01 AM
Hello, from the code below, how do I add/send a parameter to the stored procedure? SqlConnection conn = null; conn = new SqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString); conn.Open(); SqlDataAdapter daProjects = new SqlDataAdapte...more >>

Detect inactivity
Posted by Sonya at 1/15/2007 12:36:59 AM
Hi, can an application detect if windows starts the screensaver? So that my application can do some work while the user is afk. Greetings Sonya...more >>


DevelopmentNow Blog