Home All Groups Group Topic Archive Search About

Visual C# .NET

microsoft.public.dotnet.languages.csharp
Score Length of MP3 file
£ukasz - 28 Jan 2006 11:00 PM - 3 messages
Hi, Could you tell me how to retrieve (in C#) the length in miliseconds of mp3 file? Thanks in advance Regards £ukasz ...
Score Extending Brian Connelly's C# CodeDOM Genetic Algorithm project
Scott - 28 Jan 2006 10:50 PM - 2 messages
Hi, Has anyone seen this article in MSDN Magazine? [link] My GA twiddlings puffed out years ago, but the idea of using the CodeDOM has triggered my interest glands again. I could pick up where ...
Score Security Model
Jeff - 28 Jan 2006 10:04 PM - 2 messages
I am designing a new Windows Forms client application (with SQL Server db on the back end) for which users will authenticate via NT authentication (network), or SQL Server authentication. Users who are granted access to the application must also be granted access to specific forms and controls on ...
Score Rating
Amir Ghezelbash - 28 Jan 2006 9:23 PM - 5 messages
Hello every one i had a question i am developing a site where i want users to be able to rate products..but i want users to be able to only vote once per product...i was wondering if any of you know could shed some light on ...
Score Trying to access control on one from from another form
JimC - 28 Jan 2006 8:56 PM - 5 messages
On my main form in a C# program, I create an instance of another form that contains a ListView control, in the usual way, that is: public class frmMain : System.Windows.Forms.Form {     // [...]     InfoForm myInfoForm = new InfoForm( ); ...
Score Q: Datatables, Datasets and updating
Geoff - 28 Jan 2006 8:35 PM - 5 messages
Hi I'm hoping somebody can help me with the following problem that has occurred to me. Suppose I have two tables in an SQL Server database. Let's call these tables A and B. Assume that A has two fields: a primary key and another holding a ...
Score Mixing 1.1 and 2.0?
Brett Romero - 28 Jan 2006 8:22 PM - 2 messages
I'm slowly making the move to 2.0.  I have a solution in 1.1 with two projects - EXE and DLL.  I'd like to upgrade the EXE (user interface of this solution) to 2.0 and leave the DLL at 1.1 for the time.  How will ...
Score Generics article
Ludwig - 28 Jan 2006 8:11 PM - 14 messages
Hi, I wrote an article about generics in C# 2.0; you can download it at [link] Suggestions and feedback always very welcome, kind regards, Ludwig ...
Score share member variable of 1 class between 2 other classes
Scott Starker - 28 Jan 2006 6:51 PM - 6 messages
Is there anyway to do this? Every time any button is click inside class Form1, MyButtomArray.CharArray (MyButtomArray is a class) gets set (or reset) (bool). Once this is done the class TEC gets executed. I want to access MyButtonArray.CharArray to get the ...
Score Properties.Settings; ArrayList and a custom object
eugenet - 28 Jan 2006 2:45 PM - 5 messages
Hello, I am writing a Windows Forms application using .NET Framework 2.0 and Visual Studio 2005. I would like to use Properties.Settings class to persist a collection of custom objects. For that I am creating a setting called Connections ...
Score Database folder
John - 28 Jan 2006 2:31 PM - 3 messages
Hi, What is best folder to put database (location of database)? This is because when administrator restricts user rights to read (read and execute), and doesn't give permissions to write in C: disk (only to My documents is write ...
Score DLLImport - Help
Timothy - 28 Jan 2006 1:37 PM - 2 messages
Hi all, Can anyone tell me how to import the function ModifyStyleEx() into a .net app? I am not sure which DLL this function is in either, so could someone help me out, please? Thanks in advance, Tim. ...
Score Convert string to hex and write file
Tim - 28 Jan 2006 1:16 PM - 2 messages
Hi, What I am trying to accomplish is to initiate remote desktop session from within my C# application to XP Pro machine NOT terminal services to a server. I have not found any way to do this with code (if you know of a way then I ...
Score Datagrid Problem
Abhi - 28 Jan 2006 11:35 AM - 2 messages
Hi all,    I am stuck in a situation where I want to sort the datagrid column in numerical order where it originally is in string format.    For example suppose there are 3 fields id, name, age in datagrid ...
Score Disable editing of one specific cell in one specific row in dataGr
Gidi - 28 Jan 2006 11:15 AM - 2 messages
Hi, Is it possible to Disable editing of one specific cell in one specific row in dataGrid? Thanks, Gidi. ...
Score DataGridViewComboBox
perspolis - 28 Jan 2006 11:04 AM - 2 messages
Hi All I used datagridviewcombostyle for my application.. but it shows the combobox style in DropDownList style..I want to be able to enter data into it,,how can I have combobox dropdown ?? thanks in advance ...
Score ? and : for conditional expressions in v2
Mark Rae - 28 Jan 2006 9:26 AM - 15 messages
Hi, In v1.x, the following code worked perfectly: mobjSqlParameter.Value = strPayerBusinessName == null ? strPayerBusinessName However, I can't get it to work in v2. I know that the value of strPayerBusinessName is null because if I write strPayerBusinessName == null in the Immediate Window, it returns "true". ...
Score BeginAccept Question
Nuno Magalhaes - 28 Jan 2006 5:59 AM - 5 messages
One thing I've noticed is that if I try that code on a simple form load event it works ok like this: ....form load event... Socket socket=new Socket(AddressFamily.InterNetwork,SocketType.Stream,ProtocolType.Tcp); IPEndPoint ep=new IPEndPoint(IPAddress.Parse(serverIP),serverPort); ...
Score Custom Formatter with String.Format
clintonG - 28 Jan 2006 4:50 AM - 5 messages
TimeSpan utcOffset = localZone.GetUtcOffset(DateTime.Now); MessageLabel.Text = utcOffset.ToString( ); // returns -06:00:00 Instead of  -06:00:00 I want -06:00. Apparently the custom formatter should be 0:zzz but I can't figure out the correct String.Format grammar to get the desired result. ...
Score ~Simple number problem
William Stacey [MVP] - 28 Jan 2006 12:48 AM - 13 messages
if int is between 0-29  return 0.  If 30-59, return 30. Can you do this with a one line math expression and no IF statements or bit shifting?  TIA ...
Score ScrollWindowEx and drawing in C#
Ivonne Riedel - 28 Jan 2006 12:30 AM - 4 messages
Working on an incremental drawing algorithm I am facing a problem PInvoking ScrollWindowEx: The code is as follows... C#:         [DllImport("user32.dll")]         public static extern int ScrollWindowEx(IntPtr hWnd, int ...
Score How password protect ClickOnce URL while still allow app to update?
Ronald S. Cook - 28 Jan 2006 12:26 AM - 3 messages
We have our app deployed so that users may download from [link] But how can we password protect or do any sort of security on this? One of our developers has argued that ClickOnce is too basic and we should ...
Score overriding exception message
andrewcw - 27 Jan 2006 11:06 PM - 5 messages
I wanted to create an exception handler for certain processing I do - but although I can 'throw' to the constructor with a parameter, I  cannot override the exception message property, the error says its read only. How can or if  a person can create the override ? ...
Score Patterns, in general
Jeff - 27 Jan 2006 11:04 PM - 13 messages
I'm just getting up to speed on OOP patterns (e.g, MVC) and I'm wondering how closely they are followed out in the real world. Do those of you who use them try to follow them as closely as possible and deviate only as ...
Score IEnumerable Item Count
Oliver Gargour - 27 Jan 2006 10:56 PM - 4 messages
Is at all possible to get IEnumerable Item Count without having to loop through using GetEnumerator() ?? Thanks ...
Score How can I find out what version of Excel is installed?
Flack - 27 Jan 2006 10:16 PM - 2 messages
Hey guys, Can someone tell me or show me how I can programatically discover what version of Excel a machine has installed, or if the machine has Excel installed at all? If anyone has some sample code that would be great. ...
Score BeginAccept doesn't work
Nuno Magalhaes - 27 Jan 2006 9:56 PM - 12 messages
Does anyone know why the BeginAccept doesn't work? If, in the code below, I do the normal Accept function I can get the client socket but it seems that the callback isn't really called. Here's the code: ...
Score Excel & Office Integration
Amos Soma - 27 Jan 2006 9:12 PM - 3 messages
We're creating a VS 2005 C# app that needs to integrate with Excel & Office. Can anyone tell me which versions of Excel and Office C#/VS 2005 supports? I'm most interested in knowing how far back the support goes. For example, ...
Score DataTable (or CSV) into Binary Data
stockblaster - 27 Jan 2006 8:44 PM - 4 messages
Hello all.. Is it possible to convert a DataTable (i create the DataTable from a CSV file) into binary data and save it into an sql 2005 table (into binary field). After that I want to have the ability to add a row to the beginning of ...
Score Before Update Grid Evebt and Button Click Event
Roger - 27 Jan 2006 7:49 PM - 2 messages
Have a grid and when I edit a grid row it goes into edit mode. Once I attempt to click a button on the form; once the grid losses focus, it fires my beforerowupdate event. Runs through my code, but never fires the button click ...
Score Stopping wincode generation?
Brett Romero - 27 Jan 2006 6:22 PM - 2 messages
I have a custom datagrid.  When I put it onto a form, all sorts of wincode is generated for the grid.  This causes conflicts.  For example: // dataGridTableStyle8 // this.dataGridTableStyle8.DataGrid = this.dggrid; this.dataGridTableStyle8.HeaderForeColor = System.Drawing.SystemColors.ControlText; ...
Score String parser Using Regular Expression for Date format display using Locale Settings)
Rahul - 27 Jan 2006 6:16 PM - 3 messages
Hey Guys I have a development environment, in which the whole SQL syntax is stored in the Database. So the syntax in the databse column could be "where BirthDate = '12/31/2005' and ID = 345" Note : The above string is stored and the dates are in US format. so ...
Score Named pipes vs. TCP Channel
UJ - 27 Jan 2006 6:10 PM - 2 messages
I have multiple programs running on the same machine that need to talk to each other. Can anybody give me any guidance as to using Named Pipes vs a TCP Channel? What are the pros/cons of each? TIA - Jeff. ...
Score DBGrid does not show the content
Doru Roman - 27 Jan 2006 5:12 PM - 5 messages
Hi, I write some code to retrieve information from Database. After I bind the DBGrid it shows the result somehow like a link to the Table. When I click on the Table link it displays the whole content. It probably ...
Score managed code execution from unmanaged code; AppDomain
dotnetchic@gmail.com - 27 Jan 2006 4:37 PM - 3 messages
I've been enlisted to update some legacy code (VC++ 6.0/MFC) and prefer to do in C#.  Has anyone had some experience with this?  advice? ...
Score Drop Down Lists Query
accyboy1981 - 27 Jan 2006 4:32 PM - 2 messages
Hi, I new to C# so please forgive me if this is simple. I've got 2 drop down lists the first is hard coded with data where as the second is populated from a database. The options that appear in the second should ...
Score .NET Profiler that provides function call history?
Samuel R. Neff - 27 Jan 2006 3:46 PM - 3 messages
Are there any .NET Profilers that can provide a simple function call history?  I don't want to know how long functions were executed but rather which functions were executed in what order, etc. Thanks, Sam ...
Score A Memory leak in the dotnet UserControl ?
Loic - 27 Jan 2006 3:07 PM - 3 messages
A Memory leak in the dotnet UserControl ? Hi All, I’ve tried to use the following “Host Secure, Lightweight Client-Side Controls in Microsoft Internet Explorer” sample (I’d like to use a C# User Control for a project): ...
Score map a network drive
yqyq22 - 27 Jan 2006 2:24 PM - 2 messages
Dear, just a simple question HOw I should map a network drive? \\server\share$ ...
Score Windows Forms Panel - MouseWheel Scroll problem
Code Monkey - 27 Jan 2006 1:31 PM - 2 messages
using VS2005 and c# to create a windows forms application. One of my forms has a panel which I've added various controls to. Now, I've set the autoscroll property to true, which is great, but I can't ...
Score Show a form without being active
Timothy - 27 Jan 2006 1:23 PM - 2 messages
Hi all, I was wondering if there was a way to show a form without it grabbing focus. Anybody know how to do it? Thanks in advance, Tim. ...
Score GetManifestResourceStream no more working in 2.0 ?
WT - 27 Jan 2006 1:17 PM - 2 messages
Hello, My 1.1 web site was using GetManifestResourceStream to get strategic .js files embedded as resources in the site assembly, but now it is no more allowed to embed resources by specifying a build process of embedding. ,Now we have the App_GlobalResources so how to use code like this with it : ...
Score On line training source code.
UJ - 27 Jan 2006 12:49 PM - 2 messages
Does anybody know where I can get the source code for some of the programs that are in the MS C# Online Virtual Labs? I'm specifically looking for code from the No-Touch Deployment lab. Thanks - Jeff. ...
Score OOPS Newbie - Removing objects from form controls
AAJ - 27 Jan 2006 12:22 PM - 4 messages
Hi all I'm new to all this object programming, and I'm after a bit of advice on a specific problem. I wonder if anyone can help? I have a user control and on it are  some text boxes bound to a database . ...
Score Check for a secure site
Mohammed Shafiulla Khadri - 27 Jan 2006 11:43 AM - 2 messages
Hi, how do i check, if a site is using HTTPS or HTTP? Regards, MSK ...
Score free pen movement
Alexandru Taeaha - 27 Jan 2006 11:05 AM - 4 messages
Hi! i am trying to make a simple version of paint and i was woundering how i could make the the free pen so i can draw whatever i like not only lines or squears. i would really apreciate if i coud somehow use the coordonates of ...
Score AppDomain Casting
Rain - 27 Jan 2006 10:36 AM - 2 messages
AppDomain appDomain = AppDomain.CreateDomain("appDomain", null, null); try {     appDomain.AppendPrivatePath(@"C:\DLLS\");     appDomain.Load(@"FF-DeliousDateTimeRequestor");     ObjectHandle o = appDomain.CreateInstance("FF-DeliousDateTimeRequestor", "DeliousTools.Loader");     object ob = o.Unwrap(); ...
Score Global Procedures
Coder - 27 Jan 2006 10:26 AM - 3 messages
Hello, How can I call a public procedure from another webform class or another generic class within an aspx cs file ? Thanks ...
Score Collection object: Use CollectionBase, Generics, or DataSet
_DS - 27 Jan 2006 10:10 AM - 5 messages
I need to create arrays of a custom data type (which is composed of various strings, ints, the usual).  The original was built using CollectionBase.  I was thinking about redesigning to use generics, but I realized that DataSets may also work here. ...
Score System.IO.Compression
Mark Rae - 27 Jan 2006 10:07 AM - 16 messages
Hi, In v1.1, I used the Chilkat component for compression support, but am now looking at using the new System.IO.Compression namespace in .NET2 I found this article on the web: [link] which explains how to ...
Score Foreach with controls
Ant - 27 Jan 2006 9:33 AM - 8 messages
Hi, I'd like to do this basically: foreach (Textbox txt in Controls) { txt.text = "" } How fo I do it? Thanks very much for any answers. Ant ...
Score Data Changed Event ?
Geoffrey - 27 Jan 2006 9:05 AM - 3 messages
Hello, I'm using SQL server 2000. I want to permanently have a deconnected dataset taken with a select command like SELECT* FROM table WHERE myActiveField=True When The Field "myActiveField" is chnaged by another software, I want to refresh my dataset. ...
Score READING EMAILS
Savas Ates - 27 Jan 2006 9:03 AM - 14 messages
How can i read email files by using vb.net. Any referance web site or code sample? ...
Score desgin tables into objects or vice versa?
Elhanan - 27 Jan 2006 8:14 AM - 5 messages
hi.. i'm a database kind of guy, when ever i apprached a new project i always looked at it from tables point of view, how can normlize correcly and them moved to the objects and desgined them accodging to ...
Score C-Sharp contract programmers needed...
Austin Pitt - 27 Jan 2006 7:31 AM - 3 messages
WANTED:  Experienced C# contract programmer to work on business oriented application toolkit (billing, CRM, etc.) for 6 month project. Must be in one of two geographic locations:  Dallas, TX or Atlanta, GA. Dallas:  Must be able to reach the North Dallas area (University of Texas at ...
Score Excel => .NET...Grid, Chart
Niklas - 27 Jan 2006 7:30 AM - 4 messages
Hi We have a lot of applications created in Excel, but now we want to move from Excel to the .NET platform. The application will use grids and charts. What I know the .NET controls are good basic ones, but not suitable in advanced ...
Score What? C++ or C#? Why? Which?
Carlos Villaseñor M. - 27 Jan 2006 7:14 AM - 5 messages
Hi every body: There are some years that I don´t to practice C++, but since 3 moths when I decide to take up again "C" I encounter that there are 2 versions of "C" (C++ and C#), the first time, that situation results confused to me. Now I ...
Score C# ListView question
Jason Huang - 27 Jan 2006 6:37 AM - 4 messages
Hi, In my C# Windows Form MyForm, it has a ListView ListView1. If I click those ListViewItems in ListView1, it's OK; but if I click empty space in ListView1 rather than those ListViewItems, then there will come errors. How do I fix this problem? ...
Score Declaring a constant
Chris Saunders - 27 Jan 2006 6:04 AM - 16 messages
I have made a declaration like this: private const Complex I = new Complex(0.0, 1.0); When I try to build this I get the error: The expression being assigned to 'ComplexNumberLib.ComplexMath.I' must be constant. I do not understand why this constructor is not considered to be constant ...
Score c# precompiler
Carlos De Matos - 27 Jan 2006 5:57 AM - 3 messages
Hello all, Has anyone written a project/code/document on a possible implementation for a c# precompiler? I want to build a precompiler that will modify attributed code, then submit the on-the-fly modified code to the actual c# compiler. ...
Score Child usercontrol contained parent user control does'nt redisplay
lotus - 27 Jan 2006 5:53 AM - 3 messages
HI All.. I'm realtively new to C#. I have MainForm which includes Parent usercontol, and this parent usercontrol also contains child usercontrol. MainForm --> Parent usercontrol --> child usercontrol Parent usercontol has one button to change the child usercontorl's ...
Score .NET 1.1 method invoked from .NET 2
MuZZy - 27 Jan 2006 5:18 AM - 2 messages
Hi, If i have both versions of .NET installed on my machine, can i somehow invoke a .NET 1.1 version of a method from .NET 2 program? In particular, yes, i want to run 1.1 version of String.GetHashcode(). ...
Score One of its dependencies is missing! Help!
Rain - 27 Jan 2006 4:32 AM - 2 messages
AppDomain appDomain = AppDomain.CreateDomain("appDomain", null, null); try {      appDomain.Load(@"FF-DeliousDateTimeRequestor.dll"); } finally {       AppDomain.Unload(appDomain); }    Does anyone know why im getting this exception? "File or assembly name FF-DeliousDateTimeRequestor.dll, or one of its ...
Score Any way to do this function?
ºa¤Ö - 27 Jan 2006 3:14 AM - 3 messages
I have a class named country and have following properites string EngName string ChiName How to do if user request EngName, then it can return EngName, if user request ChiName, if can return ChiName but i do not want to using if-then-else since it maybe have KrName, ThaiName ...
Score Generic Collections vs ArrayList
Dale - 27 Jan 2006 3:03 AM - 6 messages
I read an article sometime in the last few weeks comparing the performance of Generic Collections to ArrayList.  It was pretty detailed with several charts comparing various collections methods between the two. I think the article was in MSDN magazine but I can't find it after hours of ...
Score MD5 hashing vs GetHashcode
MuZZy - 27 Jan 2006 2:49 AM - 4 messages
Hi, Is there any guarantee that MD5 hashing algorithm implementation will not change in the next .NET version unlike what's happened to String.GetHashcode? Thank you, MuZZy ...
Score UnBoxing
wg - 27 Jan 2006 2:33 AM - 5 messages
I am attempting to update a value in an arraylist. However when I updated one element, all elements get updated to the same value. Does anyone know how to achieve this? Here is an example, private ArrayList TagList = new ArrayList(); ...
Score generic reset of values for hashtable
andrewcw - 27 Jan 2006 2:23 AM - 3 messages
I have a reason to resuse hashtables and I'd like to set the values to null without having to reload the keys.- > which is what the clear method does. If I try a foreach  construct I get an error that I cannot alter the value.  ...
Score can you use XmlTextWriter to create HTML?
John Salerno - 27 Jan 2006 1:59 AM - 5 messages
I thought I might use the XML functions in C# to help me do some repetitive typing in an XHTML file, but I'm stuck. Here's what I have before I just stopped: void WriteXMLFile()          { ...
Score showing a form
Ant - 27 Jan 2006 1:32 AM - 3 messages
Hi, this is a simple question. i want to click a button to show a form. If I use this code: button_click() { MyNewForm myNewForm = new MyNewForm; myNewForm.Show(); } every time I click the button I get multiple instances of the form. ...
Score building a web site
admin - 27 Jan 2006 1:26 AM - 2 messages
I just got back working on my website.  Its taken a long time to finish but I am getting there. I got great web hosting at [link] where I got a free .com name and a good site builder. Im going to keep working on it ill let you all know how im doing. ...
Score Retrieving Application Information?
Orgbrat - 27 Jan 2006 1:16 AM - 3 messages
Is there a way to retrieve a WinForms application information such as Company, Product and Version from within a class library ( DLL ) that the Winforms application is using. Specificly the applications specfic ApplicationData directory. This is not a problem from within the application, all you need to do is use ...
Score Help with processing xml from an http api return
mnvikefan - 26 Jan 2006 11:01 PM - 7 messages
What would be the best way to process a return from an http api login function that returns one of the following two XML streams? Successful login with a session ID returned <?xml version="1.0" encoding="UTF-8" ?> ...
Score Is there a way to test guid string?
SevDer - 26 Jan 2006 10:48 PM - 7 messages
Is there a way to test guid string? I want to do it without try catch block to save on performance. Thanks in advance. ...
Score overriding method or property in partial class
john_teague - 26 Jan 2006 10:36 PM - 2 messages
I'm working with a code generator that uses partial classes to generated the basic stuff and leave the other file alone for you to make changes. In the 1.1 version we would inherit from a class and then override a ...
Score How to store data - binary tree?
piotrek - 26 Jan 2006 9:53 PM - 4 messages
Hi I would like to ask you a question. Ian creating app. that download from server directory structure ( whole tree ) and those data are placed in proper places into my treeview control. I decided that the most effective way would be : When i connect to the ...
Score Anonymous Method syntax issue
Joel Finkel - 26 Jan 2006 9:27 PM - 4 messages
Folks, Sorry to take up bandwidth, but for the life of me I cannot see the syntax error in this code: Timer myTimer = new Timer(); myTimer.Tick += delegate {    stopWaiting = true; }; The compiler error indicates that the parser is exepcting a "}" at the "." ...
Score Array element type
jtougas - 26 Jan 2006 8:40 PM - 6 messages
What is the way to the type of an array's elements? Array a = new long[] { 1, 2, 3 }; Type t = a.GetType(); Console.WriteLine( t.FullName ); This will write "System.Int64[]", but is not what I'm looking for. ...
Score Comparing Strings
Jonathan Wood - 26 Jan 2006 8:12 PM - 8 messages
Can someone tell me how to compare two strings using a case-insensitive comparison. Ideally, I would prefer not to have to change a global setting or override any other interfaces. BTW, does anyone know why documentation for .NET library methods don't have ...
Score RegistryKey member GetValueNames
auldh - 26 Jan 2006 8:12 PM - 3 messages
being a novice i searched the net to get help on my c# project. i'm trying to iterate, enumerate, loop through a registry tree hive. for example i have a sub folder under HKLM\SOFTWARE that has some 21 sub folders ...
Score C# to VB.net conversion for "?" conditionals
.Net Sports - 26 Jan 2006 7:54 PM - 12 messages
I need to convert some C# ?Conditionals over to vb.net (most likely in vb.net using If..Then statements), but the C#2VBNETconverter by KamalPatel isn't converting them: string PurchaseType = (Convert.ToString(drwData["DailyItem"]) == "True") ? "ID" : "PID"; XmlNodeList Selections = xdcData.GetElementsByTagName((X == 0) ? ...
Score PInvokeStackImbalance was detected.
John Sudds - 26 Jan 2006 7:51 PM - 5 messages
The MDA appears on the call to OpenDesktop. I have tried a variety of approaches (including specifying the A and W variant with ExactSpelling=true, and PreserveSig=true) but none of them seem to work. This code was copied from a 1.1 sample that purported to work ...
Score Structure for extremely large multi-tier Web projects
Dan Munk - 26 Jan 2006 7:41 PM - 4 messages
Hello, I am working on a very large multi-tier Web application.  The application consists of approximately 100 middle-tier/back-end projects and 200-300 presentation projects.  Obviously this is too large to manage in a single solution.  The development staff have each developed ...
Score Question about the split function
needin4mation - 26 Jan 2006 7:37 PM - 10 messages
Hi, I am trying to parse a colon delimited text file. Assume these as examples: Book:mybook Video:myvideo Name:myname When I use this:     ReadFromFile("c:\\Inetpub\\wwwroot\\myfile.txt");     }     public void ReadFromFile(string filename) ...
Score PLS HELP: HUGE problem with Hashcode
MuZZy - 26 Jan 2006 6:52 PM - 9 messages
Hi, Why for god sake they change implementation of String.GetHashCode() from ..NET 1 to .NET 2? We were storing some user passwords in hashcode, now we can't upgrade those clients with .NET 2 vesrion of our app as they will not be able to ...
Score Is there something better than EnumPrinters?
PyongHopscotch - 26 Jan 2006 6:15 PM - 3 messages
Hi All I was just wondering if there was a better function/way to get information on all the printers currently installed than EnumPrinters. I only really need all the printer names but don't care to do the memory management involved with EnumPrinters. ...
Score Looking for code to write DOM tree to file?
TimB - 26 Jan 2006 5:57 PM - 2 messages
What is the fastest and most eleganr way to produce XML files as files from DOM trees? I don't mean any serialization but something that writes all elements and attributes nicely in indentent form into file. ...
Score How to display second form?
Brett Romero - 26 Jan 2006 5:57 PM - 4 messages
My application start like this: frmMaster MainForm = new frmMaster(); System.Windows.Forms.Application.Run(MainForm); The flow is that MainForm shows then a SecondForm shows after the user does something.  This is an MDI app so SecondForm needs to always be ...
Score Reading result from DB reader
Jeremy H - 26 Jan 2006 5:53 PM - 3 messages
Hello, What is the nicest way to read Database data from reader objecy after making a SQL query? Do I really need mapper classes with methods like: // Reader is OleDbDataReader object. public int GetInt(string column) {      int data = (reader.IsDBNull(reader.GetOrdinal(column))) ...
Score com interop v2003
E.Sh - 26 Jan 2006 5:37 PM - 6 messages
I am using c# in v2003. created cominterop. running on the development computer, no problem to access it via COM. when trying to install it on a w2k server: 1. regasm /codebase .tlb: , OK. 2. gacutil /i. OK. 3. Oleview displays it. bur create instance fails with 'can not find file". ...
Score Can I change my setup according to the configuration
Dave - 26 Jan 2006 5:05 PM - 3 messages
I'm sure this must be really simple but I can't find it. I have a setup/deployment project and I want to include a particular program (ie. a primary output) in the debug configuration but not in the release ...
Score Sorting & ArrayLists
MikeY - 26 Jan 2006 4:39 PM - 6 messages
Hi Eveyone, I'm trying to sort my ArrayList, but I'm getting stumped. Hopefully someone can help me out. I'm using C# Windows forms, but Console app for testing. What I am doing is pulling my data from my database and putting the data ...
Score native dll access error - Attempted to read or write protected memory
hiralparikh - 26 Jan 2006 4:32 PM - 10 messages
Hi, I am using .NET 2.0 and trying to use a function from a native DLL file. Here is the syntax that I am using: definition: [DllImport(@"old.dll", EntryPoint="#1")]     public static extern String getPwd(String strServerName, String ...
Score Access a form, using a string literal?
Gerrit Snel - 26 Jan 2006 4:14 PM - 4 messages
We have a question but we're in doubt if it's even possible or not. The question is as follows: Is it possible to access a form using a string literal, and if so yes? We want to use something like this (don't mind the syntax as it obviously ...
Score Question About an Event Hook
needin4mation - 26 Jan 2006 4:04 PM - 4 messages
Hi, had a question about event hooks.  I don't know that much about it so please forgive me if I don't use all the right words.  Is it possible to use a hook that listens or watches a certain ...
Score Windows user name
Ferdinand Zaubzer - 26 Jan 2006 3:24 PM - 5 messages
With System.Security.Principal.WindowsIdentity.GetCurrent().Name I get the user name of the current Windows user. But how can I get the full name? Thanks Ferdinand ...
Score How to Design Delegate Architecture ?
Joanna Carter [TeamB] - 26 Jan 2006 2:58 PM - 5 messages
Hi folks I think I have asked something similar before, but here goes again... I have  to call a method that varies depending on the type of one of its parameters. The object that I have to pass is of a base class. ...
Score Code run from IDE or from .exe ?
Marty - 26 Jan 2006 2:46 PM - 2 messages
Hi, Is it possible to detect from the C# code that its main thread is run from the VS IDE or directly from the .exe file (in debug or release) ? This is because I want my Console output to be displayed only when the ...
Score ANN: Free PDF books for registered users of Visual Studio 2005
Carlos J. Quintero [VB MVP] - 26 Jan 2006 2:45 PM - 24 messages
Hi all, I just wanted to let you know that if you have registering Visual Studio 2005 finally has some benefits. You can get electronic PDF books about Visual Studio 2005 and some other stuff. For example, the updated book "Working with Visual Studio 2005" by Craig ...
Score Call a method based on a parameter
Peter Kirk - 26 Jan 2006 2:32 PM - 3 messages
Hi there in c# what is a good way of selecting which method to call based on a string? For example, my method can accept a string parameter (there are 50 or so valid strings that can be passed in), and based on this string I should call ...
Next »