all groups > c# > february 2006 > threads for wednesday february 8
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
Static method use
Posted by Biren Prajapati at 2/8/2006 11:11:11 PM
Hi All,
Is it advisable to make the method static if it is widely used in the
system? Will it increase the performance or decrease the performance?
Thanks,
Biren
... more >>
windows service questions
Posted by ZQ at 2/8/2006 11:10:42 PM
Hi all!
I have few questions regarding .net windows services
1. are onStart, onStop and other "system" events invoked in separate threads
than msmq events?
2. if so, is there a way for the onStop event to wait with stopping the
service until pending msmq events are finished?
3. if not, d... more >>
waiting on function
Posted by sam at 2/8/2006 11:10:08 PM
I have a timer that sends data out a serialport frequently. The call
to Send() on the serial port takes a while, and is making UI slow, and
even making the mouse jump. I've tried some various Threading
scenarios, but even when I call Send on a new thread it ties up the UI.
Thanks for any hel... more >>
Reading data from a file
Posted by Roob at 2/8/2006 10:17:39 PM
I am learning C# and was wandering if there is a straightforward way to read
a binary file created by C++. For example, I have a data structure as
follows:
typedef struct _data
time_t date;
int seq;
char name[20];
short bday;
BOOL bIsWorking;
};
My first question... more >>
iTunes events do not fire
Posted by Cursief at 2/8/2006 9:59:34 PM
Hello,
I've been playing around a little bit with the iTunes SDK. Doing the
following:
iTunesApp app = new iTunesAppClass();
app.OnPlayerPlayEvent += new
_IiTunesEvents_OnPlayerPlayEventEventHandler(app_OnPlayerPlayEvent);
private void app_OnPlayerPlayEvent(object iTrack)
{
... more >>
Changing field in object?
Posted by Brett Romero at 2/8/2006 9:46:03 PM
I'd like to copy a object1 into object2 so object2 can be manipulated.
Object1 is coming form the middle layer into the UI layer. I'd like
to rename a field in Object2 from "somethingID" to just "ID" and do
this several times for a few middle layer objects. This will allow me
to create generi... more >>
Application Block Usage
Posted by Jeff S at 2/8/2006 9:42:01 PM
Regarding the Application Blocks provided by Microsoft; are any of you using
them in production systems?
If no, why?
If yes, what has been your experience?... would you recommend for or against
their use?
Here's the Application Blocks I'm referring to:
http://msdn.microsoft.com/practic... more >>
Disconnected vs .. um .. connected?
Posted by Steven Nagy at 2/8/2006 9:25:38 PM
I know that .NET is based on a disconnected architecture, but I can't
conceive of why continually opening and closing a connection would be
faster than leaving a connection open.
So I ran a test and came up with a result of exactly the same times!
50 rows selected into a datareader, in a loop ... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
CollectionBase
Posted by wg at 2/8/2006 9:05:25 PM
I am attempting to create a collection where store and modify multiple
entries (i.e. Key, FirstName, LastName, Address, City, Phone, etc). I have
attempted to use the CollectionBase but have not been able to add more that
2 objects. Can anyone tell me how to do this or the best way.
Thanks... more >>
OT: Dev Box Configuration
Posted by Smithers at 2/8/2006 7:09:46 PM
I have a development PC that has been working great for several years for
SQL Server 2000 and .NET 1.1 development. It has a PIV 2.4G processor, 512
RAM, 7200/8MB cache RPM IDE hard drive.
I have seen people in the various NGs claim that one *must* have a
significantly faster box with gobs ... more >>
How to relate product to category object
Posted by J-T at 2/8/2006 6:44:34 PM
Hello All,
I have two objects one is Product and the otherone is the Category. Category
object is like Food,books,Medicine and etc which has different tax rates .
My product object has properties like name ,price , CategoryID. I need to
create a collection of my products and in this colle... more >>
Monitor a socket port
Posted by John J. Hughes II at 2/8/2006 6:38:44 PM
Is there a way to monitor the amount of data that is sent/received over one
port on a socket? I don't care about the data just the number of bytes.
Regards,
John
... more >>
setup creation
Posted by Ankit Aneja at 2/8/2006 5:49:24 PM
Hi I have made a windows service in C#.Net
Now I want to create a setup of this service
http://www.codeproject.com/dotnet/simplewindowsservice.asp
I read this article
Now my service is also using com dll
I also want that dll to be registered on server(or computer) on which that
service will b... more >>
Best/fastest way to abort worker thread
Posted by Soren S. Jorgensen at 2/8/2006 4:47:34 PM
Hi,
In my app I've got a worker thread (background) doing some calculations
based upon user input. A new worker thread might be invoked before the
previous worker thread has ended, and I wan't only one worker thread running
at any time (if a new worker thread start has been requested, any r... more >>
Finalizer Queue
Posted by ajbecker NO[at]SPAM gmail.com at 2/8/2006 4:10:04 PM
I'm trying to debug a problem I'm having where my finalizer queue is
getting filled up faster than the thread can execute them, (or at least
I think that's what's going on.) Is there a way that I can see how
large the queue is or, even better, what objects are in the queue to be
finalized?
... more >>
without extension
Posted by Hrvoje Voda at 2/8/2006 3:29:25 PM
How to get a file name without extension?
Hrcko
... more >>
between operator??
Posted by mgonzales3 at 2/8/2006 2:46:34 PM
I have a variable: int nbr= 5.
I need to test if the nbr is <=10, between 11 and 15, between 16 and 20 or
greater than 20.
How can I do this?
thanks.
... more >>
Communication between threads
Posted by alen.petrol NO[at]SPAM gmail.com at 2/8/2006 2:38:02 PM
Hi all
i got an asignment where is should simulate 1000 clients connecting to
a server via TCP, and each client has it's own sequence of data
exchanged so i have to have 1000 threads, so my bigest problem is how
can these threads communicate with each other something like this
Thread1 reg... more >>
Poor array performance
Posted by John Mark Howell at 2/8/2006 2:35:31 PM
I had a customer call about some C# code they had put together that was
handling some large arrays. The performance was rather poor. The C# code
runs in about 22 seconds and the equivalent C++.Net code runs in 0.3
seconds. Can someone help me understand why the C# code performance is so
poor... more >>
Save function
Posted by AxOn at 2/8/2006 2:26:11 PM
How can I save the text from a rich text box that is generated as a new
rich text box in a tab control? I want to be able to have several rich
text boxes open, and save the one that is under the selected tab.
Thanks!
... more >>
BinaryWriter/Reader big endian
Posted by Karl Seguin [MVP] at 2/8/2006 2:05:13 PM
The BinaryWriter/Reader's are little-endian only. Was hoping they were going
to be made more flexible in 2.0, but that doesn't appear to be the case.
Anyone already done all the work of implementing this? :)
Karl
--
http://www.openmymind.net/
... more >>
How to find the namespace a class belongs to?
Posted by Doru Roman at 2/8/2006 1:57:55 PM
Hi,
I try to use Process to open a Word document from my application.
The problem is I don't know what namespace to use in the Using statement so
that :
Process myProcess = new Process();
is recognized.
If I use Help it is useless, it doesn't tell me anything at all about it.
Thanks,
... more >>
Adding image to project
Posted by VMI at 2/8/2006 1:29:11 PM
How can I add an image so that it's embedded into the project? I only want
the image to be accesible through the project (not an external file). How
would I add it to Resources? Would I be able to access it with
Properties.Reources.myFileName ?
I have .Net 2005.
Thanks.
... more >>
Passing string from C++ code to C#
Posted by muntyanu NO[at]SPAM hotmail.com at 2/8/2006 12:58:15 PM
Hi all,
I am passing string from C++ to C# but not sure which way is more
correct. Here it is:
First approach:
CDAnetCSharpHooks::PassString( )
{
char str[] = "String to pass";
DotNetObject *obj = new DotNetObject();
obj->UseStringInDotNet( str );
}
Second approach:
CDAnetCSh... more >>
how to use my class from another class (.Net 2005)
Posted by Serdge Kooleman at 2/8/2006 12:44:22 PM
hi
how to use my class from another class (.Net 2005)
i have web project (one page)
and created a class MyClass in separate file, the same folder, included in
project.
when i'm call MyClass in that web page... it dosn't see it.
thank you
... more >>
Monitor.Enter/Exit Question
Posted by Rudi at 2/8/2006 12:01:29 PM
Hi
I've got a CollectData() method which is called by Timer periodically.
CollectData calls Add(input) - the problem is the code after Add(input) in
CollectData() is never executed. It's as if the monitor is never closed.
CollectData() never executes further then Add(input), except I remo... more >>
static functions variables
Posted by Pohihihi at 2/8/2006 11:59:23 AM
What could be the possible reasons (technical/non technical) of not =
using lots of static functions or variables in a program keeping in mind =
that Framework by itself has tons of static functions and variables?... more >>
Correct way of storing a date?
Posted by Tarun Mistry at 2/8/2006 11:52:54 AM
Hi, i am trying to store a users date of birth, within my application i will
store it as a datetime object, however what is the best way to store it in
the database (SQL SERVER)?
Thanks for any help!
Regards
Taz
... more >>
Process.Start with Username hangs
Posted by Kirk at 2/8/2006 11:20:15 AM
The following C# web service works fine until you uncomment the lines
setting UserName and Password. Then the process starts as the
specified user, but hangs in a suspended state. In fact, any
executable will exhibit this problem; it is not specific to whoami.exe.
This is with .NET 2.0, of co... more >>
Update local C# exe file
Posted by Mike L at 2/8/2006 11:18:28 AM
How do I push out a new version of my C# exe file to all the client
computers? The client computers are in my local area network, and I have
administrator rights. Currently I walk over to each computer and copy the
exe file off the fileserver and copy the exe to the client's local hard
driv... more >>
warning CS0168: The variable 'el' is declared but never used?
Posted by kellyatdentrix NO[at]SPAM gmail.com at 2/8/2006 11:16:02 AM
Suppose that I just want to count the elements in a collection, so I do
this:
int i = 0;
foreach (MyElement el in MyCollection)
{
i++;
}
return i;
Is there any way in the 2003 compiler to avoid the warning:
warning CS0168: The variable 'el' is declared but never used?
I don't want... more >>
variable value change breakpoint
Posted by Maxwell2006 at 2/8/2006 11:11:47 AM
Hi,
Can I have a breakpoint that stop execution as soon as any code change the
value of a specific variable?
Thank you,
Max
... more >>
warning CS0168: The variable 'el' is declared but never used?
Posted by kellyatdentrix NO[at]SPAM gmail.com at 2/8/2006 10:54:03 AM
Suppose that I just want to count the elements in a collection, so I do
this:
int i = 0;
foreach (MyElement el in MyCollection)
{
i++;
}
return i;
Is there any way in the 2003 compiler to avoid the warning:
warning CS0168: The variable 'el' is declared but never used?
I don't want... more >>
Unsafe pointers
Posted by Abra at 2/8/2006 10:53:04 AM
Hi,
I try to compile the following code (Visual Studio .NET 2005) :
....
somedata = new Byte[1024];
unsafe
{
fixed ( byte *pData = somedata)
{
MY_STRUCT1* ptr = (MY_STRUCT1*)pData;
}
...
, but I get the following error mesasge from compiler :
Error 38 Canno... more >>
Socket.Listen() maximum
Posted by John J. Hughes II at 2/8/2006 9:41:55 AM
What is the maximum value for "backlog" when running on Windows 2003 server?
It is my impression this value is based on the OS so Windows XP Pro has a
maximum value of 10.
Based on the document requesting the maximum number of connection from
socket options will throw an exception.
Regar... more >>
Visual Studio 2003 Post Build event multi-line format issues
Posted by michael.lang NO[at]SPAM xquisoft.com at 2/8/2006 9:27:49 AM
I am using PostBuild events in a C# project to run some tasks, but only
when in release configuration mode. The build events run perfectly as
expected when run. The problem comes when I save the project, close
VS, and reopen VS and the project.
When I build again, i get a post-build event er... more >>
How do you create a Access Database for a setup project
Posted by Paul at 2/8/2006 9:21:27 AM
Hi, I am developing a c# windows .NET application. The application is going
to run on a standalone PC and use an access database. I have figured out that
I will need to create a project and add it to the custom actions of the my
setup project to create the database.
How do I create the data... more >>
Closing Web Application Window
Posted by accyboy1981 at 2/8/2006 9:11:43 AM
Hi,
I'm currently creating a web application in C#. I looking to close the
window when a certain procedure is run (i.e. close Internet Explorer
that the webpage is in). I'm having difficulty finding the code to do
this. Any help would be appreciated.
Thanks
Simon
... more >>
Two Masters, one detail
Posted by McFloyd at 2/8/2006 9:09:26 AM
Hi there,
I have a question that it's kind of tricky. First, my scenario is that I
have a master table that contains program names. Then there's this details
table that contains when these programs execute. The detail table contains
the program ID and the schedule ID when the program execut... more >>
C++ to C#
Posted by Joe at 2/8/2006 8:36:45 AM
I am currently looking at C# to learn, and I was wondering how easy is
it to learn. I have several years of C++ experience and I figured that
it would be good to learn a new language. Is there any similarities
between the two? How closely are the two?... more >>
Exception ReleaseCOMObject
Posted by Christian Havel at 2/8/2006 7:51:30 AM
Hi,
we are using a framework (which is based on the Microsoft Enterprise
Library) and retrieve a ReleaseCOMObject Exception.
When I try to debug I can find out any information about the COM object.
How can I find out which COM object is responsible for the exception?
Thanks
Christian... more >>
Efficiently convert Base 1 Array to Base 0 Array?
Posted by AtariPete at 2/8/2006 7:44:53 AM
Hi all,
My scenario is as follows:
* Receive a base 1 array (index starts at 1 instead of 0) of data from
a COM component .
* Need to pass this array to a .net component that requires its array
index to start at 0.
* As a result, must convert array from base1 to base 0.
Currently my sol... more >>
installing C# fails saying application already requesting reboot
Posted by Aaron at 2/8/2006 7:39:26 AM
Not sure if this is the best spot to post this question, but I am not going
to pay money to ask an installation question.... Anyways
I am trying to install C# standard 2003 and it analyzes the system and then
say I need to install some prerequisite stuff. So I click on the link that
says th... more >>
diasble keyboard
Posted by Pete at 2/8/2006 7:15:27 AM
I would like to disable the keyboard temporarily but completely while a
routine runs
In particular Ctrl - escape needs to be disabled
What is the easiest way of doing this
Thanks
Pete... more >>
GridView1.Rows[r].Cells[i].Text problem
Posted by Steven Blair at 2/8/2006 6:03:30 AM
Using the code:
((GridView)c).Rows[r].Cells[i].Text
allows me to get the text field from each column, except columns with a
LinkButton in them (template). This property is always blank.
Anyone know how I can populare the Text field?
Regards,
Steven
*** Sent via Developersdex h... more >>
Create gui in minimized window
Posted by Boldt at 2/8/2006 5:55:02 AM
Hi
I'm trying to create an application like the miniplayer in windows
media player. I would like to be able to create some buttons etc in the
minimized window of the appliaction. But I have had a hard time finding
information about this. I have only been able to find documentation
that descri... more >>
C# Access2000->Access2003
Posted by MAT at 2/8/2006 4:43:27 AM
Hi.
I developed a software that uses a Access 2000 database communication (with
odbcConnection), because I have Office 2000 in my PC. The Software does not
run in a PC that has Access 2003 (because of an error by database
communication). What should I do in order to make the SW run in all PCs... more >>
Need some advise, is this site a hoax
Posted by Wolf at 2/8/2006 3:38:13 AM
hi
Does anyone know this site: www.websitebroker.com.Just need some info
on them.
I want to buy a website, but with all the fraud going on these days, I
just wanna make sure
If you dont know, please have a look and let me know what you think.
Thanks Guys
... more >>
Localized resource files in class library
Posted by vcmkrishnan.techie NO[at]SPAM gmail.com at 2/8/2006 3:37:49 AM
Hi All
In C#, how can I use localized resource files in class library so that
localized error messages can be loaded in a console application
Thanks Mohan
... more >>
Slow response Autocomplete
Posted by Ant at 2/8/2006 3:10:30 AM
Hi,
I'm using the text changed event of as text box to display a datagrid of
search results dynamically. (The classic 'gets more specific the more you
type in' scenario ).
I find when I first start the app & type in something into the text box, it
stalls & won't display the text you've typ... more >>
Printing and Exporting
Posted by Steven Blair at 2/8/2006 2:37:29 AM
Hi,
Couple of queries:
I am using asp.net 2.0
1. What is the best method of allowing a client to print the details of
a webform? My Webform has a number of components and a primary GridView
for displaying the results.
Should I consider using Crystal Reports or some other reporting
alter... more >>
Flat file parsing into SQL Server 2000
Posted by Neural at 2/8/2006 2:25:04 AM
Hi,
I was wondering if anybody knew of any other ways of efficiently
parsing a flat file into SQL Server 2000 using C#. The flat files are
tab delimited. And the general file size is around 1 GB so this code
has to be ultra efficient. Its a colllection of few flat files which
willl be mapped to... more >>
"Request Failed" Security Exception
Posted by Tom Purdom at 2/8/2006 2:12:00 AM
Hi All,
I am developing a Outlook interop plugin which performs task
time allocation. However when i attempt to fire my custom event to
notify that an allocation has been generated the security exception
"Request Failed" is thrown. The events sole subscriber is the main
class of the in... more >>
nube needs help on editing csharp codes
Posted by Joshua Tan at 2/8/2006 1:46:27 AM
hey there,
I really need some help with this. I have a web application running on
Windows 2000 Server , IIS5.0 , .Net Framework 1.1
I have a file.aspx, file.aspx.cs and file.aspx.resx
I tried changing some simple code in the .cs but the changes do not reflect
on the webpage. Someone tol... more >>
COMException HResults not Transferred to MFC Client
Posted by dynastar at 2/8/2006 12:04:11 AM
I'm trying to send custom COMExceptions from my C# server. My test client in
C# has no problem reading the HRESULT I send (say, 0x80040002). Needless to
say, the MFC client in C++ allows this HRESULT only to the .tli file, which I
assume is part of the client. The next thing that happens, it is c... more >>
Some high level C# design advice needed (?multi threading).
Posted by bob at 2/8/2006 12:00:00 AM
I am unsure how to approach a C# windows App.
Essentially I want to do this.
I want to write an app that reads from database_A performs some calculations
updates the pretty dials on the screen then writes the 'cooked' data to
database_B (probably not in that order).
Also I will have some ... more >>
Using XSD tool
Posted by Kiran A K at 2/8/2006 12:00:00 AM
hi,
i tried to generate an xsd file using the "XSD" tool.
i used the following command on the DOS prompt.
> xsd Const1.exe
"Const1.exe" is an exe file in the same directory.
however no .xsd file was generated. also no error was reported.
what could be the problem?
regards,
kiran
... more >>
Automatic removal of unnecessary namespace
Posted by Oscar Thornell at 2/8/2006 12:00:00 AM
Hi,
I am looking for a feature/functionality in VS.NET 2005 that removes using
directives/includes of unnecessary namespaces.
IDEs like Eclipse and JBuilder have had stuff like that for years and my
guess is that VS.NET 2005 has it to...but where?
Regards
/Oscar
... more >>
ADSI - Creating an AD account but not forcing a "change password on first login"
Posted by AC [MVP MCMS] at 2/8/2006 12:00:00 AM
Having a heck of a time trying to create a ton of AD user accounts in a specific
OU without having the users be forced to change their password upon a successful
login.
After creating the account (and committing the changes), I have the following
code that works:
// password info
... more >>
|