all groups > c# > march 2007 > threads for tuesday march 6
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
Setting the default member of a class
Posted by nano2k at 3/6/2007 11:37:51 PM
Hi
I'm searching for the way to set up the default property of my class.
I'm using v1.1 of the fmk.
For example, when I drag an object of an ArrayList type into the Watch
window, it immediately displays the value of Count property like this:
myArrayList {Count=1} System.Collections.ArrayList
... more >>
5 questions on thread pools!
Posted by richard.hallgren NO[at]SPAM gmail.com at 3/6/2007 11:22:10 PM
Hi,
I have some questions concerning thread pools. I've marked the
questions by number in the text.
First I'd like to know when which thread pools an application uses. I
know ASP.NET uses the CLR common thread pool. (1a) Is there a way
around this? (1b) Can ASP.NET application have it's own... more >>
Remove border from popup button
Posted by Eran.Yasso NO[at]SPAM gmail.com at 3/6/2007 10:01:32 PM
Hi all,
I have button which its flatstyle is popup. The problem is that it has
border when user doesn't
move the mouse on the button. How can I remove the border that only
when the user moves the mouse cursor on that button, it sets border so
it looks like 3d?
Thanks,
Eran.
... more >>
Delegates, not anonymous methods
Posted by RobinS at 3/6/2007 9:00:10 PM
I can do this in VB:
For Each fld As Field In _
fieldList.FindAll(AddressOf SearchSelOrKeyNotID)
'do stuff here
Next
where the function is defined:
Private Shared Function _
SearchSelOrKeyNotID(ByVal f As Field) As Boolean
Return Not f.IsIden... more >>
profiles in pop3 email
Posted by Vinki at 3/6/2007 8:30:03 PM
Hello Everyone,
I really need help in this email. I am using pop3 service to connect to
microsoft exchange. I have two profiles defined
in microsoft exchange.
One is west1 and another one is west2.
When I am trying to connect to west1.
I can succesfully connect to the excahnge mail bo... more >>
one line struct initialization
Posted by Zytan at 3/6/2007 8:03:39 PM
Is it possible, as in C? I don't think it is. Just checking.
Zytan
... more >>
Problem installing WindowsService
Posted by Michal Sodomka at 3/6/2007 7:17:29 PM
Hi, is there a clean way how to install windowsservice with some
SETUP.EXE project ? I tried this out but after that installation I see
my service in servicemanager not ! I also tried it with INSTALLUTIL but
it's als negative. I only get this error:
System.IO.FileNotFoundException: Data or As... more >>
writing word object to database
Posted by R at 3/6/2007 6:53:52 PM
Hi,
How can I write a word document to a database - I get the document as an
object (it is embedded within excel file) and I would like to add it to the
db.
Thanks
... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
Misplacement of controls on one machine but not others
Posted by Richard Lewis Haggard at 3/6/2007 6:04:59 PM
I've got a problem with the way that some dialogs, er ah, I mean forms,
position their controls. On most machines, but not on my client's laptop,
all of the forms and their controls display in the expected fashion but on
my client's laptop, there are a couple of forms whose controls are placed... more >>
Custom Control Mouse Events
Posted by ahmed.maryam NO[at]SPAM gmail.com at 3/6/2007 5:44:42 PM
Hello Everyone,
I designed a custom control that is entirely covered by a picture box.
I then dragged this custom control onto a windows form application
(called main) and I need to handle mouse events in my main
application. Specifically, when a user double clicks on my custom
control I nee... more >>
Array of System.Timers.timer - Assigning an object to timer
Posted by Gina_Marano at 3/6/2007 5:40:11 PM
Good day,
I read 1-n records from a database, For each record in the database I
create a system timer. (then add the timer to a list of timers).
I create an object to store the data for each record in:
public class CustAckAttribs
{
public int CustomerID;
... more >>
User control doesn't listen events
Posted by alberto at 3/6/2007 5:07:46 PM
I've made a very simple user control. It's only a textBox who only admits
numbers. I've done it listening the event KeyPress. The strange thing is
that it works fine in my home computer but it doesn't in my work. In both
places I work with VS2005.
... more >>
Nofity Icon and Windows shutdown/restart
Posted by chuck rudolph at 3/6/2007 4:11:15 PM
Does anyone know an approach to knowing when your application with a notify
icon is being shut down by windows?
I have an application with a notify icon and a back ground thread. The back
ground thread is a regular System.Threading.Thread with background mode set.
It is not a "back ground ... more >>
Very strange "input string not in correct format" bug
Posted by Jen at 3/6/2007 2:46:03 PM
One user of my application is experiencing an exception "input string not in
correct format". But it makes no sense where it is occurring. It is
occurring when a string from a textbox ("172") is being convert to an Int16
(using Convert.ToInt16). How can that be? There are other text boxes ... more >>
Create Hot-Key for submitting from C# Windows App
Posted by mikemiller.innova NO[at]SPAM gmail.com at 3/6/2007 2:29:00 PM
I created a simple C# Windows Application that allows Users to type
comments and then click a 'Submit' button to sumit the entry and close
the application.
How can I create a Hot-Key like Ctrl-Enter that will do the same thing
as clicking the 'Submit' button?
... more >>
how to share settings between app <-> class lib?
Posted by Rainer Queck at 3/6/2007 1:58:36 PM
Hello NG,
Is it possible to share the settings of an application with a class
libreary?
In my case I have a application and a set of different reports (home made)
put into a class library.
The plan is to delivere different report.dlls with the main app.
But it is essentially importent, t... more >>
Rename My "Solution"
Posted by Gary Brown at 3/6/2007 1:38:49 PM
Hi,
How do you create a "solution" from an existing one with a different
name? I renamed the directories and file but it still produces binaries
with the old solution's name.
Thanks,
Gary
... more >>
Possible to create a C# DLL with dialogs and GUI -- callable by a C program?
Posted by Harry Whitehouse at 3/6/2007 12:24:59 PM
I have a rather large legacy application written in C++. I want to add
some new functionality which would be easier to do in C#.
Is it possible to create a DLL in C# which can be called from my C++
application, with the C# DLL presenting dialogs and other GUI features? I
know I can creat... more >>
Global exception handler when creating a windows service?
Posted by Simon Harvey at 3/6/2007 12:22:20 PM
Hi all,
What is the best way to catch any and all exceptions when creating a
windows service application? Is there some sort of global exception
event I can use, or is it possible to surround the
ServiceBase.Run(ServicesToRun);
line with a try catch? Would that work?
Also, when an ex... more >>
Stopping my Windows Service Programatically
Posted by Simon Harvey at 3/6/2007 12:19:35 PM
Hi all,
Can anybody tel me how to programatically kill my service when an
exception occurs?
Whenever something bad happens I'd like to shut it down.
Also, is there a way to programatically restart my service at a set
interval or when a particular condition is met within the application?... more >>
double.Parse produces overflow exception on double.MinValue
Posted by Samuel R. Neff at 3/6/2007 12:07:49 PM
I'm using a quasi open-source project and am running into an exception
in double.Parse which is effectively this:
double.Parse(double.MinValue.ToString())
System.OverflowException: Value was either too large or too small for
a Double.
at System.Number.ParseDouble(String s, NumberStyles... more >>
Using XMLValidatingReader
Posted by JoeZ at 3/6/2007 11:58:04 AM
Hi all,
I have a question about using XMLValidatingReader.
I have a schema files (xsd), and a xml data file. In the xml data file, if I
don't specify the schema file path,
XMLValidatingReader always complains. If schema file path is included, then
it doesn't complain.
Is there any way ... more >>
Changing Form1.text at runtime
Posted by Ringo at 3/6/2007 11:13:47 AM
I have a windows app that downloads Firmware to a micro. I display the
% done on the form, but I would like to put it in the forms title so
that when it is minimized you can see it on the toolbar. It appears
you can't change Form.text at runtime. Is there a way to do it? I've
tried MSDN and goog... more >>
Vista prompting for internet access blues
Posted by Joe at 3/6/2007 10:37:56 AM
Every time our application starts it prompts the user to allow it access to
the internet because our application is checking for updates. Is there
anyway programically to tell Vista to allow this connection without
prompting the user?
Thanks,
Joe
... more >>
Threading...I thought this was supposed to be faster than doing things sequentially...
Posted by Cliff at 3/6/2007 9:56:49 AM
I've got a number of SNMP devices scattered around the globe that I
want to get some information off..
I've got a couple of classes whcih get a quite complex table together
from SQL and SNMP devices and return a DataTable Object.
but as the devices are all in totally different locations (we ... more >>
Inheritance question: How to instantiate derived class from base class
Posted by Anthony Greene at 3/6/2007 8:50:14 AM
This is probably a very introductory object-oriented question, but it
has been nagging me for years, and since I've never been able to find
the right answer, I've had to work around it with non-optimal code.
However, I suspect there must be a proper object-oriented approach to
solving this probl... more >>
Object Creation in Linked List C#
Posted by sk.rasheedfarhan NO[at]SPAM gmail.com at 3/6/2007 8:42:41 AM
Hi
I am using C# and my class declaration is like this
namespace UnitTestCaseTool
{
/// <summary>
/// Summary description for RuleParser.
/// </summary>
public class RuleParser
{
public RuleParser()
{
private Object NextItem;
RuleParser RulesProperties;
}
private R... more >>
C# Fatal Error
Posted by Rob at 3/6/2007 7:52:18 AM
I posted something relating to this earlier, but need to follow. I have a C#
(2003) app running on a Citrix server, running Windows 2003. The app will
run fine, but then all of the sudden it will produce a fatal error when
someone tries to run it. They double click on the icon, and then a m... more >>
DataView or DataTable question
Posted by DBC User at 3/6/2007 6:41:06 AM
I have a dataset with one table and I want to change one coumn value
to a fixed constant. Is it possible to do it without iterating through
each row?
Thanks.
... more >>
Delayed loading dependent assemblies when start an .Net application
Posted by wzhao2000 NO[at]SPAM gmail.com at 3/6/2007 6:29:43 AM
Back in COM time, it's possible to use #import statement in cpp to
load COM object type info and use it at coding time. When the
application is started, the underlying COM DLL will not be loaded
until that part of code is called.
Is there a similar thing in .Net (C#) application ?
When I cr... more >>
bringing up processes on "slave" computers through windows service in c#
Posted by amir at 3/6/2007 5:46:38 AM
Hello All,
Just wanted to know if c# has a class which can handle communication
between neighbour computers in same network so if i run a program on
one computer it will be able to bring up processes and have all other
properties of controling the state of that process through a service
which i... more >>
MdiChild forms question
Posted by stanciutheone NO[at]SPAM gmail.com at 3/6/2007 4:44:32 AM
hi my name is valentin and i started to programm in C# for 2 weeks
using SharpDeveloper,
My questions is how can i create child forms because now i'm using
just parent forms like:
void btPress(){
frmForm1 frmF1 = frmForm1();
frmF1.Show();
}
Somebody please help me, so i can understand ... more >>
Reach managed c++ Enum from C#
Posted by Joachim at 3/6/2007 3:36:56 AM
I'm trying to use an enum created in Managed c++ in a C# project. I can reach
the enums name, i.e.
namespace MyNS
{
public enum MyEnum
{
EOne,
ETwo
};
}
in C++ makes me able to reach MyNS, but not MyNS.EOne. Why?... more >>
How to catch System.IO.FileLoadException when starting application
Posted by jeeji at 3/6/2007 3:29:21 AM
Hi
I have a console application that in some cases could get a
System.IO.FileLoadException
Could not load file or assembly XXX, Version=5.0.0.0, Culture=neutral,
PublicKeyToken=YYYY' or one of its dependencies. The located
assembly's manifest definition does not match the assembly reference.
... more >>
GetConstructor on Generic Classes.
Posted by Undergrid at 3/6/2007 3:02:21 AM
Given the following example class:
public class genericClass<T>
{
public genericClass() {}
public genericClass(IEnumerable<T> a) { /* do something with a
*/ }
public genericClass(T b) { /* do something with b */ }
}
And the following code:
Type t = typeof ( genericClass<te... more >>
Reflection question
Posted by Christian Havel at 3/6/2007 1:43:56 AM
Hi,
is it faster to access the fields from an object directly by using
reflection than accessing them by their properties using reflection?
Thanks Christian... more >>
StringBuilder
Posted by Christian Havel at 3/6/2007 1:39:58 AM
Hi,
when I concatenate strings is it faster to use the StringBuilder or the
string.Format function?
thanks christian... more >>
C++ HWND to and from C# and Managed C++?
Posted by Joachim at 3/6/2007 1:33:44 AM
How can I pass a C++ HWND to and from C# and Managed C++?... more >>
How to convert KeyCode to a string?
Posted by BD at 3/6/2007 1:28:59 AM
Hi,
I need to convert a KeyCode from event KeyDown to a string. For
example Keys.Decimal that's 110 to ".", but it converts to char 'n'
that's the code ascii of 110. I'm a little confuse with this.
[]'s
BD... more >>
HWND to and from C# and Managed C++
Posted by Joachim at 3/6/2007 1:24:22 AM
How can I pass a C++ HWND to and from C# and Managed C++?... more >>
Eliminate highlighted button outline
Posted by Hal Meyer at 3/6/2007 1:12:24 AM
I know this is REALLY picky, but how would one go about preventing that
hideous outline from showing up around a button when it receives focus in VS
2003? I'm known for my eyecandy UI's but this is something that has plagued
me for awhile. Many thanks in advance.
... more >>
Can't put a comma in a regex pattern?
Posted by sherifffruitfly at 3/6/2007 12:38:48 AM
Hi all,
I can't see what's wrong with this regex pattern:
private int ParsePageViews(string str)
{
int ret = 0;
string pattern = @"Visits.*\n\s*Total\s\.*\s(?
<visits>(\d{3})|(\d,\d{3}))";
if (Regex.IsMatch(str, pattern))
... more >>
StandardOutput.ReadLine() doesn't work until the app exits???
Posted by Ole at 3/6/2007 12:00:00 AM
Hi,
I'm running a command line process from my C# application trying to catch
the output messages from the process into a textbox in my windows form. But
the text doesn't update (the ReadLine doesn't return) until the process
exits??? Any help is highly appreciated! The code is like this:
... more >>
How to read pixels under a form
Posted by MrAsm at 3/6/2007 12:00:00 AM
Hi,
I would like to create a form and read the pixels of the layer under
my form (think of a kind of magnifier glass), to do some processing on
them.
Do you have any idea about how to do this?
How can I read pixels under a form?
Thanks in advance
MrAsm... more >>
|