Groups | Blog | Home


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# > november 2004 > threads for tuesday november 2

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

Install C# DLL for COM
Posted by Josef at 11/2/2004 11:18:02 PM
Hello, I have created a C# class library and a want to install it with the help of a Visual Studio Setup project and register it for COM usage. During development of the library it was no problem to register the resulting dll on my computer by the option in the project settings. But in the ...more >>

Odd variable length format specifier question.
Posted by TonyM at 11/2/2004 10:46:43 PM
Hi, Can someone help me convert the following C code to the C# equivelent? Basically, we're trying to use a variable (iIndentLevel) to change the number of spaces in the string. sprintf(buff,"%*sEntering: %s\r\n",iIndentLevel," ",pFunctionStringTable[sTraceData.usFunctionNum]); Thanks al...more >>

focus console based form???
Posted by Lore Leuneog at 11/2/2004 10:31:49 PM
Hello I' invoing a windows form from within a console application. I'm using: Form1 frm = new Form1(); frm.ShowDialog; The only problem I can't solve is how can I make the form to the top most window of the screen. By now it's hidden behind the console and frm.Focus() doesn't work. Does ...more >>

Exception message on File.Move not correct
Posted by Rene at 11/2/2004 10:21:43 PM
Hi, Maybe I'm wrong, but we get an exceptoin on File.Move ("FileA", "FileB" ) because FileA is still in use (sharing violation), but the Exception.Message says: Process cannot access the file "FileB" because it is being used by another process. The destination FileB does even not exists,...more >>

win service security question
Posted by Tom at 11/2/2004 10:19:49 PM
hello there's something that I don't understand what is the difference between running a service in say User context and LocalService security context ? and what is the difference between NetworkService and LocalSystem ? those two are a little confusing could you explain in english plea...more >>

Logging Application Block.
Posted by Julia at 11/2/2004 9:47:23 PM
Hi, I am getting started with microsoft Logging Application Block and I wonder if any one can direct what is the best way to use this block in such a way that I can have an application which read the log file immediately as a new entry was added to the log, I am thinking to format an "entry" ...more >>

Inherits AND Implements
Posted by Mike Labosh at 11/2/2004 9:14:12 PM
namespace Foo { public interface IDoStuff { // method declarations } public abstract class Fee { // abstract methods for the subclasses to inherit } public class Fum { // Needs to inherit from Foo.Fee class // Needs to implement Foo....more >>

IE embedded .NET control external reference problem
Posted by Terence Lee at 11/2/2004 7:03:03 PM
Hello, I am currently writing a .NET usercontrol to be hosted in IE. The problem is, the assembly doesn't seems to be able to locate the external dll (e.g. AxInterop.SHDocVw.dll) it is referencing. Any hints? Thanx, Terence *** Sent via Developersdex http://www.developersdex.com *...more >>



easy dialog resizing
Posted by Maloney at 11/2/2004 6:47:57 PM
Does anybody know of a library in c# that will aid in making resizable dialogs? Similar to http://www.gipsysoft.com/articles/dialogsizer/ http://www.codeproject.com/dialog/easysize.asp but in c# ...more >>

How can I make sure all unmanaged resources had been released ?
Posted by Eric at 11/2/2004 6:04:30 PM
for example: SqlConnection is used in my project, how can I know if all connections were closed after open and execution. If some guys forget to close connections after using, how can i check it out ? best, eric ...more >>

IIS management
Posted by Burak SARICA at 11/2/2004 5:48:08 PM
Hi there. How can i process the folders under the default web site and do "create application" task on spesific ones in .net with c#? (i know the names of them.) Thanx. Burak SARICA ...more >>

Checking if Windows Form is open?
Posted by VMI at 11/2/2004 5:15:30 PM
Through my MDI application, I open a FormX that is opened outside of the application (not an MDI child). How can I check if the Form's open so I don't load two instances of the same window? Is it possible that, within the MDI container, a Form can have TopMost equal to true? For some reason, ...more >>

how to make two references to one string that stay refered to the same string reguardless of the changing value in the string?
Posted by Daniel at 11/2/2004 5:14:28 PM
how to make two references to one string that stay refered to the same string reguardless of the changing value in the string? ...more >>

how many places refer to an object? can this be resolved?
Posted by Daniel at 11/2/2004 5:01:14 PM
ok so lets say i have a string that got passed into a method by ref but i want to see how many other places that string is refered to is this possible? ...more >>

don't COM+ GAC and COM+ service
Posted by Tom at 11/2/2004 4:50:32 PM
hello friends whilst studying I came across I don't quite understand.. what is the difference between COM+ registered in GAC and simply registered in windows com+ services ? I think both are system usable. from my understanding to install to gac we use gactutil but to install to windows ...more >>

Assembly or Directive Error?
Posted by Bruce D at 11/2/2004 4:34:09 PM
Hi all. I'm working on debugging someone else's code. The .NET application is a mess...I can't open the project or solution files, so I've started over...creating new projects and such. I'm working on a form that gives me the following error when I try to build the project: The type or name...more >>

Programmatically Changing Printer Options
Posted by slk23 at 11/2/2004 4:20:18 PM
Hi, I'd like to programmatically change the "Keep Printed Documents" option for a printer. The option is available in the Windows UI by going to the Advanced tab on the printer's Properties dialog. Turning it on causes Windows to save copies of printed docs in the printer queue (marked as '...more >>

Building a C# library
Posted by Player at 11/2/2004 4:09:57 PM
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hello all I am using VS.NET 2003. What I am doing apart from teaching myself C# is learning my way round V.NET2003 also. OK so I have a project, it's built and saved. I also want to start my own collection of Classes that I will save u...more >>

Adding datacolumn to filled datatable
Posted by VMI at 11/2/2004 4:01:36 PM
I have a a filled datatable with 3 datacolumns and I need to add a 4th datacolumn that will contain information according to one of the columns. For example, for one record, Col1, Col2, Col3 will contain "Mr", "John", "Smith", respectively. The newly-added 4th column (Col4) will evaluate Co...more >>

LDAP namingContext
Posted by junk_mail NO[at]SPAM paralleltangent.com at 11/2/2004 3:17:53 PM
Hello, Anyone able to grab the namingContext using C# with an openldap backend using directory entry? For example: DirectoryEntry de = new DirectoryEntry("LDAP://" + serverName, userName, password, AuthenticationTypes.Anonymous); A object of type OpenLDAProotDSE is returned but contain...more >>

What does actual databinding of datagrid occurs?
Posted by C.G. Oh at 11/2/2004 2:32:57 PM
I created datagrid with dynamically generated datacolumns and edit/delete button columns. Sometimes, I want to to hide first column from the database because it is a primary key. When I add the following code to any place in the source code, I realized that it never gets to the following code...more >>

Get a MyNamespace resource from MyNamespace.MySubNameSpace?
Posted by Ed Sutton at 11/2/2004 1:17:39 PM
// This works fine when using MyNameSpace but not // from MyNameSpace.MySubNameSpace myImageList = new ImageList(); myImageList .Images.Add((Image)new Bitmap(GetType(),Resources.Images.FolderClosed.ico")); How can I get these resources from a class that is using a namespace of MyNameSpace....more >>

trimming left digit of a number
Posted by Scott at 11/2/2004 1:15:04 PM
How do I trim the left digit from a number? The user will input a number with 3 digit value and I need to trim the leftmost value from the number. A typical value might be 123.4567 and I need to remove the 1 and use it's value in another calculation. ...more >>

data validation when user inputs values
Posted by Scott at 11/2/2004 12:58:05 PM
Hi, I'm using a form to collect values for later analysis. My question is, how do I validate the value the user inputs into a textbox? For example, many of the values require a real number and nothing else is acceptable. Others may require an integer. Thanks, Scott...more >>

Accessing ArrayList index by a key not an index number
Posted by Jack Addington at 11/2/2004 12:43:44 PM
How do I go about accessing elements of an Arraylist using something other than the index? I have a class that manages a number of subclasses. Those subclasses are stored in an arraylist. The subclass has a key property that is a string. I would like to be able to call Class1.SubClassMana...more >>

Restarting an application ...
Posted by Jacek Jurkowski at 11/2/2004 12:02:42 PM
Could anybody help me to write proper code to restart my application? public static void OnRestartRequest() { ... } Restart is needed after exception handled and may occur anytime in application life time ... ...more >>

beginner: nned to change webservice return type
Posted by shainefisher NO[at]SPAM madasafish.com at 11/2/2004 11:57:01 AM
I have had a look around but I'm either not finding or not seeing the answer to this, what i want to do is reurn the results as an array, or some other worldly useful format that flash mx2004 can read. But when I did thiss I was told datasets were the way to go, but needs an array, prefer typed ...more >>

Async behaviour in a thread
Posted by Tom Vandeplas at 11/2/2004 11:53:29 AM
Hi all, When using an asynchronous API call (in my case WriteFileEx) in a thread it seems to become blocking instead of non-blocking (see details below). Can somebody explain me what is happening here... Details: I wrote a simple program that is able to do very fast async writes to disk. ...more >>

System.Diagnostics.Process.Start("../stage.bat");
Posted by choihead at 11/2/2004 11:50:02 AM
Hi All, How can i excuete a bat file by c#? I used System.Diagnostics.Process.Start("../stage.bat"); but it cannot find the file, is this the correct method to call the bat file? thx choihead ...more >>

Immediate Windows Problem !!
Posted by Paul Tsai at 11/2/2004 11:49:51 AM
Dear All, private void button1_Click(object sender, System.EventArgs e) { string a = "22222"; string b = "23456";<--------break point } My problem is why I get the following error message when I stop at the break point and debug in the Immediate Window? (In VB.net, it doesn't...more >>

query execution time
Posted by Dino L. at 11/2/2004 11:24:46 AM
Hi, how can I get query execution time? I am using ODBC conncetion, and OdbcDataReader...more >>

Event never used warning message
Posted by Jack Addington at 11/2/2004 10:41:31 AM
I have created an event and delegate combination for use in a user control when I place it on a form. However because I'm not actually doing anything in the event in the user object I didn't create any code for it. 1) How do I get rid of that warning (besides creating an empty declaration) ...more >>

setting html code in axwebbrowser
Posted by Dan at 11/2/2004 10:40:57 AM
I'd like to display some HTML code in a form using the axwebbrowser control, without having to create a temporary file to navigate to. I'm trying the following code (let's say that the web browser control is named wbb): object o = System.Reflection.Missing.Value; wbb.Navigate("about:blank", ...more >>

Exception class with additional parameter
Posted by Jamie Oglethorpe at 11/2/2004 10:33:45 AM
I would like to create a new exception class with an additional parameter, something like this: public class MyException: Exception { private String field = ""; public void MyException(String Message, String Field) { this.field = Field; ... } } How do I go about this? In parti...more >>

Extending Print Dialog
Posted by johnmg NO[at]SPAM owls.com at 11/2/2004 10:31:49 AM
Hello, Is it possible to modify the print dialog box that appears when a user clicks File->Print? Is it possible to make this modification so that all Windows programs use the modified print dialog box? What about just changing the print dialog box used by Internet Explorer? Is there ...more >>

virtual Printer driver
Posted by G. K. at 11/2/2004 10:29:20 AM
Hallo NG, i need to programm a virtual printer driver, that you can use it as a file format converter that intercepts and converts any printable document into standard BMP/TIFF/JPEG raster images in just few clicks. My question how can do this job in C#, the generation of the images is not the...more >>

Scheduled task running at system startup and showing a UI
Posted by DJMonte at 11/2/2004 10:28:01 AM
I have a C# program that is scheduled to run at system startup. When a user logs into the machine, how can I show a status screen of the running application? I tried with a NotifyIcon but the icon does not show in the tray....more >>

string array and collection
Posted by Yoshi at 11/2/2004 10:08:59 AM
Thought... I have a collection of objects. The object has a property called Name. I want fill a string array with each object Name. What is the quickest or best way to do this? Do I have to loop thru the collection and add each name to the array? TIA, Y ...more >>

Want to call DoEvents from library project
Posted by dotNETDavid at 11/2/2004 10:04:07 AM
We've broken our app into various assemblies. The WinForm assembly provides the user interface, other assemblies provide various I/O services. I'd like to be able to call System.Windows.Forms.Application.DoEvents from within a dll, but it isn't allowed. I don't want to link the dll to our WinF...more >>

How do I know if a user has logged on to our LAN
Posted by BVM at 11/2/2004 9:58:16 AM
This is a multi-part message in MIME format. ------=_NextPart_000_0008_01C4C0C2.798F9D60 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi, Friends: Our reception lady wants to know if a staff is in office or not when a = call comes in. I thi...more >>

Can terminating an ADO worker thread cause a leak?
Posted by Dave at 11/2/2004 9:43:24 AM
I have an application that queries SQL Server and Index Server using ADO. I'd like to have a feature where a user can cancel a long-running query. What I plan on doing is to move my query code to a worker thread which will then post a message back to the main thread when it's done. Then, the ap...more >>

Compiler steps details question
Posted by Skip at 11/2/2004 9:43:02 AM
Hi, I created a COM object in C# and everything works fine on my machine. Now, the compiler gives me the following messages when compiling my code: ------ Rebuild All started: Project: SI, Configuration: Debug .NET ------ Unregistering previous project output for COM Interop... Preparin...more >>

detect if objects got changed
Posted by Tee at 11/2/2004 9:42:14 AM
Hi, I have few textboxes and combobox in a user control. How can I detect if a user has changed the value of combobox and the text in textbox? I know that textbox has a CanUndo property that return true if user has changed the text, but what about combobox? I have heard of IsDirty, but h...more >>

Testing class type
Posted by Claire at 11/2/2004 9:33:34 AM
I want to pass the type of an object as a field in an object. public class FileEventArgs : EventArgs { public object Data = null; public Type ClassType = null; } In another function, I want to test ClassType. Depending on the Class Type Data is handled differently. I can't wor...more >>

How to create a theme?
Posted by Just Me at 11/2/2004 9:24:28 AM
I'd like to create my own theme but do not know how to do that. Can someone direct me to a document or sample I could study? ...more >>

Files loading
Posted by bernardpace NO[at]SPAM yahoo.com at 11/2/2004 9:08:58 AM
Hi, I have an application that makes up of files(reading data). Files are currently located on drive C. Now I am going to write the program and the files being used to a CD. The program is going to be executed on different computers and so the CD-Rom drive letter is not going to be the sam...more >>

Please help with Error Message in loading .NET application
Posted by Joseph McConaughey at 11/2/2004 9:08:02 AM
Hello All, I have been working on .NET (especially C#) applications on this computer for a long time. Everything was working fine until yesterday, but when I came back into work today and tried to open up an application taht I've been working on for a while (and subsequently tried all the o...more >>

SqlDataAdapt.Update method error.
Posted by jiangyh at 11/2/2004 8:52:07 AM
hey guys: I use SqlDataAdapt.update method to update database that appearance an error looks like following. Update unable to find TableMapping['Table'] or DataTable 'Table'. Here is My Code //---------------------------------------------------------- SqlCommand _mInsertSqlCom...more >>

Pass Data From Collection base to a Dataview
Posted by Josema at 11/2/2004 8:02:03 AM
Hi to all, i have a class (of type collectionbase) that creates a collection of objects for instance persons. For other hand i have a Datagrid whose Datasource its the collection wich i talked in last paragraph. Until here no problem, the Grids shows to me the collection. But i woul...more >>

converting data types
Posted by Scott at 11/2/2004 7:48:06 AM
How do I convert the contents of a textbox to a double for mathmateical operations? I'm using a form to collect values and when the user clicks OK, the vlaues are used for calcualtions... but they need to be double data type. Then, after the calculations, how to do I convert the double back in...more >>

plzz help me to add How a Blank row in a datagrid without using da
Posted by aj at 11/2/2004 7:13:01 AM
plzz help me to add How a Blank row in a datagrid without using dataset or any other. plzzz help me...more >>

While nesting in do-while
Posted by Tom Kent at 11/2/2004 7:12:04 AM
I'm running into a weird circumstance with Visual Studio 7.1, where it will not properly indent a while loop nested inside a do-while loop. It compiles and runs fine, but the automatic indenting messes it up every time. Here's an example: using System; namespace Do_While_Test { class ...more >>

"out" parameter and memory leak?
Posted by Alex Chan at 11/2/2004 7:08:06 AM
Hi Group, I have written a window service wtih SAP.NET Connector which is to fulfil request from SAP client. SAP client will call a function exposed by my window service that has a big "out" parameter. That "out" parameter is of class SAPTable, you can regard that as DataTable. As e...more >>

Textbox: Select Text On Tabed Focus
Posted by wackyphill NO[at]SPAM yahoo.com at 11/2/2004 6:43:08 AM
I thought when you tabbed into a textbox that the text it contained was automatically highlighted. This use to be the default in win32. Is there an easy way to do this in .NET. I don't want this to happen if the mouse is used to select the TextBox. Seems wierd, If the Textbox has the default...more >>

add icon to nonclient area
Posted by Bonj at 11/2/2004 6:03:01 AM
I'm sure there's been loads of posts (and answers) as to "how do I add a system tray icon", but how can I add the sort of minimize button that looks slightly different and sits alongside the existing minimize button, that is (fairly obviously) intended to send the app to the system tray, where...more >>

Textbox & Math Calculations
Posted by RobRich at 11/2/2004 5:51:29 AM
I'm trying to figure out the best way to accomplish a task. I need to calculate the numerical values from about 300+ textboxes. Basiclly I have an application that users input checks and credit card receipts into and the program calculates the total.. Right now I am just doing Decimal.Par...more >>

can we change an index of an object?
Posted by Tee at 11/2/2004 4:06:24 AM
Hi, Does anyone know how to change an index of an object? This is what I want to do. eg: I have 5 controls in a panel. index from 0 to 4, after I remove the 3rd control (index 2), I want to change the control with index 3 to 2, and 4 to 3. (push up) ... so when I add new control to the p...more >>

Compare values from objects stored in Hashtable
Posted by f.c.koppenol NO[at]SPAM chello.nl at 11/2/2004 1:48:05 AM
Hi! I'm kinda stuck here. I have an Hashtable with with my custom "Item" Object. The key used in the Hashtable is the "Item.Id", i have selected this key because with a lot of functions i can get the right object from the hashtable really fast. But now i need a function whom can get an object...more >>

Passing C# delegate to C++ with byte array parameter
Posted by hovesh07 NO[at]SPAM yahoo.com at 11/2/2004 1:40:54 AM
Hi All, I am trying to write a C# program to call a routine in managed C++. In the routine, the C# program passes a delegate to the managed C++. The delegate looks like this in c++: public __delegate void FoundPidDelegate ( unsigned char *pData, ); The C++ is able to call the C# beca...more >>

How do I best monitor a selected folder (and subfolder) for changes?
Posted by Egil Hansen at 11/2/2004 1:40:49 AM
Hi all Do C# and .net have some way to monitor a folder in Windows XP/Windows 2000. I want to mirror the content of the folder, including subfolders (if any exsists) to another place, and I want to mirror the changes as they happen. ...more >>


DevelopmentNow Blog