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# > april 2004 > threads for monday april 5

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

PROBLEM WITH OpenFileDialog WITH XML
Posted by bobdeboer NO[at]SPAM comcast-dot-net.no-spam.invalid at 4/5/2004 11:56:20 PM
MAYBE SOMEBODY CAM HELP I AM USING THE FOLLOWING CODE TO GET A LOCATION OF A FILE IN A WINFORM DIALOG OpenFileDialog openFileDialog = new OpenFileDialog(); OpenFileDialog.Filter = " Access (*.mdb)|*.mdb|All files (*.*)|*.*"; if (openFileDialog.ShowDialog() == DialogResult.OK) DataBaseLocat...more >>

Simple question ..passing web parameters in the url
Posted by G.Esmeijer at 4/5/2004 11:30:13 PM
Friends, working with C# ASP.NET Would like to startup my webform with http://myweb?Nr=1234?mg=1 What I want is: - bring 2 parameters to my webform (aspx) and use put these values in two textBoxes - bring 2 parameters to my webform and use them in the codebehind application. sounds ...more >>

ASP.NET Datagrid
Posted by Fabrizio at 4/5/2004 11:26:03 PM
HI, I put a datagrid in a DIV and the fill it with dataset How I can make the datagrid scrollable without wrapping the DI I mean that if there are too many records the datagrid will exceed dimension There is a property for that Thank you Fabrizio...more >>

How do I exit a for loop in C#
Posted by Aaron Ackerman at 4/5/2004 11:00:15 PM
What is the sytax for exiting a for loop in C#? ...more >>

Logic advice requested.
Posted by Ty Moffett at 4/5/2004 10:40:42 PM
I am new to C# and developing in general. During my studies I got an idea for a program that would basically be Windows Explorer with the added ability to show the size of each and every folder and everything below it in the tree. A week or so later I happened across a program called Disktect...more >>

SQL timing out
Posted by AFeris at 4/5/2004 9:59:43 PM
I am using C# to connect and extract data from an SQL database. However, on large databases (>1,000,000 records), I keep getting a time-out error ("Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.") when trying to fill a DataSet ...more >>

Chinese student seek help
Posted by Chinese student(Adam Zhang) at 4/5/2004 9:16:03 PM
I'm a Chinese student I found a very confusable proble when I studied Visual C++ 6.0 The problem is #include <iostream.h class confusable private int x,y public confusable(int x1,int y1) x=x1; y=x1 cout<<"In construct !\n" confusable(confusable & obj) *this=obj ...more >>

format
Posted by Alain Dhaene at 4/5/2004 8:26:59 PM
Hi, How can I format the variabel index so I get 25,55 i.p.v 25,5555555555444? double gewicht,lengte; double index; gewicht = Convert.ToDouble(txt_gewicht.Text); lengte = Convert.ToDouble(txt_lengte.Text); index = gewicht /(lengte/100*lengte/100); lbl_result.Text = inde...more >>



grouping items to collapse and expand the items
Posted by The Bear at 4/5/2004 8:14:17 PM
Hi, I'm trying to figure out how to group items in a datagrid and be able to collapse that list or expand it... Anyone know how to do this, or where I can find documentation on it. thanks, TB ...more >>

Why Dispose method can not be virtual
Posted by Bonnie at 4/5/2004 8:11:05 PM
In MSDN example for IDisposable, it has the followin ---------------------------------------------------------------------------- // Implement IDisposable // Do not make this method virtual // A derived class should not be able to override this method public void Dispose( Dispose(tru...more >>

Dynamic casting and dynamic variables.
Posted by Martin Hart - Memory Soft, S.L. at 4/5/2004 7:39:47 PM
Hi all: I still very new to the .NET world and don't know if what I am asking is due to an over-imaginative imagination or the fact that I have read too many fiction books!! Let me show you a very basic scenario: [Example] using System; namespace DynamicCasts { public class BaseCl...more >>

How to retrieve a computer comment over the network?
Posted by Vangelis at 4/5/2004 7:20:48 PM
Hi, I'm currently successfully retrieving the list of computers connected on the differents domains of our network via the System.DirectoryServices.DirectoryEntry class. What I'd like to have in addition of the computers name is their comment (just like when you browse over your network pla...more >>

how to Create array of objects
Posted by John Haigh at 4/5/2004 7:10:05 PM
I have the need to create an array of objects. Now this sound fairly trivial but I can't figure this out. I have one class called PostingObjectService that has a method GetPostings where the problem begins (class is below) where in the foreach loop I need to add Postings to the PostingObject[]...more >>

Events
Posted by Mike at 4/5/2004 6:10:32 PM
Hi, Can I raise an event in a C++ DLL (v6) and catch it in a VB/C# = application? Thanks Mike...more >>

Mutex and messages
Posted by Mark Rae at 4/5/2004 5:36:56 PM
Hi, I have a WinForms desktop MDI application written in C#. Following advice from others in this forum, I prevent multiple instances of the app running at the same time by creating / trying to create a mutex, as follows: bool blnCreatedMutex; objMutex = new System.Threading.Mutex(t...more >>

How to have access to an element array ?
Posted by C# newbie at 4/5/2004 4:14:46 PM
Hi, How can I grab to a specific element value located into a string dicitionary ? Let's say we have an string dictionary which is full and on a specific row and need to retrieve one of the items. I found "ContainsKey" method but when I write (within a foreach loop): if (myStringDicArray.C...more >>

Thread start and Finished Notification
Posted by Kiran at 4/5/2004 3:58:35 PM
Hi, Was wondering if its possible to have a event notification in Thread when the thread is about to start and the thread has just finished doing its work and about to terminate. If its not directly available, I was thinking to derive a class form Thread and provide this events, but again ...more >>

CollectionBase Clear - Nested collections?
Posted by Dave Veeneman at 4/5/2004 3:49:34 PM
I have created a collection class derived from CollectionBase that can be nested several layers deep. so my root object has several child objects, each of which has several grandchild objects, and so on. (The structure is a GoF Composite.) If I call the CollectionBase.Clear method on the root ...more >>

Expand drop down list
Posted by Benny at 4/5/2004 3:42:06 PM
Hello Experts, I have a drop down list web control in one of my page. Currently if I want to expand the drop down list to show all items, I must click on the down-arrow sign on the right hand side of the drop down list. The question is what are the codes to make it expand to show all items a...more >>

Define Columns
Posted by Pablo Salazar at 4/5/2004 3:22:30 PM
Hi everybody I need your help With this code read data from table Usuarios and I show it in a Datagrid. cn.Open (); SqlDataAdapter da = new SqlDataAdapter("Select Usuario,Apellidos from Usuarios;",cn); DataSet ds = new DataSet(); da.Fill(ds,"Usuarios"); DataView dvUsuarios = new DataView...more >>

Mutex Permissions
Posted by Kris at 4/5/2004 3:16:08 PM
I want to set a mutex in one windows account and allow another windows account to access this mutex. For testing I have two forms that create a mutex using the C# mutex class. I am logging into Windows XP as "User1" and creating and locking the mutex from "User1" using the 1st form. I then use the...more >>

changing datagrid column width
Posted by Amos at 4/5/2004 3:14:57 PM
Can I add a column to the datagrid and also resize it? I add them like this: DataTableAddress.Columns.Add("Col1", typeof(string)); DataTableAddress.Columns.Add("Col2", typeof(string)); DataTableAddress.Columns.Add("Col3", typeof(string)); I'd like to add to resize them without using a dataco...more >>

C# and C++ Past, Present, Future :: Software Engineer
Posted by kuphryn at 4/5/2004 2:51:07 PM
Hello I am a C++ programmer with limited experience (design) using C#. From my experience, C#, like Java, is a derivative of C++. However, Microsoft is able to blend C# and C++, getting the best out of the Java design With the recent settlement between MS and SUN, I think that MS will remain the...more >>

Shallow copies of objects - or - Copy constructors
Posted by Adam W Root at 4/5/2004 2:40:02 PM
So I have a Product and an extending class ProductLine. I want to create a new ProductLine from a Product. I wrote this in a constructor: public Product(Product p) { foreach (System.Reflection.FieldInfo info in p.GetType().GetFields(System.Reflection.BindingFlags.Instance | System.Ref...more >>

Creating and Showing a Form from a Callback Function
Posted by db_from_mn at 4/5/2004 2:29:49 PM
I have a callback function that executes when my USB device is plugged in. I want to create and show a Windows form when this happens. For some reason, I am not able to do this. When I try, the form is all white, and I see an hour-glass cursor. If I create and show the form from a push-butt...more >>

Problem with serialization
Posted by Diego F. at 4/5/2004 1:54:27 PM
Hello. I'm getting a serialization error with the following. I'm doing an app that works with a webservice. The app and the WS has to work with a class that I made as a DLL; I have some web methods that receives objects from this class as parameters. Although it compiles, when I try to add the...more >>

Datagrid columns using AutoGenerate via the autoGenColumnsArray private member array collection (reflection)
Posted by googlegroups-gaijin42 NO[at]SPAM sneakemail.com at 4/5/2004 1:45:28 PM
I have seen several people looking for a way to access the Columns collection when using the AutoGenerate = true option. Some people have gotten so far as to find the private autoGenColumnsArray that has the information, but we as developers have no way to access this information. I have com...more >>

FolderNameEditor
Posted by Mark Rae at 4/5/2004 1:41:30 PM
Hi, I discovered recently the existence of the FolderNameEditor class which is flagged in the MSDN help as being for internal use only, and should not be used in apps etc. I have a good contact at Microsoft who informed me that any undocumented features of the .NET Framework can be used, but d...more >>

Whidbey/Vs2005 Newsgroup.
Posted by Frank Rizzo at 4/5/2004 1:13:34 PM
Ok, so I downloaded the latest and greatest Visual Studio 2005 from MSDN. Now I have questions, but can't find the newsgroup for it. Does anyone know which one it is? Thanks...more >>

setting focus to a control
Posted by Dave Cullen at 4/5/2004 12:09:57 PM
I have an application that puts a combo box on a tab control form at run time. The cobo box should have focus when the form appears (cursor in the box). I can't find any SetFocus methods or properties for the form to allow me to do that. What I have are these assignments in an InitializeCompon...more >>

Build number
Posted by Mark at 4/5/2004 12:06:23 PM
We have 5 developers working on two shared ASP.NET projects. We're using VS.NET 2003 with Visual Source Safe. We'd like to track build numbers, but have NEVER touched this before. What is a super easy way to leverage build numbers and have them autoincrement, or is this already built in? Ei...more >>

Xml schema
Posted by Serge NO[at]SPAM ilres.com at 4/5/2004 12:06:08 PM
Hi, How can it be that when I create an xml schema with tools like "cooktop or xmlspy etc.." my schema are always valid and in .net studio I get always errors about the format. Now I don't know where to trust on. I can't believe that it is like this as it should be a standard. Does someo...more >>

Persistent objects
Posted by LC at 4/5/2004 11:25:46 AM
Hi, Anybody have a design pattern to implement persistent objects. I need to persist my business objects. Something like this code examples: //to create a new one Document doc = new Document("my first document", DateTime.Now); doc.Save(); .... //to open and edit an existing one Document ...more >>

copying rows from one datatable to another
Posted by anonymous NO[at]SPAM discussions.microsoft.com at 4/5/2004 10:59:01 AM
can all rows from one datatable be copied to another easily without actually traversing each row in the datatable? Thanks for your valuable replies....more >>

C# equivalent of DataView.Item(1).Row(1)
Posted by Mark Jones at 4/5/2004 10:53:19 AM
Hi, can someone please tell me what the C# version of the following VB.NET coded is; Dim oDV as DataView // DataView oDV = new DataView(); Response.Write(oDV.Item(1).Row(1)) Thanks in advance Mark ...more >>

quitting a C# app
Posted by Dave Cullen at 4/5/2004 10:27:04 AM
Can someone please tell me the function for unconditionally terminating an application for non-recoverable errors? In C++ I'd use exit(0). Thanks....more >>

prevent the combobox from dropping?
Posted by seash at 4/5/2004 10:01:16 AM
hi i got this code in FAQs to prevent combobox from dropping, but i dont know how to use it in my class here is the code, 1>when i create an object of MyCombo box class in my class the object is not showing the WndProc() function an 2>how should i pass the parameters to the function public cla...more >>

DataTable in a DataSet
Posted by anonymous NO[at]SPAM discussions.microsoft.com at 4/5/2004 9:21:18 AM
Hello all foreach(DataTable myTable in m_DsConfig.Tables) { if(myTable.TableName == "DataSourceCodeView") { len = myTable.Rows.Count; } } I am trying to get the number of rows in a datatable that is contained by a dataset. I am always getting a value of zero for the number of rows a...more >>

How do you convert a string into an enum?
Posted by anonieko NO[at]SPAM hotmail.com at 4/5/2004 8:45:50 AM
Answer: http://weblogs.asp.net/tims/archive/2004/04/02/106310.aspx by Tim Sneath I've come across the situation on a number of occasions when coding where I've wanted to convert from a string to an enum. In the Media Catalog sample, I resorted to one giant switch statement that has a case bl...more >>

How to ...
Posted by Jacek Jurkowski at 4/5/2004 7:02:02 AM
.... determine DataColumns scale and precision? ...more >>

Invalid program exception
Posted by Longshot at 4/5/2004 6:59:39 AM
I am new to using C#, and am not able to find any useful help on this error. I am running WinXp, with all the patches and updates. I am working under Visual Studio 2003, and recently I started to recieve this error when I compile with debugging (F5): an unhandled exception of type "Syste...more >>

ref function parameter question
Posted by Glenn Lerner at 4/5/2004 4:33:37 AM
If I pass a reference type (such as DataSet) to a function, I'm assuming only a reference is passed (not a copy). So there is no need to declare function parameter as ref for those types? Example: private void myFunction(ref DataSet data) If I declare it as ref anyway then does it mean it...more >>

Can a eventhandler delegate remove itself from an event without knowing the event?
Posted by torben NO[at]SPAM superusers.dk at 4/5/2004 4:19:42 AM
For test purposes I attach an event to a control, say a TextBox TextChanged event. At another time the same event delegate is attached to some other control, maybe a listbox. Same event function every where. The event function should happen only once for that control (and then, maybe again if ...more >>

convert to double *
Posted by Sagiv at 4/5/2004 3:36:06 AM
How could I pass a double* argument form my C# application to C++ assembly code which has the following prototype void abc(double * a, int nArgs ... Thanks ...more >>

how to outlookexpress
Posted by Ismail Rajput at 4/5/2004 2:06:00 AM
how can i call MS outlookexpress from my form button to send a new message and set its mail subject? ...more >>

reusing an instance
Posted by Mariano Drago at 4/5/2004 1:55:32 AM
Hi there. It will sound like a stupid question, but i cant figure out how to resolve this... Doing a little profiler job on the app im writing, i found a bottleneck in some parts that involve DB access to retrieve User information. Basically, i have an "User" class. The ctor of this class use...more >>

How to update a file ?
Posted by apa57 NO[at]SPAM hotmail.com at 4/5/2004 1:48:22 AM
I have the situation where I have a file in which there is one certain line of text that I have to find and replace with another line of text. What is the simplest way to do this ? best regards andreas...more >>


DevelopmentNow Blog