Home All Groups Group Topic Archive Search About

Visual C# .NET

microsoft.public.dotnet.languages.csharp
Score A quick Newbie to NET question
Robert Meek - 19 Jan 2007 5:53 PM - 6 messages
I recently began working with NET via VS 2005 and the Chrome Object Pascal IDE add-on as I have no experiance with other languages.  But i am picking up C# as I go along...a consequence of having to read C# code in the ...
Score Disposable & 3rd Party Lib & GUI
davis - 16 Jan 2007 12:43 AM - 2 messages
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 ...
Score What's the new thing after ActiveX?
ThunderMusic - 16 Jan 2007 12:39 AM - 6 messages
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 ...
Score Show PDF file in program
Feldaspar - 15 Jan 2007 11:43 PM - 2 messages
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 ...
Score Is an interface the only way?? Easy Q:
TheMadHatter - 15 Jan 2007 11:28 PM - 4 messages
If I inherit from, say, the control class, and I dont want all the members shown after the control has been initialized, is an interface the only way? eg: MyControl: Control { //bla bla } void main() {     MyControl myControl1 = new MyControl(); ...
Score Converting a C program to C#
Gilgamesh - 15 Jan 2007 11:24 PM - 5 messages
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# ...
Score Setting default method parameters
Mark F. - 15 Jan 2007 11:07 PM - 3 messages
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? ...
Score Where is System.ServiceModel?
Ronald S. Cook - 15 Jan 2007 10:25 PM - 2 messages
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 ...
Score getting key pressed
Jerry - 15 Jan 2007 10:02 PM - 3 messages
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 ...
Score Overwriting .NET assemblies in use
Frank Rizzo - 15 Jan 2007 9:52 PM - 2 messages
It seems that I can overwrite a .net assembly even though it is in use (in most cases).  In some cases, the OS says File in use.  Is there a write-up somewhere on when a .net assembly can be messed with (e.g. ...
Score Label change on MasterPages
bonokoot - 15 Jan 2007 9:44 PM - 3 messages
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 ...
Score Form constructor taking parameters by reference
Nikola Skoric - 15 Jan 2007 9:35 PM - 7 messages
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? ...
Score Swap function
Jack White - 15 Jan 2007 9:28 PM - 4 messages
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 ...
Score Setting a controls properties from another form
surfrat_ - 15 Jan 2007 9:01 PM - 2 messages
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 ...
Score LARGEADDRESSAWARE
Frank Rizzo - 15 Jan 2007 8:36 PM - 3 messages
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. ...
Score Filter out emailaddresses
Arjen - 15 Jan 2007 6:44 PM - 2 messages
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? ...
Score Windows CBT Hooks (Help!)
andyblum - 15 Jan 2007 5:47 PM - 2 messages
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 ...
Score Using Multi threading
vishal - 15 Jan 2007 5:29 PM - 2 messages
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... ...
Score Accessing from C# to an vb dll
jaume.pf - 15 Jan 2007 5:21 PM - 4 messages
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 = ...
Score Custom Sort Order
Ethan Strauss - 15 Jan 2007 4:05 PM - 5 messages
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 ...
Score regular expression
JJ - 15 Jan 2007 2:49 PM - 2 messages
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 ...
Score Do-Nothing WinForm App Using 4 Threads?
gsimmons - 15 Jan 2007 2:17 PM - 5 messages
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 ...
Score Convert to Char[] or just use String[i]
pigeonrandle - 15 Jan 2007 2:11 PM - 5 messages
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. ...
Score RadioButton's in different containers belonging to the same group.
Velislav - 15 Jan 2007 2:07 PM - 2 messages
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 ...
Score Event Handles in .ASPX (.CS)
Jake K - 15 Jan 2007 1:57 PM - 4 messages
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 / ...
Score How do I make my windows service start automatically?
MrNobody - 15 Jan 2007 1:52 PM - 5 messages
Ic reated a windows service and somewher ein the project I specified the service to be 'Automatic'. But when I finished the Setup program and installed it to my system, it did not start automatically, I had to open up ...
Score Implementing System.ICloneable
Stefan Hoffmann - 15 Jan 2007 1:42 PM - 7 messages
hi, the following implementations work:    public class NullSafeCollection: System.Collections.CollectionBase,                                     System.ICloneable ...
Score regular expression
JJ - 15 Jan 2007 1:28 PM - 3 messages
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 ...
Score How random is random()?
Daniel - 15 Jan 2007 1:14 PM - 9 messages
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); ...
Score deploying webform?
rcoco - 15 Jan 2007 12:40 PM - 2 messages
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 ...
Score Compact Framework 2.0 & WM2003
Stanislav Vlasic - 15 Jan 2007 12:17 PM - 2 messages
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 ...
Score Create shallow copy of CollectionBase inherited class
Stefan Hoffmann - 15 Jan 2007 11:29 AM - 3 messages
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. ...
Score Can the index type of an array be determined?
Håkan Johansson - 15 Jan 2007 11:14 AM - 4 messages
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 ...
Score How random is Random()
Daniel - 15 Jan 2007 11:12 AM - 4 messages
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); ...
Score Enumerators that need to be changed at runtime, avoiding exception
Daniel - 15 Jan 2007 10:32 AM - 5 messages
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 ...
Score consuming unmanaged DLL from managed C#
Tremendo - 15 Jan 2007 10:29 AM - 2 messages
[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 ...
Score publishing problem
dani kotlar - 15 Jan 2007 10:22 AM - 3 messages
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 ...
Score Distributing signed assemblies
stormogulen - 15 Jan 2007 10:11 AM - 2 messages
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 ...
Score SqlDataAdapter, Stored Procedure, how to add parameter?
dawson - 15 Jan 2007 9:52 AM - 4 messages
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 SqlDataAdapter("dbo.getProjectFiles", conn); DataSet ds = new DataSet(); ...
Score detecting changes of subproperties
nicolasr - 15 Jan 2007 8:18 AM - 3 messages
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 ...
Score Combobox with checked list box.
saurabhnsit2002 - 15 Jan 2007 5:21 AM - 2 messages
Can anyone help me about how to create combo box with its items as checked boxes or radio buttons. This has to be done in C#. I have seen something similar to this named custom combo boxes but they are in MFC ...
Score Allow Tab in a RichTextBox?
Michael A. Covington - 15 Jan 2007 4:22 AM - 3 messages
How do I allow the user to use the Tab key (to insert a Tab) in a RichTextBox?  The sticking point is how to get Tab to generate a KeyDown event rather than simply moving the focus to the next control. ...
Score probleme with toolstrip
Mark - 15 Jan 2007 2:20 AM - 2 messages
Hi, I have a toolstrip with several buttons, I can only see the image assigned for each button in design time and not on runtime. I've tried several different formats .bmp, .png, .ico for these buttons without any success. ...
Score Using a regular expression to retrieve the text between two parentheses
Mark Rae - 15 Jan 2007 1:54 AM - 17 messages
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" ...
Score Deployment project question
Michael A. Covington - 15 Jan 2007 12:54 AM - 4 messages
Greetings, Here's a question about deploying my C# application. My program includes a large library of data files. As far as I can tell, data files can only be added to a deployment project one at a time.  Is there a way to add a whole folder, with all its contents ...
Score how to refresh desktop items in c#
Tee - 15 Jan 2007 12:31 AM - 2 messages
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 ...
Score Detect inactivity
Sonya - 14 Jan 2007 11:36 PM - 3 messages
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 ...
Score ThreadPool.QueueUserWorkItem worker thread quit quietly?
FJY - 14 Jan 2007 10:09 PM - 5 messages
Hello All, I met a strange behavior with the system threadpool. The worker thread seems to quit in the middle of processing. Here is the code: I could see the step 1 is finished but step 2 is not finished. There was no exception. Any thoughts? ...
Score Calling a generic method that has a return value
Otis Mukinfus - 14 Jan 2007 10:04 PM - 4 messages
I've been wrestling with this for a while and can't figure it out. I have a generic method with the following signature:     //this compiles OK     public abstract class DataMethod     { ...
Score Monitor.Enter question
FJY - 14 Jan 2007 8:20 PM - 3 messages
Hello All, I have a question about the Monitor usage. The Monitor locks on the array variable itself and one element in the array is modified in the critical section. The Defined_Static_Int_Array is a static array. Monitor.Enter(Defined_Static_Int_Array); Defined_Static_Array[0] = 1; ...
Score newbie questions on http handler
Raymond Du - 14 Jan 2007 6:46 PM - 2 messages
Hi, I have questions about http handler: (1) Does it always ends with .ashx, the articles I read said http handler is for developers to create something to handle different kind of files extension, but all example I saw use .ashx. ...
Score 'using' statements
Ben - 14 Jan 2007 6:09 PM - 8 messages
Hi, I sometimes see code where the 'using' statements at the top of the file are located before the namespace declaration, and sometimes they are located inside it. For example: using System; using System.Collections; namespace MyNamespace {     ... ...
Score How to programmatically read the body text of Outlook email?
sherifffruitfly - 14 Jan 2007 5:56 PM - 2 messages
Hi, I get usage statistics emailed to me weekly, and would like to analyze the numbers. How can I read the body text of these emails into, say, a String instance? Thanks, cdj ...
Score Disabling internet access
richard.sutcliffe@gmail.com - 14 Jan 2007 4:38 PM - 4 messages
I want to write a small service that will simply disable internet access from my kids PC between certain times (to make sure they do their homework, etc).  I know I could buy any number of internet monitoring software but I don't want to act as 'big brother'. ...
Score Instantiate class from string
tiempotecnologia - 14 Jan 2007 4:01 PM - 3 messages
Hi I have a string with a classname, and I need to instantiate an object of this class. How I can do that? For example formclass = "form999" (formclass)MyNewForm = new (formclass)( ); MyNewForm.Show( ); Of course the string is assigned at runtime ...
Score MdiList property in VS 2005 ??
Chris Peeters - 14 Jan 2007 2:48 PM - 2 messages
hi, in VS 2003 one used the MdiList-property of a menuitem to display the Active Mdi-child windows in the menuitem. But I can't find it nowhere in VS2005. what is the equivalent for that in VS2005 ? thank you ...
Score Window Hooks
andyblum - 14 Jan 2007 9:45 AM - 2 messages
Creation, Destroyed and Moved events in C#.  I am just unclear about the difference between a global and locals hook.  Is global anything that is not part of my application while local is anything that is?  I ...
Score generics - constraint
Michael Moreno - 14 Jan 2007 6:31 AM - 4 messages
hello, I am trying to write a generic class where the underlying type is either an int, a float or a double: public class CMatrix<T>: ICloneable where VarType: int, float, double but that does not compile. The error message is : ...
Score how to find hwnds
Gary - 14 Jan 2007 12:13 AM - 3 messages
static void EnumerateWindows()         {             ArrayList daprocesses = new ArrayList();             System.Diagnostics.Process[] processes; ...
Score How to find hWnd handle from enumerated process?
Gary - 14 Jan 2007 12:07 AM - 3 messages
Hi i need to work with windows of processes that are running on my pc from a certain programme. I've figured out how to build an array of processes that contain just the processes i'm interested in by checking ...
Score Searching text in datagridview
VBA - 14 Jan 2007 12:01 AM - 2 messages
Hi Well what i'm trying to do is search text in a datagridview, i've seen similar code around in other posts or forums, i'm implementing this by using a Textbox, and the code in the TextChanged event, so when the user keeps ...
Next »