all groups > c# > april 2006 > threads for thursday april 20
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
Problem with reading .INI Files in C#
Posted by Kondapanaidu at 4/20/2006 10:40:55 PM
Hi,
I am using .NETV1.1,
I have the problem with reading Ini file.
[xxx]
a
b
c
I am not reading this section.
But when I put
[XXX ]
a=
b=
c=
In this case I am reading fine.
[XXX ]
a
b
c
How to read this XXX section.
Thanks in advance.
*... more >>
Interface with Flash8 External API
Posted by sandy82 at 4/20/2006 10:04:26 PM
Hi I want to interface my winforms application with External API of
Flash 8 . If any one has done a similar problem do ... guide ..
... more >>
Is this really an Illegal Cross Thread Call?
Posted by Dave Booker at 4/20/2006 9:35:01 PM
I have a Thread making a callback to a Form function that alters Form data.
Of course, the debugger is telling me, "Cross-thread operation not valid:
Control 'FormTest' accessed from a thread other than the thread it was
created on."
But I am locking before I touch the shared data, so do I... more >>
Initializing a class
Posted by Ikke at 4/20/2006 7:30:18 PM
Hi everybody,
Suppose I have a class 'Dog' defined as follows:
public class Dog : Animal
Now suppose I have the following code:
Dog fido = null;
Animal animal = new Animal();
Then how do I assign the animal Object to fido?
If I were to write:
fido = (Animal) animal;
I get an error i... more >>
get information used to uniquely identify a PC system
Posted by Ryan Liu at 4/20/2006 7:16:26 PM
Hi,
What are APIs can used to get information used to uniquely identify a PC
system?
Indeed the only thing I really want is to find a mechanism to generate a
global unique key to identiy my software installed across customers. The
installation package is same, when my client install it, I w... more >>
changing a folders custom picture
Posted by jeremiah johnson at 4/20/2006 7:03:17 PM
Hi everyone.
I'm going to write an app in C# that changes a folder's custom picture
to some kind of picture that represents how much 'stuff' is inside the
folder...
.... as soon as I can figure out how to change this:
http://naikrovek.org/stuff/folderPicture.png
programmatically.
... more >>
StringBuilder vs. String performance
Posted by Richard Lewis Haggard at 4/20/2006 6:22:34 PM
I thought that the whole point of StringBuilder was that it was supposed to
be a faster way of building strings than string. However, I just put
together a simple little application to do a comparative analysis between
the two and, surprisingly, string seems to out perform StringBuilder by a
... more >>
Split an action and run on the servers
Posted by Venkat at 4/20/2006 6:21:31 PM
Hi,
Ours is a windows based application and I have to perform an
action which takes much time (as it requires much CPU time) on a single pc.
I want to split the action to more than two and I want to run the action on
different servers and mix the result at end and do the res... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
How to excute IE with specified URL?
Posted by Boki at 4/20/2006 6:08:56 PM
Hi All,
I want to excute IE with specified URL, my code:
Process p = new Process();
p.StartInfo.FileName = @"C:\Program Files\Internet
Explorer\IEXPLORE.EXE http://www.google.com?ei=UTF-8&p=" +
textBox1.Text;
p.StartInfo.CreateNoWindow = true;
p.Star... more >>
No scroll bar to choose event?
Posted by Boki at 4/20/2006 6:02:03 PM
Hi All,
Why I can not see the scroll bar to choose the event I want to handle (
as in VB ) ?
Best regards,
Boki.
... more >>
Running EXE's on ASP 2.0 server
Posted by joe at 4/20/2006 5:13:54 PM
I have the following code in an aspx.cs file:
[snip]
string strLocation;
strLocation = Server.MapPath(".")+"\\test.exe";
System.Diagnostics.Process Proc = new System.Diagnostics.Process();
Proc.StartInfo.FileName = strLocation;
Proc.Start();
[snip]
... more >>
RSS in a repeater
Posted by David at 4/20/2006 5:12:28 PM
Hi all,
I have an RSS feed that I am dropping into a repeater (using the Dataset's
ability to collect from a URL).
Is there a quick and easy way to limit the amount of rows from the feed
appearing? I have done a search and cannot find one.
Thanks.
Best regards,
Dave Colliver.
http:... more >>
static event generates CS0052
Posted by Dave Booker at 4/20/2006 5:10:01 PM
What is the right way to declare a static event handler?
I have a:
delegate void TestEvent(string ID, ref string payload);
namespace TestNS
{
public class TestFrm : System.Windows.Forms.Form
{
public static event TestEvent newEvent;
....
And this last line gives me compiler e... more >>
Help creating a class library
Posted by AAOMTim at 4/20/2006 4:53:01 PM
I would like to create a class library that uses a ListItemControl, but when
I try to create the class withthe following using atetments, it doesn't
recognize the System.Web.UI components:
using System;
using System.Web;
using System.Web.UI;
Why is that? How can I get around that?
--
... more >>
Load an object reference onto the stack ???
Posted by VivekR at 4/20/2006 4:16:19 PM
Hi
I have a class CodeGen in which GenerateILBody is a method that uses
ILGenerator.Emit to create the IL code as method body for a dynamic
method DynMethod. GenerateILBody at runtime must call another method
CallBack of the class CodeGen.
All i have to do is to emit the IL code that loads ... more >>
building url with StringBuilder
Posted by John A Grandy at 4/20/2006 2:38:10 PM
I am using a StringBuilder to build a link tag (based on categoryId and
categoryName , which are populated elsewhere ) :
StringBuilder sb = new StringBuilder();
sb.Append("<a href=\"http://www.mywebsite.com/mypage.aspx?category=");
sb.Append(categoryId);
sb.Append("&filter=price\">");
sb.Ap... more >>
whole word substring search w/o using regular expressions
Posted by seannakasone NO[at]SPAM yahoo.com at 4/20/2006 2:26:19 PM
Is there a way to search a string for a whole word w/o using a regular
expression?
i.e.
mystring.IndexOf(mypattern, *WholeWord);
The reason i rather not use a regular expression is because sometimes i
want to search for whole words w/o the regular expression special
characters being interp... more >>
access to jpeg properties
Posted by Val at 4/20/2006 2:19:01 PM
I am trying to programmatically access to the properties of a picture file
(jpg). These properties are available in Explorer by right
clicking->selecting "properties"->"Summary" tab. Examples of these properties
are: width, height, Date picture Taken, etc.
Unfortunately, I cannot find a way... more >>
Managed WMI memory problem
Posted by Salvador at 4/20/2006 1:39:01 PM
Hi,
I am using WMI to gather information about different computers (using win2K
and win 2K3), checking common classes and also WMI load balance. My
application runs every 1 minute and reports the status of the machines.
Upon we follow the .NET object lifetime recommendations the applicatio... more >>
Trying to use nant to build and link resource files into final product
Posted by urban.john NO[at]SPAM gmail.com at 4/20/2006 1:32:40 PM
Here are my steps:
create resource files from resx files:
<echo message="CREATING RESOURCE FILES FROM RESGEN EN" />
<resgen todir="product\resources_en" verbose="true">
<resources>
<include name="${AppName}\**.en.resx" />
<include name="${AppName}\Global.asax.... more >>
Replacement for NDoc?
Posted by J.Marsch at 4/20/2006 1:24:01 PM
Hello:
Since NDoc does not seem to support .Net 2.0, (and the project seems to be
inactive), what are the other alternatives out there for producing HTML
documents from XML Comments in C# 2.0 code?
... more >>
Can't add UserControl to toolbox, missing reference
Posted by sklett at 4/20/2006 1:01:53 PM
I'm trying to add an assembly that has a couple UserControls (among other
things) to the toolbar. When I browse to it, I get a message that it's
can't find an assembly that it needs (ObjectBuilder) - I know my assembly
uses ObjectBuilder, but I don't know what I need to do VS2005 to find it? ... more >>
Iterate through files
Posted by Toco at 4/20/2006 12:49:02 PM
Hello. I have program which now searches for one file in a directory,
because file name is hard-coded. What I wish to do is to have program go to
first file in directory, do some processing, then go to next file in same
directory, do some processing, ect, ect. It seems to me this would be a... more >>
DateTime conversion to its sqlServer datetime float representation.
Posted by A.Neves at 4/20/2006 12:32:36 PM
Hi,
I'm having a problem, I have a DateTime value in Portuguese representation
(dd-mm-yyyy) and I'm using SQLServer2005 with its default language English
(yyyy-mm-dd), so when I assemble a WHERE clause the date that goes to
SQLSErver is wrong.
I found that in SQLSErver I can convert a da... more >>
asp.net compiling
Posted by gl at 4/20/2006 12:14:02 PM
I have a very general question. When you compile a website in asp.net 2.0
where do the compiled assemblies (for the individual pages) go? You used to
see something in the bin directory for them, but now I don't see anything
there. Am i missing something?... more >>
convert.ToDateTime vs System.DateTime.Parse
Posted by tshad at 4/20/2006 12:11:07 PM
Is there any difference between convert.ToDateTime and
System.DateTime.Parse?
I am using them both and they seem the same.
Is one better to use than another?
Thanks,
Tom
... more >>
Visual * Express free forever. Thank u Microsoft !
Posted by Web learner at 4/20/2006 11:52:30 AM
http://blogs.msdn.com/danielfe/archive/2006/04/19/579109.aspx
... more >>
VS8 C# error - "compiler could not be created."
Posted by MikeJ at 4/20/2006 11:51:31 AM
In my office, we have workstations with standard Win 2000 images (OS plus
standard apps like Office, etc.) as developers, we then install our
development tools on top of those images. other developers in my office
have installed VS8 and use it with no problems. however, on a new
workstati... more >>
Start Menu / ClickOnce
Posted by Chris Rennert at 4/20/2006 11:05:56 AM
Hello all, is there any way I can create additional start menu items
under my program folder that is being created by ClickOnce? I have
created the SUpport URL, but I would also like to include a help file,
and a few additional documents. I appreciate any help you guys can give me.
Chris... more >>
Built In Help Pages
Posted by RBChallenger at 4/20/2006 10:28:45 AM
Hi,
Can anyone tell me how to embed help pages into an application? I
looking for the standard windows help system that you typically see..
little purple books as the index pages in the other pane, ability t
open the correct page on demand etc. Thanks ahead of time!!
--
RBChallenge
-------... more >>
Peculiar WebRequest behaviour when specifying range with AddRange
Posted by Richard K Bethell at 4/20/2006 10:15:46 AM
I have built a downloading engine that is designed to use the HttpWebRequest
and HttpWebResponse classes to draw files in 64K chunks, rather than pull a
file all at once. This is to ensure that the client is never overtaxed with
huge byte arrays or streams going into memory as the downloaded f... more >>
Calling dll functions
Posted by John at 4/20/2006 10:13:02 AM
DWORD _stdcall DLLFunction(DWORD Num, CHAR *Str);
I call the above dll function from a C++ app. Now I need to call it from my
C# app. How can I do it?
[DllImport("MyDll.dll")]
public static extern int DLLFunction(int Num, string Info);
int Num;
string Info = new string(' ', 80);
DLLFun... more >>
How to update program when user double-clicks icon
Posted by Dan Tallent at 4/20/2006 10:11:15 AM
When a user launches the program, I want it to test if an update is
available.
You see many examples of this method to update. (Quickbooks, Norton
AntiVirus, online games)
I have a method already to determine if an update is available and download
it to the end-users computer. It does not... more >>
Mutable Types and Read-Only Fields
Posted by Mythran at 4/20/2006 9:58:10 AM
http://msdn2.microsoft.com/en-US/library/ms229057(VS.80).aspx
* Do not assign instances of mutable types to read-only fields.
I would have to disagree with this "Field Design" guidelines...to an extent.
Example:
public class SomeClass {
private NameValueCollection mCollection;
... more >>
Why are get/set properties useful?
Posted by VMI at 4/20/2006 9:18:01 AM
WHy are the get/set properties so useful? I know they're used so that I don't
directly access a variable, but why is that so useful? What would the
difference be between using it directly and using get/set?
Thanks.... more >>
Dispose of Worker Thread?
Posted by joey.powell NO[at]SPAM topscene.com at 4/20/2006 8:44:15 AM
I have a windows forms app (VS 2005) that uses a worker thread to do
lots of stuff in a job. When I run the job again - always after the
first completes - from the app (back to the UI thread to spawn another
worker thread) I notice that the performance has slowed a lot. Is there
something I need... more >>
Local variables in Asynchronous socket server
Posted by Macca at 4/20/2006 8:19:01 AM
Hi,
I am implemeting an asynchronous socket server in my app. There will be up
to 30 clients sending data to the socket server.
Within the socket server I will have a number of local variables for each
client connection.
e.g varA, varB, varC, varD.
I have been testing the comms with... more >>
IBindingList with dynamic columns
Posted by Dante at 4/20/2006 8:09:28 AM
Hi Folks,
I have a datagrid that could be bound to an IBindingList. Currently I
don't get it how the mapping is made between the class and the grid. As
far as I got I have a class with some public properties that will be
mapped automatically by the grid to be used as columns.
Now I have the... more >>
Repeater
Posted by Doug Parker at 4/20/2006 6:12:23 AM
I'm trying to use the repeater control to create a column-like row of
data, I've searched the net and it doesn't appear to be that easy. Use
this page for reference:
http://www.westmarkadvisors.com/photo_gallery.php (i'm converting this
to .net)
I'm using the repeater to list all of the th... more >>
Resolve Email Address
Posted by Roger at 4/20/2006 5:32:21 AM
Hi,
I wrote code that captures a users windows nt id and sends an email in
their name. However, I haven't been successful in resolving their
exchange id based on nt logon. Does anyone know how to do this?
Roger
... more >>
COM problem
Posted by Steven Blair at 4/20/2006 4:56:50 AM
I am attemtping to create a C# which can be used in my C++ app.
Here is my source.
http://pastebin.com/671099
Register for COM Interop is checked and the following warning is
displayed when I build:
Warning 1 "C:\Documents and Settings\sblair.TS3INTERACTIVE\My
Documents\Visual Studio 200... more >>
Compare class names of interface inherited classes
Posted by Joachim at 4/20/2006 3:04:02 AM
Let's say I have this:
interface MyInterface {}
class MyClass1 : MyInterface {...}
class MyClass2 : MyInterface {...}
class SomeClass
{
MyInterface myClassX;
public SomeFunc()
{
if (someCondition)
myClassX = new MyClass1();
else
myClassX =... more >>
Richedit / Custom Control help for final university project
Posted by Lee at 4/20/2006 2:56:33 AM
Hi all, I'm trying to programatically change the background color of
lines of text and running into a few difficulties, anyone got any
suggestions?
my relevant code is as follows:
public void colorLines() {
//_Paint = false; //don't want to update while we are doing
this
... more >>
Best place to store passwords?
Posted by Macca at 4/20/2006 2:39:01 AM
Hi,
My application uses passwords to limit access to certain parts of the app. I
was considering storing these in my database but have heard that there can be
problems with this. I have heard using the Global Assembly Cache (GAC) would
be a good place.
Does anyone have any opinions on th... more >>
Open URL in Window Form
Posted by cherryparadise001 NO[at]SPAM gmail.com at 4/20/2006 12:49:41 AM
Is it possible to open a website or URL in internet explorer by
clicking a button in window form?
what class should I use?
... more >>
Open URL in Window Form
Posted by cherryparadise001 NO[at]SPAM gmail.com at 4/20/2006 12:49:40 AM
Is it possible to open a website or URL in internet explorer by
clicking a button in window form?
what class should I use?
... more >>
Want to Record Skype Messenger Conversation in C#
Posted by MS News at 4/20/2006 12:00:00 AM
hi
I need help.I want to to record my Skype Messenger Conversation i.e Incoming
and Outgoing
conversation in C#.Please if some body know guide me.I need starting
help.what should i
study for this?
thanks
Usman
... more >>
Book recommendation
Posted by Materialised at 4/20/2006 12:00:00 AM
Hi Everyone,
I am looking for a book on C#.net (2005) which will give me a insight
into programming using more advanced techniques such as multi-threading
and sockets examples.
Does anyone have any recommendations?
Kind regards... more >>
This page contains both secure and nonsecure items
Posted by Mantorok at 4/20/2006 12:00:00 AM
Hi all
This has been driving me nuts for months now, if I access my site from IE
https://db.cornwall.gov.uk/PlanningApplications and then hover over one of
the 2-level menus it comes up with the message:
"This page contains both secure and nonsecure items. Do you want to display
the non... more >>
Convert object type to byte[]
Posted by Kimelia Schiles at 4/20/2006 12:00:00 AM
Hi,
I would like to know how to convert the value with return type of object to
a byte array. For example:
byte[] photo = ds.Tables[0].Rows["Photo"];
Thanks and have a nice day
... more >>
Q: datatable to array
Posted by dllhell at 4/20/2006 12:00:00 AM
Hi all,
Is there a way to make a string array from DataTable?
I wish to avoid for statement...
thanks in advance
... more >>
media player activeX control
Posted by Sa¹o Zagoranski at 4/20/2006 12:00:00 AM
Hi,
I'm trying to use the media player activeX control (wmp sdk 10) in my
windows forms app.
My problem is that I have the file in a stream in memory and I don't want to
write it to a temp
file.
Is there a way I can play the stream without writing it to a temp file?
thanks,
sa¹o
... more >>
XML problem
Posted by Jason Huang at 4/20/2006 12:00:00 AM
Hi,
The data MyTable in SQL Server is:
123456789
And the XML in my C# Windows Form project is also:
123456789
However, if I request the data after '9' using SqlClient , it will raise
error, this is correct.
But if I use the ReadXML method requesting data after 9, it will start over
from ... more >>
|