all groups > c# > october 2003 > threads for thursday october 2
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
how to create/reg/access a virtual drive
Posted by Iwan at 10/2/2003 10:47:09 PM
I have a speciffic task of which i do not know how to start on.
The task is to create a virtual drive (like a ram drive og deamon tools).
Through this drive files are to be saved and loaded like a normal drive, but
the "files" are created runtime by my program. The idea is that the program
acc... more >>
WinForms And XML
Posted by Empire City at 10/2/2003 10:30:12 PM
I saw the following requirement somewhere:
"....using WinForms and the screens should be described in XML. The XML is
to prescribe both the layout as well as the connectivity to the underlying
model"
Can someone tell me how a Windows Form can be described in XML?
... more >>
CPU usage?
Posted by Dirk Reske at 10/2/2003 10:11:12 PM
Hello,
which performance counter do I have to use, if want to know the actual cpu
usage?
... more >>
Main() in classes
Posted by Marc at 10/2/2003 10:01:16 PM
I am just starting out teaching myself C#, and I have come accross a
confusing point in my book. It seems that any class can have a Main()
function, but what does that mean? Is the Main() function for a class called
whenever an instance of that class is created, or would it be there for
another ... more >>
binary diff
Posted by Ching-Lung at 10/2/2003 9:34:08 PM
Hi all,
I try to create a tool to check the delta (diff) of 2
binaries and create the delta binary. I use binary
formatter (serialization) to create the delta binary. It
works fine but the delta binary is pretty huge in size. I
have 1 byte file and 2 bytes file, the delta should be 1
... more >>
open source C# game projects?
Posted by Brandon J. Van Every at 10/2/2003 9:28:51 PM
Anyone know of any "good" open source C# game projects out there? Something
that actually has a game engine and some content done, so I can just fiddle
with it and do interesting / goofy things. I hesitate to state genre
preferences. I've been all over SourceForge and it's slim pickings in C#
... more >>
Pass a structure by reference to C++ dll in .Net Compact Framework
Posted by Maloney at 10/2/2003 6:13:33 PM
I'm trying to pass a structer from C# to a C dll in .Net Compact Framework
This partially works. If in the GetStatus I only set -- status->fileLength
= 10; -- and not the second variable then filelength = 10 and fileposition =
0, but if i set the second one only or both of them then they are f... more >>
Problems with the NNTP server?
Posted by J.Marsch at 10/2/2003 6:07:28 PM
For the past few days, I've been getting really poor performance with these
newgroups (use Outlook Express 6 as my NNTP reader), and sometimes it will
completely fail download a message, and I have to go to the Web interface to
read it. Is there some kind of problem with the NNTP server, or am I... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
"using" question
Posted by Charles Stanley at 10/2/2003 5:51:58 PM
Hi all,
I'm new to C#, and have two pretty simple questions:
I have a class, in a .cs file by itself. I need to make use of the sole
function in this class in another .cs file. Here's the code, filename
bannertrack.cs
First question - the function "LogImpr" users ServerVariables["REMOTE... more >>
time zones
Posted by Uzi Baruch at 10/2/2003 5:11:41 PM
Hi!
im working on a client server application using .NET remoting, i have a
problem in which the server is at another time zone and i want to enforce
the server timezone on the client current proccess.
something like setting the server culture info on the client, but doing that
only sets th... more >>
"global" singleton
Posted by Pawel Janik at 10/2/2003 5:03:54 PM
Hello.
I'd like to create utility, that writes something to a file, but this
utility shoud be easy to access from several different applications.
Because this utility have to open a file, it shoud do this only once (there
is one class instance, but every application has a acces to it). What
t... more >>
hmm, reg exp prob again
Posted by Lasse Edsvik at 10/2/2003 4:47:31 PM
Hello
why doesn't this match everything after first space?
Match m = Regex.Match(@"/great ba b4",@"Zs:+");
/Lasse
... more >>
how i run a tcplistener in a windows service
Posted by byron guerrero at 10/2/2003 4:15:41 PM
I need to execute a TcpListener in a windows service.
tanks for the help.
... more >>
more values in one section of app.config
Posted by Patrick at 10/2/2003 4:14:56 PM
Hi
I want tu use an app.config like the example below. The problem is, that i
don't know how many Action-Tags there will be, because this can be changed
by the user. When using
System.Configuration.ConfigurationSettings.GetConfig("IncomingActions/action
") I can access the config file, but g... more >>
Programmaticallygetting type of an enum
Posted by Tom Hundley at 10/2/2003 3:40:30 PM
Scenario:
- I'm dumping an int value of myEnum into a table.
- I am getting that int value out of the table.
- I need to set myEnum equal to that int value
Easy enough:
private enum animals {cat=0, dog=1}
private animals myAnimal = (animals)1;
OK- so that works, and myAnimal is set to dog... more >>
Problem to serialize a interface in Xml
Posted by Pol Bawin at 10/2/2003 3:32:35 PM
A class has a private field of type IWizard (An interface) and a public
property to access it.
When I try to serialize the Geometry class in XML, i have an error but it
works in Binary
Can you help me
[Serializable]
public class Geometry
{
....
private IWizard _wizard;
... more >>
Trivial question - Visual C# .Net vs Visual Studio .Net
Posted by John Timbers at 10/2/2003 3:21:18 PM
I'd like to purchase Visual C# .Net for learning purposes only since it's a
lot cheaper than Visual Studio (note that I'm a very experienced C++
developer). Can someone simply clarify the basic differences. Ok, Visual
Studio has C++, VB and J++ thrown in plus some extra bells and whistles (I
alr... more >>
place c# inside aspx
Posted by coder5811 NO[at]SPAM yahoo.com at 10/2/2003 3:13:08 PM
Hi,
I have to set the url of a link from the codebehind.
I want to call the GetLink function which returns a string.
<<a href= <<% GetLink(); %>>My Link<</a>>
- Thanks,... more >>
Iterated chain of values
Posted by Jesper Stocholm at 10/2/2003 2:48:22 PM
I have an iterated function like this:
01 string Guid = System.Guid.NewGuid().ToString();
02 _bSeed = (new UnicodeEncoding()).GetBytes(Guid);
03
04 CreateHashChain(0,_bSeed,10000);
05
06 private void CreateHashChain(int i,byte[] b, int max)
07 {
08 SHA1 sha = new SHA1CryptoServicePro... more >>
Stopping Thread Blocking on Socket.Receive
Posted by Bruce Vander Werf at 10/2/2003 2:15:39 PM
How can I cleanly stop a thread that is currently blocking on
Socket.Receive?
I don't want to use Thread.Abort, because I would like the thread
method to exit cleanly, and the same code must run under the Compact
Framework, which does not support Abort.
Will Socket.Close cause the Receive m... more >>
problem: how to know when temporary static files are requested so that they can be deleted...
Posted by franklopez2000 NO[at]SPAM yahoo.com at 10/2/2003 2:11:35 PM
In .NET and C#, is there anyway to create a hook for a specific
directory or file where my C# .NET software can monitor which static
web files are requested by the browser?
What I am doing is writing temporary files to a specific directory for
a specific user, and then when the user has reques... more >>
How to solve timeout problem?
Posted by BVM at 10/2/2003 2:04:54 PM
Hi, All:
I have this error. It seems execution time is too long. Actually the =
execution time is about 30 seconds(I tested in Query analyzer). How do I =
solve this problem?
System.Web.Services.Protocols.SoapException: =
System.Web.Services.Protocols.SoapException: Server was unable to =
... more >>
Old Values in Web Textbox
Posted by Max Sandman at 10/2/2003 1:40:51 PM
You know how a textbox on a web-page retains previously typed values?
How do I get rid of that? Both the capability and the history?
sandman
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!... more >>
Avoid scientific notation when casting numbers to string
Posted by Dennis Myrén at 10/2/2003 1:35:37 PM
Hi.
Is there a way to make sure that float, double and decimal data types
never will be presented in a scientific notation?
I have tried to round(Math.Round) float's to 7 decimals, double's to 15
and decimals to 28 decimals, but that does not help.
And the System.Globalization.NumberFormatI... more >>
Properties of event log
Posted by Raghu Rudra at 10/2/2003 1:32:16 PM
Is there a way to modify the properties of event log once it is created with
..net language? For example, I want to change the size of new log to 1 MB
instead of 512 KB.
Can this be done using some other component in .net? The EventLog class does
not seem to offer any help in this regard.
T... more >>
Need docs on use of the .Net Framework Configuation 1.1
Posted by n_o_s_p_a__m NO[at]SPAM mail.com at 10/2/2003 12:56:53 PM
Ok, nobody at my office, including me, has a clue on .net security,
how to configure it, etc..
Any book or URL recommendations are welcome. Thanks.
-NS... more >>
Design Patterns
Posted by Mr.Tickle at 10/2/2003 12:35:01 PM
How can I impleement a singleton pattern in an abstract or interface for
inheritance to an object so all the pattern rules are followed on all
similar objects?
... more >>
Convert from Image to Bitmap
Posted by Fritz Switzer at 10/2/2003 12:27:26 PM
With two controls a PictureBox and another "PictureBox like" , Pic2, a
control from a dll, I'm stuck on cannot implicity convert
System.Drawing.Image to System.Drawing.Bitmap error.
How do I convert the following code so that the Pic2 can accept the Image
from the stream where it wants Pictur... more >>
C# Destructor Blueprint
Posted by Joe at 10/2/2003 11:47:37 AM
I am looking for the quintessential blueprint for how a
C++ like destructor should be implemented in C#. I see
all kinds of articles in print and on the web, but I see
lots of discrepencies. For example ...
C# Essentials (O'Reilly) - "Finalizers are class-only
methods". Not sure what "... more >>
As I able to corrupt the memory using unsafe code in C#?
Posted by babylon at 10/2/2003 11:31:30 AM
just like invalid pointer referencing in C++?
it seems to me so as unsafe code should prevent the runtime from checking
the memory location for performance issue, right?
... more >>
exiting constructor
Posted by RickN at 10/2/2003 11:26:38 AM
I want to test whether someone has the right to open
a form and need to test for this in the constructor. If they are not
permitted, I want to display a message and exit the form. The question is
how do I exit the form from the constructor before the form is initialized?
Can't use ParentForm.C... more >>
checkedListBox
Posted by Jonas Knaus at 10/2/2003 10:58:23 AM
hi there
i was wondering if it is possible to set a checkedListBox in a state where i
can not change the
checkboxes but still select the lines (entry with the name for the
checkbox).
when i set the control to enabled=false, te everything is diabled but i only
want the checkboxes
to be disab... more >>
Integer overflow handling on P3 vs. P4
Posted by Mikael Svenson at 10/2/2003 10:53:33 AM
Sample code:
static void Main(string[] args)
{
double inf = 0.1 / 0.0;
int test2 = (int)(inf * 0.0F);
Console.WriteLine( test2.ToString() );
}
On a P3 this gives the result "0", on a P4 it gives -2147483648 which is
int.MinValue.
Anyone know why this happens? Is it .Net which... more >>
Programmatically adding attributes to DataGrid columns
Posted by Mike Irwin at 10/2/2003 10:50:48 AM
I'm trying to add an attribute to each column header of a DataGrid. I know
that I need to do this within the ItemCreated event of the DataGrid, but I'm
stuck on how to go any further.
I found some info on MSDN on how to do this, but it's doesn't clear any
thing up for me Here's the paragraph... more >>
Shell in C#
Posted by Justin at 10/2/2003 10:02:08 AM
Hi,
Is there a comparable shell statement for C#? In vb.net you just use
Shell(). I need to shell out a process from within C#.
Thanks.
... more >>
Count of imbedded strings
Posted by peteZ at 10/2/2003 9:59:52 AM
How do you get a count of how many times a string appears in another string
?
eg. How many times does: "abc" appear in the string: "xyxabcxyzabcxyz"
Is there a String method that does thsi - I know I have seen this before but
cannot find details on it again.
- peteZ
... more >>
Inheriting Serialization
Posted by maheal.geo NO[at]SPAM yahoo.com at 10/2/2003 9:43:27 AM
I have been trying to Serialize an object that is the child of another
object which is also serializable. Here is the simplified scenario
(assume missing code is correct):
class One : ISerializable {
int x;
int y;
One() {}; // constructor
One(SerializationInfo i, StreamingContext... more >>
Something like StrRev?
Posted by at 10/2/2003 9:33:59 AM
I am just wondering if there is a C# equivalent to the VB StrRev function? I
have
written my own, but was wondering if there is a built-in way?
JRB
... more >>
need help to create a driver with C# , C++ ,VB or java
Posted by Bio at 10/2/2003 9:18:20 AM
Hy
I'm a computing student
I looking for some one who can help me to create driver by
using one of this compiler (see subject)
Because it's not part of my studies I couldn't find any
teacher to help me doing that
I getting worry cause all my diplomat project is stopped
because I cannot m... more >>
.text == "" vs .length==0
Posted by j_ruez NO[at]SPAM yahoo.com at 10/2/2003 7:56:54 AM
I am trying to learn the best ways to do some things in c#
When testing for an empty string, what is the best way to test it.
For example, if I have a textbox named txtValue
Should I use
txtValue.Text == ""
or
txtValue.Length == 0
and why would I use one over the other. And if ... more >>
Geting Source Code from Exception.
Posted by Gary van der Merwe at 10/2/2003 7:22:18 AM
I have a web application which has a custom error handler
which displays frendly message to user and emails me the
details.
The standard Asp.NET error handler page will, if the
project is in debug mode, display the line of code that
the error occoured on, as well as the previous and next ... more >>
sending an email
Posted by Giulio at 10/2/2003 6:02:50 AM
Hi, I use this code to send an email:
System.Web.Mail.MailMessage myMail =3D new=20
System.Web.Mail.MailMessage();
myMail.Subject =3D "Mail di prova.";=20
myMail.Body =3D "Questa =E8 una mail di test.";
myMail.To =3D "Tizio ";
myMail.From =3D "enrico.teotti@must-ht.it";
//SmtpMail.SmtpServe... more >>
Newbie Q about C# and DLLs
Posted by Peter Krikelis at 10/2/2003 5:42:00 AM
Hi,
We recently upgraded to C# from VB 6.0 and all our front
ends imported fine. I was wondering how to convert over
all our DLL code to C#. Does C# support the notion of
creating DLLs or do I have to create a Class Library
instead or whether a VB DLL could be called by a C# front-
end.
... more >>
Derived classes of an abstract class - adding methods.
Posted by newsgroper NO[at]SPAM yahoo.com at 10/2/2003 2:22:44 AM
I have an abstract class with some abstract methods. I created
another class that derives from the abstract method. In the derived
class I have overridden all the abstract methods. However, I tried to
create a method in the class that doesn't exist in the abstract class
and I get a compile er... more >>
|