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# > october 2005 > threads for wednesday october 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 31

How to dynamically create a button?
Posted by Keith Smith at 10/12/2005 11:21:54 PM
What am I missing? I am trying to dynamically create a button... Button myButton = new Button(); myButton.Name="ButtonX"; ...more >>

Help regarding class in c#
Posted by trialproduct2004 NO[at]SPAM yahoo.com at 10/12/2005 10:50:15 PM
Hi all i am having problem in c# class. I have two classes one nexted inside another. What i want is to have one command function to be defined in outerlevel class and to be accessiable in nested class. Is it possible. Because my function is public but i am not able to access it in nested cla...more >>

Selectedindexchanged on page load
Posted by Morten at 10/12/2005 9:26:11 PM
Hi! I have a form containing a listbox control. The control is configured to autopostback. When I manually select a new item in the list I'm getting properties for the selected item displayed in various textboxes and labels. My problem is that I'd like to automatically display the propertie...more >>

com interop C# GUI thread
Posted by x at 10/12/2005 9:24:39 PM
I am currently calling a windows form from my vb6 app. I need to know the best practice for handling the gui thread. I wish to call the form and have it behave as a modal dialog and obtain a notification/return value when the form is disposed. Is this possible? If so how? Many thanks ...more >>

No overhead for a "get" accessor...
Posted by Javaman59 at 10/12/2005 9:10:03 PM
This is probably common knowledge to .Net gurus, but please bear with me while I share a discovery with the group... I needed to create a public lock on a class, as follows... class Locked { ..... public object lockObject = new object(); } Next I wanted to consider hiding the loc...more >>

Visual C# Express - Custom Controls
Posted by Danny Tuppeny at 10/12/2005 7:06:35 PM
Well, this doesn't seem to work at all now :-( I've created a new user control. I've added a few labels to it. I've compiled, and it's appeared in my toolbox. Drag it onto a form, and I get "Failed to load toolbox item 'player'. It will be removed from the toolbox". It happened in my la...more >>

Outlook/Help file multipane sytle app
Posted by Macca at 10/12/2005 6:42:07 PM
Im am writing an application that will looks similar to Outlook or a help file, i.e tree structure on left with right hand side pane showing data. It is split into two panes.The Left pane has a treeview. When the nodes in the tree are selected data is shown in the right pane. I am using a tree...more >>

C++ Delphi C# ???
Posted by lukeharpin NO[at]SPAM hotmail.com at 10/12/2005 5:57:54 PM
Hi World, We have been developing Engineering software in Delphi 3,4,5,6,7 for a few years now. This morning we had a discussion about OOP and re-programming the software to which the question came up, should we stay with Delphi and go with Delphi 2005 or not. I'm interested to here everyone'...more >>



Custom settings in App.config
Posted by Joe at 10/12/2005 5:33:21 PM
I would like to store some nodes & child nodes in the app.config file and was wondering if there is a way to read these values in as a config file rather than an xml. Thanks, Joe ...more >>

OSQL [Shared Memory] error from C#
Posted by Zeya at 10/12/2005 4:39:28 PM
I am executing OSQL using System.Diagnostic.Process with the following parameters: -S <servername> -E -Q "BACKUP DATABASE <databasename> to DISK='E:\Temp\Now.bak'" This works from command line but when I execute this from my ASP.Net app it shows this error: [Shared Memory]SSL Security er...more >>

inheritance in value types of = operator overloading in reference types
Posted by apm at 10/12/2005 3:50:39 PM
Recently I have had to use a value type for a complex structure because I don't know how to override the = operator. Can the operator ever be overloaded? Or can inheritance be used with value types? ...more >>

upload file
Posted by NuB at 10/12/2005 3:37:23 PM
I want to allow the user to upload a file to a server from my windows form and then display that file name in a grid. When the user clicks on the file name i want the user to be able to open the file. I can I do that? I've done something similiar to this in asp.net but not windows form. I'm ...more >>

Changing permissions on NTFS file
Posted by Eric St-Onge at 10/12/2005 3:33:02 PM
Hi, I am looking at a way in C# to change the permissions of a file to localmachine\Users (Modify). Thanks Eric...more >>

How to save textbox.text to the dataset when it's bound to datagri
Posted by Alpha at 10/12/2005 3:18:02 PM
Hi, I have a window based program. One of the form has several textboxes and a datagrid. The textboxes are bind to the same dataset table as the datagrid and the text changes to reflect different row selected in the datagrid. I want to save the changes that user make in the textboxes when...more >>

Callbacks into another assembly
Posted by David at 10/12/2005 3:14:03 PM
Here's my problem. I've created a windows service using the Win32 app instead of the .NET framework's System.ServiceProcess.ServiceBase and I'm trying to use the RegisterServiceCtrlHandler win32 API call. It works just fine when I compile all my code and classes in a normal executable. However, ...more >>

CreateDelegate error
Posted by Max at 10/12/2005 1:56:44 PM
I'm using late binding to automate to Outlook and I'm getting an ArgumentException when I create a delegate. The arguments I pass seem valid. This is my code: [CODE] Type oType = Type.GetTypeFromProgID("Outlook.Application"); oApp = Activator.CreateInstance(oType); oInspectors = oApp.GetT...more >>

Problem With FolderBrowserDialog Control
Posted by joey.powell NO[at]SPAM topscene.com at 10/12/2005 12:08:00 PM
I have a C# windows forms app where I am using a FolderBrowserControl. It works great much of the time, BUT... When users try to browse/select a folder that contains MANY (thousands and thousands) subdirectories and files, it just sits there, sometimes for as much as thirty minutes, before it ...more >>

Sync'ing Enums to Database values.
Posted by narshe NO[at]SPAM gmail.com at 10/12/2005 11:59:00 AM
I haven't come across an elegant way to do this yet, and would like to know what other people have come up with. There are two tables: CREATE TABLE EmployeeStatus ( pkId int not null primary key identity, status varchar( 50 ) not null ) CREATE TABLE Employees ( pkId int not nul...more >>

What's the datagrid event when user selects a different row?
Posted by Alpha at 10/12/2005 11:51:07 AM
I've looked through all the event members of a datagrid but I can't find one that's for when user selects a different row in the datagrid. How does one catch this type of event? Thanks, Alpha...more >>

privatePath Probing not working??
Posted by Richard at 10/12/2005 11:49:08 AM
I am writing an installer for our application. The installer places the application .exe in the install directory and then creates a \bin subfolder and places all .dlls in the \bin subfolder. When we run the application it throws a "file not found" exception upon attempted loading of the...more >>

Need help with OpenFileDialog StartPosition / Location settings
Posted by cider123 NO[at]SPAM hotmail.com at 10/12/2005 11:43:24 AM
Everything I've read so far states you can't inherit or extend these dialogs because they're "sealed". I considered building my own custom control, but I haven't been able to find: 1) How to add a "Places Bar" to a form 2) How to hook a Combo Box into System locations like the existing Ope...more >>

Pb with TcpClient class and NTP server
Posted by Kirk at 10/12/2005 11:33:21 AM
Hello, I'm trying to get the current date/time from a (S)NTP server. It works with UdpClient class, but not with TcpClient class. I want to use TcpClient because i can set timeout values for reading/writing operations. The connect method generate a SocketException (10060 : timeout error) :...more >>

adjusting X, Y location
Posted by MAF at 10/12/2005 11:26:12 AM
I am draggin an object into a user control that contains a tree view and want to insert the object into the tree. The problem I have is that the X, Y(coordinates for the form that contains the user control) are not within the underlying treeview control. Isn't there a calculation that I can...more >>

Textbox bind to datagrid but text doesn't change when selection ch
Posted by Alpha at 10/12/2005 11:20:35 AM
I have several textboxes that I need to chang the text when the selection row is changed in a datagrid. I have the following code. This textbox displayes the initial selection but when I click on different rows in the datagrid, the textbox content doesn't change to reflect the change. How c...more >>

WebCustomControl or DataGrid
Posted by news NO[at]SPAM pro-it.be at 10/12/2005 11:09:16 AM
Hello All, As a VB6/C/C++ (and some Java) developer, I've been toying with c# for the last couple of weeks. I'm currently trying to create a grid of 3x3 with each cell containing numbers from 1 to 9. The idea is that if you push one of the numbers, it gets 'blown up' to the full size of the c...more >>

Performance Updating a DataSet
Posted by booksnore at 10/12/2005 10:47:46 AM
Hi, I have a program which performs some calculations and then updates a table. I tested my program on a few thousand rows, worked good, no issues, update worked. When I test on larger data - up into the millions of rows the calculation part is fine and fairly quick but the table update is ver,...more >>

How to show thumbnails
Posted by Keith Smith at 10/12/2005 10:27:32 AM
How can I have a box (maybe a picture box or a panel or something?) that will display all of the contents of a particular folder and show the picture files as thumbnails along with the name of the file right below them? I then need to be able to drag each item onto another picture box (or s...more >>

Recompilation requires "Increase Assembly Trust"
Posted by NonDeterministic at 10/12/2005 10:24:15 AM
Hello! Everytime I recompile a program with csc, I have to go to ".NET Framework 2.0 Configuration" / Runtime Security Policy and increase the assembly trust to make it run properly. How can I automate this process, or even disable the security restrictions for, let's say - a whole directory...more >>

addon forms??
Posted by Raj Chudasama at 10/12/2005 10:10:26 AM
I have a gui app in which i have various forms. I would like to make it so these forms become sort of "add on" featuers. so you necessarily don t have to iinclude the forms with the original exe but you can put them in the same directory later on and have them loaded etc. how can i accomplis...more >>

Inheritance question
Posted by VJ at 10/12/2005 10:05:19 AM
Sorry this might really a very basic question.. not hitting me now...What am I doing wrong??? public class Textbox2 : Textbox1 { public Textbox2() --> gives a error No overload for method 'Textbox1' takes '0' arguments { } } public class Textbox1 : System.Wi...more >>

c# fixed length file processing
Posted by ecov at 10/12/2005 9:36:03 AM
Is there any easy way to read into a dataset a file that was created from a BCP command. The file is in a fixed length format. I would also like to be able to write out a dataset to the same type of file structure. The obvious solution would be to use XML file processing however that is n...more >>

Info
Posted by Vai2000 at 10/12/2005 9:25:26 AM
Hi All, How do I know what Service Pack's are installed on my Production Machines...I have just the .net Framework installed on it no Visual Studio on them. TIA ...more >>

Windows.Forms validation strategy
Posted by Kathy at 10/12/2005 9:21:51 AM
I have a form to generate a report. On the form are several textboxes and a "Generate" button. I would like to have the button grayed (not enabled), unless the data in each of the dependant textboxes is valid. What is the proper procedure for doing this? It seems the Validating and Validated...more >>

Unmanaged buffer problem?
Posted by Pete Davis at 10/12/2005 8:51:27 AM
I've got an app that plays video using the ActiveMovie COM stuff. I'm using the FilgraphManagerClass to play the movie and I'm trying to get an image from the currently displayed scene. The call to do it is FilgraphManagerClass.GetCurrentImage(ref int bufferSize, out int dibImage) Now, ...more >>

Start program directly from memory
Posted by wavemill at 10/12/2005 8:41:04 AM
This is my code: FileStream fs = new FileStream(@"C:\Documents and Settings\Berdoues\Mes documents\VisualStudioProjects\Application_Test_WindowsForm\LoadAssembly\CaptureControl.exe",FileMode.Open); BinaryReader br = new BinaryReader(fs); byte[] byteload = br.ReadBytes(Convert.ToInt32(fs.Length))...more >>

Error opening xml file with ANSI encoding
Posted by sjoshi at 10/12/2005 8:29:53 AM
I'm doig a test using XP English with LocalSettings set to Russian. When trying to open an XML file with ANSI encoding, I get errors. When I change the encoding to UTF8, I can read the file successfully. I'm wondering why this happens. Any help is appreciated. thanks Sunit ...more >>

IsInRole with wild cards?
Posted by Esteban404 at 10/12/2005 8:21:07 AM
My WinForm application is activating menus based on the user's roles in AD. I've created the groups to use the same 3 letter abbreviation. Is there a way to do something like this: mnuPlanning.Enabled = wp.IsInRole(@"domain\ibb*"); or mnuPlanning.Enabled = wp.IsInRole(@"domain\ibb%"); I'm...more >>

browser display
Posted by dale zhang at 10/12/2005 7:53:07 AM
Hi, I am using asp.net to make a web application. IE 6 has the best display. Firefox reports server error – can not display at all. Netscape displays all 3 columns in one column (one by one). Any idea? Thanks. -Dale ...more >>

write a table to a file
Posted by dale zhang at 10/12/2005 7:50:06 AM
Hi, I am using StreamWriter to write text files now. What is the easiest way to write a word table to a file? XML + style? Thanks. -Dale ...more >>

Access parent properties/methods?
Posted by Chris Ashley at 10/12/2005 6:22:33 AM
Say I have a class called TabManager, which has an array of Tab objects? There is no inheritance or other relationship between them apart from the TabManager instantiating the tab objects and holding them in an array. How can the Tab objects call the methods and access the properties of its TabM...more >>

Atom table
Posted by Just close your eyes and see at 10/12/2005 4:56:04 AM
Hello All can any one help me where is the windows atom table and how to navigate it, and how to add and delete values from it thx ...more >>

executing DTS packages in C#
Posted by Mike P at 10/12/2005 3:07:39 AM
How do you execute a DTS package from C#? I have some code that doesn't work because the structured storage file cannot be found : [MTAThread] static void Main(string[] args) { // TODO: Add code to start application here Package2Class package = new Package2Class(); object p...more >>

Nested collection pattern
Posted by peter.moss NO[at]SPAM gmail.com at 10/12/2005 2:15:57 AM
Need some help! I have a nested collection like so: Grandparent .Parent .Child Which is going to be bound to a datagrid in a flat view: Grandparent1 | Parent1 | Child1 Grandparent1 | Parent1 | Child2 Grandparent1 | Parent2 | Child3 Grandparent1 | Parent2 | Child4 Grandparent2 | Pare...more >>

Properties and abstract classes
Posted by MicroMoth at 10/12/2005 2:00:03 AM
Hi, If I have an abstract class with variables in it, for example: public abstract class A { private int A; private int B; public abstract void DoSomething(); } Do I create the Property methods in the abstract class or the inheriting class, for example public class B ...more >>

C# constructor
Posted by Sampat at 10/12/2005 1:59:01 AM
Hi, I need have a base class that enforces the derived class to have a constructor with a string parameter in it. If there is no constructor of that type then it should ideally give me a compilation error. Is there a way to do this. public class Base { //some methods. } public cla...more >>

Programatically posting data to a web form
Posted by Jeffery Tyree at 10/12/2005 1:25:02 AM
All I would like is one example of working code that does nothing more than submit a search criteria to Google and print to console the resulting page of found items. To make it easier, below is my code. Simply correct it in place so that I may copy/paste it back into the IDE and run it. Pl...more >>

simple code hopefully??
Posted by tindog at 10/12/2005 12:00:00 AM
I am brand new to this programming especially C#. I am confused (at the moment). I have bought two books to get started to learn C# language and Visual C#.net 2003 in 24 hours. Which is the best to learn the straight language or the VS techniques??? I am using VS2005 team suite, but have come ...more >>

which way is better?
Posted by John Salerno at 10/12/2005 12:00:00 AM
This is where my OO skills aren't quite honed yet. Some of you might remember the little game program I was working on for fun. I had several methods written to determine a character's class, race, etc. My question is, should I put all those questions in a Character base class (so that all s...more >>

Events in threads...
Posted by Danny Tuppeny at 10/12/2005 12:00:00 AM
Hi All, I've written a console app, which sends and recieves data across a NetworkStream and displays output to the console. All is great. I'm now modifying it to be a windows app, but the thing blocks while waiting to recieve data. So, I want to run it in a thread. However, the object t...more >>

Adding a web service at runtime
Posted by Simon Tamman {Uchiha Jax} at 10/12/2005 12:00:00 AM
Wondering how difficult this will be to do. The principle being that the application will load a URL from a configuration file at runtime and then add a reference to the web service. Only having ever added a Web Reference from Visual Studio at buildtime i'm unsure of how to perform this task. ...more >>

C# Windows Form Inheritance Quesiton
Posted by Jason Huang at 10/12/2005 12:00:00 AM
Hi, In my ASP.Net 1.1, C#, I have two windows forms, one is frmContactPerson, another is frmContactAddress. These two forms has many same Controls, except in one GroupBox they have different TextBoxes showing different data from datatable ContactPerson and ContactAddress respectively. Now...more >>

csv to datagrid
Posted by Stanley Cheung at 10/12/2005 12:00:00 AM
Hi all, How can I import a csv file and display as a datagrid directly. Now, I am using datatable to bind to datagrid, but I got the problem for sorting and paging, i don't know how to make a sorting and paging. Do I need to store data into dataset and sqldataadapter? I am using c#. Than...more >>

book recommendation
Posted by David Arden Stevensonn at 10/12/2005 12:00:00 AM
Sorry if this is already in the FAQ or elsewhere. Looking for a book/books recommendation for c#/.net specifically for building multi-tier web applications. Im a mid-level J2EE developer and would like to get up to speed with .NET. Thanks in advance! ...more >>

Lisbox vs datagrid highlighting/selection?
Posted by ___Newbie___ at 10/12/2005 12:00:00 AM
Hello, I'm looking for a control that can display rows and columns similar to a table but highlight the entire row during selection? Listbox highlights the entire row but doesn't support multiple columns. DataGrid on the other hand supports multiple columns but I can't able to highlight the e...more >>

Date in ISO 8601 format
Posted by Fouad Fahim at 10/12/2005 12:00:00 AM
Hi all, I wonder how we can convert or getting a date in ISO 8601 Format!? Regards, FF ...more >>

using visual web developer?
Posted by John Salerno at 10/12/2005 12:00:00 AM
I haven't had much experience with it, so I'm wondering, is VWD something you can use to create a personal website, or would Dreamweaver, etc. be better for that sort of thing?...more >>

Cancellare file con un Web Service
Posted by Marco Tibolla at 10/12/2005 12:00:00 AM
Buongiorno a tutti, ho un problema che mi fa impazzire :-( Ho creato un WebService per sincronizzare una cartella nel mio PC locale con il mio sito internet. La cartella contiene dei file PDF. Premetto che nei test nel mio PC tutto funziona, quando sincronizzo la cartella remota tutto OK...more >>

Different TreeView on different PCs
Posted by Marco at 10/12/2005 12:00:00 AM
Hi all, in my WinForm app I use a TreeView as left menu. In the last months I made several modification to the nodes (added, removed, renamed, etc, etc). When I install the app (using a VS.NET 2003 install project) on some PCs the most uptodate treevire is shown while on other th...more >>

Q: Validating a control on a form
Posted by Visual Systems AB (Martin Arvidsson) at 10/12/2005 12:00:00 AM
Hi! I have written a simple validating event for a couple of textbox's on a form. They validate just fine when leaving the form, now for the problem. If i click a button to begin execution, i want to validate all the textforms before it can proceed. I have tried to send validate to the f...more >>


DevelopmentNow Blog