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# > may 2004 > threads for thursday may 20

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

MP3 (no WMP, no DirectX)
Posted by psg at 5/20/2004 11:09:30 PM
Hello! I am negatively surprized how playing MP3 files in my application can be such a pain in the ass. First I tried ActiveX control of Windows Media Player, it worked fine, but: 1. consumed too much memory 2. from time to time was stopping with (ActiveMovie memory) error (maybe that was ...more >>


Focus problem!
Posted by snapple at 5/20/2004 10:01:01 PM
Does anyone know how I can find the last focused control from a form before I leave it? Managed code is preferred please Thank you...more >>

creating odbc dsn with c#
Posted by Andi Reisenhofer at 5/20/2004 9:33:26 PM
Hallo C# folks, Somebody know how to create a ODBC DSN dynamically in c# program. Also interesting for me would be the connectionstring for an Access Database. Thinks a lot Andreas ...more >>

AssemblyInfo.cs
Posted by sachin at 5/20/2004 9:21:02 PM
What is the significance of AssemblyInfo.cs file that gets created automatically in .NET environment ? where and how it is used ...more >>

TabPage TabControl Question
Posted by meh at 5/20/2004 9:14:46 PM
New to C#... I have a tab page with a handful of controls on it (label, combobox, etc.). Is it possible to "boilerplate a tabPage with the controls "like a MDI childForm" so that adding a new tabPage includes the controls. Any examples, documentation or comments would be helpful. tia meh...more >>

ComboBox in DataGrid - Stuck! Help with Debugging!!
Posted by sirinya16 NO[at]SPAM hotmail.com at 5/20/2004 9:07:23 PM
I've been trying to put a them, please help me out. Here's the major parts of my code: public Form1() { DataSet myDataSet = new DataSet("myDataSet"); DataTable testTable = new DataTable("table"); testTable.Columns.Add("Col1", typeof(Int32)); testTable.Columns.Add("Col2", typeof(String...more >>

Search results coloring in HTML page
Posted by Julie at 5/20/2004 9:06:55 PM
Part of my site has a search capability that I'd like to enhance. What I'd like to do is have a 'filter' of some kind that would take the search results page and would highlight the found words, and that would end up being the page rendered to the user. Is there something out there that will ...more >>

Text Parsing/Coloring?
Posted by Donald Smith at 5/20/2004 8:47:59 PM
Hey, How it works is, wolfenstein has a color code system built into it. By typing ^(a-z or 0-9 key here), it gets a value that represents a color, each key has a different color. Like ^1 = Red, ^2 = Green, 3 = Yellow, etc. What I need done is, when my program reads a string, it look...more >>



NULL datetime
Posted by Dean L. Howen at 5/20/2004 8:45:17 PM
Dear friends, Could you help me to solve the problem: How can we set/get NULL values of datetime in DatetimePicker ? I design a form using DateTimePicker to input/output date value, but the date could be NULL Thank you. ...more >>

Binding two data columns to one DropDownList
Posted by cw bebop at 5/20/2004 7:47:08 PM
Is there a way to bind two columns from a table to one DropDownList? Below I have the column ["DNAME"] databound to DropDownList1 and would like to also have the column ["LOC"] bound to the same DropDownList1 from the Dept table. Can this be done? Have a dropdownlist with DNAME and right...more >>

Converting object to class
Posted by DDE at 5/20/2004 7:30:53 PM
Hi all, I have defined a meththod supposed to do some treatment with the class it receives as argument. This method can receive different type of classes so it's argument is defined as an object, see sample beloz public DoSomething(object theClass) { } public class Myclass1 { int ...more >>

Reference problem...
Posted by Raphaël ARBUZ at 5/20/2004 6:38:30 PM
Hello, I'm a very beginner in ASP.NET and I was attempting to work with several .cs files so as tu use object programming capabilites. The problem is that when I try to use a component (such as an Oracle Connection or a Data Grid) created in my main .aspx file, with another class, I get an err...more >>

Convert class
Posted by Alberto at 5/20/2004 6:23:50 PM
why there isn't a Convert.ToFloat() method in the Convert class? Sometimes I can't work with a float field because there isn't this method and I need it to, for example, convert the input in a textBox to a float field. Thank you ...more >>

Where does business logic go?
Posted by Simon Harvey at 5/20/2004 5:34:17 PM
Hello Chaps, Me and a collegue have been talking about where the best place to put business logic is. I think that the best place is where Microsoft suggest - in a seperate business logic layer. The alternative is to have all the logic in with the business entity objects, thus eliminating t...more >>

How to support PropertyGrid
Posted by °Ë´óɽÈË at 5/20/2004 5:25:22 PM
As you know, There is a PropertyGrid in .net Framework, and it can browser the property of a object. But it doesn't support the datatype defined by user. For example, I write a struct MyStruct, and object has a property Struct is MyStruct, the Struct property isn't editable in propertyGrid. How ...more >>

TabControls TabPages collection cause error when removing pages
Posted by Peter Row at 5/20/2004 4:43:20 PM
Hi, I have created a UserControl which is subsequently hosted on a standard form. My control has a TabControl on it but it has no TabPages configured. At runtime I create X pages and put a single RichTextBox on each page. In my controls loaded event I call my Render() method which configur...more >>

Sort a datatable by col?
Posted by VM at 5/20/2004 4:37:50 PM
How can I sort a datatable by a certain col after the table is filled? Also, in my Windows datagrid, when I click on a column header that contains integers 1-11, instead of sorting them correctly, it sorts them as 1,10,11, 2,3,... Windows Explorer does the same thing when sorting filenames that...more >>

How can I get the count of the Items in a ListBox?THX!
Posted by honeybee at 5/20/2004 4:22:42 PM
How can I get the count of the Items in a ListBox?THX! ...more >>

Multiple Main() s in Petzold's book.
Posted by Victor at 5/20/2004 4:18:28 PM
In his book "Programming Microsoft Windows with C#", page 42, Petzold deals with the case of a project with multiple Mains. He explains that when compiling in the command line the argument /main can be used, as in csc prog1.cs prog2.cs /main:prog2ClassContainigMain (the code details are ...more >>

Crystal Reports in Windows Service
Posted by Ann at 5/20/2004 4:06:05 PM
HI, All Is there a possibility that I could use Crystal Reports in a Windows Service? I am currently working in a project where a particular windows service would import data from excel files, compute them, then export the results on excel or csv files -- without user interaction Please help I...more >>

send email using c# without using CDONTS
Posted by Mohammed Abdel-Razzak at 5/20/2004 4:02:51 PM
dear sirs i want to send email using c# but i don`t want to use CDONTS or tell me how can i use it i don`t know any thing about CDONTS thanks ...more >>

converting adjacency matrix into a tree
Posted by Oleg Ogurok at 5/20/2004 4:02:05 PM
Hi all, I'm looking for a fast algorithm to do the following: A DataTable has the following columns: ID, ParentID, Title, Body, etc. It represents webforum conversation threads. ParentID points to the ID of the parent post. I'm trying to convert this into a tree structure in memory (e.g. XML)...more >>

NUnit testing & database setup
Posted by Kiran at 5/20/2004 3:58:59 PM
Hi, I am looking for a way to setup my databases for my unit test case to run. basically my class needs some test environment to me available before I can test it, and if I have to write code to create that test environment.... then its will be a big task by itself. Instead one possible s...more >>

Know of a forum discussing writing FIT tests?
Posted by Julie at 5/20/2004 2:29:14 PM
Does anyone know of a forum for discussing the writing of fit tests? I have a couple of questions that haven't been answered in the typical open source way (look at the source stupid). Barring a forum, any decent online resources that actually *describe* fit, fixtures, and story tests?...more >>

System.Threading.Timer and Crystal Reports
Posted by Ryan Gregg at 5/20/2004 2:26:40 PM
I've got a background service running that needs to check a database periodically and print reports whenever it finds that the data has changed. I've built a class library that scans the database for the changes, and then generates a report using the VS.NET 2003 version of Crystal Reports, and ...more >>

Convert Java->Native DLL call to C#
Posted by Richard A. Lowe at 5/20/2004 2:14:59 PM
Hi all (sorry I haven't been around lately for those who know me, life happens :) I have to call a native DLL (written > 5 years ago, not by me, and all source lost) that is currently being called from a Java application also written about 5 years ago (I think Borland JBuilder 4 was the IDE - ...more >>

Tab Order on WebForm
Posted by Brian Conway at 5/20/2004 1:39:51 PM
How do you change the tab order on a Webform so that it flows from box to box, instead of jumping all around the page? ...more >>

Tab control & validation
Posted by Dennis C. Drumm at 5/20/2004 1:30:02 PM
Is there a way to prevent the user from leaving a tab on a TabControl until all the controls on that tab have finished validating? The problem I am experiencing is when a control fails its validating event and the user clicks another tab things get messy. Ideally, I think the best solution ...more >>

Modifying row in datatable??
Posted by VM at 5/20/2004 1:28:08 PM
How can I modify a row in a datatable in a Windows form? For example, I want to find the row where 'emplcode' equas '000001' and once I find it, change the 'name' to 'John'. Then put the updated row back to the table. Thanks. ...more >>

Passing a Collection object to a COM+ Server application.
Posted by Naveed Anwar Kharadi at 5/20/2004 12:46:19 PM
From: "Naveed Anwar Kharadi" <n-anwar@corrtec.com> Subject: Passing a Collection object to a COM+ Server application. Date: Thursday, May 20, 2004 12:43 PM Hi, I am trying to develop a COM+ Server Application, using C#.Net, that accepts a ListDictionary object in one of its method argumen...more >>

Authentication against NT4 domain
Posted by Z D at 5/20/2004 12:27:07 PM
Hello, I was wondering how I would go about writing some code that would be able to authenticate a user atainst a Domain Controller on an old NT4 domain. The call would be coming from a server or client machine that isn't necessarily even part of the old NT4 domain. Is this possible? If s...more >>

updating main data source
Posted by Grant at 5/20/2004 12:20:11 PM
For some reason I cannot update certain adapters using the command: 'predecessorAdapter.Update(agencyDatabaseDataset1)'. The error message I get is: Operation must use an updateable query. at System.Data.Common.DbDataAdapter.Update(DataRow[] dataRows, DataTableMapping tableMapping) ...more >>

database resource released
Posted by Mullin Yu at 5/20/2004 12:17:51 PM
hi, i write the following code, but will the db resource be released? i noted that at the SQL Server's Process Info that my application seems generate lots of Process with new ProcessID, will it be removed if the application runs Dispose() method. or i better not to use Adapter OleDbDa...more >>

get current Instance of Word
Posted by Jazper Manto at 5/20/2004 12:06:02 PM
hi i want to open a document in word by my app. therefore i wrote some code. Type tWordApp = Type.GetTypeFromProgID("Word.Application"); Word.ApplicationClass oWordApp = (Word.ApplicationClass) Activator.CreateInstance(tWordApp); the probem is that i get a complete new instance even when ...more >>

.NET Security policy.
Posted by Mark Broadbent at 5/20/2004 11:58:15 AM
this is probably quite a basic question, but currently reading through this subject and havent yet had this question answered. for the Enterprise security policy level, am I right in assuming that this is propergated via Active Directory? If no then how is it done? cheers. -- Br, ...more >>

Advice on XML vs. binary serialization?
Posted by Dave Veeneman at 5/20/2004 11:40:13 AM
I'm working on a project where I have to persist data to a file, rather than to a database. Basically, I need to save the state of several classes, each of which will have a couple of dozen instances. I have set it up to use binary serialization to a single file, which works well. However, I have...more >>

converting string to date
Posted by Daniel Patriak at 5/20/2004 11:33:27 AM
hello! Anybody knows if there is a method in C#, that can convert date given as string, using date format given as string (like DD/MM/YYYY, DD-MM-YYYY) ? Please help! I couldn't find it in MSDN! Thanks Daniel ...more >>

Logging in .NET
Posted by John Doe at 5/20/2004 11:32:33 AM
Hello MVPs and Folks, I am curious to know what logging mechanism currently .NET provides and what is in the cards for the coming versions of Whidbey and ... Can I have some configurable leves to ignore depending on the current setting. I am used to log4J and I want to know the solution inher...more >>

ConvertStringSidToSid help
Posted by Microsoft News at 5/20/2004 11:24:05 AM
I have a list of String SIDs that I need to convert so that I can use System.DirectoryServices to do a search for the objectSID property. I am assuming that the "ConvertStringSidToSid" C++ function is what I need to use. The problem is that I do not know how to use this code in C#, is there an...more >>

Checking grid datasource?
Posted by VM at 5/20/2004 11:21:52 AM
How can I check if a Windows Grid datasource is a datatable, dataset, or dataview? Thanks. ...more >>

How does mailto really work?
Posted by clintonG at 5/20/2004 10:55:27 AM
Example: <a href="mailto:somebody@somewhere.com>Send Mail</a> I've been trying to find documentation via W3 and the RFCs but I have yet to find documentation that explains how a click event on an anchor tag can launch a client-side e-mail program and populate its To: field with an e-mail addr...more >>

tree vs a flat hashtable.
Posted by William Stacey [MVP] at 5/20/2004 10:47:07 AM
I am doing a dns zone type of project which has an inverted tree like you all know. test.com. (top node. value contains arraylist of all test.com records) www.test.com. (node. value contains arraylist of all matching rrs) www.sub1.test.com. .... Bind and (probably) MSs dns, use a tree stru...more >>

Setup Project: Changing Permissions of the Installation Directory
Posted by ryan NO[at]SPAM ractor.org at 5/20/2004 10:13:44 AM
I have a setup project to deploy our software -- but I have a problem. I want the installation to be system wide, but I also want all users to have rwx permissions to the installation directory (c:\program files\company\program\) The reason is as follows: I have an autoupdate feature that gr...more >>

xml and xsd extraction problem
Posted by SKG at 5/20/2004 9:28:15 AM
i generated an c# class using xsd.exe from an xsd file. I have a property as [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSche maForm.Unqualified)] public bool bOwner; when i tried to load the class from an xml data file, i got exeception "input string was not ...more >>

imort delphi dll
Posted by erdos.andras NO[at]SPAM eduweb-dot-hu.no-spam.invalid at 5/20/2004 9:20:37 AM
Hi I want use dll (Delphi 7) in c# example delphi procedure GetNev(s:PChar);export; begin ShowMessage(s) ; end; exports GetNev; c# [DllImport( "project1.dll", CallingConvention = CallingConvention.StdCall, CharSet=CharSet.Unicode )] public static extern void GetNev(st...more >>

STCK to DateTime type conversion
Posted by Daniel Stoever at 5/20/2004 8:58:28 AM
I have a client program that talks to an IBM mainframe and recieves 64bit unsigned integers(STCK) that represent date-time values. I need to convert these to native DateTime format for use in my c# code. There appears to be a convert function that takes a long parameter and returns a DateTime bu...more >>

Converting to Upper Case
Posted by Brian Conway at 5/20/2004 8:07:02 AM
How do I convert a field that is filled in to uppercase within the C3 code? I see the ToUpper in there, but how do I get the text box to convert this to upper when you change focus or move to another text box? ...more >>

Converting to UpperCase
Posted by Brian Conway at 5/20/2004 8:04:17 AM
How do I convert a field that is filled in to uppercase within the C3 code? I see the ToUpper in there, but how do I get the text box to convert this to upper when you change focus or move to another text box? ...more >>

Riempire treeview....
Posted by robert0 at 5/20/2004 7:36:13 AM
Devo riempire una treeview con una serie di dati tratti da un campo di una datatable tipo: -/Dir1/Dir2/nome file -/Dir1/Dir2/Dir3/nomefile -/Dir1/nomefile -/Dir3/Dir4/nomefile Ho fatto uno split della stringa inserendo quindi i dati nella treeview ma ho difficolta' a far riconoscere che ...more >>

DBConcurrencyException
Posted by 2G at 5/20/2004 6:40:04 AM
Hi, I seem to have some problems updating my dataset, I always get a error that no rows were updated...: An unhandled exception of type 'System.Data.DBConcurrencyException' occurred in system.data.dll Additional information: Concurrency violation: the UpdateCommand affected 0 records. I...more >>

Web control Session
Posted by jandrinas at 5/20/2004 6:01:02 AM
Hi, i have a Web Custom control... Its possible insert values into a Session?? Thnx. Regards. Jandrinas....more >>

NetRemoteTOD USage
Posted by PRM at 5/20/2004 5:51:03 AM
Hi, I am tring to use the NetRemoteTOD Windows API from CSharp, I am looking for some help on the C# Signature for this API. An example of the Signature or USage in C# would be of great help. The NetRemoteTOD function returns the time of day information from a specified server. Here is ...more >>

Viewstate DataGrid problem
Posted by Josema at 5/20/2004 4:16:07 AM
Hi, to all.. I have 2 web controls (MyDataGrid.cs, MyCalendar.cs The first inherits from calendar, and i have implemented the event MyCalendar_SelectionChanged and inside of this i put in the viewstate a datatable that i filled (and its filled, i verified)... like this Viewstate.Add("DATA"...more >>

New Web Site
Posted by Bill English at 5/20/2004 4:06:07 AM
I am considering making a new Web Site with a layout similiar to that of MSN.com. If I were to start this website, what program would I use to make the task easiest? I was thinking FrontPage, but also know that Visual Studio has a web part to it also. I have never used Visual Studio for a website...more >>

Creating a C# class Inherited from VB.Net
Posted by Steven Blair at 5/20/2004 3:47:05 AM
Hi, I have a VB.NET class which I would like to use in a C# application. I know I can create a C# class inherited from the VB.NET, but have only done this using seperate DLL's (One DLL for VB, one dll for C#) Is it possible to do this within one project ( C# App and no DLL's used) Any hel...more >>

User control with in a parent aspx page cant see the view state
Posted by russell8mccloy NO[at]SPAM hotmail.com at 5/20/2004 3:42:52 AM
Morning, I have been having trouble with a my embedded user control not being able to see the view state that I set in its parent page. I have done a test with the following and I still cant get it to work! PARENT PAGE (default.aspx): private void Page_Load(object sender, System.Event...more >>

security problem with html
Posted by guy at 5/20/2004 3:06:02 AM
hi al i try to change the value of inputFile element from my program and the value doesn't change because of security reason i'm talking about input of browse files someone knows how to do it thank you very much...more >>

Codebehind beginner dude...
Posted by Janderlen at 5/20/2004 2:36:04 AM
Hi, Im start to learning c#.... My question is I have a webform1.asp ¿What are the difference between write code c# inside the codebehind of the page (webform1.aspx.cs), and write c# code inside the tab "html" page like <script language=c#> (webform.aspx) ...... Thanks a lot Janderlen...more >>

Problem when accessing a string using indexer
Posted by Mike at 5/20/2004 2:31:06 AM
Hello I load a text file into a string. Then I start seraching for a substring that appears many time in the file. Once I find an occurrence of the substirng I have to find the first accurance of " before it (there has to be one). Then I copy the substring starting with the first " until the index...more >>

How can I get the count of the Items in a ListBox?
Posted by honeybee at 5/20/2004 1:26:03 AM
How can I get the count of the Items in a ListBox?...more >>

Permuted order challenge.
Posted by William Stacey [MVP] at 5/20/2004 12:34:38 AM
Have an ArrayList in a class with 1 or more elements (no fixed upper bound) Want a method on the class to return a new ArrayList with the permuted order of the arraylist so that each call returns different order until it starts again. Such that a 3 element arraylist (for example) of elements A,B...more >>

Memory Debugging
Posted by Aaron at 5/20/2004 12:31:20 AM
I just made a web app and there's some memory leak in the code. I can't use the VS.NET debugger for this. I would like to be able to see what's going on in the memory. What is the best memory debugging program? Aaron ...more >>

The server tag is not well formed
Posted by das at 5/20/2004 12:11:02 AM
Hi All I'm adding some variables on Session on start mothod as given belo protected void Session_Start(Object sender, EventArgs e Session.Add("UserID",string.Empty) Session.Add("isAdmin",false) Session.Add("isLoggedIn",false) on a Webform I'm try to access the variables as...more >>


DevelopmentNow Blog