microsoft.public.dotnet.languages.csharp Archive - March 2002
Post a message to this list
Messages
Page: 1234567891011121314151617181920
21
How can I change the name and path of app.config file ? (2 replies)
microsoft.public.dotnet.languages.csharp
I can't find any classes for manipulate app.config file (which contain dynamic properties) except to read from it. But I want to write to app.config file programmly and change it name and path where is it. How can I to do it ?
>>>Windows Service<<< (3 replies)
microsoft.public.dotnet.languages.csharp
Hi Folks! I was trying to write a Win Service in C# , but I am running into bad luck. I tried to create a basic service through the wizard and with the help of MSDN but I am failing to see my Service Name appearing in the Server/Explorer/Services listing? Are ther any tips with Win Service on .net (BTW I am using beta 2) Steps I did 1. Created an empty Win Service Proj (with no functionality) 2. R...
Problems using system.reflection (3 replies)
microsoft.public.dotnet.languages.csharp
Hi, we seem to be having problems using the system.reflection . We call a method which returns a sqldatareader object dynamically using the system.reflection namespace classes The commented code where we use the object in a early bound manner works fine But the dynamic class loading works only until the object' method is called , but the datareader doesnt seem to have any data in it * and also how...
ANN: Programming C# 2nd Edition (12 replies)
microsoft.public.dotnet.languages.csharp
This is a one time announcement that I hope will be of interest to this list... I'm pleased and proud to announce that the second edition of Programming C# is now in stores. This is a full update, in which all the known problems have been fixed, and all the code has been tested with Release 1 of .NET. You can read about this book and review a sample chapter on my web site (http://www.LibertyAssoci...
Example of SocketPermission security? (2 replies)
microsoft.public.dotnet.languages.csharp
I have a server application that I would like to restrict access to by IP address. I can manually verify the remote address by using the socket class and checking the remote address each time a connection is requested. I have been trying to read about the Security features in dotnet, and it seems like I should be able to use some combination of the SocketPermission class and Security Attribute cla...
Correctly creating threads or wasting memory? (3 replies)
microsoft.public.dotnet.languages.csharp
Hello everyone, I've never really though about this problem before. I'm executing a loop and in every pass I use a private class field &quot;xxx&quot; to create a *new* instance of another class &quot;clsXXX&quot; that will be executed in another thread. The thread variable &quot;oThread&quot; is also a private class variable. Let's say the loop has executed one pass and xxx is equal to a new instance of clsXXX and oThread is ...
questions on RichTextBox, Window Handle, and TopMost (2 replies)
microsoft.public.dotnet.languages.csharp
1. Undo and Redo in RichTextBox seem to be cleared up when getting the Text property. Is there a way to get the text to avoid this? 2. How to increase the number of window handles that an application can create? 3. Setting Form.TopMost to true seems to interfere with default focusing on controls in the form. Below is an example that shows the behavior: using System; using System.Windows.Forms; cla...
Win32 API - SystemParametersInfo (2 replies)
microsoft.public.dotnet.languages.csharp
I'm trying to use SystemParametersInfo() to get and set the desktop wallpaper. I'm trying to do this in C#. When I run my code, I get an error back saying that &quot;The specified procedure can not be found&quot;. I've attached my code. I think I'm doing something wrong in how I set up the signature for SystemParametersInfo(). Is there a better way to get and/or set the desktop wallpaper, instead of using t...
DataGrid-Cell-Text-Color (2 replies)
microsoft.public.dotnet.languages.csharp
I have a DataTable x with 3 Column. I need to change all Cell text color on the 3 Column. How I do that? Thanks!
getting filename in c# (6 replies)
microsoft.public.dotnet.languages.csharp
I do this string [] fileEntries Directory.GetFiles(sdirname); but I get filenames with full path . I only want the file name . what do I have to do. Akshay
new public void draw() versus public void override draw() (2 replies)
microsoft.public.dotnet.languages.csharp
I'm trying to understand why there are two ways to override a base class's methods and properties, et.al. The two ways I'm referring to are using the &quot;new&quot; keyword and the &quot;override&quot; modifier when declaring a method. When is one preferred over the other, or is the &quot;new&quot; modifier just there to accommodate bad design in the first place (say someone forgot to declare a virtual method in their base cl...
How to change column width and row height in DataGrid ? (2 replies)
microsoft.public.dotnet.languages.csharp
How can I change the width of some columns and the height of some (multiline) rows after binding the DataGrid with a DataTable ? Heinz
Selecting a know DataRow in the DataGrid (4 replies)
microsoft.public.dotnet.languages.csharp
Hi, I have a DataGrid that contains a DataTable. Having a primary key, I can fetch a specific row from my DataTable, my goal is to select this row in the DataTable. My DataGrid can be sorted any time, so I can not rely on the index. My question is: Having a DataRow x, how I can selected this x in the DataGrid ? Thanks for any help Jeff
Convert.ToDateTime (3 replies)
microsoft.public.dotnet.languages.csharp
Hi , Hi calling the ToDatetime function of the Convert Class does indeed work fine with the format &quot;mm/dd/yyyy&quot; guess thats the default How can we convert it to other formats like say &quot;dd/mm/yyyy&quot; Kind regards
s == null || s == string.Empty (3 replies)
microsoft.public.dotnet.languages.csharp
Is there a simple way of performing this check? I.e. I have: string s; //... if (s null || s string.Empty) { } is there something like: if (NullString(s)) {} I'm trying to avoid adding my own unnecessary library functionality.
Error loading C# Controls into a form (2 replies)
microsoft.public.dotnet.languages.csharp
I created a new TextBox, derived fom the TextBox Control. When loading this TextBox into a new form I always get the error: Exception from HRESULT 0x80131019. This happens also with other controls I created. I tried different approaches: create a standard textbox in the resource editor and exchange the standard textbox class in the source code. The programm will compile an function as expected, bu...
How to write Text on an Image Object? (3 replies)
microsoft.public.dotnet.languages.csharp
How to write Text on an Image Object?
Event Reflection (4 replies)
microsoft.public.dotnet.languages.csharp
Two issues have arisen with respect to reflecting events. 1. Suppose that I have a class that defines EventA. Reflecting the private members of the class reveals that there is also a corresponding private field (of type object) named EventA. From the FieldInfo, I can find no way to discern that the field is associated with the event. A workaround of course is to go through the reflected events and...
'finally' usage? (2 replies)
microsoft.public.dotnet.languages.csharp
In some place Microsoft gives the advise to use 'finally' to ensure some task is done. For example, to be sure a connection will be closed: try { SqlConnection con new SqlConnection(); ... do something } // Position 1 catch { ... do something } // Position 2 finally { con.Close(); } that's because the code inside of 'finally' is always executed. (If no exception is raised, after 'Position 1', othe...
resize false on a windows form? (2 replies)
microsoft.public.dotnet.languages.csharp
Hey, guys I am new to C#. Tell me how do I prevent a windows form from resizing. I am sending you the crappy app I created.
How to get the MAC-address of a network card? How to get HD serial Number? (3 replies)
microsoft.public.dotnet.languages.csharp
I wonder how can I do this using managed C#. Any help welcome.
Possible to disable system beep when ENTER pressed? (3 replies)
microsoft.public.dotnet.languages.csharp
I've got an event KEYDOWN that i've attached to a textbox. Every time it's pressed, the system speaker beeps... is there a way to disable this? Had the same problem with my VB6 app. AC
Mixing columns from two tables in a grid (6 replies)
microsoft.public.dotnet.languages.csharp
Hello, I am fairly new to C#, and have just learned the basics of data adapters, data sets and data grids. I've done the walkthroughs relating to those things but I can't work out how to create a data grid which mixes columns from two (or more) table. Let's say for example that I have a table &quot;Customers&quot; with the columns &quot;ID&quot; and &quot;Name&quot;, and a table &quot;Orders&quot; with the columns &quot;ID&quot;, &quot;Cust ID&quot;, &quot;Orde...
Windows FORMS! (2 replies)
microsoft.public.dotnet.languages.csharp
Form form1 new Form(); form1.Text &quot;My Dialog Box&quot;; form1.MdiParent this; form1.ShowDialog(); I have a MDI application... I am trying to create a child window on the fly.. but when you do that you can't use form1.MdiParent this; and I haved looked everywhere trying to find a solution to this problem. Anyone know how to create child forms without using the designer for a MDI app? TheUaRT
WishList: Readonly Arrays (3 replies)
microsoft.public.dotnet.languages.csharp
It would be nice if Arrays exposed a readonly wrapper. From example... Dim X() As Integer //fill the values Dim R() as Integer X.ReadOnly R would be a wrapper for X, not a copy. Thus any changes to X would be reflected in it. However, anyone given R would be prevented from making changes to the array. Also, the type used for R would inherit from Integer() so that you can pass it to methods that ne...
Ad
MBR BootFX
Best-of-breed application framework for .NET projects, developed by Matthew Baxter-Reynolds and MBR IT
 
 Copyright © Matthew Baxter-Reynolds 2001-2008. '.NET 247 Software Development Services' is a trading style of MBR IT Solutions Ltd.
Contact Us - Terms of Use - Privacy Policy - www.dotnet247.com