all groups > c# > january 2008 > threads for monday january 21
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
WebEvent
Posted by Rodrigo Ferreira at 1/21/2008 10:50:11 PM
What is the best way to creat a instant chatting program like msn? I mean,
the part of detecting that a user has send a message to you.
Thanks!
... more >>
WebCam Capture
Posted by Rodrigo Ferreira at 1/21/2008 10:46:53 PM
How can i capture photos and videos from a webcam?
Thanks
... more >>
Help with Custom Format & Clipboard
Posted by bern11 at 1/21/2008 9:56:51 PM
I have an data structure with a bitmap as a member. I want to be able
to copy the object to the clipboard and paste it back into my app as a
new object, or into another app as a bitmap. It looks like the
dataobject class does this, but I'm not exactly sure how to set it up.
1) Should I j... more >>
Calling virtual functions ancestor class in C#
Posted by Alexander Vasilevsky at 1/21/2008 8:23:58 PM
How to call a virtual function ancestor class in C#?
http://www.alvas.net - Audio tools for C# and VB.Net developers
... more >>
Stuck on crazy Dictionary/List problem...
Posted by vbMark at 1/21/2008 8:18:58 PM
I'm stuck on this crazy problem. I need to get this list into this type
of dictionary object: Dictionary<string, List>
I have this collection passed to me named "items"
-Animal
Dog
Cat
Cow
-Food
Apple
Nut
Carrot
-Vehicle
Car
Boat
Train
The string part of the dictionary object ... more >>
Error with partial classes with ineherited class
Posted by Rotsey at 1/21/2008 7:16:20 PM
Hi,
I have the following classes and am getting an error
"Projects does not implment inherited abstract member on Insert()"
Only the essential code is shown
public class DCBase
{
public abstract int Insert();
}
public partial class Projects : DCBase
{
//some code here
... more >>
Creating List<Type> from type name
Posted by Andrus at 1/21/2008 5:45:23 PM
I use switch statement to create Generic list for combobox:
using EntityExtension;
public static class ComboPickList {
public static object GetObjectPickList(string entityClassName) {
switch (entityClassName) {
case "Customer":
return new List<Customer>();
case "Item":
... more >>
Creating forms!
Posted by Atmapuri at 1/21/2008 4:31:55 PM
Hi!
How can I create a custom Form() within a component
and have it create a proper handle? Currently i can call
CreateControl but there is no effect. Should I assign a parent?
Where do I get the parent from, (hopefully without the explicit
reference to the main form).
Thanks!
Atmapuri... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
Excel 2003 / VS 2005 Automation Add-In
Posted by My interest at 1/21/2008 4:23:57 PM
My computer recently crashed, so I rebuilt it and installed office
2003, VS 2005, PIA for 2003 etc (as it was before). But very
strangely, all my C# based Excel automation add-in stopped working.
In fact I can load them into Excel without any error message, i.e.
Tools / Add-In / Automation / Se... more >>
"Deep" Assignment operator
Posted by sklett at 1/21/2008 4:23:08 PM
I know the assignment operator is shallow and I know it can't be overloaded.
What I can't find (on the web) is a best practice or guideline for assigning
the values of one instance to the value of another instance of objects.
In C++ I would overload the assignment operator to achieve what I wa... more >>
Threading question!
Posted by Atmapuri at 1/21/2008 3:14:54 PM
Hi!
How can I have a thread notify the main thread that it has ended?
The thread object seems to have only one event, ThreadStart.
Thanks!
Atmapuri... more >>
How do I accomplish typesafe value checking - without typedefs
Posted by Dave at 1/21/2008 2:37:31 PM
I've spent much of today researching how best to get around C# not
supporting typedefs. I relied on them quite a lot in C++ and finally
broke down today testing out how best to emulate them. (I toyed with
using enum types within ClientRetType<> but this fell apart as enums
are not types, was t... more >>
problem converting to decimal
Posted by Jeff at 1/21/2008 2:19:16 PM
Hey
..NET 2.0
In my code am I trying to convert an int value into a decimal:
decimal d = 0;
int k = 87664;
d = Convert.ToDecimal(k/100);
The last line of code gives d the value 876, instead I want it to be 876,64
any suggestions?
... more >>
CustomAttributeBuilder without ctor
Posted by EDBrian at 1/21/2008 2:17:39 PM
I am attempting to dynmically create a class that looks like this:
--------------------------------------
[Table(Name="ClientTable")]
public class ClientTable{
[Column(DbType = "VarChar(400) NOT NULL")]
public string FirstName { get; set; }
}
--------------------------------------
The ... more >>
which one is faster/better > or >=
Posted by Mahdi at 1/21/2008 11:40:45 AM
Hi
This seems like a crazy question but I wanted to find out if anyone
knows which one of those two conditions are better (faster, smaller
memory footprint, can be optimized by the compiler, etc..)
1- if(i > 0) {// do stuff}
2- if(i >=1) {// do stuff}
Thanks.
--
Mahdi.... more >>
Configuring for wsHttpBinding in vs2005 dev environment
Posted by Bill Fuller at 1/21/2008 11:15:10 AM
I am trying to test a WCF web service in Visual Studio 2005 that has been
configured to use wsHttpBinding and getting a security error. I am not sure
how to do this. Is there any examples or docs on this?
... more >>
Antialiasing the text in Windows Forms Controls
Posted by RSH at 1/21/2008 11:07:31 AM
I have been experimenting with overriding the Paint event on Win Form
controls...more specifically trying to force the text to render as
Antialiased text. I have not been successful in any of the methods Ive
tried...is there a trick? Any information or examples would be greatly
appreciated.... more >>
event ID 0
Posted by GS at 1/21/2008 10:56:06 AM
how can I fix this problem?
Event Type: Error
Event Source: VCSExpress
Event Category: None
Event ID: 0
Date: 2008-01-21
Time: 00:18:50
User: N/A
Computer: myA64
Description:
The description for Event ID ( 0 ) in Source ( VCSExpress ) cannot be found.
The local computer may not have... more >>
Why does C# have indexers and Visual Basic does not?
Posted by COHENMARVIN@lycos.com at 1/21/2008 10:51:40 AM
I'm a VB.net programmer learning C#. I don't understand what indexers
are for in C#. Can't you have arrays of classes that can be indexed
in both C# and VB.net? And if they contain arrays as members, can't
those arrays be indexed?
What doesn't VB have indexers?
Thanks?
-- Marvin... more >>
Regex Q (Another one)
Posted by John B at 1/21/2008 10:45:28 AM
Could anyone tell me why the following do not match?
^ABC_\d{6}_\d{6}$
Should match(twice):
ABC_123456_789123
ABC_123456_789123
It matches:
ABC_123456_789123
But not the double one.
Regex options set are:
RegexOptions.IgnoreCase | RegexOptions.IgnorePatternWhitespace |
Regex... more >>
Re: convert struct to byte[]
Posted by Paul Jarvis at 1/21/2008 10:40:12 AM
Yes I am "looking to persist the structure to some storage, and then
get that information back somewhere else, you can use
serialization"!
Please could you show me how to do this?
Thanks
Paul Jarvis
PhD Student
The School of Community Based Medicine
The University of Manchester
... more >>
Help creating a custom collection
Posted by DotNetNewbie at 1/21/2008 10:33:40 AM
Hello,
I want to create a collection that will be accessed like the
following, that returns a Boolean value;
MyClass[userID].Attributes[SomeEnum.Value1];
Can someone help me with how I should design this cusotm collection?
... more >>
Dispatcher Memory Leak
Posted by hufaunder@yahoo.com at 1/21/2008 10:07:54 AM
I have a WPF application that spins off a thread. That thread needs to
show a dialog (InputDlg) to get some user input. The From my thread I
am displaying the dialog as shown bellow. The problem is that each
time I display the dialog (when I call Invoke) some memory is
allocated but it is never ... more >>
block allocation of classes
Posted by not_a_commie at 1/21/2008 9:30:42 AM
I've got a search algorithm where I would like to allocate my nodes in
blocks. In other words, I would like to reserve enough memory for 200k
nodes and then just keep my own pointer into that block. I don't want
to do 200k small memory allocation calls. It seemed that this made
more sense when I... more >>
convert struct to byte[]
Posted by Paul Jarvis at 1/21/2008 9:09:25 AM
I have a large structure, below is a simplistic version of my structure:
public struct MeanMinMaxSd
{
public double mean;
public double min;
public double max;
public double sd;
}
public struct StatisticsReport
{
public int a;
public int b;
public MinMax c;
publi... more >>
Concurrency Nightmare
Posted by Malenfant at 1/21/2008 8:45:46 AM
I've recently made the switch to C# from vb6 and although loving it
I'm plagued by concurrency problems when updating new recordsets. I've
solved prior problems by using the FillSchema command and changed the
database to make things harder to fall apart but I'm still having the
same core problem... more >>
Passing Parameters to an Exe
Posted by JTC^..^ at 1/21/2008 8:18:59 AM
I would like to pass a parameter (with or without using a windows
service), so the user can be taken to a particular form when opening
the application.
The user recieves an email notification containing the information
they need, this additionally contains a link to the publish.htm, as
the ap... more >>
SqlCommand and Print statements
Posted by escher4096 at 1/21/2008 6:38:51 AM
I have a block of SQL that has print statements in it. When I execute
it with Query Analyzer the output from the print commands goes to the
messages pane. Is there any way to get those messages when I execute
the same SQL through a SQLCommand in C#?
Thanks
-Cam... more >>
Calling Javascript from C# Code
Posted by TarheelsFan at 1/21/2008 6:31:48 AM
I am creating a web site that allows admins to edit the website from
within the site (add contacts, events, etc.) After modifying the
content by either adding, editing, or deleting some info, I want to
display a Javascript alert.
When I write the Javascript in the markup and add the event to ... more >>
C# Late Binding "Unknown Error"
Posted by nelsonivan@clix.pt at 1/21/2008 6:04:46 AM
Hi,
i'm trying to reference some objects using reflection and Late Binding
accessing.
The Object API to his methods it's easy to understand, and it's as
"Object.Method" - aka. "Clientes.Existe"-
So, to reference this object, it was simplier to me resolving this
with reflection, and it was ... more >>
How do you get an Excel Range in a TextBox?
Posted by pinkfloydfan at 1/21/2008 5:53:28 AM
Hi again
My C# Form is part of a .xll . I have managed to get the Form to open
up but now what I want to do for one of the TextBoxes is have the user
input an Excel range which can set by clicking a cell/range back in
the calling session of Excel.
So, if the user clicked on cell $A$1 then ... more >>
Setting a parameter's default value and validating datatype with attributes.
Posted by Jimmo at 1/21/2008 4:46:25 AM
I have written a parameter attribute class
("AttributeTargets.Parameter). One of several the constructor
arguments is a parameter to specify a default value for the method's
parameter.
I would like to emulate InteropServices.DefaultParameterValueAttribute
behavior where at compile time, the ... more >>
Problem with List<>.Sort()
Posted by pinkfloydfan at 1/21/2008 4:28:33 AM
Hi there
In a Form I have created I am trying to Sort a List<string> extracted
from the Keys of a Dictionary. However, when I attempt to build the
project I get the following error:
Cannot implicitly convert type 'void' to 'object'
The relevant code is as follows:
private void Form1_L... more >>
Automatic properties
Posted by Peter K at 1/21/2008 4:10:02 AM
Hi
is it possible to have a default value for an automatic property?
For example, say I have a property
public string Name { get; set; }
Can I have the "name" set to a default value of "Peter"? (I guess I could
write a constructor that does this).
/Peter... more >>
How to: Load data in gridview without DataSource
Posted by ircremer@hotmail.com at 1/21/2008 3:34:44 AM
Hello,
First, sorry for my English...
I'm triying to load data from store procedure into a gridview.
The most simply is doing 'myGrid.DataSource =3D myDataTable', but this
'myDataTable' returns a numeric value that I need to transform (this
numeric value is an ID, and i need the descripti... more >>
Iterate through XML using .NET 1.1
Posted by Christian Havel at 1/21/2008 2:52:02 AM
Hi,
I have a XML like following:
<entities>
<entity created="09.01.2008 12:43:50">
<item NAME="MyName" VALUE="MyValue" />
... some more items
</entity>
... some more entities
</entites>
I want to iterate through the XML but I want only to read the entity objects
where the creat... more >>
Parsing to DateTime
Posted by pinkfloydhomer@gmail.com at 1/21/2008 1:24:58 AM
I have timestamps in this format: 21-01-08 08:09:53:4118488
I want to convert these into DateTime. I can't make DateTime.Parse()
behave. Help!
... more >>
The value mytype is not of type mytype exception
Posted by Andrus at 1/21/2008 1:20:23 AM
I have code in Winforms 2 combobox:
EntityBase entity = EntityManager.FindById(LookupTableName, id);
IList entityList = DataSource as IList;
entityList.Add(entity);
Last line causes strange exception below.
Entity variable type is MyApp.EntityExtension.Klliik which is inherited from
my... more >>
Threads and UI Components
Posted by Falcon at 1/21/2008 1:05:52 AM
Hi all,
I want to fill a TreeView with some heave data. this action may take
several minutes and I'd like to show to the user a model dialog with a
simple ProgressBar ('Marquee' style). I managed to work before with
BackgroundWorker and Invoke methods, but this time When I try to add a
node to ... more >>
|