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# > february 2004 > threads for tuesday february 17

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

Data Types of datetime and bit
Posted by Tom at 2/17/2004 11:01:11 PM
Hi, I have a DB table in which has 2 attributes: 1. RegistrationDate datetime 2. IsApproved bit //Approved = 0; Not approve = 1 Now, I need to get and set their values in cs files. public XXX RegistrationDate / IsApproved { get { return this.Date; / this.Is...more >>

C# Socket Data Throughput
Posted by jerome.symons NO[at]SPAM adi-limited.com at 2/17/2004 10:10:56 PM
Hi everyone, I have developed a C# client/server system that creates bitmap images at the server and sends them to the client as an array of bytes using a Socket. When the data rate through the socket reaches about 4.5 MB/s, the Socket.Read command at the client end uses all of my CPU. I do...more >>

Mutex question
Posted by Michael A. Covington at 2/17/2004 9:33:16 PM
What is the difference between myMutex.WaitOne(n,false); and myMutex.WaitOne(n,true); where n is a number of milliseconds and myMutex is a Mutex? The second parameter supposedly says whether to "exit the synchronization domain before waiting." What does that mean? Also, can anyon...more >>

Calling Url with form parameters in c# ?
Posted by WJ at 2/17/2004 9:24:19 PM
1. I have an ASP.Net web site that does nothing but accept files to be uploaded manually. It has one simple page that asks users to specify a file to be uploaded. 2. I also have a Windows Form application in c# that needs to send files automatically to the web site folder. So far, I got the...more >>

Serial Port
Posted by Steven Blair at 2/17/2004 6:55:49 PM
Hi, I need to talk to a serial port using C# and dont know how to do it. Basically, I want to be able to send files and receive files from COM port 1. Can .NET do this ? Steven www.stevenblair.com ...more >>

sizing controls
Posted by ichor at 2/17/2004 6:49:06 PM
hi i am developing a c# app and i want that when i size the form the controls should also be automatically sized. thanx ...more >>

Version of .NET
Posted by Greg Shannan at 2/17/2004 5:57:56 PM
How do I tell what version of .NET my C# program is running under (for instance 1.0 or 1.1)? TIA .... Greg Shannan ...more >>

Get a control from clipboard
Posted by keith at 2/17/2004 5:56:08 PM
I can use following codes to set and get object (serializable class) from Clipboar Clipboard.SetDataObject(obj) then DataObject data=new DataObject() obj=(ClassType)data.GetData(typeof(ClassType)) In the book Windows with C# (author Charles Petzold), it says a Button can be set or got from...more >>



help in class type converstion
Posted by Cheryl at 2/17/2004 5:49:56 PM
I am trying to use ArrayList to implement a class Wordlist. Wordlist wordlist; public ListOfData() { wordlist = new ArrayList(); } But then when I try to access the objects in the ArrayList, Object is returned instead of type Wordlist. What should I do in order to access the ...more >>

copy file to floppy disk
Posted by cfyam at 2/17/2004 5:34:28 PM
When my app copy some files to floppy disk, how can to determine the time to show the message to inform user to take the disk off? ...more >>

Pass a Cast by Reference
Posted by David Martin at 2/17/2004 5:22:37 PM
I am working with some third part code. The method in question has the following signature: public sub Add(ByVal ObjProperty as String, ByRef ctrl as System.Windows.Forms.Controls) The problem is that I need to pass a control that is not in the System.Windows.Forms.Controls namespace. It ...more >>

Creating CAB files with C#
Posted by Drago at 2/17/2004 5:00:12 PM
Hi, Does anyone have sample source ot tell me what I should do to be able to compress and decompress files using the CAB format? Thanks! Drago ...more >>

How to initialize class object from given string?
Posted by Ladislav Kepl at 2/17/2004 4:59:05 PM
I would like to initialize new instance of class "EWC.EWCWebCustomControls.EwcImgButton" defined in string and then work with the object of this class, I tried this: Type myType = System.Reflection.Emit.TypeBuilder.GetType("EWC.EWCWebCustomControls.EwcImgB utton"); ctrl = (myType)Convert.C...more >>

convert string to another type
Posted by winthux at 2/17/2004 4:55:25 PM
How can I convert string i.e. to integer or to unsigned integer, or to other types? ...more >>

Wav file conversion
Posted by Anthony Boudouvas at 2/17/2004 4:33:01 PM
Hi to all, is it possible to convert a 16 signed mono .wav file into a .wav 8bit alaw format ? Any samples, code snippets or so ? thanks for any help anthonyb ...more >>

PropertyGrid
Posted by SDK at 2/17/2004 4:32:09 PM
I'm using a propertygrid control in my program, but I'm having some troubles implementing the following. I've got two classes, the second class has a property "Parent" which is an object of the first class. How can I let my user select one of the 'Class1' objects in a propertygrid? So what I ...more >>

data encryption
Posted by will at 2/17/2004 4:02:08 PM
hi, i have a SQL table which stores some passwords. how do i encrypt and decrypt them in C# (see the catch below)? the catch is, i'm assuming a worst case scenario where the whole web server and SQL server have been compromised, so the intruder have access to all the codes and tables. ...more >>

isprint
Posted by Jaga at 2/17/2004 3:43:52 PM
1.) I am using C#. Is there any similar function to isprint in C? 2.) If I trap the event OnKeyDown in a Control, I become a System.Windows.Forms.KeyEventArgs. How can I determine whether the key in the KeyEventArgs a printable char is? Thanks in advance Jaga ...more >>

StringWriter and XmlTextWriter
Posted by Einar Høst at 2/17/2004 3:22:14 PM
Hi, I'm having weird problems using StringWriter and XmlTextWriter. My code looks like this: StringWriter sw = new StringWriter(CultureInfo.InvariantInfo); XmlTextWriter xtw = new XmlTextWriter(sw); // NullReferenceException thrown here! xtw.WriteStartDocument(); xtw.WriteStartElement(...more >>

Fax Image Processing in c#
Posted by demerson NO[at]SPAM hpsj.com at 2/17/2004 3:21:23 PM
I'm working on a document storage / retrieval system in c#. The app stores faxes in TIF format in SQL Server. I'm having a little trouble I hope you folks can help me with: Here's the first issue. When viewing a fax, i pull the data out of sql server into an Image object and display it in a...more >>

Using a C++ class in C#
Posted by Thomas Johansen at 2/17/2004 3:18:00 PM
Hi. I have an DLL written as "normal" C++ dll. I has an GetObject function, which return an c++ class. Now I whant to use this class (and all its members) in my C# applikation. I know that C# classes and C++ class are incompatible. So this is how I whant to solve it: (If possible) My C# ap...more >>

How do I start debugging this?
Posted by David Berman at 2/17/2004 3:13:00 PM
I have a C# Windows Forms based application. I have a form which serves as a menu (it has push buttons on it). When I click a push button, it launches a window with this code: private void button1_Click(object sender, System.EventArgs e) { ImportDataFrom formImportData = new formImportdat...more >>

Raising an exception in a Sockets Async Callback Problem.
Posted by David at 2/17/2004 3:10:16 PM
Hi, Ive been trying to work this out for the past 2 days now and im not getting anywhere fast. The problem i have is that i am using Asynchronous sockets to create a Socket Client library. When i try to connect to a server that doesnt exist it raises a "Connection forcibly rejected by th...more >>

Fixing form on the screen
Posted by Patrick De Ridder at 2/17/2004 3:10:12 PM
If I remove the top band from the form, the form will be fixed on the screen (you cannot move the form about on the screen). Is there a way to stop the form from being moved about, whilst retaining the band at the top of the form? Thank you. Patrick. ...more >>

BUG INVOKING .NET WEB SERVICE .
Posted by Rodrigo Meneses at 2/17/2004 2:48:47 PM
Whenever I invoke a method on my web service I got the following error Client found response content type of 'text/html' Does somebody know something? Thanks -- _______________________ Ing. Rodrigo Meneses Arquitecto de Software Vedantek Telf. +58-212-952-5353 Fax. +58-212-952-776...more >>

Detecting whether the Path is local or remote
Posted by Hayato Iriumi at 2/17/2004 2:41:22 PM
Hello, I'm trying to find out a way to detect whether a path passed resides locally or on a remote machine. I can easily detect a path like \\machinename\path to be remote. But when it comes to a mapped path, I don't really know what to do about it. Does anyone have any idea how to do this?...more >>

Data Loading Issue
Posted by Sunny at 2/17/2004 2:16:28 PM
Hi, I am using Databases in my applications, i have a table with an average of 3.5 million records, i am trying to show the search results in a DataGrid from that table, but the results take a very long time to load, it is a very simple search and there are no constraints on the table nor is it a s...more >>

Printing horizontal pages...
Posted by James at 2/17/2004 2:04:03 PM
Hello, how can I print horizontal pages in c#? I have used the landscape property, setting it to true, but it still prints it vertically, maybe it's my printer? another way I thought is to rotate the graphic object (g), but I haven't tried that yet. another thing, the amount of rotation is 2...more >>

pointer on jagged array (unsafe)
Posted by Jannis Linxweiler at 2/17/2004 1:48:37 PM
Hi NG! I have a problem with my unsafe code. I'd like to get a pointer on a jagged array like this: double[][] arr = new double[x][]; for (int i....); arr[i] = new double[y]; double** pArr = arr; //does not work !!!! I found a solution for rectagular arrays, but as i heared ...more >>

Time Difference Calculations
Posted by Sunny at 2/17/2004 1:41:05 PM
I am interested in finding out the time it takes to complete a certain section of my source code How do i determine the time difference between the beginning of a process and its end. I need to get the result in Minutes and then second, like e.g. 3 minutes 45 seconds Any suggestions for a fast so...more >>

How do you modify an array while iterating through it?
Posted by Gustaf Liljegren at 2/17/2004 1:34:13 PM
I ran into this problem today: I got an array with Account objects. I need to iterate through this array to supplement the accounts in the array with more data. But the compiler complains when I try to modify the objects in the array while iterating through it. I marked the bugs in this code: ...more >>

Getting Handle to Console Application
Posted by sharp NO[at]SPAM homerlex.mailshell.com at 2/17/2004 1:26:28 PM
I'm a newbie to C# and C++. I have a C# app using windows forms that call a native dll passes in the window's hwnd and the dll uses PostMessage to send messages to the C# app. This works great. The messages are received in the WndProc method. Now, the probelm is that I want to change the C#...more >>

Unable to shut down machine when a .net application is running
Posted by kuldeep at 2/17/2004 1:01:27 PM
Hi all, I have a application developed in C# .net. The problem I face is I am unable to shutdown my machine when the exe is running. Windows is unable to close this exe an shut down. Can anyone help. Regards, Kuldeep Pawar Programmer, Maximize Learning, Pune. www.maximizelearning.com ...more >>

A simple Telnet program and received packets...
Posted by Serdar C. at 2/17/2004 12:12:19 PM
hi there i just write a program works like a telnet client (with AsyncCallback).... everything works fine but i have a problem with packets received... i set the received packet size to 32768 ( byte[] incoming = new byte[32768] ) and then i tried to connect to a pop3 server... i logged in with...more >>

DataGrid Column
Posted by Tap at 2/17/2004 12:11:08 PM
How can I restrict the datagrid column to display only 40 characters per line, and wrap the rest. e.g. If the column string is 2000 characters, i would like to wrap it at 41st character. The column width should not increase more than 40 characters. Somehow its going out of the screen whenever I ha...more >>

A code structure question
Posted by Zoury at 2/17/2004 11:53:58 AM
Hi there! I'm Coming from a classic VB background. In VB *any* declaration in a given scope are made when the given scope is "entered". What about the following C# code snippet? //*** private void MyFunc(string s) { if (s.Length == 0) {return;} string s2 = "a string"; in...more >>

System.BadImageFormatException.. What is the problem?
Posted by Madhu Gopinathan at 2/17/2004 11:49:49 AM
Hi, I am facing a problem in .NET COM InterOp. I have a COM Dll which I = want to use from my CSharp code. So, I import the TLB directly from the = DLL using the tlbimp tool to a managed DLL. I add a reference to this = managed DLL in my CSharp solution. Now, when I try to create a new = in...more >>

Setting HelpNamespace property for HelpProvider
Posted by Dennis C. Drumm at 2/17/2004 11:38:59 AM
How do we set the HelpNamespace property of the HelpProvider class, so that when the application is deployed the path will be correct, since the path cannot be known for sure ahead of time? This is assuming the user installs to a different folder than is the default. Thanks, Dennis ...more >>

Strongly typed datasets and XML
Posted by Big D at 2/17/2004 11:23:01 AM
I am having trouble understanding strongly typed datasets and XML files. I have the following schema: <xs:schema id="Pages" targetNamespace="http://asdf.org/EOBEPages.xsd" elementFormDefault="qualified" xmlns="http://asdf.org" xmlns:mstns="http://asdf.org/EOBEPages.xsd" xmlns:xs="http://ww...more >>

Permissions
Posted by Sean McKaharay at 2/17/2004 10:43:24 AM
I am wondering if anyone can help me out with this one. Here goes....... I have my local machine (Windows XP framework 1.1) and a Server (Windows 2003 framework 1.1). When I go to run my code on my box and late bind to a dll on the server machine I get an error. Below is the lines of code and the...more >>

Calling a form function from a button click on a user defined control placed on the form
Posted by Scott Schade at 2/17/2004 10:35:37 AM
I have a form onto which I add a control during execution. The control is a control that I wrote. The control has a number of controls on it. I would like to click on a button on the control and execute a function on the form. Is this possible? Thanks, Scott ...more >>

What do lines like [COMImport] do?
Posted by SM at 2/17/2004 10:32:50 AM
I found a COM interop code sample and came across these lines of code: [ComImport] [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] [Guid("FC4801A3-2BA9-11CF-A229-00AA003D7352")] What do those type of lines encapsuled in [] brackets do? I already tried to find an answer using web sear...more >>

Bug in PathGradientBrush
Posted by Tony Reynolds at 2/17/2004 10:31:09 AM
Hi I'm fairly new to C# graphics, but I think I've found a bug in PathGradientBrush The following code *should* show a hollowed rectangle. In fact, there is an indentation on the left edge Can someone experienced comment Regard Tony Reynold code follows......... // Set up a GraphicsPat...more >>

interop
Posted by <.> at 2/17/2004 10:28:39 AM
Hi, I have a set of classes source in C++ and I want to use those from C#, can I just make these into a regular DLL and export these and DllImport these from C# with no problems? Is it that easy? ...more >>

Display Tooltip When Control Recieves Focus
Posted by Vinny Vin at 2/17/2004 10:26:09 AM
I would like to display a ToolTip (WinForms) when the Control associated recieves focus (when the control.enter event is triggered) as oppose to having the ToolTip displayed when the mouse hovers over the control,How can this be accomplished(Im developing in C#)?...more >>

Menu and Toolbars in MyAxDrawingDoc...
Posted by genc ymeri at 2/17/2004 10:20:23 AM
Hi, I dropped the activeX of MSVIsio2003 in a C#/VB.Net form. I set two of its properties "negotiatemenu"/"negotiatetoolbars" to true but no menu is shown up. Any idea ? Thank You very much in advance PS: FYI:I did the same thing in Delphi/VB and they did show up. ...more >>

How to prevent program losing focus?
Posted by Morten Wennevik at 2/17/2004 10:14:18 AM
I'm pretty sure this has been mentioned a few times, but so far I haven't found anything. I am trying to "lock" a program to always focus, non closable etc, but overriding OnDeactivate and calling Activate() only works 1 time, and never again. After the initial refocus it never seems to fir...more >>

handling external exceptions in ADO.NET
Posted by Wiktor Zychla at 2/17/2004 10:11:25 AM
Hello, my question is rather connected with some aspects of ADO.NET but I've been trying to ask on .dotnet.framework.adonet with no result. I hope someone here can help me. The problem is here: some stored procedures raise errors and return results in the same time. One of such sps is s...more >>

UDL Files
Posted by Philip Townsend at 2/17/2004 9:16:22 AM
Has anyone used UDL files with C#.net? I have not done this before and have always used the normal connection string, but have been asked to research this. Does anyone have an example? Are there any disadvantages to doing it this way? Does the UDL method still take advantage of connection poolin...more >>

copy files
Posted by Mike at 2/17/2004 9:12:11 AM
I want to be able to copy a directory of files (all .HTM files) from a network drive to a local drive on the machine c:\HTMFiles , How can i do that? I tried File.Copy(source, dest) but i need to put the file name in the dest section. I just want to copy the entire directory since I don't kno...more >>

isnumeric in c sharp
Posted by crowl NO[at]SPAM gmx.de at 2/17/2004 8:38:39 AM
I have a pocket pc project in c#. From a textbox i have to verify if the input is numeric. I have found in the msdn a sample like this: textbox1.numeric = true / false. But this do not work in my environment. If I convert the textbox content explicit to a numeric value, and is is not numer...more >>

IComparer Sorting based on 2 object vales
Posted by arulrajalivi NO[at]SPAM hotmail.com at 2/17/2004 8:38:04 AM
Hello, I have a custom collection object. each instance has FirstName and LastName. I want to sort this object collection by Last Name and First Name(ie if the last names are same I want to sub sort it by First Name). I know how to sort it by one value?(last Name) I am using the following ...more >>

Launch unmanaged EXE's
Posted by Bevo at 2/17/2004 6:16:10 AM
Can anyone help me with the code lines I have to implement to launch an unmanaged EXE-application Thanks ...more >>

Reading XML Document
Posted by Mike at 2/17/2004 5:11:11 AM
I have stored data in an xml document So I created one that looks like this <?xml verson="1.0"?><report><name>"Rpt1" /><width>"letterRotate"</width><Header>"10 lines"</header><report><report><name>"Rpt2" /><width>"letter"</width><Header>"8lines"</header><report><report><name>"Rpt3" /><width>"legal...more >>

import dll
Posted by Federico at 2/17/2004 5:05:49 AM
Hello, first of all i wonna beg pardon for my bad english, but its not my first language. Here is my question: How can i load in c# an external dll coded in c# or vb.net? I know that to load dll coded in c++ etc.. u must use, for example [DllImport("advapi32.dll", SetLastError=true)] ...more >>

Passing string to another program instance
Posted by jarod1701 NO[at]SPAM gmx.de at 2/17/2004 4:46:01 AM
Hi, I'm currently working on a program that is supposed to allow only one instance of itself. How can I transfer the data that is passed to a second instance as a parameter to the first instance. One part of my program's functionality is that it parses all links from a webpage. Well, a scrip...more >>

client/server socket problem
Posted by Paul Fi at 2/17/2004 4:30:52 AM
I have this client code: string server = "localhost"; int port = 8085; IPHostEntry hostent = Dns.Resolve(server); IPAddress hostadd = hostent.AddressList[0]; IPEndPoint EPhost = new IPEndPoint(hostadd, port); Socket soc = new Socke(AddressFamily.InterNetwork, SocketType.Stream,ProtocolT...more >>

Re: error CS1548: Cryptographic failure while signing assembly
Posted by Manuel J. Goyenechea at 2/17/2004 4:12:02 AM
Hello, Up to this date I have had no problems building and deploying C# ServicedComponents using Visual Studio 2003 .NET, but after removing a registered object that had been testing I am no longer able to sign my C# ServicedComponents. When I try to build the assembly I get the following err...more >>

Invoke?
Posted by C# Learner at 2/17/2004 3:56:45 AM
How can I "invoke" a method containing parameters? I've tried creating my own delegates and using them to do it, but can't get it working. Can't find any info on this anywhere. e.g.: public class MainForm : Form { private delegate void D(char c); private void Invoker() { D d = ne...more >>

how to restart a thread
Posted by Kranthis at 2/17/2004 3:54:13 AM
Hi, I want to restart a thread after same variable value in the thread reaches 100 in c# . How can I do. Please suggest me any solution...more >>

HttpException 0x80004005 invalid state problem!
Posted by billgay_hk NO[at]SPAM yahoo.com.hk at 2/17/2004 3:53:00 AM
I am doing a web application for pocket pc IE using C#. in the aspx page, when i press the button to run some code, it go to invalid state error. So i go to use the enableViewState=false. It go to other problem say what cannot find the reference when run cmd.ExcuteScalar().ToString() anyone ca...more >>

How to count 15 Minutes backwards with a Timer?
Posted by Robert Mayer at 2/17/2004 1:23:11 AM
Hello! I would like to count 15 Minutes (in this style: 15:00, 14:59, 14:58 ...) backwards with a Timer and want to show it on a Label. The Time is displayed correctly (15:00), but nothing happen. Did I forgot something?? int Minutes = 15; int Seconds = 0; private TimeSpan _tsCountD...more >>

List Control
Posted by Suud Orarry at 2/17/2004 1:12:02 AM
Hi All, I am trying to build a UI component. The component is a list control which has other controls in it. For example I have user control which consists of textboxes and buttons and I need to have a list control embedded with user controls in a simple list. Are there any examples of...more >>

Default view for .cs files; code completion for try...catch
Posted by dc NO[at]SPAM upsize.de at 2/17/2004 12:37:10 AM
Hi, this is somehow related to the fact that the main class in my .cs file inherits from another file: the VS .Net 2003 thinks it is best to open this file in designer mode then and also adds a .resx file to the .cs file. But I want this file to always open in code view. Any clue? I heared ...more >>


DevelopmentNow Blog