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# > march 2005 > threads for wednesday march 16

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

DesignerVerbCollection
Posted by Franck Diastein at 3/16/2005 11:31:24 PM
Hi, I have a component using DesignerVerbCollection. When one of the verbs is clicked in VS, I launch a WinForm... The structure of my component is this: Component.cs (component code and Designer code) frmOptions.cs (a properties form for component) ComponentLogic.cs (a single class ...more >>


Forms & Opacity
Posted by Adam at 3/16/2005 10:56:40 PM
Hi everyone, I have a simple timer which decreases the Opacity from 1.0 to 0.0 and back again. The problem I have is, when it changes from 1.0 to 0.99, the whole form flickers completely before the smooth fading out. It never does it from 0.0 to 0.1, only from 1.0 to 0.99. Anyone seen...more >>

Conditional compiling C#
Posted by Magne Ryholt at 3/16/2005 10:33:32 PM
Using VS.net 2003 (C#) Code: : #if DEBUG something #else something else #endif When I switch the build configuration to release, the code in the #if DEBUG path is still compiled (and executed) I have checked the "Conditional Compilation Constants" in the project properties s...more >>

A real simple one
Posted by web1110 at 3/16/2005 9:23:30 PM
Hi, My documetation is deficient on this. What is the easiest way to iteraterate over all the controls within a form control using the foreach statement. Thanx, Bill ...more >>

Reflection question
Posted by Fred at 3/16/2005 6:58:47 PM
Hi I need to loop through the properties of an object and record the various values. I have some reflection code that does this nicely but any enumerated properties return the Text of the enumeration not the underlying value. The code is: FormElement _Element = new FormElement("Testing123")...more >>

need help writing to a control
Posted by Robert Megee at 3/16/2005 6:13:40 PM
If i create a textbox tb1, I can write to it as such: tb1.Text = "mytext"; I can make it visible: tb1.Visible = true; or invisible: tb1.Visible = false; Thanks to a posting here from a previous question, I can reference that control indirectly to set it visible: string st1;...more >>

help!i'm stuck here
Posted by alyssa at 3/16/2005 5:45:01 PM
SqlDataReader rdr = null; SQLConnection con = null; SqlCommand cmd = null; try { // Open connection to the database string ConnectionString = "server=localhost;database = CallBilling System"; con = new SqlConnection(ConnectionString); con.Open(); // Set up a command with t...more >>

Does C# provide something like this dialog?
Posted by cyshao at 3/16/2005 5:14:29 PM
When we copy files in MyComputer, there is a dialog with a ProcessBar and a Cancel button. Does C# provide something like this dialog? Thanks CYShao ...more >>



multidimensional ArrayList?
Posted by Daves at 3/16/2005 5:00:15 PM
is it possible? if so - how would you do it? ...more >>

How to know when a thread in a thread pool has finished executing my workitem ?
Posted by palaga at 3/16/2005 4:08:31 PM
hi I'm using QueueUserWorkItem to execute a bunch of tasks using the thread pool. Once started, I would like to wait for all of them to finish, using something like WaitAll. Is there a way I can know when a thread pool workItem has finished executing ? (My only solution at this time is to use a...more >>

Exposing selected parts of C# Assemblies
Posted by J L at 3/16/2005 4:03:27 PM
I'm trying to expose only a limited set of method calls from a C# program to someone using my dll. The entire application is written in C# and my first attempt has been to try and write a COM object/interface. However, since the COM object references parts I don't want exposed, in order to us...more >>

Arrays in structs
Posted by Claire at 3/16/2005 3:57:43 PM
I need to set up an array in a struct for passing to a win32 api call . How do I do this please? ("Name" is actually a zero terminated ascii string, so a pointer to a better way to do this would also be appreciated) eg [StructLayout(LayoutKind.Sequential)] public struct Details { ...more >>

static members in multi-thread environment
Posted by mflanagan NO[at]SPAM RemoveThis.MJFlanagan.com at 3/16/2005 3:57:00 PM
I have unmanaged C++ program that will load a managed C++ dll and then call a function in that dll. The managed C++ routine will call some C# routines. The unmanaged C++ main program will make these calls (to the managed C++ dll) many times, from many different threads. Each thread will do a L...more >>

PLS HELP! ComoBox list adjustment
Posted by MuZZy at 3/16/2005 3:50:59 PM
Hi, I just wonder if anybody could give me a hint on this: I have a ComboBox component on the form and it has some very long sting items. When the combobox drops down, the list of items doesn't adjust it's width to the length of the items. Is there a way to do that, other than using third-pa...more >>

Error Lookup
Posted by Stuart Ferguson at 3/16/2005 3:43:02 PM
I require the functionality of an error lookup (storing the err number and a description) in some software which i am working on and wud use an array normally but i have a small problem in that the error codes are non sequential eg 0,5,27,28 are the first four error codes. I would like to be a...more >>

Prepending a string to a string[]
Posted by David P. Donahue at 3/16/2005 3:27:16 PM
There must be something I'm missing, but is there an easy way to add a given string as the first element in a string[] after the string[] is created (from, say, a Directory.GetFiles function call)? Regards, David P. Donahue ddonahue@ccs.neu.edu...more >>

MDI Parent with 3 controls and a MDIChild...
Posted by SpotNet at 3/16/2005 3:18:48 PM
Hello NewsGroup, I have a MDIParent form with a docked left treeview control, a splitter control and a generic docked control on the right. Kind of looks like Windows Explorer, though it's functionality is quite different. I have a function where an MDIChild is activated, well attempted t...more >>

from VC++ to C# translation - newbie
Posted by Matias Woloski at 3/16/2005 3:18:40 PM
I need to translate this to c#. It's for a capturing screen shots on IE. http://cvs.sourceforge.net/viewcvs.py/*checkout*/iecapt/IECapt/IECapt/IECapt.cpp?rev=1.2 I don't know how to start. Should I use p/invoke? How I handler the WM messages? How do I create the hidden IE window? Is it pos...more >>

Strange Error...
Posted by Kerem Gümrükcü at 3/16/2005 2:47:52 PM
Hi, i get this error when i try to compile my code. But why, ...everything seems to be ok! When i try to get some files extension with this: "File Extension: " + Path.GetExtension(e.FullPath) + " created..."; , i get this error 'type' does not contain a definition for 'function...more >>

Parsing XML nodes by Attribute
Posted by Grant at 3/16/2005 2:44:53 PM
I have this simple xml file which wont ever get beyong 3 nodes deep. I need to get the value of the child node of any node with an id of '63'. So fir instance I would be returned 'False' from the example below. Ive attached an XML snippet and a cC# code snippet. The piece of code is not wor...more >>

lnk file target
Posted by Manoj Nair at 3/16/2005 2:43:05 PM
Hi, Can we retrieve the target of a .lnk file through c# code. Can the application that is run by the .lnk file also be retrieved. thanks Manoj ...more >>

timer ambiguous
Posted by Dave at 3/16/2005 2:21:04 PM
I trying to setup a time. The following code is in a function, Timer stateTimer = new Timer(ab(), null, 1000, 1000); I have included using System.Threading; at the begining of my code. When I try to compile I receive the error, 'Timer' is an ambiguous reference What is the problem?...more >>

System.Management Namespace
Posted by TRW at 3/16/2005 1:37:13 PM
I can not get the the .Management namespace into my program. I've installed (so I think) the WMI SDK as well has the core SDK. Am I missing something? Visual Studio does not find this namespace when I compile my code. Also, is WMI the best way to send an SNMP trap to a SNMP Management se...more >>

monitor IIS with C#
Posted by maxim iulian at 3/16/2005 1:36:04 PM
I want to create o program in C# that's monitor IIS server. Thank's a lot ! Maxim Iulian *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it!...more >>

how do i set the width of a column in a datagrid
Posted by Hajash at 3/16/2005 1:09:57 PM
hi all, how do i set the width of a column in a datagrid.Please help.Thanks in advance. regards, hajash ...more >>

Plugin Application Design Advice
Posted by Dave Weber at 3/16/2005 1:07:02 PM
I'm in the process of writing an open-source plugin-enabled application. I know that you can define the API in several ways, and right now it is equipped as an Interface. The gist of the functionality, is when a timer expires, the app will notify the plugins that it's time for them to d...more >>

.net and flash
Posted by Rick at 3/16/2005 12:54:21 PM
hi guys!! i saw recently a document explaining how to send ""events"" from a flash swf to a .net app using C#, now im interested in know if is possible to send "events" from my app .net using C# o VB or J# to the same flash movie without use a web server, flash remoting, orbe or aspx, php...more >>

using Crystal report with C#
Posted by Holly at 3/16/2005 12:48:23 PM
Hi, I populate a DataSet in C# then do ds.WriteXmlSchema to create a schema file. I create the crystal report based on this schema. After the report is created, I save the report as a pdf file. The problem is that now my pdf or report has all records in the DataSet. What I want to do is c...more >>

Disabled controls
Posted by web1110 at 3/16/2005 12:43:49 PM
Is there a way to set the colors of a disabled control? What I am getting on a disabled textbox is hard to read. ...more >>

View all objects in .NET Managed Heap
Posted by probashi at 3/16/2005 11:53:04 AM
Hi, Is there any way I can view all the objects in the managed heap. I want to know how many times a particular object has been loaded in to heap.( in debug mode ) Thanks probashi@hotmail.com ...more >>

C# Dll Question
Posted by glenn at 3/16/2005 11:42:09 AM
I understand that C# does not generate dll's that can be called from other application development platforms. So now I have to find another way to write a client app that can be utilized within another environment and am thinking about COM. Can anyone point me to a tutorial or advise me on wher...more >>

Opening a Word Document in a browser (C#)
Posted by Walter Levine at 3/16/2005 11:12:52 AM
I just worked through a VB.Net sample program that creates an rft document and then opens it in Word. The code that opens the document is: Dim sFileName As String sFileName = "Sample1.doc" Response.Write( "<META HTTP-EQUIV=""REFRESH"" Content=""0;URL=" & sFileName & """>") I cannot get ...more >>

Re-running an already created thread.
Posted by Robert Wilson at 3/16/2005 10:59:20 AM
Hi, I am running a separate thread in order to be able to poll devices on a MODBUS RTU network. I create a thread and look at the ThreadObj.IsAlive flag, and this work ok. I then might have to come back later to the thread an re run the task contained within it. When I come to re-run the...more >>

text box and database
Posted by alyssa at 3/16/2005 10:43:12 AM
May i know how to write the code to display out the value that i get from the database into data grid...my prog works like this..when the user enter the customer id into the text box and press the button, the value in the text box will match the customer id in the table and display out the act...more >>

System.Type.InvokeMember()
Posted by Rein Petersen at 3/16/2005 10:34:56 AM
Hi All, I'm invoking Type.InvokeMember() on a COM class (via COMInterop) through a generalized interface. However, each specialized instance (of the COMInterop generic interface) requires slightly different arguments for which I dynamically create the object[] arguments and it all works nic...more >>

C# reentrancy and VB static variable
Posted by XPhaktor at 3/16/2005 10:19:03 AM
In C#, how do I replace using VB local static variable declarations to handle method reentrancy. Note, if you use a class-scope variable instead of a local one, then you run the risk of inadvertently changing the variable's value in another method that is performing the same technique. The ...more >>

defaultNamingContext property failing in asp.net
Posted by Ollie Riches at 3/16/2005 10:07:56 AM
I am trying to access an AD from asp.net, I am getting the 'famous' "The specified domain either does not exist or could not be contacted" exception with a HR = 0x08007054b the code (C# .Net) is as follows: DirectoryEntry rootEntry = new DirectoryEntry("LDAP://RootDSE"); string contextPath ...more >>

create plugin assemblies?
Posted by pnp at 3/16/2005 9:50:53 AM
Hi all, What is the best way to create some plugin assemblies so that the main app will load them automaticaly from a particular folder in the filesystem. So if you would like to give the app an extra functionality you would copy an assembly to that specified folder and it would then be ...more >>

Translation from C to C#
Posted by Mateusz [PEYN] Adamus at 3/16/2005 9:48:31 AM
Hi First of all sorry for large post. I know its big, probably most won't get to the end, but I'm running out of options. I've searched web, I've found some demo project on www.codeproject.com but there is only basic info about it. :-( Could someone please translated it for me? I'm sitt...more >>

Problem accessing a StreamReader's BaseStream
Posted by arno.podfreins NO[at]SPAM caramail-dot-com.no-spam.invalid at 3/16/2005 9:36:43 AM
Hi, I'm using TcpClient for communication between two PC running a small piece of software. The protocol used has been designed internally and is HTTP similar (command line, headers, body). A typical response in this protocol would be: SMP/1.0 200 OK<crlf> User-Agent: foo<crlf> Vers...more >>

Keyboard/Barcode scanner keypress question
Posted by Darren Coleman at 3/16/2005 9:29:32 AM
I need help with 2 keyboard/input questions 1. How do i caputre all keypress events for my application/form? 2. How do I determine which keyboard sent the keypress? What i'm doing is using a USB Barcode scanner, windows sees the scanner as a keyboard. When the scanner reads a barcode it dec...more >>

Binary to string conversion
Posted by Diablo at 3/16/2005 9:06:55 AM
Hi, I am converting a byte array to string using System.Text.Encoding.UTF8.GetString() or Unicode.GetString(). Then the resulting text is converted back to binary, using the reverse function: System.Text.Encoding.UTF8.GetBytes() or Unicode.GetBytes. But the result does not match the original ...more >>

Automationserver could not create object
Posted by Lars Grøtteland at 3/16/2005 9:03:15 AM
Hello! Have a problem. Just now I receive an error from VisualStudio that I'm unable to add a data set to my application. I tried to add a sataset - and I receive the error saying "Automatisationserver could not create object" Ae there any com object missing? - Lars ...more >>

One more problem with DataGrid
Posted by kscdavefl at 3/16/2005 8:55:03 AM
I am trying to iterate through a datagrid using the following code: private void updateFCA(object sender, System.Web.UI.WebControls.DataGridItemEventArgs e) { for (int i = 0; i < e.Item.Cells.Count - 1; i ++) { if (e.Item.Cells[3].Text == "FCA") { e.Item.Cells[3].Text...more >>

anyone help me please...
Posted by alyssa at 3/16/2005 8:45:05 AM
my prog works like this...i had created a summary report form where there is a text box, data grid and a button. when the user enter the customer id in the text box and press the button, the data grid will show the particulars about that customer id only....may i know how to pass the value fro...more >>

help needed..
Posted by alyssa at 3/16/2005 8:09:08 AM
C:\Documents and Settings\Yeoh Cheng Lin\My Documents\Visual Studio Projects\CallBillingSystem\CallBillingSystem\SummaryReport.cs(334): The type or namespace name 'ConnectionState' could not be found (are you missing a using directive or an assembly reference?) may i know what does it means...more >>

passing c# class as parameter to managed c++ method
Posted by lolomgwtf NO[at]SPAM gmail.com at 3/16/2005 8:02:59 AM
I have a managed C++ method that wraps unmanaged code and creates a managed object holding data retrieved form an unmanged one. I want create an instance of this managed class in C#, pass it to this method and have it set the instance to hold the right data. >From what I've read it seems I sh...more >>

Programmatically retrieving photos
Posted by Robert Lochon at 3/16/2005 8:01:23 AM
Hi, I'm trying to transfer the photos from my Canon EOS 20D to a folder on my hard-drive with a C# program (but the language doesn't matter). But the cam folder doesn't appear in the directory browser within my application, although it appears in the Windows explorer. I deduce that it is not ...more >>

help anyone..
Posted by alyssa at 3/16/2005 7:39:11 AM
C:\Documents and Settings\Yeoh Cheng Lin\My Documents\Visual Studio Projects\CallBillingSystem\CallBillingSystem\SummaryReport.cs(301): The type or namespace name 'SqlConnection' could not be found (are you missing a using directive or an assembly reference?) may i know what does it means? ...more >>

Remoting The underlying connection was closed
Posted by Reshma Prabhu at 3/16/2005 7:29:04 AM
hello, I am using remoting in order to connect to a remote hosting server running under IIS. The client works fine if the server is running on local intranet but if the server is shifted to a different doamin machine the client throws System.Net.WebException giving message "The u...more >>

Counting
Posted by jez123456 at 3/16/2005 7:11:07 AM
Hi, I have a form with 6 checkboxes. What is the best way to count how many checkboxes have been checked? Thanks...more >>

Problem Iterating Through A Datagrid
Posted by kscdavefl at 3/16/2005 6:27:02 AM
I am using the following code to iterate through a DataGrid to change the value in one of the columns: private void UpdateFCA() { for (int i = 0; i <= reportGrid.Items.Count; i++) { DataGridItem item = reportGrid.Items[i]; TextBox fcaText = (TextBox)item.FindControl("fca");...more >>

execute client side script + server side code for button click
Posted by kk at 3/16/2005 6:21:02 AM
Hello everyone, Thank you in advance for your time and help. Mine is an asp.net/C# application. I have an aspx page(parent window) which has a link that launches a new ie window with another aspx page(child window). The child window has a button with some server side event code for bu...more >>

document.webform1 gives null
Posted by sushi at 3/16/2005 5:04:48 AM
Hello, I am using java script to post data back to the server when a button is clicked. In my web form, when a button is clicked, a javascript executes which submits data back to the server by following statment document.WebForm1.submit( ); But when i click on the butt...more >>

Async Socket: How to tell when there is no more data.
Posted by mscirri NO[at]SPAM osmose.com at 3/16/2005 4:59:01 AM
The code below is what I am using to asynchronously get data from a PocketPC device. The data comes in fine in blocks of 1024 bytes but even when I send no data from the PocketPC constant blocks of 1024 with all values set to Null arrive. Other than examine a block of 1024 to see if the entire b...more >>

Add a embedded resource icon
Posted by Rogerio Jun at 3/16/2005 4:37:02 AM
Can i add a embedded resource icon in my application in run time ? Rogerio...more >>

Finding a StreamReader's true position
Posted by Keith Kingsley at 3/16/2005 4:15:05 AM
I'm using a StreamReader to read in several lines from an ASCII file. I'd like to know the StreamReader's "true" position-- that is, the number of bytes into the file that the StreamReader has read. I thought about using MyStreamReader.BaseStream.Position, but this always seems to return a ...more >>

help!!i'm stuck here!!
Posted by alyssa at 3/16/2005 3:37:07 AM
Hi guys, May i know how to match the value in the text box with the table's attribute in SQL Server? For example, when the customer enter their customer id and press the button, I want to display out the rows of that customer and not the whole table. I had done the data binding in the text bo...more >>

Memory Leak with WMI
Posted by Don Nell at 3/16/2005 2:52:26 AM
Hello Why is there a memory leak when this code is executed. for(;;) { ManagementScope scope = new ManagementScope(); scope.Options.Username="username"; scope.Options.Password="password"; scope.Path.Path=@"\\pc\root\cimv2"; scope.Connect(); } There is no leak if...more >>

filling values into dataset
Posted by chris at 3/16/2005 2:29:03 AM
Hi there, I created a DataSet manually like this: DataSet myDataSet = new DataSet("NewDataSet"); DataTable tblUserData = new DataTable("tblUserData"); tblUserData.Columns.Add("User_Name", typeof(string)); myDataSet.Tables.Add(tblUserData); How can I add manually a value to the column "User...more >>

Error while using html controls
Posted by sushi at 3/16/2005 2:25:05 AM
Hello, I am developing an asp.net website. I have a web fomr say' webform1.aspx' having two input button html controls. When I click on 'button1' a message appears. Following code is executed o client side button1_click( ) { document.webform1.submit( ); } and on server side the me...more >>

How create a csv file from a datatable
Posted by radiohead at 3/16/2005 2:21:07 AM
Is there a straightforward way of creating an excel/csv file from a datatable. I don't know where to start with this. thank you....more >>

How to store the reference to a "bool" ?
Posted by Mochuelo at 3/16/2005 2:01:10 AM
Hi, In the constructor of a class, I am taking as a parameter the reference to a "bool", as in this code: ----------------------- public class TCP_synch_client { public string address =""; public int port =0; public TCP_synch_client(string address1...more >>

dataset
Posted by juli jul at 3/16/2005 1:35:02 AM
Hello,I am trying to retrieve a column from a dataset which will be in array as a collection of strings. I am doing something like that: ds = new DataSet(); Adapter1.Fill(ds); MessageBox.Show(ds.Tables["n"].Columns["p"].ToString()); but it's not working (it gives the :Object reference ...more >>

Float addition bug???
Posted by Rene at 3/16/2005 1:27:41 AM
The following code: float someFloat = 0; for(int x = 1; x <= 10; x++) { someFloat += .1F; Console.WriteLine(someFloat.ToString()); } Returns: 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8000001 0.9000001 1 WHY, WHY, WHY, WHY, WHY, WHY, WHY, WHY, WHY, WHY, WHY!!! What happened to th...more >>

How do I invoke System Beep in Windows Forms?
Posted by Anton at 3/16/2005 1:19:02 AM
Where is the command for making a system beep (to indicate an error)?...more >>

New versions vs. serialization
Posted by Jesper at 3/16/2005 1:13:03 AM
Hi, I'm writing a program which is, and will continue to be, constantly extended with functionality that require information. Until now the source of this information has been found and modified using notepad in a txt file that was parsed into fields in objects. (This solution because this ...more >>

Baffling static property issue.
Posted by Steve at 3/16/2005 12:55:06 AM
I'm currently running into a problem, and I have no idea what to make of it. I have a class with nested clases and static properties that I'm using to store configuration information using a custom configuration section. When my code accesses one of the static properties the static construc...more >>

manipulation of a long string
Posted by chris at 3/16/2005 12:51:05 AM
Hi there, I get a string from a recordset, with is delemitered by the | character for the different values. The string looks like this: Peter|Pan|Donald|Duck Now I would like to each result seperately. strDetails = rs.GetString(ADODB.StringFormatEnum.adClipString ,1,"|",",",null)...more >>

C# Timers
Posted by matt chuningham via .NET 247 at 3/16/2005 12:21:14 AM
Hi there=2E=2EI have a troublesome problem=2E I have a class, that is= processing a specific task=2E At any specific moment a custom= event is fired so that I could view the info generated in the= interface=2E Now, I need some sort of mechanism that would halt= the whole thing for 2 seconds ...more >>


DevelopmentNow Blog