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# > june 2004 > threads for thursday june 24

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

Binaryformatter, unreadable junk
Posted by 2G at 6/24/2004 11:00:09 PM
Hi, When I serialize a object using the binaryformatter and save it to a file, the file contains some parts of unreadable junk. Should I do some encoding on the bytearray or something before saving it ? All works fine when I use the soapformatter. public byte[] Serialize(object o, Serializa...more >>


Oracle connectivity in C#
Posted by ibrahim NO[at]SPAM islamabad-dot-net.no-spam.invalid at 6/24/2004 10:54:39 PM
can anyone send a code for the oracle connectivity wid C#.. would be really tahnkful .. Desert Desperado 8) Posted Via Usenet.com Premium Usenet Newsgroup Services ---------------------------------------------------------- ** SPEED ** RETENTION ** COMPLETION ** ANONYMITY ** ----------...more >>

connection problem between C# and SQL Server 2000
Posted by superbsoda NO[at]SPAM yahoo.com-dot-sg.no-spam.invalid at 6/24/2004 10:54:39 PM
Hello. I'm a student desperately needed some help here :cry: . Recently i got a program written in C# from a friend of mine. Its a complete and running program my friend told, but he forget to tell me one thing, that is, the proper way to make the connection between the program and the SQL Serve...more >>

FileAttributes
Posted by Frank at 6/24/2004 7:08:11 PM
Help My Brain is apparently not working! I have been trying to toggle FileAttributes in C# code to no avail. Nothing I have tried has worked and I have been unable to find anything anywhere on toggling the bits properly. Depending on the file I need to either turn off the "Archive...more >>

attn: MVPs... Sockets.. Killing!!
Posted by Slappy White at 6/24/2004 6:55:26 PM
Hi All, I have a strange problem with .net sockets (Protocol TCP/IP). I have developed a slave application that listens for incoming connection in asynchronous mode, and accepts incoming connection in a socket and returns to the listening mode. The connected socket then uses async mode ...more >>

When does the .NET Framework 1.1 Service Pack 1 come out?
Posted by Henrik Dahl at 6/24/2004 6:25:05 PM
Hello! At a page on Microsoft's www server I've seen a mentioning of a forthcoming ..NET Framework 1.1 Service Pack 1. Do some of you know when it actually will come out? Best regards, Henrik Dahl ...more >>

How to tell if path is file or directory
Posted by Andy Gilman at 6/24/2004 6:23:35 PM
I want a method basically that tells me if a path is a file or directory, or any other possibilities. What do i need to do? I'm hoping I dont have to manually determine all these things with Exists() for FileInfo and DirectoryInfo. If I do have to do that, is a directory also a file? Seems lik...more >>

Singleton + sqlConnection with inhereted winform
Posted by The Real Andy at 6/24/2004 6:12:27 PM
OK, please excuse the simple (ambiguous) nature of this question. I have a winform, set up as a base class. I inherit about 5 instances from this form, each relating to a db table. Currently I am using some code in a method that launches the inherited form. In this method I check if an instanc...more >>



new or not new
Posted by Jay at 6/24/2004 6:09:08 PM
Why is it some things require new and some do not? System.String name; System.Random r = new Random ...more >>

dynamic control creation
Posted by e-mid at 6/24/2004 5:57:42 PM
i have a user control (say myUserControl) that inherits panel, i create some textboxes on myUserControl dynamically, then i create some myUserControls on the form dynamically with a loop . of course i change name,location etc.. meanwhile. i have some problems here then. eg: how could i r...more >>

Dataset finding and value assign
Posted by Wilson Wu at 6/24/2004 5:52:32 PM
Hi, How can I find the field value in the dataset and then assign one of the field value to a variable ? Thanks Wilson ...more >>

Understanding references...
Posted by VM at 6/24/2004 5:35:09 PM
My solution has 4 projects, and two of those projects have a reference to a ZM_Utilities project (a class library) that's part of the solution. Whenever I compile to test, I "Build Solution", with Active Solution Configuration = Debug (and everything underneath in Debug). The only time I do a "B...more >>

Dynamic Localization at Runtime
Posted by mike at 6/24/2004 4:43:27 PM
Hi People, I've found heaps of examples of how to localize C# apps from resource files at runtime, but the examples I've seen all seem to involve resources that are compiled in so that strings can be localized but not actually changed. I want to be able to actually load the strings themselve...more >>

Include external file
Posted by Christoph at 6/24/2004 4:32:21 PM
I'm sorry for the (potentially) stupid question I'm about to ask. I've looked through the docs and I've also searched on google (perhaps I'm looking for the wrong thing?) and I just can't find the answer to this. I have 2 files. One is my primary class and the other is my support class. Whe...more >>

Who called me method???
Posted by Tamir Khason at 6/24/2004 3:43:03 PM
How can I know who called the certain method of some object (from which class/method it was called) E.G. class A { Public A() { B b = new B(); } Private Some() { b.Caller(); } } Class B { Public Caller() { Console.WriteLine ("Called from {0}",WHO_CALL_ME); } } ...more >>

Errorhandling with response.redirect
Posted by Roel at 6/24/2004 3:40:22 PM
Hello When I have an exception within a try - catch block, I sent the user to my error page with the following code: Response.Redirect(@"error.aspx?errmsg=" + ex.Message + "&errsource=" + ex.Source + "&errstack=" + ex.StackTrace); The problem is that when there is an \n - sign in the error ...more >>

Help with Process function - ASP page using C#
Posted by vbMark at 6/24/2004 3:38:35 PM
Here is my C# code in the ASP.NET page. public static void DoConvert ( string sFile ) { string cmd = "foo.exe" ; string param = " /bar.txt" ; Process myproc ; // <-- Error here ProcessStartInfo startInfo = new ProcessStartInfo ( cmd , param ) ; startInfo.CreateNoWindow = true ; sta...more >>

How can I avoid connection leak? thanks!
Posted by davidw at 6/24/2004 3:32:13 PM
I have code like this try{ sqlConn = new SqlConnection(gDSN); sqlConn.Open(); ..... .... catch(Exception e) { ShowError("...", e); } finally { if(sqlConn!=null) { sqlConn.Close(); sqlConn.Dispose(); } ...more >>

DataGrid - centering
Posted by sirinya16 NO[at]SPAM hotmail.com at 6/24/2004 3:28:34 PM
I have created a DataGrid control with checkboxes, TextBoxes, ComboBoxes, and NumericUpDowns. Since I used the DataGridBoolColumn, the checkbox is displayed in the center of the cell, horizontally and vertically aligned. I want the other cells with data to also be centered so that it is cong...more >>

Tab Page!!
Posted by Vai2000 at 6/24/2004 3:08:55 PM
Hi All, I want to create a tabular form on top of each other, for e.g. the way you get in Active Directory Users Properties or Windows XP My Computer Properties. Which settings will let me do it? Or do I have to create inherited control or what? Its pretty straight forward to create a horizontal...more >>

Web Service authentication question
Posted by Derrick at 6/24/2004 3:00:23 PM
I'm going thru this tutorial - http://samples.gotdotnet.com/quickstart/aspplus/default.aspx?url=/quickstart/aspplus/doc/secureservices.aspx and interested in the Soap Header implementation, would like to have the web service authenticated against a user/password table in a database, that can b...more >>

HTML in the XML Documentation
Posted by John Mark Howell at 6/24/2004 2:59:48 PM
BlankDoes anyone know what all HTML tags are allowed in the XML doc = tags? Example, I know by experience that <h1> tags are allowed. What = other tags are allowed? The MSDN is not clear about this. --=20 John Mark Howell...more >>

Accessing elements of an array
Posted by skrishnan NO[at]SPAM snet.net at 6/24/2004 2:56:27 PM
The following call returns something like US/ABCDEF System.Security.Principal.WindowsIdentity.GetCurrent().Name.ToString() I would like to split the string by "/" and access the 2 member OR index of 1 in the array. I tried doing something like System.Security.Principal.WindowsIdentit...more >>

Basic Class Question
Posted by alan baer at 6/24/2004 2:48:34 PM
When I post a form, what happens to the instance of the class I created? It appears that I need to create a new instance, but I suspect I may be doing something wrong. If the class can retain data across posts, that would be ideal. ...more >>

Re: prepending text to a file
Posted by monkeyjob at 6/24/2004 2:17:54 PM
Hi, if you're running microsoft windows, you could try content appender: http://www.monkeyjob.com/Packages/ConAppen.htm However, you would have to purchase the full version to use it (The demonstration version runs but it does not allow you to perform any actions). Regards, www.monke...more >>

VS.NET 2005: Why VB's IDE is better than C#'s IDE ??
Posted by Stefano at 6/24/2004 2:01:07 PM
Dear Friends, i have had a preview of the new VS.NET 2005 version that has showed to me a lot of improvment in C# and VB language. But i have notice that the VB's IDE is better than C#'s IDE. Could someone explain to me why ? Are VB programmers more lazy (or stupid) than C# programmers and need...more >>

Possible to use Cache object in library assembly
Posted by AC at 6/24/2004 1:49:33 PM
Is it possible to use the System.Web.Caching.Cache object in a class = library project (where there's no HttpContext)? I have web application, = but want the cache to be managed by a library project (business layer). -AC...more >>

msi
Posted by frazer at 6/24/2004 1:37:09 PM
what is the difference between an msi installer and a self extracting installer. ...more >>

apiviewer
Posted by frazer at 6/24/2004 1:35:43 PM
hi how do i view the apis in the user32.dll i used to use apiviewer in visualstudio 6. what is the equivalent in dotnet. thnx ...more >>

Help with array
Posted by vbMark at 6/24/2004 1:25:09 PM
I'm tyring to extract the file name from a path entered in a text box by doing this: string sFile = File1.Value; string[] sArray = sFile.Split(new char[] {'/'}); sFile = sArray.GetValue(sArray.GetUpperBound(0)); However, I get the following error: Compiler Error Message: CS0029: Cannot im...more >>

How can I update datagrid while table is being filled??
Posted by VM at 6/24/2004 1:23:40 PM
Initially, I had created my Windows application so that my datagrid's source would be updated once the method that filled the table was finished: private void btn_run_Click(object sender, System.EventArgs e) { ... myTable = Match.fillTable(); datagrid.datasource = myTable; } pu...more >>

Launch Outlook express with attachment
Posted by Thejus at 6/24/2004 1:15:18 PM
Hi, I want to launch Outlook express with a file attached. The file can be of type *.xls/*.txt/*.doc. I have the application with Outlook, but I want it for Outlook Express. Which COM I will have to add. The "mailto:" component do not have a provision for attaching file(as far as I know). I...more >>

Launch Outlook express with attachment
Posted by Thejus at 6/24/2004 12:59:11 PM
Hi, I want to launch Outlook express with attachment. Any ideas ? Thanks Thejus ...more >>

Windows Service Version
Posted by timb at 6/24/2004 12:15:10 PM
Hi, I have windows service, in the event of an exception calling (which is important enough to write away to a customer event log) i would like to write away the software version as part of the evenetlog message text. I have used the following code with existing windows forms applications ...more >>

event handlers and GC
Posted by cs at 6/24/2004 11:57:38 AM
I have an object X, and an object Y. Y is the only object that has a reference to X. X has an event. Objects A, B, C register for this event but dont keep a reference to object X. When whoever owns Y is done with it, and Y is garbag collected, what happens to X and to the Objects that registere...more >>

Image opacity
Posted by Baramuse at 6/24/2004 11:46:01 AM
Hi, I wonder if it was possible to change the opacity of an image in a picturebox for example : I try to make a splash screen that shows up images (one after one). But i would like to change the opacity of the images as the program loads itself... like a progressbar.. And is there a way to ma...more >>

Viewing subitem in listview
Posted by Paddy at 6/24/2004 11:29:49 AM
I would like to do this: private void listView1_SelectedIndexChanged(etc) { // show the subitem of the item that was clicked } Please help. Paddy ...more >>

NameValueCollection Question
Posted by Bernie Walker at 6/24/2004 10:55:30 AM
Can an individual value be changed or must the entire collection for a specific key be cleared and re added? Bernie. ...more >>

find closest number from array
Posted by mike at 6/24/2004 10:43:27 AM
I have ListArray with number in Eg: 1, 1.456, 2.43, 4, 6.78 next i have a decimal variable containing one number EG: 1.786 Could someone please tell me how i find the "closest match" number below the decimal variable from the arraylist. Thanks ever so much in advance ...more >>

PostBack on a Datagrid
Posted by Brian Conway at 6/24/2004 10:40:24 AM
How do I code for a datagrid to postback an editable field? I have field that come up automatically when the datagrid gets populated. You can make some changed right there to multiple fields, however, I want it to postback to the dataset after that field loses focus. ...more >>

modification on ie window
Posted by MA at 6/24/2004 10:37:10 AM
Hi all! Javascript can control the browser windows size and if menu is shown. Is there anyway to do this with C# /Marre ...more >>

Field limit masking ?
Posted by John Sutor at 6/24/2004 10:29:15 AM
Here is te problem. I have a text box that I only allow numbers or decimals to be entered (using an event delegate). The max number of characters I allow is 4. The highest number that they should be able to enter is 1.25 and the lowest is 0.010. Currently I check the field when the leave the ...more >>

C# marshal string PTCHAR TCHAR* help needed
Posted by marabo82 NO[at]SPAM hotmail.com at 6/24/2004 10:27:46 AM
Hi, i am trying to call A dll FUNCTION from a C# application. i am using this function int hhpGetErrorMessage(PTCHAR ptcErrorMsg,int nMaxChars) where ptcErrMsg: TCHAR buffer to hold error message string. nMaxChars: Maximum number of characters that can fit in ptcErrorMsg including NULL. i...more >>

Difference between setting reference=null and going out of scope?
Posted by Adam Clauss at 6/24/2004 10:26:44 AM
Basically, my question is in terms of performance and the garbage collector - Is there any difference between a) letting a variable simply go out of scope b) explicity setting it to null once I am done with it I have no particular reason to think that b) would gain me anything, but I thought m...more >>

OFFTOPIC : Newsreader of choice
Posted by AC at 6/24/2004 10:20:15 AM
I know it's off topic, but there isn't really a place to post this. What's the preferred newsreader of everyone? Outlook Express, while = free & good enough, lacks many features. Seems NNTP and RSS/ATOM... = blogs in general would be a good combo app for developers with watch = lists, keywor...more >>

DataGrids displaying null as a value
Posted by Lane at 6/24/2004 10:15:01 AM
Is there a way to make a datagrid display nothing rather than (null) when the field has a null value. Im using visual studio and sql server???...more >>

Variable Type?
Posted by Jeff Johnson at 6/24/2004 10:10:27 AM
Hi Everyone, I have a page with numerous label controls with the Visible attribute set to false. On page_load I loop through an array and depending on what is returned for each label, I want to set the Visible attribute to true as well as a number of other attributes. Instead of having a...more >>

Reflection with array
Posted by Wernfried Schwenkner at 6/24/2004 10:02:21 AM
I want to deserialize a file. In one ofe my classes I have an array like: public class MyClass { public MyArray[] theArray; } i.e. an arry of an own defined class. While reading the file I only know the dimension on the end of reading, so I keep the array elements in an ArrayList "r...more >>

NumericUPDown cannot increment decimals
Posted by skrishnan NO[at]SPAM snet.net at 6/24/2004 8:48:17 AM
Is it true that I cannot increment in decimals, I would like to increment the control by .25 thanks...more >>

Unstoppable thread in application end???
Posted by gaetan NO[at]SPAM xeberon.net at 6/24/2004 8:44:13 AM
Hi let this code : using System; using System.Threading; namespace ThisNamespace { class ThisClass { static void Main() { new ThisClass(); // here the end of the application => should call the "destructor" } public ThisClass() { S...more >>

Multiple XML nodes with the same tag + DataRow access?
Posted by jamie at 6/24/2004 8:11:55 AM
hello, I realize that this is an ADO.Net question, but I'm having now luck with responses. I have the following xml structure which I load into a DataRow (the xml document is loaded into a dataset...) <EXMAPLE_NODE> <A>string1</A> <B>string2</B> <C>string3</C> <D...more >>

Printing with multiple pages
Posted by John Sutor at 6/24/2004 7:55:02 AM
Does anyone know how to print multiple page documents? I can print from a test box or a one page document, but not one with multiple pages. ...more >>

Linking a C# application to a VC++ dll
Posted by dominicjoseph NO[at]SPAM rediffmail.com at 6/24/2004 7:47:50 AM
Hi, I needed some information on linking a C# application to a VC++ dll. How can this be done? It would be great if someone could give links to tutorials/articles on this subject. Thanks....more >>

How to get Row and ColId of datatable
Posted by skrishnan NO[at]SPAM snet.net at 6/24/2004 7:45:22 AM
I have an event handler for column changed event. When a column changes, I would like to find out what row/column changed . The event handlers donot help me get to the property. thanks for any help....more >>

Disappearing controls
Posted by google NO[at]SPAM sforeman.com at 6/24/2004 7:36:01 AM
Hi All, I've seen many postings regarding different situations where controls disappear but have never seen a decent solution. Here is the problem. I have a form onto which I am placing some standard controls from the toolbox (mainly radio buttons and labels.) The form itself derives fro...more >>

Threading problem
Posted by Ulf Bietz at 6/24/2004 7:34:43 AM
I need some help to understand a specific threading problem : I wrote a function "BrowserObjects()" for testing webcontent. .... IHTMLDocument3 currentDoc = (IHTMLDocument3)ObjectFromLResult(lRes, ref IID_IHTMLDocument,0); IHTMLElementCollection frameCol = currentDoc.getElementsByTagName("FRA...more >>

ArrayList in Hashtable
Posted by Matthias Kwiedor at 6/24/2004 7:25:31 AM
Hi! What i want to do, is to put an ArrayList into a Hashtable. So i can access the ArrayList fast over the key-indexing of the Hashtable. What i did is to put the ArrayList into the Hashtable hash[key] = arraylist When i get the ArrayList back ArrayList array = (ArrayList)hash[...more >>

HELP Please on Code
Posted by Brian Conway at 6/24/2004 6:36:39 AM
Can anyone tell me where I have this code messed up. It produces no errors, but it does nto work either. The More command seems to work just fine, but I can't tell whether this is an accident or whether it is because it is coded right. private void DataGrid1_ItemCommand(object source,System...more >>

Certificates
Posted by BuddyWork at 6/24/2004 6:08:27 AM
Hello, With ASP.NET you can use certificates for authentication but within WinForms what can I use? Thanks...more >>

MonthCalendar background painting
Posted by Robert Misiak at 6/24/2004 4:47:11 AM
Hi everyone- I've done a lot of searching around on the web and I'm sure the answer to this question is no, but I'll ask anyway. Is it possible to create an inherited MonthCalendar control and override the member that paints the background? I've tried working with OnPaint, OnPaintBackground ...more >>

c# PropertyGrid with resource
Posted by jehle NO[at]SPAM centralnet.ch at 6/24/2004 4:29:55 AM
My problem based on a multilingual interface. I display the Properties in a PropertyGrid - no proplem at all. I have properties defined like this one: [System.ComponentModel.Browsable(true), System.ComponentModel.Description("Type your Path"), System.ComponentModel.Category("Pathstructure")] ...more >>

thumbnails view
Posted by Ada at 6/24/2004 3:05:01 AM
if you go to Windows Explorer and select a directory that contained a bunch of images, then go to VIEW > THUMBNAILS you will see a thumbnails of all the images in the folder. to familiarize myself with C# code, i want to do something like that. i was thinking of using LISTVIEW and IMAGELIST co...more >>

IP and Port
Posted by bernardpace NO[at]SPAM yahoo.com at 6/24/2004 2:41:21 AM
Hi, I am writing a program using the TcpListener class. How can I get a random unused port and the ip of my local host machine. Thanks in Advance...more >>

Get C string into C#
Posted by Aku at 6/24/2004 2:37:47 AM
Hi, My C# app is talking to a unmanaged Win32 DLL - the DLL is producing a string in a char array. I need to get that string information into my C# code - how to do it? Thanks! *** Sent via Devdex http://www.devdex.com *** Don't just participate in USENET...get rewarded for it!...more >>

Set Collection Needed ?
Posted by shearne NO[at]SPAM tssg.org at 6/24/2004 1:44:03 AM
I have numerous collections (currently ArrayLists) which contain objects of the same type. I need some way of aggregating these lists into one collection with duplicate objects only appearing once in the final collection (set type collection). Currently i'm using an Hashtable, entering the obj...more >>

PrintDialog
Posted by Beeeeeeeeeeeeves at 6/24/2004 1:31:02 AM
Hi, I am trying to use the PrintDialog to allow the user to select a printer to send a crystal report to. The crystal report is a strongly-typed one (i.e. embedded into the application rather than loaded from a file). I am using a PrintDialog to allow the user to select what printer to print to, b...more >>

Maintaining variable state on web form
Posted by Das at 6/24/2004 1:27:01 AM
Hi all, I'm using Asp.net. Within a form I have declared declared a public variable. When the form is loaded I set the property for the variable. but it doesn't maintain its state on postback. I there any way to maintain the state for variable? Thanks, Das...more >>

Problem of deploying webapp on IIS production server
Posted by Tom at 6/24/2004 1:18:01 AM
Hi, I built and packaged some web applications written by .net and c#. They connect to the same DB and have listview to list data from DB. They did not have any errors when I built and test them on local development machine. However, the listview shows the following error when I installed ...more >>

[Q] Examples / Reference on how to use DLLs with C#
Posted by stuie_norris NO[at]SPAM yahoo.com.au at 6/24/2004 12:56:28 AM
Dear Readers, Are they any good references on calling / using windows DLL from C# sharp. I need to use some functions in a DLL file for a touch screen. I have some code that calls the DLL in C++ so I was wanting to convert it to C# so I can call the DLL natively. Or can I call the C++...more >>


DevelopmentNow Blog