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 thursday may 11

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

Is it possible to Define multiple assembly attributes of the same type in one assembly?
Posted by Andreas Mueller at 5/11/2006 10:44:05 PM
Hi all, I have an attribute class: [AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)] class MyAttribute : Attribute { public MyAttribute(){ } } In one assembly I define the attribute multiple times: [assembly: MyAttribute()] [assembly: MyAttribute()] [assembly:...more >>


ASP.net - Themes
Posted by WayDownUnder at 5/11/2006 10:37:02 PM
Hello, I have a theme in my project . I use the page directive <%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="Content01.aspx.cs" Inherits="Content01" Title="Untitled Page" Theme="Summer" %> The page does not seem to pick up the theme. the pa...more >>

NewBie help.
Posted by archana at 5/11/2006 10:23:01 PM
Hi all, I am having confusion regarding following code:- HttpWebRequest wr = (HttpWebRequest)WebRequest.Create( url ); WebResponse resp = wr.GetResponse(); MessageBox.Show(resp.ResponseUri.ToString()); Above code fails for some url. It was giving error 'The remote server returned an erro...more >>

through asp.net in C# how to check a web site is up
Posted by Suresh.P.R at 5/11/2006 9:40:02 PM
Hi, Through ASP.Net in C# how we can check automatically that the Web Site is up. Or generally through .Net windows application how we can check a particular web site is up. Please inform me, Suresh...more >>

ETA for Service Pack for .NET Framework 2.0 and VS.NET
Posted by Jeremy S. at 5/11/2006 8:52:45 PM
About 6 months ago MS announced that a service pack for .NET Framework 2.0 and VS.NET (2003 and 2005) would be available around mid-year. Any update on that ETA? (we're approaching mid-year now) Just curious (and yes, I googled this and found nothing helpful) -J ...more >>

asp.net, C#, constructor in new class
Posted by Ranginald at 5/11/2006 8:24:06 PM
I am learning C# and asp.net and am trying to create a new utility class. The default code you get from vwd express is: /// <summary> /// Summary description for ddlCode /// </summary> public class someClass { public someClass() { // // TODO: Add constructor logic here // ...more >>

What is the unit in DirectX ?
Posted by Boki at 5/11/2006 8:17:40 PM
Hi All, For DirectX, we can set the x, y, z, axis, but what is its unit? pixel, or center meter or ? ex: verts[0].X=150; Best regards, Boki. /////////////////////////////////////////// public void OnCreateVertexBuffer(object sender, EventArgs e) { VertexBuffer vb = (VertexBuffe...more >>

How can I get my VS2003 Form files splitted in 2 Partial class flies like in VS2005 ?
Posted by TheSteph at 5/11/2006 6:50:19 PM
In VS 2005 Form files are in 3 parts : From1.cs, Form1.Designer.cs and Form1.resx. In VS 2003 there is only one ".cs files". How can I split my old VS2003 ".cs files" files in 2 files : From.cs and Form.Designer.cs, and get thoses file "grouped" in the Solution explorer under the main...more >>



Master Pages - public properties
Posted by WayDownUnder at 5/11/2006 6:38:02 PM
Hello I am having trouble accessing a public porperty that my master page exposes I try to access it in a content page but the property is not visible through intell sense. Master Page ''''''''''''''''''''''''''''''''''''' string m_PageHeadingTitle = "My Company"; public str...more >>

CallContext thread safe
Posted by Tommaso Caldarola at 5/11/2006 6:23:04 PM
If I call System.Runtime.Remoting.CallContext.SetData() and then I call System.Runtime.Remoting.CallContext.GetData() from a different thread I get null, if the thread indeed is the same I get right data. How to do CallContext.GetData() thread safe? Inviato da X-Privat.Org - Registra...more >>

How to cancel a BackgroundWorker in a blocked state ?
Posted by Sagaert Johan at 5/11/2006 5:58:10 PM
The backgroundworker contains a blocking call to UDPClient.Receive How do i unlock this thread so the backgroundworker can be cancelled ? Johan ...more >>

CSharp compile's bug?
Posted by www.s1985.com at 5/11/2006 5:50:01 PM
bool b = true; if(!b) goto end; string str="str"; end: Console.Write(str); compiler throw error message 'unassign variable "str"'. this error explain compiler was find variable define, but don't execute assing sentence. Why?Is't a bug?...more >>

Lock problems with System.Timers.Timer
Posted by Ben at 5/11/2006 4:54:04 PM
Hello everybody I got confused by this problem for which I don't have a logical explanation. There is a Thread (ThreadA) which receives Events from another system thread (ThreadS). ThreadA then adds a time stamp to the received event and adds it to a event queue. This works well (therfore no...more >>

Copy/Cut/Paste menu
Posted by Sasho Popovski at 5/11/2006 4:53:07 PM
Is there elegant way to create Edit menu in MainMenu with standard Copy/Cut/Paste MenuItems which will work on the Application level. There ara Copy/Cut/Paste methods connected to the TextBox-es, but i need a general functionality in MDI Oriented Application. If there is a way to get the cur...more >>

list of avaible video capture devices
Posted by xer at 5/11/2006 3:10:24 PM
How can I get list of avaible video (Screen Capture Direct Show Filtres too) and audio capture devices? ...more >>

copy 1 dimensional to 2 dimensional array with actual int values
Posted by j-in-uk at 5/11/2006 3:09:15 PM
Hi, I have a table with 2 columns and a one dimensional string array. I need to copy the string array to the table but I think I have to convert my string array to a 2dimensional array first with an incremental id inorder to add to table. any suggestions how to? thanks DataTable dtContinent =...more >>

Control properties are not enabled
Posted by Steve Teeples at 5/11/2006 2:58:02 PM
I have a base form that I use for creating a common look and feel of all my forms. On the base form I've set all "Modifiers" to public so that the inherited forms can edit them. I have a statusstrip on the base form. It's Modifier is set to public, but the inherited forms cannot edit any of...more >>

Language="C#" required in code in front
Posted by fred at 5/11/2006 2:54:07 PM
Does anyone know why Language="C#" is required in the code in front of aspx and ascx files? for example in the header of my aspx file: <%@ Control Language="c#" Inherits="Blah.Apps.Controls.Announcement" CodeFile="Announcement.ascx.cs" %> if i don't have that in the header, Announcement....more >>

Objectlists and memory
Posted by Peter Hartlén at 5/11/2006 2:45:28 PM
Hi! The basic questions here is how an object is stored in memory. I have an list of a custom object, where the object has a couple of fields, properties and methods. If we pretend that he fields take 24bytes, the properties take 12bytes and the methods take 36bytes of code for this part...more >>

time out
Posted by Adrian at 5/11/2006 2:17:29 PM
Hi I have some lines of code that call an external COM object if they are responding all is OK however it they are not I sit waiting... So how can I set a timeout for them? the com Object returns an XML Doc the line is as follows: xml_doc.LoadXml(my.AxOb()); So how do I only wait...more >>

Serialization Question for .Net 2.0
Posted by V at 5/11/2006 1:15:32 PM
Hi, I am trying to ascertain if Object Serialization (binary or xml) has been improved (new classes, or new ways) from version 1.1 of the .net framework. I pretty much know how to do that in 1.1, and am working on a program which requires this. So before re-using the old concepts, i was try...more >>

?? Can I Limit Member Visibility to the Namespace ??
Posted by Alan Foxmore at 5/11/2006 1:05:01 PM
I understand about public, internal, protected, etc. Is there a way to ensure members are accessible within the same namespace only? In other words, I want to prohibit access to members outside the namespace. Can this be done? I don't think so. Thanks -- Alan Foxmore ...more >>

Friend classes
Posted by Padu at 5/11/2006 12:59:59 PM
Is there such a thing in C#? If not, is there a workaround or suggested shift of paradigm? I know friendly classes can be evils sometimes, but some other times it may be very helpful. If you think about the memento pattern, it is nice for the memento to expose two interfaces, one for the wo...more >>

How to insert characters at cursor's current location
Posted by Melson at 5/11/2006 12:00:17 PM
Hi Can anyone help. How to insert the selected item in the listbox to the current location of the cursor in the notepad or other program. Thanks. Regards Melson ...more >>

Sql connection performance advice please!
Posted by Steven Blair at 5/11/2006 11:49:34 AM
I have a DB connection performance issue in my C# app. I have used the Stopwatch to track how long it takes to do a couple things. Creating a SqlConnection object takes 19ms, and Opening a connection (Sql2005) takes roughly 120ms. Connecting to Sql2000 is around 64ms. Does this sound correc...more >>

Want to call a method before visible=true for a form
Posted by tony at 5/11/2006 11:45:16 AM
Hello!! I have an application that consist of several windows forms. Lets call these A,B and C for simplicity. I have one main meny where the user can choose window form A or B or C. When a user bring up a window for the first time I create an instance otherwise I just set visible = true. ...more >>

properties
Posted by RobcPettit NO[at]SPAM yahoo.co.uk at 5/11/2006 10:42:45 AM
Hope I word this ok. Ive created a class, which I added to my references. In the class ther is public method called isloggedin. when I check the objects I see 'public bool IsLoggedIn { get; } Member of BetBetter.Betfair.BetfairWrapper'. My project compiles fine, runs ok, as Im not requesting...more >>

Create Sticky Note like with listbox
Posted by Melson at 5/11/2006 10:33:02 AM
Hi Does anyone know how to create a similar sticky note UI with listbox and I can select the item in the listbox. Thanks. Regards Melson ...more >>

printing blues regarding margins
Posted by CobraStrikes NO[at]SPAM al.com at 5/11/2006 9:48:17 AM
Hi, I am having problems setting the margins of a page as all the settings I have tried are read only, Can you suggest how I can set the page margins. Thank You. ...more >>

Return value of method
Posted by Toco at 5/11/2006 9:36:02 AM
Hello. I have method (called GetKey) in a class that returns a string. Also, I have in another class, a method which makes a call to the GetKey method. What I wish to do is to do an evaluation of the return value of the GetKey method, within this 2nd class. My question is, should I create ...more >>

Why this declaration is legal
Posted by Boki at 5/11/2006 9:31:02 AM
Hi All, I saw a code: vertexBuffer = new VertexBuffer( typeof(CustomVertex.TransformedColored), 3, dev, 0, CustomVertex.TransformedColored.Format, Pool.Default); but why not: VertexBuffer vertexBuffer = new VertexBuffer( typeof(CustomVertex.TransformedC...more >>

Changing the Version number
Posted by Greg Smith at 5/11/2006 9:12:44 AM
I would like to change the version number that you get as the first part ('1.0.') of string that is returned by "Application.ProductVersion". Where do I change this? Any help is greatly appreciated. ...more >>

Exception Handling
Posted by Fernando at 5/11/2006 9:07:02 AM
I would like to know if this is OK or if it is better to just let the exception go instead of re-throwing it: I have: try { } catch(OracleException ex) { // Do something } catch(Exception) { throw; } Should I only have: try { } catch(OracleException ex) { // ...more >>

Windows Forms and Console Application
Posted by dm1608 at 5/11/2006 8:26:18 AM
Hi -- I have a VB6 application that I plan on rewriting in C#.NET. The program today basically connects to a SQL Server and parses varies system stats from our mainframes and rolls the data up for up/downtime statistics, etc. Since the current program today requires me to click various bu...more >>

Problem ...
Posted by Jacek Jurkowski at 5/11/2006 8:24:55 AM
.... I'm trying to retrieve an Image from Image field of a remote SQLServer Table. The code is simple: SqlConnection c = new SqlConnection("Data Source=XX.XX.XXX.XX;Initial Catalog=STFManager;Persist Security Info=True;User ID=XXXX;password=XXXX"); c.Open(); ...more >>

C# vs C++
Posted by cr113 at 5/11/2006 7:39:16 AM
I'm thinking about switching some of my apps from VB.NET to either C# or C++, just for the experience. I'm leaning towards C# since I had the misfortune of having to maintain a windows program written in C several years ago. Trying to find all the memory leaks drove me nuts. Basically the apps...more >>

problem tablelayoutpanel c# windows application
Posted by Sudha Pune at 5/11/2006 7:28:17 AM
Hi all i am using vs2005 C# window application i am trying to add the controls dynamically inside the "tablelayoutpanel", i need to add row by row and each row i will have to have 10 columns and each column i need to add one control If i try to do this the control coming one under one and...more >>

Release Builds
Posted by Philip at 5/11/2006 7:27:03 AM
In VS.NET 2005, I have C# class library projects and when I switch to conduct a release build ... the build still creates program debug files (PDB). I have tried everything.... I have manually deleted all PDBs before conducting the RELEASE build... Any known issues with Release builds ? ...more >>

Specific IComparer use with TreeNodeCollection
Posted by escristian NO[at]SPAM hotmail.com at 5/11/2006 7:23:12 AM
Hello. I am trying to use a specific IComparer object to sort the nodes of my TreeView. Now if it was an Array I could simply call Sort() and pass it my IComparer object. But with the TreeNodeCollection object there is no sort method. Can anyone give me some ideas on how to implement this? T...more >>

Uploading a document using http post
Posted by neoret NO[at]SPAM gmail.com at 5/11/2006 6:52:28 AM
Hi there. I need to perform an upload of a document using HTTP post. This has to be done from my windows form using C#. My challenge is: 1: To send - the word document 2: To attach several variables to the same request 3: To handle the response. 4: To authenticate my request by adding a u...more >>

Application Dessapears
Posted by Diogo Alves - Software Developer at 5/11/2006 6:48:01 AM
Hi, After the splash that loads de application sometimes, and I repeat SomeTimes, the app get's invisible. It just don't appear on my task bar neither on the screen. But if I do Alt + TAb the application is there and cames back to normal, also if I open the task manager the application is ...more >>

Bug in Reflection in .net 2.0
Posted by Konrad Kaczanowski at 5/11/2006 6:46:04 AM
Hi, I have the following code: using System; using System.Collections.Generic; using System.Text; namespace GenericParamsCodeGeneration { public class MyGenericClass<T,U> { public void NestedGParamMethod(NestedGenericClass<IList<int>> newParentHierarchy) { ...more >>

INTELLISENSE....
Posted by jacopomeucci NO[at]SPAM libero.it at 5/11/2006 6:46:02 AM
Hi all..... someone knows why if i write an ENUM in C# class, sometime,. when i invoke this class via another class i cannot see intellisense tag???? Note that the program run however.... It seems that all code is all right, but i'dont know why i have this problem!!!! Thanks PINO...more >>

'is' operator is giving compile error when used with switch statem
Posted by Raj at 5/11/2006 6:38:01 AM
public static void HandleException(ref Exception io_exException, bool i_blnPropagateException) { switch (true) { case io_exException is ApplicationHandledException: { if (i_blnPropagateException) { throw io_exException; } ...more >>

Intellisense
Posted by jacopomeucci NO[at]SPAM libero.it at 5/11/2006 6:25:43 AM
Hi all..... someone knows why if i write an ENUM in C# class, sometime,. when i invoke this class via another class i cannot see intellisense tag???? Note that the program run however.... It seems that all code is all right, but i'dont know why i have this problem!!!! Thanks PINO...more >>

Is this structure good for methods?
Posted by Steven Blair at 5/11/2006 6:05:12 AM
Looking for some opinions on the structure of this method, namely the way errors are handled and reported: http://pastebin.com/711366 My view is this is quite a good method of trapping and moving through a flow of data. Anyone suggest a better way? Steven *** Sent via Developers...more >>

screen scraping
Posted by RobcPettit NO[at]SPAM yahoo.co.uk at 5/11/2006 5:49:53 AM
Hi im using // Open the requested URL WebRequest req = WebRequest.Create("http://www.betfairgames.com/?rfr=1738&sid=77&pi.localeId=en_GB&pi.regionId=GBR"); // Get the stream from the returned web response StreamReader stream = new StreamReader(req.GetRespo...more >>

Redirect to a page
Posted by sri_rakesh NO[at]SPAM msn.com at 5/11/2006 5:05:55 AM
Here is the Scenario: We are using a 3rd Party OCX. The User logs in to the ASP.NET Application. If there is Event Fired by OCX then User is redirected to a Page With related data passed by the OCX. Or Else he is in a wait mode. Problem : Event is ther on Server not on User Machine. Since the Us...more >>

Schedule an Exe
Posted by None at 5/11/2006 4:53:42 AM
Hi, I want to execute an Exe everyday at 3'o clock. How can i do this? I have done with Windows Services project. But that Exe is not working when i call it from Windows Service. Is anyother way is there to execute an exe at scheduled time. If anybody solution please let me know it....more >>

Sorted List in C#
Posted by Zoro at 5/11/2006 3:29:38 AM
I come from the Delphi world and there we had a very useful component called TStringList which was a dynamic string array which had a 'sorted' property and 'duplicate' property and it was great for maintaining ordered lists allowing or disallowing duplicates. Is there something similar in C#? W...more >>

Calling Methods in User Controls
Posted by JohnSouth at 5/11/2006 3:18:03 AM
Hi I've a questionnaire application where each question is a separate User Control that gets loaded dynamically at run-time. Each question has a list of answer options stored in a database. I need to load the options when the question loads and save the answer selected when the users click...more >>

Webrequest not working.
Posted by archana at 5/11/2006 3:07:42 AM
Hi all, I am having application which is validating URL's and checking whether that URL is redirecting to some other URL at a time of opening or not. My code looks like:- WebRequest myWebRequest = WebRequest.Create(textBox1.Text); response. myWebResponse = myWebRequest.GetResponse(); Mssag...more >>

How to setup a project to import the compiled files of other projects
Posted by Anthony Nguyen at 5/11/2006 2:18:46 AM
Hi all, I have a C# Project which would need to output of a C++ project. How can I setup the C# project to automatically import the output of the C++ project prior to debug or compilation ? Cheers Anthony ...more >>

Generating Datasets - Tricky Question
Posted by S Chapman at 5/11/2006 2:00:05 AM
Is there any tool that generates Typed DataTables rather than Typed Datasets? The trouble we are having is we have quite a few tables in our database and a single table can be a part of more than one dataset. If we use the XSD.Exe, the datatable definitions are repeated in every dataset they a...more >>

Important question about .NET 2.0 DataSets
Posted by Dave at 5/11/2006 1:54:11 AM
We've created a robust client server application over the past 3 years on the .NET framework version 1.1 using c#. We layed all of our marbles in creating strongly typed datasets and for the most part we are extremely happy we did that. However, there's an incredibly huge bug (in my opinion) ...more >>

VisualStyleRenderer won't work, crashes control... any bug fix?
Posted by Xafier at 5/11/2006 1:25:23 AM
Hi I'm working on making a TreeView and re-doing the painting myself, but I'm having a problem with this code: private VisualStyleRenderer glyphOpen = new VisualStyleRenderer(VisualStyleElement.TreeView.Glyph.Opened); and any code similar... for some reason whenever those lines are decla...more >>

Hot Topic ----C and C#
Posted by thomson at 5/11/2006 1:02:39 AM
Hi All, i got a question from one of my friend who is working in C, He asked me What you write in C# , I can write it in C , Why there is so much of Hype for objects, Can anyone give more insights on this Thanks in Advance thomson ...more >>

How to get current thread id
Posted by Joachim at 5/11/2006 12:41:01 AM
How do I get the current thread ID in C# 2.0? I know there is a deprecated one, but I can't find it. Also, is there another, not deprecated way, of finding the thread id?...more >>

Multiple events triggered by fileSystemWatcher
Posted by Abel Chan at 5/11/2006 12:30:01 AM
Hi there, I was trying to write a simple NT services using .NET 2.0 and fileSystemWatcher control. The goal is to poll documents from a watch directory and ftp them to a remote web site. I created a Windows Services project using VS2005. Drag a fileSystemWatcher control to the designer...more >>

Input from a file to !objsize command(WinDbg)
Posted by conckrish NO[at]SPAM gmail.com at 5/11/2006 12:12:31 AM
Hi All, Can anyone tell me how to give the input(object address) to !objsize <address> command in WinDbg .. I have a list of object addresses in a file which is stored in local drive.. How to give this address to input of !objsize <addr> command in WinDbg ??? and also how to redirect ...more >>

How to add rows ?
Posted by Jarod at 5/11/2006 12:11:39 AM
Hey I have very simple Access database. I added it as a source to my windows app, and typed dataset was created. Let's say it's moviesDataSet. I added bindingSource and used detailed view. So in my interface now is the navigator on the top and add and delete button. I added also Save button, ...more >>

¿How can I include a DLL in a Visual Basic V6.0 application ?
Posted by Carlos Villaseñor M. at 5/11/2006 12:08:59 AM
Hi everybody I'm new in visual studio .net, and I have developed a group of methods in C-Sharp (visual studio .Net 2003) that I need to share with another that has developed an application in Visual Basic 6.0. We first attempted to call the DLL file, but without success. I don´t know if exist ...more >>

NGen During Install
Posted by Sharat Koya at 5/11/2006 12:04:01 AM
http://msdn2.microsoft.com/en-us/library/3hwzzhyd.aspx This artilce shows how to execute NGen during installation. Can this be done in C# or please can someone provide the C# translation of the code in the article. Thanks for any time spent on this Sharat...more >>


DevelopmentNow Blog