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# > february 2005 > threads for thursday february 17

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

sqlStatement value
Posted by ReidarT at 2/17/2005 11:43:33 PM
I have an sql-statement this.daKioskSelect.CommandText = "SELECT Count(KioskID) AS AntallKiosk FROM Kiosk WHERE KioskID ='" + strKioskID + "'"; How do I get the AntallKiosk into a textbox on a webform? Like I did with ADO rs.AntallKiosk.value regards reidarT ...more >>


isnull in C#
Posted by ReidarT at 2/17/2005 11:00:42 PM
How do I checkif a string is empty in C# like isNull(string) in VB? regards reidarT ...more >>

Override and "base" keyword
Posted by Gecko at 2/17/2005 10:59:33 PM
I noticed that every time I override a class member, the intellisense behavior is to automatically add a call to the base class of the overridden member such as: public override void SomeMethod() { /// Some quality code goes here. base.SomeMethod(); } 1) What would happen if I ...more >>

How to make external process launch "ontop" of my TopMost forms?
Posted by Robin Tucker at 2/17/2005 9:07:19 PM
Hi, I am using System.Diagnostics.Process to launch (shell extension) a process. I have forms in my application that are specified as "top-most" but I would like my launched application to be top-most of those forms when it arrives. At present, it isn't. I have the same trouble with Micros...more >>

Including page
Posted by AntoS at 2/17/2005 7:25:47 PM
I would like to include a head menu in all pages, how can I do it using, include,... which is the syntax? Thanks Bye ...more >>

how does c# know that there are indexers an an IL assembly ?
Posted by bonk at 2/17/2005 7:20:03 PM
Hello, IL does not have indexers. Infact the c# compiler compiles indexers to Set_Item and Get_Item (or whatever name I choose via the IndexerNameAttribute ). So how does c# (compiler) know that something in a IL Assembly is supposed to be an indexer ? And more important, what ways do I h...more >>

Threading question
Posted by Phillip N Rounds at 2/17/2005 6:30:50 PM
Why is this using 50% of available CPU? What I am trying to accomplish in this service is as follows: In the main class (COS_Service) , int Main(), initializes a timer. Each OnTimer() event is to create multiple threads to perform their assigned task. I also want to do some checkin...more >>

Average .NET salary?
Posted by Stu at 2/17/2005 6:23:05 PM
What are .NET programmers making now a days? No one has to answer or give their exact salary, but I think it might be useful for those of us who think they might be underpaid :) I know it varies a lot by where you live and how much experience you have, so it will be hard to draw any conclusion...more >>



C# and custom components
Posted by glenn at 2/17/2005 6:22:41 PM
I have been looking to no avail for a book, site or something that explains the processes involved with writing my own custom components such as grids, textboxes and such and then registering with environment so that I can choose from the list of components. Can anyone point me to a resource o...more >>

Collection remove
Posted by Franck Diastein at 2/17/2005 6:03:12 PM
Hi, I'm trying to remove items from a collection this way: foreach(Object myO in ObjectCol){ if(myO != "xxx"){ myO.Remove(); } } But I'm having an error telling me that Collection was modified... I understand this, since I remove one object from collection... What is the best way ...more >>

Dependencies and remote object
Posted by Julia at 2/17/2005 5:41:49 PM
Hi, My asp uses .Net remote to call to MyServer 1.assuming I am not using the GAC,should I install all MyServer.dll dependencies on the Bin folder of my .Net application as well,or is it enough to install MyServer.dll? 2.assuming i am using the GAC,should the MyServer.dll or any of its ...more >>

Open a StreamReader on type File
Posted by Bagger Vance at 2/17/2005 5:06:19 PM
Can I open a StreamReader on type File ( instead of a string filename ) ? ...more >>

Evaluate Expression in while
Posted by Bagger Vance at 2/17/2005 5:03:36 PM
The code below does not work -- but is there a way to do this? I want to both read a line and string sline; StreamReader m_streamReader = new StreamReader(fi); while(sline=m_streamReader.ReadLine()) Debug.WriteLine(sline);...more >>

Paging Issue with datagrid
Posted by Mathana g at 2/17/2005 4:56:28 PM
Hello Friends, When we bind custom collection object (which is populated with objects of custom class) to a Datagrid, the paging links(or numbers) are disabled and only first page number is getting displayed under the datagrid. Thanks & Regards, Mathana Gopalan.C ...more >>

Web service class, inherit from asmx class
Posted by free.teranews.com at 2/17/2005 4:20:04 PM
After defining a trace file listener, I wrote a small method for doing logging and put it in the main class for a web service, Service1.cs : public void log(string s) { Trace.WriteLine(DateTime.Now+":"+s); } Now I want to access it from other classes in other files, so that they all ...more >>

NAnt knowledge
Posted by Frank Rizzo at 2/17/2005 4:14:26 PM
Is there a step by step tutorial for NAnt out there? All I found is bunch of fragments here and there with people assuming that you already have solid knowledge of it. Their Wiki, while nice that they have it, is more for encyclopedias than learning about something complex. Thanks...more >>

"Object not set to an instance of an object" How do i check this?
Posted by aaa at 2/17/2005 4:14:23 PM
I know in VB we had IsObject ut how do I check an object to see if it exists in sharp (without bombing the if)? ...more >>

Doing an FTP from .NET application
Posted by Sinex at 2/17/2005 4:04:57 PM
Hi, I have a windows application This guy monitors a directory on my PC (using FileSystemWatcher). When any file is dropped into this directory, I want the application to send that file(s) by FTP to an FTP server. What are the classes that I should use? ...more >>

Unions in C Sharp
Posted by Fritz at 2/17/2005 3:42:01 PM
Is is possible to create a C style union in C Sharp? I'm trying to call functions in an unmanaged DLL that has a struct with unions in it as a function parameter. I've looked at the "StructLayout" attribute and the unmanaged code examples but I don't see anything about unions. Regards, F...more >>

Synchronizing 2 grids via the CurrencyManager
Posted by Pete Davis at 2/17/2005 3:40:53 PM
I have written a custom databound grid control that we've been using successfully for months, but one of our developers has just run into a problem that I can't figure out. The code for setting it up is as follows: DataSet dataSet = new DataSet( "TestSet" ); DataTable tableParent = dataSe...more >>

C# 2.0 Data Sources
Posted by Michael Rodriguez at 2/17/2005 3:37:02 PM
I'm using the December CTP of VS.NET 2005. There is an option there to use a business object as a data source, but it assumes you have a bunch of public field names and list operations built in, etc. My business object simply returns a DataSet. What I can't figure out is how to create a Dat...more >>

Deserialization constructor
Posted by MP at 2/17/2005 2:52:09 PM
Hello, I am having a bit of a problem with Deserialization. I need to "override" the special constructor used when an object is deserialize. In thes constructor I have to execute some code that is requierd by our framework and then call the 'original' special constructor. How can I call ...more >>

AssemblyInfo.cs AssemblyVersion
Posted by Matthew Smith at 2/17/2005 2:38:26 PM
Is there a way to get the value that is stored in the AssemblyVersion attribute that's in AssemblyInfo.cs?...more >>

Need Help with Multi Form handling
Posted by Tim Geiges at 2/17/2005 2:36:45 PM
Since I am being challenged with learning c# I figured I could pass some of the pain on to you guys :-) I have another question(this one is important for me to fix before I can get my app to Beta) My app (an image viewer) opens with a Main form with a file explorer if you open the program wit...more >>

Authenticate agains several Active Directory Domains
Posted by Marc Eggenberger at 2/17/2005 2:32:47 PM
Hi there. I have the following environment: Active Directory running on Windows 2000. There is a root domain called ad.sys and within this root domain there are the following subdomains: dom1.ad.sys dom2.ad.sys dom3.ad.sys I need to restrict access to a certain part of a ASP.NET page...more >>

Exporting functions
Posted by balmerch at 2/17/2005 1:39:04 PM
Is it possible to export functions in C#, so say an unmanaged C++ application could call the functions? This question relates to making plugins for an application written in C++ that has to call two functions in the plugin, myplugin_version and myplugin_main. Is this possible in C#? Thanks,...more >>

c# class->xml->sql tables->c#class
Posted by Michael.McD at 2/17/2005 1:31:07 PM
I would like to store an object graph in a SQL tables (that map via a schema generated using xsd.exe to my objects properties - generated using xsd.exe) and then restore these objects from said tables. Dose anyone know where I might find a good description of how to acheieve this or of an...more >>

Focus problem
Posted by Keith Smith at 2/17/2005 1:08:32 PM
I have a form with some comboBoxes and other controls. When tabbing through the controls the cursor "disappears" about after the 4th comboBox. Apparently there is another item being focused, however, I have checked the tab index value on each of my items and they are all set in consecutive ...more >>

Foxpro & Unicode
Posted by Sascha Schmidt at 2/17/2005 1:07:54 PM
Hello ! I have a little problem accessing a Visual Foxpro-database using ODBC = (Driver 6.00.8167) (using System.Data.Odbc). Reading a column, defined in the Foxpro table = definition as a kind=20 of binary char (i'm no foxpro-expert and the database is predetermined) = and containing=20 Un...more >>

Treeview with Scrollbar on Left
Posted by Michael C# at 2/17/2005 12:56:47 PM
Hi all, I need a treeview with the vertical scrollbar on the left-hand side of the control. Can someone point me in the right direction for the best way to do this? Articles, source code, links, etc. all appreciated. TIA ...more >>

Inheriting Permissions
Posted by !!! Klutzo !!! at 2/17/2005 12:49:39 PM
I give permissions for ASPNET on a top level subdirectory. A windows program copies a file into the subdirectory, however, my web service cannot access the file because it does not have permissions. Shouldn't the file automatically inherit permissions by being dropped into that top level...more >>

format string modifier for actual number of decimals
Posted by Donal McWeeney at 2/17/2005 12:42:41 PM
Hi, Is there a way to specify on the predefined format strings like P and N that you want displayed all the decimals in the number... for example 3 will display 3 2.1 will display 2.1 3.21 will display 3.21 I know I can do it will a custom format like 0.##### but would rather if th...more >>

Help on '*.exe' versioning naming
Posted by MikeY at 2/17/2005 12:16:16 PM
Hi everyone, Hopefully someone can help me on this. I've been trying to find out how to change my naming on my executable program when I have updated the application ie: myApp.exe1.0 to myApp.exe1.1. I am making my project with C# in a window environment. How can this be achieved and is ...more >>

Probably an easy one for ya - File Associations
Posted by Tim Geiges at 2/17/2005 12:01:11 PM
I am trying to open an image in a little image viewer I wrote(it has its own file explorer but I want it to also open from Windows Explorer) When I select an image from widows explorer and use "Open With" point it to my app, I can read the args[0] which contains the path to the file but I c...more >>

Font.Bold
Posted by Marty at 2/17/2005 11:56:49 AM
Is there a way to set textbox font to bold at runtime? Thanks. ...more >>

How to get a list of DNS servers
Posted by Peter Gloor at 2/17/2005 11:45:50 AM
I'm writing an application that requires some dns queries (MX etc) not provided by System.Net.Dns. So far I managed to write my own dns class with methods to query a given dns server. There is only one thing left I could not figure out so far. How can I get the list of dns servers used by...more >>

Shaped Forms
Posted by Publicjoe at 2/17/2005 11:35:41 AM
I now understand the issue. The code Bob posted has the same issue. It appears that when you have the screen resolution set to 32-bit, then the transparencykey does not work. Thanks guys for your input. Publicjoe C# Tutorial at http://www.publicjoe.f9.co.uk/csharp/tut.html C# Ebook at ht...more >>

Calling macro from aspx
Posted by Baskar at 2/17/2005 11:31:28 AM
We have series of .SAS files (Macros), which produce output as graph and datasets. In some cases the output dataset is fed to the next set of Macros that gets executed. We need to call these Macros from .ASPX files, pass some parameters and display the output (graph/data in grid). As per our kn...more >>

Object lifetime question... again
Posted by MuZZy at 2/17/2005 11:29:07 AM
Hi, As a follow up for my previous post, i have one more question: Do following two examples differ in terms of optimization(execution + memory): void Func1() { CUtil u = new CUtil(SomeDataBaseConnectionParams); if (u.SomeDatabaseCheck()) { DoWhatever(); } } vs void Fun...more >>

Reflecting a property type for IList
Posted by Michael Groeger at 2/17/2005 11:10:53 AM
Hi, is it possible to determine if the PropertyType of a property support IList? We are inspecting all properties of a Type and we need to care about the properties which have a type which supports IList. I tried to do the following: public void TestPropertiesOfType() { System.Type ...more >>

Office automation cleanup (Excel)
Posted by Stephen Brooker at 2/17/2005 10:55:09 AM
Hi all, Just playing around a MS how-to sample to work with an Excel file from within C#. Everything is fine and I understand it OK, however when Excel and the application are closed, there is still an Excel process showing up in the task manager. Every time the app is run, another process ...more >>

binding radio buttons
Posted by imjess at 2/17/2005 10:51:08 AM
Hi, I'm having a problem binding two radio buttons to a dataset. Seems that the radio buttons are visually updated, but the corresponding values are not updated in the dataset. I have many other controls that are bound with no problems. Any help or sugguestions are much appreciated!! ...more >>

How do I choose debug/release version of C# DLL?
Posted by Peter Steele at 2/17/2005 10:43:47 AM
I've written a C# DLL that I want to include in my other C# projects. What I want to do is include the Debug version of the DLL when I am building the other apps in debug mode and Release version of the DLL when I'm building in release mode. This is quite easy to do in VC++ using various macro...more >>

Drawing on screen
Posted by Hai Ly Hoang at 2/17/2005 10:40:08 AM
Hi, I want to draw directly on to the screen. I think i should get the Graphics object of the screen. It's easy to get do it in C++ (by GetWindowDC(NULL)). But how to do that in C# ? Thanks ...more >>

OpenFileDialog
Posted by abcd at 2/17/2005 10:33:04 AM
I am using OpenFileDialog. I am using REstoreDirectory = true When I successively open the file dialog the last directory opened is not remembered. How should I achieve this. Thanks ...more >>

Search Tool like Aivosto Project Analyzer for c#
Posted by Ewald B. at 2/17/2005 10:32:33 AM
Hi, i am searching a tool which shows me information about a method. i want to know which other methodes calls a method. Example: Method1: - called by: Method2, Methode3, ... - calls: Method5 For VB.net the tool aivosto project analyzer works fine. But i need this for c#. Tha...more >>

"using" vs "= null" and object lifetime
Posted by MuZZy at 2/17/2005 10:02:52 AM
Hi, Lately i've been (and still am) fixing some memory leaks problems in the project i just took over when i got this new job. Among the other issues i've noticed that for localy created objects it makes difference to explicitly put them to null after working with them is done - it somehow ma...more >>

A question about lock() and exceptions
Posted by Paul Tomlinson at 2/17/2005 9:41:57 AM
All, If I do something like this: lock( typeof( mainform ) ) { .... if( some condition ) throw new Exception() .... } when "some condition" is true and the exception gets thrown does the lock get released? Thanks PT ...more >>

Way to improve managed code performance
Posted by Nadav at 2/17/2005 8:51:03 AM
Hi, I hope this post will find it's way to some MS technical authority... I am experienced with bought Unmanaged C++ and Managed code ( C# ), There are some issues with the .NET framework that make me wonder... Take in mind the following points: 1. Managed objects are managed by the GC t...more >>

how to write raw data to event log.
Posted by Paul at 2/17/2005 8:33:05 AM
Hi I am writing to the event log in a c# console app, but can not seem to write data. the message below works with 23 being the catagory, just wondering what format to use to write for instance a byte of data? System.Diagnostics.EventLog.WriteEntry("newlog","testmessageone", EventLogEntryTy...more >>

Custom controls derived from common usercontrol ancestor
Posted by John B at 2/17/2005 8:27:51 AM
Hello I want to create a set of controls that have some common methods and properties. I was thinking that I should subclass the UserControl class and add these common features there and then base all my custom controls on this new MyUserControl Class. Is this the way to go? The MyUserContr...more >>

Newbie : Problem Inheriting from a VB dll
Posted by John at 2/17/2005 8:24:07 AM
Hi all, I'm relatively new to this so please bare with me here. I have a whole lot of VB dll's that I use and all of them inherit from one central dll. Now in VB, I simply use the Inherits keyword and include the base dll in my references for that particular project I'm working in. I also ...more >>

Code Access Security exception in subproject
Posted by dc NO[at]SPAM upsize.de at 2/17/2005 8:01:20 AM
Hi, I have a solution with an ASP.NET project and a business and a data layer in separate projects. The following code string test = System.Diagnostics.Process.GetCurrentProcess().ProcessName; runs fine in the ASP.NET app and in the business layer, but throws a security exception in the d...more >>

How to: Add "ListItems" to DropDownLists that are binded
Posted by charliewest at 2/17/2005 7:53:01 AM
I have binded a dropdownlist control to a data view. I am trying to add a listitem to this already binded control, however, i cannot figure this out. My code is: // code to create data view object (dv) DropDownList1.DataSource = dv; DropDownList1.DataMember = "vStA"; DropDownList1.DataTe...more >>

Hyperlink in DataGrid
Posted by Newbie at 2/17/2005 6:21:11 AM
Hello! I am using a DataGrid to show a table. Some of the columns are showing numeric data. I need to show these numeric data as hyperlinks so that the user can drill downward (or get more details about the data). Thanks in advance. Newbie...more >>

problem with wmi
Posted by DAMAR at 2/17/2005 5:11:02 AM
I have got a problem with WMI's Win32_LocalTime: here is the msdn reference: http://msdn.microsoft.com/library/en-us/wmisdk/wmi/win32_localtime.asp I'D like to have a timer which pass me an event every thursday at 7 am. I have got a method to produce a querystring to configure this timer (...more >>

Programmatically burn DVDs?
Posted by Susan at 2/17/2005 4:45:14 AM
Is there any built-in functionality in .net or Win32 to burn CDs and DVDs from within a program (c# or c++)? If not, can anyone point me toward type librarys or 3rd party software that would enable programmatic DVD burning?.. ...more >>

throws keyword missing in C#
Posted by vijaynats NO[at]SPAM yahoo.com at 2/17/2005 4:30:12 AM
Why isn't there a 'throws' keyword in C# like java - i would like to declare a function and say - public int addup(int a, int b) throws ArithmeticExceptio, DivideByZeroException { ... ... } just like java so that addup function only throws these two types of exceptions is there...more >>

Really nasty bug with intellisense causing the VS.NET 2003 IDE to lock
Posted by webmaster NO[at]SPAM vbusers.com at 2/17/2005 3:15:45 AM
Since installing SP1 and using VS.NET 2003 I have been having terrible problems with the intellisense locking the IDE. It only seems to happen with certain assemblies, but happens a lot. For example if I type: MessageBox.Show( this, "Test", and then start using the Up and Down arrows to ...more >>

how can I stop the beep when I press the return key ?
Posted by CobraStrikes NO[at]SPAM al.com at 2/17/2005 1:54:17 AM
Thank you for taking time out to answer my question ...more >>

Get String from unknown object
Posted by Webgour at 2/17/2005 12:15:21 AM
Hello, I'm using the following System.Collections.IEnumerator IEn = ((System.Collections.IEnumerable)DataSource).GetEnumerator(); while (IEn.MoveNext()) { dr = m_contentDataTable.NewRow(); dr[0] = IEn.Current; m_contentDataTable.Rows.Add(dr); } However I would like to get the content...more >>

ListBox VScrollBar ???
Posted by Sharon at 2/17/2005 12:09:06 AM
I have a ListBox on my form and wand to do auto scrolling, I can do that by: myListBox.ClearSelected(); OutputListBox.SelectedIndex = myListBox.Items.Count - 1; But it causes to unselect all selected items, so I wish do that by moving the vertical scroll bar, imbedded in the ListBox. But I c...more >>


DevelopmentNow Blog