all groups > c# > december 2005 > threads for friday december 23
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
Thread safety and events
Posted by Emrys at 12/23/2005 11:21:19 PM
Hi.
I have two threads and an event. The first thread registers a callback
with the event. That callback plays with variables that only the first
thread should touch. The second thread triggers the event. Is this
thread-safe? If not, should I be doing thread synchronization
(locking, etc... more >>
cyclic dependency
Posted by Pohihihi at 12/23/2005 6:02:56 PM
This is a report from VSS newsgroup in hope of getting some more =
suggestions.
Thanks,
Po
-------------------------------------------
I guess I am not getting the whole picture here. How does this apply to =
the=20
condition when there is a cyclic reference for the binaries (dlls) in =
... more >>
Another question about performance
Posted by MuZZy at 12/23/2005 4:17:04 PM
Hi,
Consider this:
ArrayList al = new ArrayList();
FillList(al);
/// NOW TWO SCENARIOS:
/// 1.
for (int i = 0 ; i < al.Count ; i++)
{..do whatever..}
/// 2.
int iCount = al.Count;
for (int i = 0 ; i < iCount ; i++)
{..do whatever..}
Yes, as you have already figured out my que... more >>
How can I judge an application is runing ??
Posted by dahuzizyd at 12/23/2005 4:00:52 PM
Hi all
I want to judge an application is runing or not when another application
start .
If the application is running , get focus.
I use the Pinvoke to invoke the FindWindow function ,I declared FindWindow
function
in assembly WindowsApplication3. If the WindowsApplication2 is running ,t... more >>
Ftp Efficiency
Posted by Frank Rizzo at 12/23/2005 2:15:35 PM
Hello,
Using vs2005 and the new built-in Ftp functionality. I need to transfer
a gigantic amount of data (15 GB) using my app. The current way is that
I ZIP (or RAR) the data and transfer it to the server via FTP. Is
there a more efficient way to transfer data? Does FTP go as fast as ... more >>
non C# question
Posted by Jassim Rahma at 12/23/2005 1:52:42 PM
hi,
i know it's not a C# question but i am developing a C# database
application and would like to know what is the maximum characters'
digits for the following:
1. Email Address
2. Windows XP computer name
3. Windows XP user name
4. Windows 2003 Active Directory user name
5. IP Address
... more >>
VS 2005 IDE/Compile bug
Posted by Rene at 12/23/2005 1:25:20 PM
I keep getting the following error every time I compile the solution under
VS 2005:
----------------
Error 5
Unable to copy file "obj\Debug\xyz.dll" to "bin\Debug\xyz.dll". The process
cannot access the file 'bin\Debug\xyz.dll' because it is being used by
another process.
-------------... more >>
Adding a Form to a TabPage
Posted by TN at 12/23/2005 12:50:52 PM
I can add a button to a TabPage, how come I can't add a Form? The Form
never gets realized on the page, but a button can :-(
f = new System.Windows.Forms.Form();
b = new Button();
b.Text = "Hello";
f.Text = "NEW";
f.Size = new Size(100, 100);
f.Controls.Add(b);
f.TopLevel = false;
f.Doc... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
Directred Event Multicasting
Posted by Pete at 12/23/2005 12:47:02 PM
Assume I have an n by n matrix of identical objects, each of which can both
invoke and consume event A. If, say, obect[1,2] invokes the event, the only
other objects that need to consume it are those in row 1 and those in column
2. Sending the notification to other objects would be a waste of ... more >>
create my own intelisense
Posted by orianavim NO[at]SPAM gmail.com at 12/23/2005 12:17:24 PM
Hi,
i'm try to build my own intelisense to some part of our system. Does
anyone know where should i start from? or maybe can you refer me to a
good reference or a open source code which can help me to start writing
such control.
What i'm trying to so is to enable my users to have the same ... more >>
Struct faster than class?
Posted by wackyphill NO[at]SPAM yahoo.com at 12/23/2005 12:08:20 PM
If you have a function that basically creates an object/struct that
holds data only in a function and wish to return the object/struct from
the function which is faster a class object or struct?
I would have thought class object since it can be passed back as an
object reference instead of cop... more >>
verfiy a query like Query Analyzer's parse query function
Posted by kevin at 12/23/2005 12:01:01 PM
I thought that the parse query feature in Query Analyzer simply wrapped your
statement in a TRAN and then issued a ROLLBACK statement to prevent making
real changes... but i just had a query parse successfully (ctrl-F5) and then
fail on execution(F5), due to a lack of permissions on the object... more >>
How to get html to string
Posted by ozulku_omer at 12/23/2005 11:58:02 AM
Hi all,
I want to have www.msdn.microsoft.com 's html code in a string ? What can i
do to have it?
Thanks.
Omer... more >>
Load Resources from Win32 Executables
Posted by Mythran at 12/23/2005 11:56:24 AM
I am attempting to read all of the resources from a Win32 executable, and
load each of them to display them on a screen. So, please help figure out
why I can't seem to get it right :)
First off, I have my API declarations (will post that at bottom). I make a
call to LoadLibraryEx. Then, ... more >>
how to disable auto repair of msi when shortcut clicked
Posted by MJB at 12/23/2005 11:44:55 AM
I'm using Visual Studio 2005 and I have built an msi using the built in
setup project. My application installs fine, but on install the
application itself runs a few configuration scripts which alter the
original contents of the directory. The next time you start the
application by click... more >>
Creating a new Value Type for hiding creation of Guid's
Posted by Guy at 12/23/2005 11:41:02 AM
I want to create a new value type for hiding the creation of Guid's that can
be used in my business classes. I suppose I have to achieve this by creating
a struct (ID)
The problem is I'm completely stuck as how to develop my struct. Anyone can
help?
Thanks.
e.g.
class Person
{
ID P... more >>
Collection indexer causing a stack overflow due to parent property
Posted by Geordie at 12/23/2005 11:20:01 AM
Hi,
I'm in the process of converting a production VS 2003 application to VS
2005. To simplify the conversion I'm converting a small piece at a time and
then unit testing the code to confirm it converted correctly. The application
consists of 10 seperate projects.
I have hit a problem w... more >>
indexers, enumerators
Posted by Andrzej Kaczmarczyk at 12/23/2005 10:41:19 AM
Hi, I am receiving this exception
Error 3 Cannot apply indexing with [] to an expression of type
'System.Collections.Generic.IEnumerable<VisualSystems.DbObjects.DbClasses.DbColumn>'
C:\Visual Studio\PROJECTS\VisualSystems.DbObjects.DbClasses\DbObjectTable.cs
51 30 VisualSystems.DbObjects.Db... more >>
DataGrid Row cursor control
Posted by cfyam at 12/23/2005 10:38:24 AM
How can I set the row cursor(on the row header) position by C# app? The
DataGrid.Select() method can't do it!
... more >>
Problem sending Hexadecimal as part of a string using socket.send
Posted by Alpha at 12/23/2005 10:37:02 AM
Hi, I'm able to make connection to a server using socket connection.
However, when I send a command string the server just ignores it. All
command string needs to start with "0xF9" at Byte 0. During the run-time
debug, I see it to be "u" with a "~" on top of it. Is that OxF9? Can
someon... more >>
FontDialog question
Posted by Chris at 12/23/2005 10:30:32 AM
Hi all,
I've been trying to update the font style in a RichTextBox using FontDialog.
But when I use this method (Rather than change each attribute individually)
all the text in the RTB changes to the new font. Is there any way to just
make the selected text change or the text from that poin... more >>
Design, enums, and const ints
Posted by Bit Twiddler at 12/23/2005 10:07:40 AM
I have a home grown bit vector and I keep oscillating between what I use
access individual bits.
For example, is is better to do this:
const int BIT_1 = 1;
const int BIT_2 = 2;
....
int my_bits;
// Set bit 1
my_bits |= BIT_1;
Or, should I create an enum
enum BitPos
{
Bit... more >>
working days problem
Posted by Jason Huang at 12/23/2005 9:20:22 AM
Hi,
In our C# Windows Form application, we are using the SQL Server 2000 as the
database server.
The Database table MyTable has a field RegistrationDate which represents the
Date a client comes to our company to deliver his product. We have some
Working days for processing his product, li... more >>
About a custom Crystal Report
Posted by Robe at 12/23/2005 8:37:02 AM
I need to do a Report using Crystal where:
Given a number in a field x. Ej. 150
I need to print it in a report that has 4 columns where each value in the
field must be located in the correspondant column according to the number
(0> and <100) (>101 and <200) (>201 and <300) (>301 an... more >>
Downloading Zip from SQL Image field
Posted by joef NO[at]SPAM nospam.com at 12/23/2005 8:33:02 AM
I'm converting a Delphi app to C#. The application uploads and downloads
files to an image field on SQL through a webservice. With Delphi, this was
done straight to SQL instead of a webservice. The C# code works fine in both
directions except in the case of zip files. I get a message, from Win... more >>
Asp control
Posted by BlueSky at 12/23/2005 6:25:23 AM
Hi All,
Is there an equivalent html control or asp control in .NET that does
the following -
<ul>
<li>list item1</li>
<li>list item2</li>
<li>list item3</li>
</ul>
Thanks for any tip!
... more >>
wmi to access the services runnig in PC ? -error help required
Posted by myclassmates at 12/23/2005 6:16:40 AM
An unhandled exception of type
'System.Runtime.InteropServices.COMException' occurred in mscorlib.dll
Additional information: The RPC server is unavailable.
See the code below and help me out to solve this problem.
public static void Main(string[] args)
{
string strvalue;
Cons... more >>
Memory Leak in managed Code
Posted by James at 12/23/2005 5:59:02 AM
The following code will create memory leaks!!!
using System;
using System.Diagnostics;
using System.Data;
using System.Data.SqlClient;
namespace MemoryLeak
{
public class RGCSqlConnection:System.IDisposable
{
SqlConnection m_connSQL;
public RGCSqlConnection(string dbName, str... more >>
Databinding is late!
Posted by Bruno Rodrigues at 12/23/2005 4:53:02 AM
The controls in my form are bounded to a datasource, including textboxes,
comboboxes, etc...
Something lame happens: In runtime, the last focused control before clicking
on my save button, doesn't have its datasource bounded value refreshed with
the new data inputed. I think the control's Lo... more >>
What does Shell32.FolderItem's IsBrowsable mean
Posted by **Developer** at 12/23/2005 3:09:25 AM
Using Shell32.FolderItem's IsBrowsable I find, for example, that Internet
Explorer and Printers and Faxes are browsable.
I studied Help to find the definition of Browsable but could not find it.
Can you tell me what Browserable means?
Thanks in advance
... more >>
C# Preprocessor
Posted by Christopher Ireland at 12/23/2005 3:06:31 AM
Hello,
I'm looking for a C# Preprocessor (shareware with source, if possible)
which has the functionality of preprocessors which already exist in
other languages, e.g.
http://www.zeitungsjunge.de/delphi/dipp/
DIPP is a Pascal Preprocessor. The purpose of DIPP is to manipulate
Pascal sour... more >>
AVI RGB or BGR
Posted by Nuno Magalhaes at 12/23/2005 1:46:59 AM
How to know when the frames in AVI file is RGB or BGR because sometimes
Red appears first and sometimes Blue appears first in uncompressed
frames.
Does *anyone* know why?
... more >>
Yet another threading/invoking question...
Posted by MuZZy at 12/23/2005 1:11:30 AM
Hi,
I'm currently rewriting some functionality which was using
multithredaing for retrieving datasets from database and updating a grid
control. I found that the grids (Infragistics UltraGrid, though it
doesn't matter) were updated (i.e. grid.DataSource = dsDataSet;) and
used for differen... more >>
DateTime equivalent struct with start/end properties
Posted by Anders Borum at 12/23/2005 12:36:52 AM
Hello!
As part of a refactoring iteration, I was looking at consolidating two
properties (Start and EndDate) to a single structure that would allow a
single access point for the "duration" (so to speak).
I considered using the TimeSpan, but that structure doesn't provide the
boundaries f... more >>
|