all groups > c# > november 2007
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
binding a listbox
Posted by Michael Powe at 11/30/2007 11:27:38 PM
Hello,
I want to bind a list box to a collection that will be pulled
dynamically from a web service.
The data that will be pulled will consist of a name and id. I want my
listbox to display the name but, when a name is selected, pass the id
as the value.
i've read and googled but i can... more >>
default background color name?
Posted by Slickuser at 11/30/2007 8:08:44 PM
What's the equivalent color of the default background in C#?
I want set the a circle to that color after I draw it.
Thanks.
C# color link
http://www.flounder.com/csharp_color_table.htm... more >>
TreeView or DataGridView ?
Posted by colin at 11/30/2007 7:48:27 PM
Hi,
I wish to display and edit 3 collections of different object types,
each object type also has a collection of the other 2 types,
such that if one object contains another then the reverse
is always true, a many to many relationship.
the objects are 3d objects making up a wire mesh model,
... more >>
Aborting Threads
Posted by AdrianDev at 11/30/2007 6:43:57 PM
Hi,
I have a thread which I call like this:
// Allocate a new thread containing class with the host
getInfoThread git = new getInfoThread(host);
// Create the thread and call the Go method
new Thread(new ThreadStart (git.Go)).Start();
// Sleep for 5 ... more >>
C++ grammar for ANTLR & C# output
Posted by Rami at 11/30/2007 6:35:58 PM
Hi,
I'm looking for ANTLR input file with C++ grammar which is configured for C#
output. Does anybody know where can I find it?
... more >>
WiFi signal strength in vista
Posted by Maarten Weyn at 11/30/2007 5:52:44 PM
Is there a way to get the signal strength of all surroundin access points in
c# on a vista pc?
regards
Maarten Weyn
... more >>
Dyanamically referring to an object instance
Posted by RSH at 11/30/2007 3:49:11 PM
Hi,
I have a situation where I have multiple objects created from concrete
classes:
// Concrete implementations of the Abstract class ApprovalChain
MarketingApprovalChain MktgAppChain = new MarketingApprovalChain();
AccountingApprovalChain AcctAppChain = new AccountingApprovalChain();
I... more >>
How do you check to see if an object works in vs2005 standard?
Posted by Andy B at 11/30/2007 3:07:36 PM
I have an object i want to test before putting into real code. How do i do
that in vs 2005 standard?
... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
Need advice on working with coarse-grained objects
Posted by BillG at 11/30/2007 2:22:27 PM
I am used to dealing with recordsets and I am using a coarse-grained object
and need to know if I am doing it correctly.
I have a class named Activity which represents an event being planned (golf
outing, dinner dance etc.). The Activity hold a list of Registrations which
represents some c... more >>
loop over the static variables of a struct?
Posted by sloan at 11/30/2007 12:47:23 PM
Is there a way to loop over the static variables of a struct?
public struct FunFoods
{
public static readonly Guid GRANOLA = new
System.Guid("00000000-0000-0000-0000-000000000101");
public static readonly Guid TRAILMIX = new
System.Guid("00000000-0... more >>
Simple question about c-tor and initializing
Posted by TonyJ at 11/30/2007 12:38:19 PM
Hello!
Assume I have the two classes Test1 and Test2. They are very similar.
Test1 initialize the instance variable in the C-tor but
Test2 initialize the instance variable without using the C-tor.
Both classes can be seen below.
In this simple example it doesn't matter because Test1 is the ... more >>
Listview control / selected blue line
Posted by Finn Stampe Mikkelsen at 11/30/2007 12:30:15 PM
Hi
I'm writing an application in which i have a listview. I'm using Hottracking
/ Hoverselection properties set to true. This gives me a control with each
item looking like a hyperlink, but is there any way to disable the typical
blue 'selected line' so that the only visible indication of w... more >>
Static Variables.
Posted by Gobinath at 11/30/2007 11:39:03 AM
Hi,
I have a pretty basic question.
I have a C# control with lots of classes and I need few instances(manager
classes) shared by all the classes in the conrol. So I define a Static Class
and it works OK.
Now When I want multiple instances of the control in the same application
and eac... more >>
Enumerating XML Attribute Nodes
Posted by James at 11/30/2007 10:19:44 AM
Hi,
I am trying to optimize some c# code that contains lots of code such as
String name = null;
try
{
name = myXMLElement.Attributes["name"].Value;
}
catch
{
}
[OK - I admit it - It's my code!]
The code needs optimizing, and I suspect throwing exceptions like this is
t... more >>
How do I get the assembly name at compile time?
Posted by Dave at 11/30/2007 10:12:00 AM
Surely it must be possible to access an assembly's name (ie the name of the
..exe or .dll file to which it will eventually compile) at compile time. All
the information is available within VS, but how do I get at it?
(Actually what I'd like to do is get the assembly name of a referenced
ass... more >>
Create Permutations from Dictionary<string, List<string>>
Posted by Assimalyst at 11/30/2007 9:13:19 AM
Hi
I have a Dictionary<string, List<string>>, which i have successfully
filled. My problem is I need to create a filter expression using all
possible permutations of its contents.
i.e. the dictionary essentially creates the following array:
Key Value
Column1 1
Column1 ... more >>
Questions about porting C++ dll to C#
Posted by chrisben at 11/30/2007 9:07:01 AM
Hi,
I have some codes in C to do some complex calculation. In order to use it in
C#, I wrap the C codes using C++ and create a unmanged dll, then my program
will call the dll from the C#.
The application has been working ok. However, it is not convenient for me to
debug the codes since a... more >>
XMLReader file used by another process
Posted by heday60@gmail.com at 11/30/2007 8:19:39 AM
I've got this application that watches a directory for XML's and then
parses them into a DB. It then moves them based on if the XML was
succesful or a bad XML...
foreach(FileInfo file in dir.GetFiles("*.xml"))
{
try
{
ParseXML(file.FullName);
}
catch
{
FilesToMoveError.Add(file... more >>
datagrid
Posted by DLI at 11/30/2007 7:58:10 AM
I have a datagrid that displays related child rows from a master table.
I have set the datagrids datasource to the relation I set up in the main
dataset
I created a dataview in order to keep all the form's controls in sync
This all works great EXCEPT
I would like to set the datagrid so... more >>
Threading and Instances
Posted by Trecius at 11/30/2007 7:26:00 AM
Hello, Newsgroupians:
I'm a little confused when it comes to threads in C#. Here's what I'm
trying to do...
I have a List<> containing a set of MyPoint(s)...
public struct MyPoint
{
int x;
int y;
int val;
}
class MyClass
{
List<MyPoint> m_list = new List<MyPoint>();
... more >>
Odd ObjectDataSource Issue with Generic List of objects
Posted by fig000 at 11/30/2007 7:23:30 AM
Hi,
I am new to C# and ObjectDataSources and have encountered what I
think is a strange problem. I have a web page that has a formview on
it. The formview is set to insert mode in the page load. The
ObjectDataSource for the form has a procedure for inserting. Ths
procedure adds the new rec... more >>
XmlSerializer List<T>
Posted by Caspian at 11/30/2007 6:39:13 AM
can anyone help with this problem, it seems to fail when I try to
initialise the XMLSerializer.
I'm getting a "There was an error reflecting type ... "
innerexception: "Cannot serialize member
'CommercialWebServices.DataAccess.ResponseStructures.RequestParameters.Parameter'
of type 'System.... more >>
difference is between using ThreadStart and delegates instead of using BeginInvoke
Posted by robparr@hotmail.com at 11/30/2007 3:13:04 AM
Hello, hopefully someone can help me.
I am reading and learning steadily about threading and asynchronous
programming, which to me sound like the same thing. At the moment I am
not sure what the difference is between using ThreadStart and
delegates instead of using BeginInvoke. Can both of t... more >>
listviewitem
Posted by plork at 11/30/2007 3:07:12 AM
hi all can anyone show me how i add a button to each row in a
listview?
i'm adding each row like this but i need to add a button as well
lv = new ListViewItem(id);
lv.SubItems.Add(xx);
lv.SubItems.Add(yy);
m_lstView.Items.AddRange(new ListViewItem[] { lv });
when i do AddRange i nee... more >>
Resources: How to retrieve localized resource?
Posted by Axel Dahmen at 11/30/2007 3:06:01 AM
Hi,
I've created a class library assembly containing several string resource
files, like:
- TableColumns.resx
- TableColumns.de.resx
- General.resx
- General.de.resx
I don't know how to address each of these having automatic language
fall-back enabled.
If I write...
new
Res... more >>
Running command line from aspx page
Posted by jetoo at 11/30/2007 2:16:45 AM
Hi there,
i'm trying to run a powershell script from a aspx page.
Here's the code:
//Powershell arguments
String powershell =3D "C:\\WINDOWS\\system32\
\windowspowershell\\v1.0\\powershell.exe";
String args =3D " -PSConsoleFile \"C:\\Program Files\
\... more >>
converting tableAdaptor queries into stored procs
Posted by Andy B at 11/30/2007 1:50:33 AM
Is there an easy way to convert tableAdaptor queries into stored procs
without messing up the dataTables in the dataSet or losing the queries
themselves?
... more >>
clear fillEllipse graphics
Posted by Slickuser at 11/29/2007 10:35:13 PM
I have this function that will fill the ellipse every 10 seconds with
specific x,y,w,h.
Now I want do the the reverse, to clear the ellipse with given x,y
using Timer at every 30s.
Or I have put these (x,y,w,h) to an array?
Later go back the array and fill ellipse with the same color as
back... more >>
Why this code does not cause error in .NET 2 & 3.5 (bug?)
Posted by Andrus at 11/29/2007 7:45:29 PM
While iterating a collection it is not allowed to remove its element.
However code below runs *without* (!) error in .NET 2.0 and 3.5
There could be some buggy IEnumerable implementation that fails to report
errorneous
removal of collection content
Please confirm, is this .NET bug ?
And... more >>
C# DLL in Delphi
Posted by Iwan Budihalim at 11/29/2007 7:11:48 PM
is it anyway to call C# DLL (manage) with Delphi ?
Thanks
... more >>
DataGridView -- What row am I on?
Posted by Dom at 11/29/2007 6:50:47 PM
I like to use the AlternateRow option for DataGridViews, so that the
odd rows have a defaut style, and the even rows have an alternate
style, usually just a light blue backcolor.
Sometimes I need to change the style of cell to give a visual clue
about the data, for example, italicise it. But ... more >>
vb/window serivce
Posted by someone@js.com at 11/29/2007 4:08:54 PM
Hi, I use C# to build a window service, inside it, there is a complex
function
dosomething() .
Now in asp/VB, I need to call the docomething(), is it possible?
... more >>
Is the .NET 3.5 SDK available yet?
Posted by Anders Borum at 11/29/2007 3:34:08 PM
Hi!
I am looking for the .NET 3.5 SDK Documentation (the most current version I
can find online is for .NET 2.0). If you could provide a link or information
as to when it'll be released, I'd be very happy. The .NET 2.0 SDK
Documentation is a really great tool and I keep it available at all ... more >>
System.Threading.Thread Question
Posted by Trecius at 11/29/2007 2:44:01 PM
Hello, Newsgroupians:
I've two questions regarding the System.Threading.Thread namespace.
First, what is the point of having a ThreadStart parameter? For example...
using System.Threading;
Thread myThread;
myThread = new Thread(new ThreadStart(myFunc)); // This works
myThread = new T... more >>
Garbage Collector Reference Counting
Posted by mdoxdo@gmail.com at 11/29/2007 1:59:43 PM
Hi all,
I was wondering if there is a way to get the number of references an
objects have (ie, other objects reference that object)? I know
that .Net GC uses a different mechanism than the RefCount in C++
since .Net uses managed objects. I just need to know if there is any
way possible to get... more >>
List of common exceptions?
Posted by Smokey Grindel at 11/29/2007 1:54:43 PM
Is there a list of commonly used exception types out there and what they are
intended to be used for? Thanks!
... more >>
returning x chars of Eval("..")
Posted by Kevin Blount at 11/29/2007 1:50:33 PM
I'm putting a radG:GridTemplateColumn together (which is probably
irelevant), and within it I'm using a Label, as so:
<asp:Label ID="defaultDescription" runat="server" Text='<%#
Eval("description") %>'></asp:Label>
Fo this Label, I'd like to only show the first 50 chars of the
"description"... more >>
Embedded user controls
Posted by Dave Kelly at 11/29/2007 1:48:08 PM
c#, .Net 2.0, VS2008
I have a user control, and wish to embed other custom/user controls
within this control.
I am getting problems in compilation though, that the type or
namespace cannot be found.
I have used the same namespace for both components.
Everything compiles and works fine ... more >>
DataTableCollection object question
Posted by rodchar at 11/29/2007 1:40:03 PM
hey all,
this is what i thought would make sense to me but got the infamous "Object
not instantiated" error:
DataTable dt;
dt = mySprocDt;
DataTableCollection dtColl = null;
dtColl.Add(dt);
instead i had to do this to make it work:
DataSet ds = new DataSet( );
DataTableCollection... more >>
keybd_event wont fire KeyDown event for VK_Return keycode on textbox?
Posted by ink at 11/29/2007 12:54:50 PM
Hi all,
I am working with C# CF2 on windows mobile 5 phone edition on a Symbol MC70
device.
For some reason the KeyDown Event doesn't fire when you use the keybd_event
to send the VK_Return= 0x0D.
If I use the hard keyboard Return I get.
KeyDown
KeyPress
KeyUp
KeyUp
If I use ... more >>
The right way from VS2005 to VS2008?
Posted by Rainer Queck at 11/29/2007 12:48:56 PM
Hello NG,
I now have the ISO image of VS2008 on my (external drive) :-)
Now I am thinking of the right way to go from VS2005 to VS2008.
Currently I have VS2005 prof german installed.
For a parallel installation I don't have enough room on my system.
Also at the moment only the english versi... more >>
Read Stream Until Bytes Hit?
Posted by coconet at 11/29/2007 12:42:29 PM
I am trying to use a StreamReader to read consecutive bytes into a
byte array until a ";" is hit, then store everything read up until
that point into a new byte array.
I have a semicolon-delimited file that I am trying to read and parse
using StreamReader and byte arrays.
Thanks.
... more >>
Renaming a class
Posted by dragonslayer008@hotmail.com at 11/29/2007 12:21:24 PM
Hi I have a designer generated class when I made a user control
project. There is a comment warning:
/// WARNING: If you change the name of this class, you will need to
change the
/// 'Resource File Name' property for the managed resource
compiler tool
/// associated with a... more >>
Associate WPF Graphic with a Class
Posted by Wonko the Sane at 11/29/2007 12:13:01 PM
Hi All,
I have the following (much-simplified) situation. I have a class, part of
which involves drawing graphics on a Canvas. I may have a number of
instances of these graphics, which may include a line, two rectangles used as
endpoints, and perhaps a label for the line.
I want to som... more >>
FillSchema
Posted by Alex K. at 11/29/2007 12:02:00 PM
Hi all
I noticed that if Select stmt returns dataset containing two tables,
executing FillShema only populates schema info for first table only.
Simple test: (.NET 2.0)
....
string strSQL = "Select * from tableA select * from tableB"
OleDbConnection cn = new OleDbConnection(strConnectio... more >>
Databinding
Posted by DLI at 11/29/2007 11:52:26 AM
Scenario:
I have a form and two text boxes and one datagrid.
I have a dataset composed of two tables
Questions (QuestionID, QuestionText)
Answers (QuestionID, AnswerText)
there is a one to many relationship between Questions and Answers defined by
this Relation (QuestionAnswer) in the d... more >>
Math functions in VB (or even a dll somewhere) Options
Posted by Nondisclosure007 at 11/29/2007 11:47:46 AM
Hello. If this is the wrong group for this, please let me know.
I'll
post it somewhere else.
I've been doing data imports into MS Excel (ver 2007) and using the
CORREL function. What I was wondering was is there anything like
this
in Visual Basic or C#? Or even a DLL? I've got VS2008 and... more >>
Label Expand Left
Posted by randy1200 at 11/29/2007 11:37:01 AM
I have two labels on a form. The text for these two labels is assigned at
runtime.
lblLeft lblRight
If the text for lblLeft is wider than the default, the text runs into
lblRight.
How do I make lblLeft automatically expand to the left?
Thanks,
Randy... more >>
Advantages of going with LINQ
Posted by Ronald S. Cook at 11/29/2007 11:30:13 AM
We're currently architecting an enterprise Windows app using WCF. However,
now with LINQ, we're planning to re-architect that way instead.
I've prepared the below in an attempt to explain/sell the new approach to
our team.
Any feedback would be greatly appreciated.
Early 90's: fat cl... more >>
What tableAdaptor should this query be in?
Posted by Andy B at 11/29/2007 10:25:10 AM
I have a delete query that spans 2 tables: NewsArticles and NewsHeaders. I
am trying to figure out what tableAdaptor to put the delete query under
since it deals with 2 tables. Should it be in the NewsArticles table since
thats what it does? is delete newsArticles? or should it be in the
New... more >>
|