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# > october 2006 > threads for monday october 30

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

Easy VB.NET > C# port question
Posted by nime at 10/30/2006 11:04:52 PM
I tried to port from VB to C# and now I'm stuck. I couldn't convert the VB line readdata = dt.Rows(0)(data) as C#: return dt.Rows[0][data]; Error detail: Error 1 Cannot implicitly convert type 'object' to 'string'. An explicit conversion exists (are you missing ...more >>


Custom reporting engine.
Posted by Ibrahim. at 10/30/2006 10:24:01 PM
Hello, I want to build a custom reporting engine in .NET. Wht are the consideration and I need to provide the user design facilty at run time. Thanks, ...more >>

Help Please-- Failure sending Email
Posted by NW Technicals at 10/30/2006 10:10:00 PM
I am trying to send email using this fucntion can you guys help me please find the mistake I am using my Gmail Credentials and the only exception error I get is Failure sending email Any help is greatly appreciated ===================== MailMessage mailMessage = new MailMessage(); ...more >>

Reverse XmlNodeList Order
Posted by eggie5 NO[at]SPAM gmail.com at 10/30/2006 9:40:33 PM
Hi, I have an XmlNodeList and I need to reverse it. Just like Array.Reverse(), but it has to stay as an XmlNodeList. Any ideas? ...more >>

Design question: transferring data between business objects and the data layer
Posted by olduncleamos at 10/30/2006 7:59:28 PM
Hi all, What is, in general, the preferred practice to transfer data between business objects and the data layer? To be more specific, I have a couple of business objects with state data that are stored in external storage. The data layer take care of communicating with the storage and return...more >>

best way for "atomic" like code parts execution?
Posted by SharpCoderMP at 10/30/2006 6:01:20 PM
is it possible to implement some safe way of performing two or more instructions in a kind of "atomic" way? consider this: we have two queues (implemented on top of an List<T>). now we need to move an element from one queue to another, so we need to do something like this: queue2.Enqueue(queu...more >>

equivalent of trace macro
Posted by --== Alain ==-- at 10/30/2006 5:42:31 PM
Hi, could you tell me what is the equivalent under .NET of TRACE macro used under VC++ ? I would like to display some status of my program in output window for an easier debugging. thanks a lot, Al....more >>

Clearing last item from combobox?
Posted by Brett Romero at 10/30/2006 5:16:39 PM
After I remove all items from a combobox, the last selected item remains in the display area. I've tried: mycbox.SelectedText = string.Empty; and mycbox.refresh(); How do I clear the display area of a combobox after removing all of its items? Thanks, Brett ...more >>



Known File-types Previewer
Posted by Andrea Anastasescu at 10/30/2006 4:52:49 PM
Hi there, I have to integrate a previewer into a desktop application, that retains some links to resources (local files, internet-links, personal mails - this is not of certain concern). This window should be able to give a preview of the document: be it an office (word, excel), an image f...more >>

how to set the hour of a dateTimePicker
Posted by Wilfried Mestdagh at 10/30/2006 4:40:45 PM
Hi, How do you set a datetimepicker (set to time only) to 00:00 programatically ? -- rgds, Wilfried [MapPoint MVP] http://www.mestdagh.biz...more >>

How to cancel service startup during OnStart?
Posted by SharpCoderMP at 10/30/2006 4:39:22 PM
hi, as in subject - how can i do that? when my service starts up it performs some tests within OnStart method. i would like it to refuse to start if some of these tests fail. there is simply no point in running my service if certain criteria is not met. in that case i would like to log test r...more >>

Best practice - Using modal input form
Posted by Ant at 10/30/2006 4:29:02 PM
Hi, I'm using a modal dialog box to input data. I have created properties on the dialog form to capture the data so that it might be read from the main form via the dialog form. This approach encapsulates the data & I can implement the business logic in the dialog form. This leaves me wi...more >>

what is best way to talk to https webpages within .net? any good librarys for talking to https websites?
Posted by Daniel at 10/30/2006 3:46:00 PM
what is best way to talk to https webpages within .net? any good librarys for talking to https websites? ...more >>

PromptDataSource method
Posted by Coder at 10/30/2006 3:45:08 PM
When using Delphi, In order to create connection strings, there was a method to show Data Source creation page, string ConnStr = PromptDataSource(); What is the C# equivalent of this method ? Thanks ...more >>

Model view presenter - setting object collections
Posted by Doug at 10/30/2006 2:31:31 PM
Hi, I learned a little about the model view presenter pattern at a conference this last week and am experimenting with it. It's working pretty well but I have a question. I am trying to use it to reset info in a combo box. Below is some sample code for my view interface and the presenter:...more >>

Flicker free drawing on Panel
Posted by arlef at 10/30/2006 1:18:58 PM
Hi there, Is there a way to achieve flicker free drawing on a Panel? I know it is possible on a form using the double buffered property. However, I do not know how to achieve the same using a Panel. Please can somebody help. Regards, James ...more >>

AccountExpires WITHOUT ACTIVEDS
Posted by SHEBERT at 10/30/2006 12:26:03 PM
In c#, How can I get the "accountExpires" without having to register the ACTIVEDS COM object on the client? DirectoryEntry returns almost all value with the COM object except for dates. Why MS designed .NET object returning COM object? I hoped we got rid of the complexity of COM in .NE...more >>

implicit conversion
Posted by docschnipp at 10/30/2006 11:11:02 AM
Hi, I have an object that manages a kind of Variant type. For comfort reasons I want to have the possibility to do this: MyPropclass prop = new MyPropclass(); string m = "blabla"; prop = m; How can I do this? Is there a way to overwrite "="? Or must I extend "string"? Than...more >>

c# / Visual Studios / "Setup Project"
Posted by Gina_Marano at 10/30/2006 10:50:41 AM
Hey All, I have created an application and an installer for it using Visual Studios "Setup and Deployment" project template. It works great (for the simplicity that I require) except that it doesn't allow multiple instances. The user needs to be able to install 1 or more copies of the progr...more >>

SQL server schema
Posted by John Sutor at 10/30/2006 10:10:02 AM
Does anyone know what objects to use to query a SQL database to get back all of the tables and then be able to get information on the tables and column information (name, datatype, max length etc...) *** Sent via Developersdex http://www.developersdex.com ***...more >>

Convert C# to C++
Posted by Flyte at 10/30/2006 10:08:04 AM
What is the easiest way to convert C# to C++? And more specifically, how to convert a C# / WinForms (.NET 2) to a C++ / Qt solution? ...more >>

Wrapping up software
Posted by pigeonrandle at 10/30/2006 9:37:40 AM
Hi, I have written several pieces of software and would like to hear any thoughts anyone has on what measures i should take to ensure(!) its stability and security at the hands of the *users*. I have obviously put error handling in :O) but have heard of loads of other things i could do like obf...more >>

Using Pipes in C# with Overlapped I/O
Posted by dvestal NO[at]SPAM gmail.com at 10/30/2006 9:11:28 AM
I'm trying to use Overlapped I/O from C#, and utterly failing. I've tried to boil down my code to as simple an example as possible, in hopes that you people can point to where I'm going wrong. I've included my test program. The behavior I'm seeing is that the callback routine is never called,...more >>

"file download" dialog box appears twice
Posted by L. Scott M. at 10/30/2006 9:08:20 AM
I am invoking a file download using the following code: Response.Clear(); Response.AddHeader("Content-Disposition", "attachment; filename=" + downloadFile.Name); Response.AddHeader("Content-Length", downloadFile.Length.ToString()); Response.ContentType = "application/octet-stream"; Res...more >>

Can't Get Sql Connection
Posted by Steven C at 10/30/2006 8:16:13 AM
Hello: I have a C# app that has a class called DataAccess that handles the SqlClient based connection to a MSDE instance on my laptop (MSDE Release A). I can access the database that I created from a Foxpro app, but when I try to access it from the C# app, I get an error "Sql Server doesn't ...more >>

Changing binary to PDF
Posted by C#Schroeder at 10/30/2006 7:45:11 AM
I am working on a project where I have to take a binary file and convert it to a PDF file. The binary file is stored in a database as a Varbinary. What is the best way to store the binary file. Like is an object, array, interger, etc.. Also can you point me in the right direction to viewing t...more >>

Custom class and ArrayList
Posted by Steven Blair at 10/30/2006 7:18:34 AM
Hi, I want to know if this is the most efficient method of fixing my problem: I have a custom class and I need to maintain an array of these items. Initially I used MyCustom[] a = new MyCustom[someSize]; However, a new requirement has popped up which means this array might change size (a...more >>

How to write XML with any name and type?
Posted by Demorsy at 10/30/2006 7:11:01 AM
Disappointed, this is not the first time I'm posting this kind of a request for help, but no helpful answer was posted yet. I'll try make my question as clear as I can: (1) I wish to write an XML file. this file will contain any number of parameters to be used in my C# code as database. (...more >>

Visual Studio Command Prompt - recognition of lower and upper case
Posted by Mike Dunk at 10/30/2006 6:59:02 AM
In the .NET Framework 2.0 SDK I create a file TestApp.cs - mixed case. Does anyone know why, when I compile entering a csc command from the Visual Studio 2005 Command Prompt, I need to enter the file as "testapp.cs" lower case?...more >>

Combine 2 lines in text file conditionally
Posted by d4 at 10/30/2006 6:55:36 AM
I have a vbscript (below) I want to rewrite in C# but I cannot get it to work (unless there is a better way to do it). The script will combine 2 lines if the (next) line contains a "+", otherwise just write the line. #### vbscript: Do While Not InputFile.AtEndofStream Line = Input...more >>

Add Child Node to multinode XML Document
Posted by fischertm NO[at]SPAM hotmail.com at 10/30/2006 6:41:52 AM
I'm trying to add a chile node to a document that looks like the following: <Configuration> <Main> <one> ONE </One> <Two> TWO </Two> </Main> <Multiples> <Entry> <Name> TEST </Name> <Date> DATE </Date> <Other> OTHER </Other> ...more >>

"^$" regex does not work
Posted by Efi at 10/30/2006 3:52:31 AM
Hello, I am trying to capture empty lines, for example : 1. ABCDEF 2. 3. abcdef I would like to capture line number 2. I am using the following regex - new Regex("^$",RegexOptions.Multiline); RegexBuddy captures the empty lines correctly why doesn't the regex engine of .net manages to...more >>

cant save data to db
Posted by Ilanco at 10/30/2006 2:26:01 AM
I'm new to c#. I am trying to insert or update data to my tables, and in the debug mode everithig looks ok. when i exit and look in the database all the update or insert did not take effect. i'm using Visual c# 2005 express and SQl 2005 express. I tried to insert a button with this code : ...more >>

Reading Zipped data from database record
Posted by peter.bremer NO[at]SPAM gmail.com at 10/30/2006 1:51:14 AM
Hi all, I've got a SQL Server database that contains zipped information stored in (binary) image fields. To complicate things, this zipped data is combined with plain-text data. I've verified the zipped data to be readable by SharpZipLib by writing the field contents to a file and using a b...more >>

Help with taking out part of string
Posted by Aahz at 10/30/2006 1:45:54 AM
Hello, Can someone help me with this: I have taken string frm an html source, and it looks like this: <a class="v11" href=Sweden-232433.html>Sweden</a> (30millions) Now I am trying to take out name of the state(in this case "Sweden"). What is best way to do this? Using RegEx validator? ...more >>

Book advice for ADO.NET & Windows Forms with C#
Posted by adodotnet20 NO[at]SPAM gmail.com at 10/30/2006 1:28:07 AM
Hi, I need to create an application in C# that will be fairly simple from a UI prospective and that will be able to retrieve some information from a db. The overall look and feel should be nice but not too sophisticated. There are two areas that will need to shine though: first a datagrid which...more >>

How to view JIT-ed native code?
Posted by Morgan Cheng at 10/30/2006 12:31:24 AM
We can view MSIL code with reflector or ILDASM, but how can we view native code generated by JIT compiler at runtime? ...more >>

How to cancel a copy selection in Excel?
Posted by Siv at 10/30/2006 12:14:21 AM
Hi, Does anyone know how to cancel the selection of a block that has been copied programmatically using C# and Excel Interop. This is my current code: rng=XLApp.get_Range("OrigRows",m); //selects the row named OrigRows XLApp.CutCopy...more >>

Accessing dynamic controls by name?
Posted by Anil Gupte at 10/30/2006 12:00:00 AM
How does one access dynamic controls by name (or wahtever other means)? I have the following: Dim newbtnPick As New Button newbtnPick.Name = "SliceButton" & CurSliceNum newbtnPick.Location = New Point(SILoc.SIPickbtn, SILoc.SIY3) newbtnPick.Size = New Size(SILoc.btnW, SILoc.btnH) new...more >>

using win32 dll in c# ?
Posted by chandu at 10/30/2006 12:00:00 AM
hello, i want to use win32 dll in my c# application.i copied that dll in my bin/debug folder and then i used one of its function like this...... [DllImport("XCENLogInterface.dll")] public static extern void SetPatientLogFileName(string pPatientLogFileName); if i call this method it is gi...more >>

Mail merge
Posted by Alan T at 10/30/2006 12:00:00 AM
Hi, I'll be working on mail merge in the coming few days, is there any pointer to the tutorials or help please? ...more >>

Sorting ListView columns in .NET 2.0
Posted by Gustaf at 10/30/2006 12:00:00 AM
I'm porting code from VS 2003 to VS 2005, and can't get column sorting to work as before. This is code I found somewhere and used without acctually understanding it. I still don't fully understand it, which makes it hard to see what's wrong now. In VS 2003, it allowed me to click on a ListVi...more >>

How to use Vc++ dll in C# Application?
Posted by chandu at 10/30/2006 12:00:00 AM
Hello , i had one VC++ dll . and i need to use that functions in my c# code. it is logger dll. i want to use that logger functions from my c# and log the details. how to use that VC++ dll in my C# through interoperabilty service.. can u please explain? ...more >>

DllImport and using Win32 API GetParent return no value
Posted by Sanghoon Lee at 10/30/2006 12:00:00 AM
I wrote tiny sample of smart client using Win32 API and get parent IE's handle as follow [DllImport("User32.dll")] public static extern IntPtr GetParent(IntPtr hWnd); IntPtr cHandle = this.Handle; // this is smart client IntPtr pHandle = GetParent(cHandle); // oHandle will be IE'...more >>


DevelopmentNow Blog