Groups | Blog | Home


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# > march 2005 > threads for friday march 18

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

Socket Exception 10054 (connection reset by peer)
Posted by Bernd at 3/18/2005 10:05:20 PM
Hello, i have a problem with my network code. What i want to do is, send an UDP-packet and check if i get an icmp-reply type 3 (dest. unreachable). the code looks like that so far: .. .. <snip> this.Sock = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp); ...more >>


How to use functions in VB.NET'S module
Posted by ad at 3/18/2005 8:09:01 PM
I had a module of VB.NET. Now I want to use some of the functions in the module when I develop a c# project. How can I do that? ...more >>

Customize the StartProc for thread
Posted by Zeng at 3/18/2005 7:11:55 PM
Hello, Is there a way to pass something to the StartProc below for each new thread that I create? Something like 'code' below. Thanks for any comment or advice! static void StartProc( int code ) { if( code > 0 ) { // do something } } Thread t = new Thread(...more >>

Can I convert the Solution?
Posted by JM at 3/18/2005 6:07:02 PM
Hi I created a small app in Visual C# Express Beta 1. I now want to port it back to Visual C# 2003. Is that possible? I'm have a heck of a time!...more >>

Protecting Code
Posted by Typpo at 3/18/2005 5:49:12 PM
Hi all, Because the programs I work on are intended to be limited to only certain users, I have had several problems concerning people hex'ing out authentication procedures and replacing strings such as the form title with whatever they want. I'm aware that there are many obfuscation and...more >>

iterating through a column on a datagrid
Posted by Dave Bailey via DotNetMonster.com at 3/18/2005 5:34:14 PM
I need to access the information in only one column of a datagrid. The column is column[3]. When iterating through the grid I want to find all instances where the entry is "" and change it to read "N". If the entry !+ "" then I want the entry to read "Y". Any ideas on how I can accomplish th...more >>

batch printing pdf files
Posted by David Cho at 3/18/2005 5:26:27 PM
I loop through the code that looks like this to batch a set of pdf files. Process command = new Process(); command.StartInfo.FileName = "AcroRd32.exe"; command.StartInfo.Arguments = "/p /h " + pdfFileName; command.StartInfo.RedirectStandardOutput = true; command.StartInfo....more >>

can C# methods call Java/J2EE session beans?
Posted by Flip at 3/18/2005 4:08:48 PM
Is there a way for C# methods (either in a WinForm or from ASPX) to call a j2ee session bean on another server? If so, are there any web references out there? Thanks. ...more >>



CBT Hook
Posted by Arnold at 3/18/2005 4:08:40 PM
Hi, I want to make a Global CBT Hook, but the CallBack Method is never raised. SetWindowsHookEx return me a Handle to the Hook, but when i try to uninstall the hook the UnhookWindowsHookEx generate an error (1404: Invalid hook handle.). A part of code is this: Install Hook: .... CBTCallBack =...more >>

try/catch/finally
Posted by Alexander Mueller at 3/18/2005 3:24:53 PM
I have always wondered what finally is actually for. What would be the exact difference between try { somecode1(); } catch(Exception) { somecode2(); } finally { somecode3(); } somecode4(); ..... and .... try { ...more >>

What is the C# equivelant of the function InStr in VB?
Posted by ad at 3/18/2005 2:53:09 PM
There are InStr in VB What is the C# equivelant of the function InStr in VB? ---------------------------------------------------------------------------- ------------------ SearchString ="XXpXXpXXPXXP" ' String to search in. SearchChar = "P" ' Search for "P". ' Comparison is binary ...more >>

Extract Strings
Posted by Steven at 3/18/2005 2:47:43 PM
Following is the string ... <ADDRESSINFO name = "Cedar Ave" no = "21123" attrib ="visible"> <HOUSE name ="main" type ="1" value ="2200"/> <HOUSE name ="slide" type ="12" value ="123"/> <HOUSE name ="major" type ="1" value ="1234"/> <HOUSE name ="branch" type ="1" value ="31980"/> </A...more >>

Class declarations
Posted by web1110 at 3/18/2005 2:17:41 PM
Is this legit? I thought that class members could not be allocated in the class declaration. I thought this had to go into the constructor. If this is OK, what are the associated rules? class WhatEver { private object[] thePair=new object[2]; [STAThread] static void Main(strin...more >>

Share DLL Across Machines
Posted by Chris Fink at 3/18/2005 1:52:00 PM
I have a c# library dll that I want to use from MULTIPLE machines. How do you do this? For example, library.dll is installed in GAC on box1. Now I want box2 to use it also. How does the application on box2 reference the library.dll on box1? What is .Net's replacment for DCOM? Is .Net ...more >>

Passing buffer to unmanaged dll.
Posted by Claire at 3/18/2005 1:43:21 PM
After giving up on passing nested structs to an unmanaged DLL, I planned that I'd pass a simple buffer of bytes (the same size as the struct) to the dll, convert to a memory stream and read in the fields from that. I've 2 possible DLls to use, one is emulated and the other one is the "real" ...more >>

newbie: string reference
Posted by sklett at 3/18/2005 1:32:50 PM
I know there aren't pointers in C#, well, there are but... you know... I have a situation there I need to have a reference to string a and then later, string b. I hoped I could do something like; <code> string a; string b; string ref refStr = a; // some code, then the switch refStr =...more >>

treeview keypress
Posted by Hrvoje Voda at 3/18/2005 12:43:36 PM
I can't get to work treeview keypress event. I press Enter and nothing happens. This is a code: private void treeKeyPress(object sender, KeyPressEventArgs e) { if (e.KeyChar == (char)13) { ConnString = "workstation id=HRVOJE;packet size=4096;integrated secur...more >>

mdi form restricted within the parent form space
Posted by Craig at 3/18/2005 12:41:07 PM
Is it possible to restrict where an mdi form can go within the parent form....for example, what if I wanted the parent form to have a panel with a listbox on the left hand side of the form......would it be possible to somehow code it so that any mdi forms would not be allowed to be dragged ove...more >>

OraOps9.dll not found
Posted by Chris Fink at 3/18/2005 12:40:47 PM
I have written a library class which makes calls to an Oracle 8i database. I am using the ODP.NET data provider which is in turn making calls to the \oracleclientdirectory\bin\Oracle.DataAccess.dll which was added as a reference to my library class. Everything in this class works fine. Now...more >>

Need numericUpDown to contain Int
Posted by Dave at 3/18/2005 12:21:04 PM
I need a numericUpDown control to contain a Int variable. Is there a way to do this?...more >>

how to open rtf file in ie
Posted by Hajash at 3/18/2005 12:11:55 PM
Hi all, I am creating a application using WebBrowser.It opens almost all the files ..I am not able to open rtf files alone.Can anybody there Please help me on this.Thanks in advance. Regards, hajash ...more >>

Installer version number
Posted by Kristof Thys at 3/18/2005 12:11:43 PM
Hello, I'm adding an installer to my C# application in Visual Studio .Net, wich works just fine. Although there are some things wich I can't get done... - I want to auto-increment the version number of the installer everytime I build a new release... Is this possible? - I want to show ...more >>

BeginInvoke call another function
Posted by LP at 3/18/2005 12:11:24 PM
Hi, I have a method that's called from another thread through a delegate. It's checking if (InvokeRequired){} and does BeginInvoke() if true. So it will be executed on the same UI thread. here's the code in question: private void wrkP_OnProcessCompleted(WorkerProcessBalanceEventArgs e) { ...more >>

Color Scheme
Posted by mha at 3/18/2005 12:07:57 PM
Hi :-) From the Display Properties->Appearance dialog, it is possible to select a color scheme from a drop down list and change the visual style of XP. Is it possible to select/change color schemes with help from C# or dotnet sdk? regards - Morten - ...more >>

Q: enum
Posted by Geoff Jones at 3/18/2005 11:47:44 AM
Hiya I've just started experimenting with C# and have a problem with enum. I have created an enumeration as follows: enum Boxes {small, large}; I've placed this just after the namespace qualifier of the Box class (see below) I have a class, called for example Box, to which I want to ...more >>

Visual Source Safe woes
Posted by Frank Rizzo at 3/18/2005 11:45:46 AM
I am quite new to VSS and I can't figure out how to check in all files that I've checked out in various directories in one shot. Is there a command like that? Because now I have to go and hunt various directories for all the files, I've checked out. Thanks....more >>

What is session's namespace
Posted by ad at 3/18/2005 11:43:05 AM
I want to manage session in a class's property like: public class HealthSession { private int SelClassID, SelGradeID; public int ClassID_Sel { get {return Session["ClassID_Sel"];} set {Session["ClassID_Sel"]=value;} } But the it cannot find the namespace of Se...more >>

Delegates
Posted by web1110 at 3/18/2005 11:33:45 AM
Hi, Can someone provide me with an explanation of how delegates work. I know how to use them by rote - meaning I look at code I have employing delegates and reproduce it. My problem is that there is something about the process I don't perceive. I think that somehow I've misinterpreted the w...more >>

Can we define a static class
Posted by ad at 3/18/2005 10:46:07 AM
We can define a static member in a class. But can we define a static class, so that all members are static? ...more >>

How to write fun. for form Minimize event?
Posted by cyshao at 3/18/2005 10:42:55 AM
Excuse me. How to write function for form Minimize button clicked? Thanks CYShao:-) ...more >>

Need some fast code for some string array logic
Posted by David P. Donahue at 3/18/2005 10:36:55 AM
I'm trying to come up with the best (fastest, as this code will be run often) way to accomplish the following: I have a dynamic string array X (as one grabbed from a GetFiles() or GetDirectories() function call), which could have anywhere from 0 to maybe 250 elements in it. I also have a s...more >>

Small problem with my code
Posted by Steven at 3/18/2005 10:26:16 AM
Please look at this code .. this will add the values of all 'checked' boxes (check box list control) into an array .. the problem is its adding the values twice. for eg: If I selected 2, 3 on the page the array is getting values .. 2,2,3,3. It should be getting 2,3. What is the error? fore...more >>

Start a process
Posted by GTi at 3/18/2005 10:24:25 AM
I have small program that always must be running when a user is logged on. Since users can close this program I must create a program that always check if this program is running. So I created a program in C# (my first!!) and it works with one major problem. This program detects when the des...more >>

Can static varible cross session
Posted by ad at 3/18/2005 10:12:45 AM
I define a static variable, like myClass.aString. If one user in a session update the value of myClass.aString. Can the other users in other sessions can see this change? ...more >>

Crystal report export problem
Posted by Holly at 3/18/2005 10:09:02 AM
I have a web page in C# that export the crystal report to pdf files. I can export the pdf files on my local driver but if I change the file path to a remote server, the program doesn't give any error just no file created. I could first save the file to my local disk then using FileInfo clas...more >>

How can I use Ms Enterprise Configuration Application Block modify app.conifg
Posted by qushui at 3/18/2005 9:53:24 AM
Now I was writing a windows form program which need be modified its config file by program. How can I do? Did anyone catch this problem. Thank you. -- ************** ÂäϼÓë¹ÂðÍÆë·É ÇïË®¹²³¤Ììһɫ ************** ...more >>

ADO.NET performance at deleting records
Posted by Abra at 3/18/2005 9:46:28 AM
My C# application has a list (ListBox object), connected over a DataView to a dataset which corresponds to a table from a MySql database. I want to delete for example 4000-5000 rows from the table, which correspond to a certain filter. If I iterate the Rows from the table and check for each one...more >>

Error using structs in calling unmanaged dll
Posted by Claire at 3/18/2005 9:21:44 AM
I don't understand the following error I'm getting when I call the DoOpen function of my unmanaged dll. Can someone explain please [DllImport(DllName, CharSet=charset)] public static extern int DoOpen(ref sRDetails RDetails); "An unhandled exception of type 'System.TypeLoadException' occurr...more >>

Register users
Posted by Josema at 3/18/2005 9:01:08 AM
Hi, I have an web application to register users with username, password, email, etc... I the database i have a field with name: "activate" that its a bit field, 1 account activated, 0 account not activated... My application works well, when a user wants to registers complete the form, ...more >>

EventHandler
Posted by Rogerio Jun at 3/18/2005 8:51:04 AM
How I make this ? Item.Click += new EventHandler(methodname); methodname is a parameter. Rogerio ...more >>

tricky event question.
Posted by melinda at 3/18/2005 8:45:31 AM
If I have 2 classes ("A" and "B") that inherit from the same base class, and both override an event handler method HandleMyEvent(..), class "A" has a hashtable of one or more class "B"'s. When the event is getting thrown, class "A"'s overriden method HandleMyEvent(...) is catching it just ...more >>

question about query datatable
Posted by chrisben at 3/18/2005 8:29:05 AM
Hi, I would like to query a datatable in C#. The query is like select sum(quantity) from table where company="IBM" And I would get this number and display it in my GUI. Is there a way to do it? Thanks Chrisben...more >>

400 usercontrols to display take too much time - any solution?
Posted by picander77 NO[at]SPAM yahoo.de at 3/18/2005 8:06:43 AM
hello, I am developing a boardgame, with a large number of customed usercontrols ( e.g. 20 X 20 = 400 ). I find it very usefull to use usercontrols, as they can contains specific properties and methods, but it makes the application very slow to redraw, even if I redraw only a small subset of ...more >>

Newbie to ASP.Net
Posted by bernardpace NO[at]SPAM yahoo.com at 3/18/2005 8:06:14 AM
Hi, I am using ASP.Net for the first time. How foward user to another web page on a certain event? Thanks in Advance...more >>

C# Interop
Posted by Al Pennyworth at 3/18/2005 6:53:32 AM
I created a dll in .NET using C# and I need to call this dll from a Visual C++ 6.0 application. I am programmatically calling the regasm.exe as I am getting the installroot registry key, finding the folder, get the exe, then doing a CreateProcess and it seems to function correctly. My problem ...more >>

new to debug... howto save debug to file
Posted by Hans [DiaGraphIT] at 3/18/2005 5:39:09 AM
Hi! When developing a windows application I sometimes recieve a popup wnidow with an exception message. (telling me somthing about JIT... with following error message) When this exceptions occurs I whish that the applications should save it to a file, as a log. How do I do that, or wh...more >>

Interface to Exchange SMTP Server?
Posted by Comconix at 3/18/2005 5:05:04 AM
I have some ideas that I would like to try in eliminating DoS, unwanted SMTP connections/sessions, etc. to my Exchange server. To do this I need to write code that examines each SMTP attempt to connect (HELO) message and determine whether I would like to allow them to connect or not and then ...more >>

Loading a byte array into a word document
Posted by pdmann NO[at]SPAM gmail.com at 3/18/2005 4:54:07 AM
Hi, Is there anyway to programmatically load a byte array into a word document in c#? We have an application that streams a byte array of a previously saved word document into a c# client. I can file the stream away to the local disk, then open with document.open, but there is a system req...more >>

Unit Test Code Generation Tool in .NET
Posted by Shan at 3/18/2005 4:49:12 AM
Is there any tool available for generating unit test code in .NET. This is reverse engineering process, which we have to unit test methods in a class. Tool such as Nunit can test the methods only if we have unit test classes. Is there any tool available which can assist in developing these uni...more >>

Unicode
Posted by geoffblanduk_nospam NO[at]SPAM yahoo.co.uk at 3/18/2005 4:40:25 AM
If I call "=80".getBytes() in Java I get 0x80. If I call myUTF8Encoding.GetBytes("=80") in C# I get 0xe2, 0x82, 0xac. In case you can't read it the chararacter in double quotes is a Euro symbol. I need to pass strings to Java via JNI so I need to have the same Unicode bytes. I know this ...more >>

write BatteryLifePercent into a string and send it
Posted by sacchi.alessandro NO[at]SPAM gmail.com at 3/18/2005 3:18:54 AM
Hi everyone... I'm a beginner in C#, I'm trying to: -> check the BatteryLifePercent, and put the value into a string; ->check the ACLineStatus to know if the device is connected to external power, ->if yes add this info into the string; ->send the string via UDP to a server. i wrote ...more >>

Array 2d into datatable
Posted by Josema at 3/18/2005 2:49:02 AM
Hi, How could i pass an array2d into a datatable?. Has Datatable class a direct method to do that? I try to use LoadRow method for each row in the array2d but doesnt work. -- Thanks Regards. Josema...more >>

Adding to Array
Posted by jez123456 at 3/18/2005 2:03:01 AM
Hi I have the following method that I'm having trouble with. The method should check that the files exist. If it does, then dynamically create a checkbox for that file. Not sure if the second array databasesActual is required which is where I'm geeting mixed up. private void AddCheckBoxes(s...more >>

input focus
Posted by Mészáros_Tamás at 3/18/2005 2:00:44 AM
Hi all, how can i get the active control (which has the input focus) in an other application? I have the handle of the active window, but I can't reach the active control. Any idea? Thanks, Tamas Meszaros...more >>

Basic XML file creation / editing
Posted by Sam Collett at 3/18/2005 1:53:29 AM
Is there a basic guide on Xml document creation and editing (simpler than the MSDN docs). Say I want to create a file containing the following: <?xml version="1.0" encoding="utf-8" standalone="yes"?> <Files> <File> <Text>Test</Text> <Name>Test.html</N...more >>

Game development for XDA (Pocket PC with Windows Mobile)
Posted by DaRueSchni at 3/18/2005 12:55:02 AM
Hello, I am a student who needs to develop a game for an XDA. I´d like to create one where you need to walk through some floors and enter different rooms. (walk through floors maybe like 1st Person shooter). I have Visual Szudio .Net Professional and I would like a tool which can draw these...more >>

Windows authentication with impersonation - network resource access fails
Posted by srivalli chavali via DotNetMonster.com at 3/18/2005 12:27:25 AM
Hi, I have a question regd. Windows authentication and network file access. My asp.net application doesn't use any of the .NET's authentication schemes (Forms, Windows or Passport) yet. I have a login page where the users would supply their credentials and the business logic compares these ...more >>

send copy message
Posted by Mészáros_Tamás at 3/18/2005 12:27:09 AM
Hi, How can I "steal" selection from an application? e.g. I select some text in the browser and I would like to see this text from my application. Can I send for example CTRL-C (Clipboard-Copy) message to other app-s? How? Thanks in advance! Tamas Meszaros...more >>


DevelopmentNow Blog