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 friday april 16

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

About mulit thread and async
Posted by Jet Leung at 4/16/2004 11:04:18 PM
Hi: How can I control the thread? For example run a function in 3 thread or run a program in more then 1 thread?? if the speed of the program will running faster when the program is run under multi thread ? Or what's the different between a program running under multi thread and a program runni...more >>

Visual C# Windows Form Background
Posted by David at 4/16/2004 10:56:42 PM
Hi, I want to scale an image in the background of a visual c# form. There isn't an option in the parameter list and I wondered if there is a straightforward way of doing it? Thanks ...more >>

Why the function need to run by the delegate?
Posted by Jet Leung at 4/16/2004 10:56:24 PM
Hi: I had asked how to use delegate in the programming. And now actually I want to know why and when the function need to run by the delegate? ...more >>

About msmq
Posted by Jet Leung at 4/16/2004 10:53:05 PM
Hi all How can I programming with msmq? What's the msmq use for? Please show some example code on the reply . Thank you. ...more >>

Always focused ToolBox...
Posted by pnp at 4/16/2004 10:37:06 PM
How can I make a Toolbox form always stay focused without making it a topmost form? ...more >>

Minimizing an app frees memory ?
Posted by cybertof at 4/16/2004 10:29:17 PM
Hello, I have a simple c# app. At first launch, It takes 30Mb once launched. If i minimize it, it only takes 1380 Kb If i maximize it back, it stays near to 2600 Kb, and never goes back to 30Mb. How do you explain this ? ...more >>

Programmatically assigning a value to a DataGridCell
Posted by Moshe Lupiansky via .NET 247 at 4/16/2004 10:28:55 PM
(Type your message here) 1 - How do I programmatically assign a value to a specified cell in a DataGrid? Something like DataGrid1(3,8) = "ABC" 2 - When I am going to the last row (the empty one)in order to insert a new record into the DB, I want the default values of the fields that do have defa...more >>

how to find current application path using c#
Posted by sathya moorthy via .NET 247 at 4/16/2004 8:53:23 PM
(Type your message here) hi. i am doing a small application project in c#. can any one help me how to find the directory of the current running program. how to create the input box in c# program. -------------------------------- From: sathya moorthy ----------------------- Posted by a use...more >>



Opacity removing transparent color.
Posted by Scatropolis at 4/16/2004 8:34:51 PM
I have a form that uses a transparent color. When I change the opacity of the form the transparent color becomes visible....I've tried redeclaring the transparent color and doing a couple other things but I can't get it to be invisible again. I don't remember having problems with this in the...more >>

grid heiracheal display
Posted by andrewcw at 4/16/2004 8:01:05 PM
I have a simple winform Data Grid with a XML source file. The heirarcy is 1 level deep. While I have expand selected, I still have to click on the hyperlinks to get the grid to show its data. What I would really like is to have it just plain come up as if I was getting the data from a databse ( not...more >>

COM
Posted by Dave at 4/16/2004 5:53:56 PM
Hi, I wrote an assembly in c# and i need to use it in my vc++ project so i build a tlb from it using regasm.exe and import it in my project i also put the dll under the directory of my exe file but it failes when i try to all the createinstance function why??? It work fine in my xp computer whe...more >>

Treeview issue
Posted by Anil at 4/16/2004 5:45:26 PM
I am working in C# .NET If I want to invoke LabelEdit event of TreeView/ListView(property set to true) from another event what should I do? I was advised to send a LVM_EDITLABEL / TVM_EDITLABEL message to the control. But how to get the integer number for LVM_EDITLABEL / TVM_EDITLEVEL ? Or ...more >>

why is the stack faster?
Posted by Sharon at 4/16/2004 4:52:11 PM
hi all. why value types which are stored in the stack, give better performance, than reference types which are stored in the heap? are not both stored in the ram? thanks. ...more >>

w32/sdbot.worm do not download or open
Posted by David H. Lipman at 4/16/2004 4:50:17 PM
w32/sdbot.worm do not download or open ...more >>

Detecting socket disconnection (Async?)
Posted by Adam Clauss at 4/16/2004 3:41:09 PM
There seems to be various methods to determine when the remote client disconnects, but all of them I have seen are Synchronous. AKA: Right before you try to send or receive data, check. Is there no way to do raise an event for this? That way you know as soon as the client disconnects? There ...more >>

Apparent bug in XmlSerializer or XmlTextWriter or something
Posted by Integer Software at 4/16/2004 3:31:16 PM
Hi. I have a really simple set of classes that writes 2 pathnames to a xml file. I can write the default ok. Then if I change 1 pathname to a shorter one, then rewrite the xml file, the remains of the old pathname, and closing tags are left on the end resulting in an invalid XML file. Xm...more >>

What is your favourite book?
Posted by Arda Han at 4/16/2004 3:04:31 PM
Hi friends, I am a Delphi Programmer I want change my technical skill with C#. What is your recommended book? I think Wrox Professional C# is good. Any idea? ...more >>

C# and DirectX
Posted by nsgi_2004 at 4/16/2004 3:03:25 PM
I want to use C# for 3D tool development to take advantage of its superior gui library. I have tried out some stuff in managed dx, but still I do not want to be writing the same code twice in different languages. (I.e., I don't want to write a particle system editor in C# and MDX, only to rewri...more >>

Waiting for an event
Posted by Jon Cosby at 4/16/2004 3:02:55 PM
I have a form that needs to take input from another form. Problem is I can't see any way to pause the sequence in the main form to wait for input from the second form. prompt = new AddressPrompt(); prompt.Show(); // Wait for click event in prompt if (prompt.okay) a...more >>

shared int reference?
Posted by Alex Leduc at 4/16/2004 3:02:13 PM
I'd like to know how one shares an int variable across different ocjects (of different classes) without pointers. public class ClassA { public int n; public ClassA(int N) { n = ??? n++; } } public class ClassB { public int n = 0; public ClassA = new ClassA(n); } If I inc...more >>

Callback Functions
Posted by db_from_mn at 4/16/2004 2:50:28 PM
I'm having a lot of difficulty getting even the simplest callback function (void return, no arguments) to work, from a dll to C#. When the callback is invoked from the dll, I get a fatal error, that shuts down the app. I suspect that the function pointer is passed incorrectly. I've studied ...more >>

Again - interfaces vs. inheritence
Posted by trnospam NO[at]SPAM earthlink.net at 4/16/2004 2:29:33 PM
The thread on 'why NOT to use interface?' has provoked a question - but I'll start a new thread.... Is there any performance difference that anyone is aware of between using interfaces for polymorphism instead of inheritance? I'm aware of the OOP design plusses and minuses of each approach, b...more >>

Naming Conventions dot net/csharp
Posted by Mark Broadbent at 4/16/2004 2:26:34 PM
stupid question time again to most of you experts but this is something that continually bothers me. I am trying to get into the habit of naming variables and controls in an assembly as per convensions. The thing is that Ive never really get the full reference to check against. Ive seen a coupl...more >>

Font.Parse
Posted by Scatropolis at 4/16/2004 2:05:39 PM
I think a Font.Parse would come in handy right about now. There is a ToString() meathod but is there some kind of parsing for that, or would I have to do it manually :(. Is there something else I can use to turn a Font into a string then back again? thanks...more >>

shift bit
Posted by Be Learning at 4/16/2004 2:04:49 PM
I need your help! I want to declare and shift left a buffer that bigger then any basic data type that C/C++ supports And I'm doing so: --------------------------------------------------------------------------- unsigned char arr[32]; for (int i=0; i<31; i++) { code = arr[i+1] &...more >>

urlstreamhandler
Posted by cs at 4/16/2004 1:50:21 PM
in java you can create your own url stream handler and make it handle any url you want (like myurl://someurl), is there such a thing on .net? ...more >>

CheckedListBox-- item checkmark status?
Posted by Dave Veeneman at 4/16/2004 1:38:37 PM
Is there a simple way to check the status of an item as checked or unchecked in a CheckedListBox? I need to cycle through a CheckedListBox and take one of two actions for each item, depending on whether the item is checked or unchecked. So the CheckedItems property doesn't really help me. I ex...more >>

Populating Datagrids??
Posted by Darryn Ross at 4/16/2004 1:33:05 PM
Hi, When i popualte my datagrid the columns are all squashed together and = not applying their set width.. my code is as follows.. first i do this.. DataGridTableStyle TSCA =3D new DataGridTableStyle() ; TSCA.MappingName =3D "tbl" ; DataGridColumnStyle TCCode =3D new DataGr...more >>

WaitForSingleObject Event Thrown from Sql Server
Posted by Bill Sonia at 4/16/2004 1:22:10 PM
Hello, I have a Widnows Service that creates a system event that I would like to have a Sql Server stored procedure fire when the stored procedure is called. I have a Windows Service that runs on my database server that will wait for this event before it will execute (via the Win32.CreateEve...more >>

ListBox question anyone can answer
Posted by Scatropolis at 4/16/2004 12:50:51 PM
Hi, I've looked but find what I'm looking for. I'm trying to resize a ListBox to the smallest size but still have all the items showing. kinda like a ContextMenu. I've looked and even tried figuring it out manually, but haven't had a success. Thanks...more >>

Binary Data in Data Grid :: C#
Posted by kuphryn at 4/16/2004 12:16:06 PM
Hello Given an array of binary data stored in an ArrayList container, do you associate the container as a datasource in a Data Grid control private ArrayList xList = new ArrayList() // Arbitrarily add 64 integers into containe for (int i = 0; i < 64; ++i this.xList.Add(i) // Assuming Data...more >>

Event Sink tutorial not quite working
Posted by Notlwonk at 4/16/2004 12:01:04 PM
Not sure where to post this Q I am trying to write a Managed Exchange Server Event Sink (as a class library) in C# I have been following this tutorial step-by-step http://www.codeproject.com/csharp/CsManagedEventSinksHooks.as So far so good....except when it comes down to binding the compone...more >>

TLS over TCP
Posted by news NO[at]SPAM mikendy.com at 4/16/2004 11:33:24 AM
I need badly establish TLS communication over TCP. How to do it? Thanks ME ...more >>

event handlers
Posted by frazer at 4/16/2004 11:27:19 AM
hi i am looking at a colleagues code and i fail to understand what these mean. public event DataListItemEventHandler ItemSelect { add { this.Events.AddHandler(EventItemSelect, value); } remove { this.Events.RemoveHandler(EventItemSelect, value); } } ...more >>

Get AD user password expire date?
Posted by Bryan Yeo at 4/16/2004 11:10:06 AM
Trying to get the user password expire date from AD, but there is no such field. What I could get is the PasswordLastChanged property. Is there anyway I could calculate the date or something? Regards, Bryan ...more >>

Any good reason for NOT using interface?
Posted by Marius Horak at 4/16/2004 11:02:35 AM
As in subject. Thanks MH ...more >>

C# sample code for attendace management system
Posted by navvyus NO[at]SPAM yahoo.com at 4/16/2004 10:56:09 AM
Hi Has anyone got some sample code in C# for a program that basically manages an employees atttendance i.e. the time employee came in and left and when he took breaks and lunch. Thanks...more >>

Object counter?
Posted by lyndon at 4/16/2004 10:33:20 AM
I've done a lil reading about the performance counter MMC snapin and how it operates. But I'm really interested in tracking the number of instances of particular objects so i can see what objects would be good canidates for pooling. Could anyone point me to a good resource (google didn't help)...more >>

How to make help files ?
Posted by user NO[at]SPAM domain.invalid at 4/16/2004 10:10:00 AM
Hello How can i make help files for program in C# in .net ? Thanx Michal ...more >>

scary (but good) .NET 2.0 feature
Posted by Michael Bray at 4/16/2004 10:01:02 AM
All, I was just reading over a new MSDN Magazine article by Juval Lowy on the new features in C# 2.0 (its a wonderful article, see link below.) In the section titled "Anonymous Method Example" he makes reference to an aspect of .NET 2.0 that may have a significant impact on many of your ...more >>

helpstrings
Posted by Kimmo Laine at 4/16/2004 9:55:26 AM
Hi, back in the COM days, i could write something like this, in IDL: [id(1), helpstring("My Foo function")] HRESULT Foo(); and later in (e.g.) VBs object browser, my description would apper when i see the details for Foo. How can i do that in C#? [Description("My Foo function")] pu...more >>

Problem with DataGridColumnStyle
Posted by lukaspersson NO[at]SPAM yahoo.se at 4/16/2004 9:54:29 AM
I want to use the EndEdit function, so I need a DataGridColumnStyle object. But I get a 'index out of range' exception when running the line bellow: DataGridColumnStyle dgc = dgShowStock.TableStyles[0].GridColumnStyles[0]; I don't understand what I'm doing wrong. I tried other values then 0...more >>

How do you play sounds in a .NET app?
Posted by Will Pittenger at 4/16/2004 9:53:09 AM
I have a C# application that I would like to notify the user of events with sound. Is there a way to playback at least the standard sounds? ---------- Will Pittenger E-Mail: mailto:will.pittenger@verizon.net All mail filtered by Qurb (www.qurb.com) ...more >>

Big Hashtable or big Assembly Resource File?
Posted by Dennis Myrén at 4/16/2004 9:18:11 AM
Hi. I would need an advice here please. I have to define a set of constant key/value pairs for my C# .NET DLL component. We are talking about at least 5000 pairs (where each key is a System.String and the corresponding value preferably is a System.Byte [0x4] ) These pairs will only have...more >>

OOP concept - derived classes -C# question
Posted by anonymous NO[at]SPAM discussions.microsoft.com at 4/16/2004 9:10:34 AM
Hi all I have a class Parent, and two child classes class Child1 and class Child2 derived from Parent class. In Parent class there is a method that will instantiate child classes based on the input parameters it received. I am able to instantiate my child class from the Parent class, b...more >>

Read and write incoming udp packets???
Posted by robert0 NO[at]SPAM aliceposta.it at 4/16/2004 9:09:34 AM
Hi,i'm trying to read udp packets sent by satellite. It's a porting of a delphi program i did some year ago but , as i'm learning c#, i'd like to do it. I have the ip address of the sat card(238.238.200.200), ip address an port where data are coming from( 139.139.139.139:9000). Using socket cla...more >>

Show a Hidden Form?
Posted by Susan at 4/16/2004 8:21:03 AM
I have an application. When a user minimizes it it hides itselfs but stays activate in the system tray. Since it is hidden the user may think that they have exited the application and now may attempt to create a new instance by launching the program again. The problem that I am running into is be...more >>

how can i load jpg from file
Posted by user NO[at]SPAM domain.invalid at 4/16/2004 8:02:22 AM
Hello I finally managed to save Bitmap that reprezented my pictureBox to jpg file, but now how can i load from that file to Bitmap again ? Bitmap does not have any Load or Open method (like Save...). Thanx Michal ...more >>

GetThumbnailImage
Posted by Andrew Banks at 4/16/2004 7:36:52 AM
Is it possible to use GetThumbnailImage with images being pulled from an SQL DB and if so how? All examples I've seen refer to working with an actual image stored on the server. My code for pulling the image from the DB is below if it makes a difference. Thanks in advance private void Pag...more >>

PInvoke, marshalling bool as int
Posted by TT (Tom Tempelaere) at 4/16/2004 5:51:04 AM
Hi I'm writing the interop functions for functions in a C dll. All these functions return INT (32 signed). However, the return value is to be interpreted as a bool (false=0, true!=0). Can I do the following without problems [DllImport("UsedLib.dll", EntryPoint="UsedFn") [return : MarshalA...more >>

PInvoke, marshalling pointer to array
Posted by TT (Tom Tempelaere) at 4/16/2004 5:51:03 AM
Hi people I am wrapping a C dll using PInvoke from C#. I need to wrap the following signature in C int dma_start( const UCHAR* data, UINT data_length ) The function should start with a DMA operation, and I have to use it from my C# program. I am really unsure what type of marshalling I shou...more >>

get property after obfuscation
Posted by bob_jeffcoat NO[at]SPAM hotmail.com at 4/16/2004 5:33:06 AM
Hi, I've got some forms with loads of controls for entering numbers. Each text box should behave in a similare way but i hated writing all the text processing code for every text box. So I made a function that took the object whose property was being set, the name of the property and the text...more >>

Library support to launch c# applications
Posted by ganga at 4/16/2004 4:11:03 AM
Hi, I am very new to C#. I have a c# application which is using lot of .NET namespaces . I want to run it on a machine which has Just OS installed on it say 2k.(No other libraries/tools) What all libraries do i need to bundle with my application to make sure my app works without any problems? ...more >>

Carriage return in Combobox
Posted by Abhi at 4/16/2004 3:01:04 AM
I have a simple Combo box on my Form, Data in it is Coming from database, Data is stored in database Through a form where i am using Textbox to enter data The Source data to combobox contains carriagereturn,linefeed ('\n\r') , Since the Combo box can not display carriage return it displays it as s...more >>

How to convert back a string that have converted to byte[]
Posted by FrzzMan at 4/16/2004 1:23:27 AM
How to convert back a string that have converted to byte[] using System.Text.Encoding.UTF8.GetBytes() string StringData = "This is a string"; byte[] ConvertedString = System.Text.Encoding.UTF8.GetBytes(StringData); Now, how can I convert ConvertedString to "This is a string" string again?...more >>

How to build DLL with .def file
Posted by FrzzMan at 4/16/2004 12:37:16 AM
Hello, How can I build the DLL with .def file? I've just build the DLL with following cl.exe options to build, it's worked. But I can't use the DLL in my C# project cause it need to be built with .def file. cl.exe -nologo -LD -W3 -O2 -GF mydll.c So, can you tell me how to build the libr...more >>


DevelopmentNow Blog