all groups > c# > october 2003 > threads for tuesday october 7
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
What programs to start with ?
Posted by Stu Banter at 10/7/2003 11:55:11 PM
I am (like many here I read) still quite new to C#.
I meticulously try the examples in the book I use and found some tutorials
online.
Somehow (and this becomes a dejavu, from the time I tried mastering Delphi)
the gap between doing these separate assignments (many in Console
Applications) an... more >>
Flimsiness of Outlook OM
Posted by john bailo at 10/7/2003 11:38:39 PM
I notice a certain 'flimsiness' to the Outlook OM.
After running a c# interop against it, the OL client
seems to degrade to the point where I have to
stop/start OL, or log out or reboot to restore
functionality ( such as the MarkAsRead )
property.
... more >>
How Can I ? ? ?
Posted by Kate Luu at 10/7/2003 10:34:25 PM
after I installed the .NET frame work, I try to run some XML project but I
cannot, because no *.sln file for those project, they are just *.mak file.
How can I start the project with those *.mak files. Any help is deeply
appreciated. Thanks you all in advance...
the file location is: C:\Progra... more >>
FolderBrowserDialog
Posted by Pluto at 10/7/2003 9:55:16 PM
Is it possible to open (ShowDialog) the FolderBrowserDialog in a specific
folder location?
Thanks.
... more >>
RTF print
Posted by Dmitri Shvetsov at 10/7/2003 9:55:10 PM
Hi All,
Who prints RTF files or streams from C#? Can you give a hint or a good
advice? How to do it easier?
Regards,
Dmitri Shvetsov
... more >>
DirectoryInfo.GetFiles()
Posted by Pluto at 10/7/2003 9:45:56 PM
Hi,
I want to get a list of files matching certain extensions, such as
"*.jpg;*.gif" (i.e. all files ending with .jpg and .gif).
I was using DirectoryInfo.GetFiles(string) method. Unfortunately it appears
that I cannot have something like:
dirInfo.GetFiles("*.jpg;*.gif"); // where dirInf... more >>
Run base class's version of method in polymorphism
Posted by warren at 10/7/2003 9:40:58 PM
Hi,
How do I call the base class's version of method when there is polymorphism?
also, what if there are multiple levels of inheritance and i want to call
the method that is
several levels up?
Thanks.
... more >>
Load / Unload Dll as runtime?
Posted by Patrick Blackman at 10/7/2003 9:15:01 PM
I have a program that search the application path for all the Dll that
implement a certain interface IText ,when a Dll with the interface is found
,I run a method called
IText.Format() which works very beautifully but then I would like to unload
the Dll after running the ITextFormat procedure. A... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
System.Windows
Posted by Oleg at 10/7/2003 8:56:25 PM
Hi People,
sorry that I will repeat myself, the previous message
wasn't cleared.
Here is the error:
using System;
using System.Windows.Forms; <------------- ????
using System.Threading;
When I tried to compile: the compiler gave me errors:
D:\Oleg\Practice
C++\samples\VCSharp\A... more >>
Difference between Convert.ReferenceEquals() and Object.Equals()
Posted by kevin_ebert NO[at]SPAM hotmail.com at 10/7/2003 8:27:54 PM
Today, I ran into something I didn't quite expect. I'm sure there is
a logical explanation for it so I want to post it and see if anyone
can explain the difference to me.
I came across a situation when I wanted to see if a public variable
inside a struct was null or not. Sample code below:
... more >>
Provider Control installation
Posted by Mark Oliver at 10/7/2003 8:18:37 PM
Hi,
How do I install an instance of a Provider Control in a way that the IDE
will understand - so that the extended properties the Provider Control adds
are show in the IDE property grid?
In the November MSDN Magazine Cutting Edge code at
http://msdn.microsoft.com/msdnmag/code03.aspx ... more >>
Select Label.Text?
Posted by BGS at 10/7/2003 8:15:18 PM
Is there some setting that will allow users to select the text displayed in
a Label on a Windows Form? I would just like to be able to highlight the
text so that I could use Ctrl-Ins to capture the text to the Windows
clipboard. (I understand I could have the text display in a TextBox rather
t... more >>
Starting 2 Winforms at the same time ?
Posted by Cybertof at 10/7/2003 7:36:43 PM
Hello,
How to start 2 winforms at the same time (in 2 threads ?) ?
Application.Run(new frmForm1());
Application.Run(new frmForm2());
Here frmForm2 waits frmForm1 to be closed before beeing displayed.
Thanks,
Cybertof.... more >>
File creation problem
Posted by Patrick De Ridder at 10/7/2003 7:32:36 PM
I have a coding problem, modelled by the trial code below
I don't understand the error, however elementary this is.
Pleases assist,
Patrick.
try
{
FileStream stream1 = new
FileStream(@"c:\trial\trial.006",FileMode.OpenOrCreate,FileAccess.Read) ;
stream1.Close();
}
catch
{
Directory.Cre... more >>
Opinion requested: Where to instantiate field variable?
Posted by Pluto at 10/7/2003 6:13:42 PM
I have a private field like:
private XmlDocument xmlDocument;
In the constructor, I have:
xmlDocument = new XmlDocument();
Is it better to instantiate the XmlDocument in the field declaration like:
private XmlDocument xmlDocument = new XmlDocument();
Does it even matter? What is the orde... more >>
Get the status of CTRL key in MouseDown event
Posted by Boaz Ben-Porat at 10/7/2003 6:05:36 PM
Is there any way to determine if the CTRL key is pressed from a MouseDown
event on a DataGrid ?
TIA
Boaz ben-Porat
DataPharm a/s
Denmark
... more >>
Passing Safearray from unmanaged C++ to C#
Posted by Roland Moschel at 10/7/2003 5:56:47 PM
Hi there !
I have some Problems to get a SafeArray out of a COM Server written in
(Unmanaged) C++.
From (unmanaged) Visual Basic , everything is ok , but unfortunately
in C# I get an exception.
Can anybody help me ?
Thanks a lot !!
Roland
----------------C++ (unmanaged) C... more >>
DataGrid or DataView custom sorting
Posted by Mike Irwin at 10/7/2003 5:25:21 PM
I set up sorting by various columns for a DataGrid. For one of the columns,
I would like to implement my own sort algorithm, though. For example, the
column contains data like:
<a href="http://www.example.com">DEF</a>
<a href="http://www.test.somedomain">ABC</a>
If I sort by the default a... more >>
How to get filename?
Posted by Pluto at 10/7/2003 5:19:22 PM
Hi,
I can have code like:
Application.ExecutablePath
to return something like "c:\blah\myapp.exe"
I only want "c:\blah\myapp" (or even just "myapp") to return, is there some
other code I can use? Otherwise, I'll have to trim the ".exe".
In the end I want to build a string like "c:\blah\m... more >>
Detection of crashes
Posted by Mr.Tickle at 10/7/2003 5:09:00 PM
Is it possible to detect when an application crashes, like Watson does?
... more >>
An operation on a socket could not be performed because the system lacked sufficient buffer space or because a queue was full
Posted by Frank Jones at 10/7/2003 5:06:00 PM
When I call Dns.GetHostByName(Dns.GetHostName()) on one of our lab boxes I
get the below exception. I've seen posts saying others in these newsgroups
have seen similar issues since moving to .Net. I currently can only
reproduce it on one lab box. The box is running Windows 2000 Pro SP4. I
... more >>
Two dimensional array initialization
Posted by Dadi at 10/7/2003 4:53:59 PM
Hi,
I can make a simple initialization work like this:
Object[,] ONE_ROW =3D {{"Vodafone", "5550160100197016"}};
But, now I want to create another array that consists of multiple copies =
of ONE_ROW like this (will not compile):
Object[,] TWO_ROWS =3D {ONE_ROW, ONE_ROW}; // Works in Ja... more >>
C#: using System.Windows.*
Posted by Oleg at 10/7/2003 4:47:42 PM
Hi People,
Does anybody knows how to set up a V.S. .NET.
I am trying to use Windows libraries in my code, but got
en error that library in not found, not installed, etc.
here is the simple exaple.
using System.Windows;
using System.Windows.Frames;
anyhow, it doesn't recognize the ... more >>
Own debugger
Posted by Vadym Stetsyak at 10/7/2003 4:39:34 PM
Hello!
With the help of what API can I develop my own debugger in .NET Framework???
--
Vadym Stetsyak
PDS
... more >>
ListView problem
Posted by J_Max at 10/7/2003 3:45:54 PM
Hello,
This might be a really easy question, but... I am
developing a simple Smart Device application that uses a
listview. I have a function that adds a item to the
listview - code is below. I use the type listviewitem,
selitem, on one form to modify the listviewitem, using a
timer, ev... more >>
listView subitem click event.
Posted by andrewcw at 10/7/2003 3:26:12 PM
The clcik event on the ListView control seems to trigger
off the item level ( the first column ). I would like to
be able to trap the click event on a particular subitem (
a specific column's row ). If possible, what do I do to
activate that 'cell' - thanks.
I thought that listView.Labe... more >>
Application doesn't quit
Posted by Maziar Aflatoun at 10/7/2003 3:26:02 PM
Hi everyone,
I'm writing an application that needs to quit when it encouters an error.
However, Application.Exit() doesn't do anything here. Does anyone know why?
public bool timerenabled
{
get
{
bool timerenabled;
ManageXML XMLSettingFile = new ManageXML();
try
{
timerenabled =
C... more >>
Singleton Examination (Watch)
Posted by Cybertof at 10/7/2003 3:17:29 PM
Hello,
I need some help about a strange thing.
I have the following declaration :
public class CLockeEnv
{
private static CLockeEnv mlockeEnv;
public CLockeEnv()
{
}
public static CLockeEnv GetInstance()
{
if(mlockeEnv == null)
mlockeEnv = new CLockeEnv();
// R... more >>
Enum design question?
Posted by Donal McWeeney at 10/7/2003 3:12:37 PM
Hi,
I have a quick question on a design approach using enums - based on the
model of something like the HtmlTextWriterTag enum. I presume that what the
text writer does is use the Enum.GetName method to convert the enum value to
its corresponding tag string.
My question is, which is better ... more >>
Adding to a dataset
Posted by Philip Townsend at 10/7/2003 2:18:31 PM
I have a user control that populates a dataset from a stored procedure.
In the event that the stored procedure returns an empty result set, I
want to add a record to the dataset indicating to the user that the
search returned nothing. How should I add a value to the dataset?
*** Sent via D... more >>
static / new / singleton
Posted by Cybertof at 10/7/2003 2:13:28 PM
Hello,
I have a simple question :
In the below code, why do i get an (ERROR) saying
"An object reference is required for the nonstatic field, method, or
property 'mLockeEnv3'"
I don't understand why mLockeEnv3 should be static.....
Also, what is the difference betwenn mLockeEnv & mLo... more >>
Catching exceptions inside static callback methods
Posted by Adam at 10/7/2003 1:54:52 PM
If I catch an exception in a static callback method like:
private static void ResponseCallback(IAsnycResult
asyncResult)
{
try { //code...code...code }
catch (WebException e)
{ //handle exception }
}
will that that WebException object remain for the life of
the process???
I h... more >>
TRACE function ?? (writing to IDE output window while debugging)
Posted by Sagaert Johan at 10/7/2003 1:45:02 PM
In vc6 there was the TRACE fuction to write to the output window while
debugging
Is this also possible in the VS .NET IDE ?
... more >>
Custom user control - generate code
Posted by Lut at 10/7/2003 12:38:25 PM
Hey,
I made a custom usercontrol (Custom listview) in the
Control Library.
Now I want in the properties of design a property 'Sort'.
(That is not a problem to do that) But, when it is Yes
then I want to add following code in my class.
private ListViewSortManager SortMgr1;
and in the... more >>
Delegates using a non-static member function->Is the providing Object protected from GC?
Posted by Andreas Mueller at 10/7/2003 12:29:29 PM
Hi All,
the following Situation is going through my mind:
class Xox
{
public Xox(){}
public object Foo(){ return null; }
}
class Class1
{
public delegate object Functor();
[STAThread]
static void Main(string[] args)
{
Functor f = new Functor(new Xox().Foo);
// do someth... more >>
Stack Size
Posted by Ben R. Bolton at 10/7/2003 12:12:43 PM
The documentation indicates that the threads "default stack size" is 1MB.
The work "default" implies that it can be changed.
Is it possible to change the StackSize in .NET? If so how?
Is it possible to determine the amount of memory used in the current stack?
Any assistance would be appre... more >>
how to convert string to double?
Posted by cindy liu at 10/7/2003 11:57:46 AM
Hi,
In C#, how to convert a string to a double?
Thanks in advance!
Cindy
... more >>
DLL wird nicht gefunden
Posted by Hubert Hermanutz at 10/7/2003 11:40:12 AM
Hallo,
ich möchte ein kleines Testprogramm erstellen, dass auf eine Visual C
(Studio 6.0) DLL zugreift. Bevor ich damit beginne wollte ich die
notwendigen Schritte, anhand eines Beispiels nachvollziehen.
(http://www.codeproject.com/useritems/interop.asp?target=dll%7Cimport).
Im Beispiel wi... more >>
monitoring foler for file modification
Posted by Ron Vecchi at 10/7/2003 11:27:30 AM
Hi all,
Can someone point me in the direction on this one, resources or examples.
I am writing a Windows Service to monitor a folder. When I file is modified
within the folder or any subfolders it should write the name of the file to
a xml file.
Then at a specifed time all the files in the x... more >>
Subclassing ArrayList
Posted by Guinness Mann at 10/7/2003 11:09:42 AM
I have a class that I use throughout my application, and I store
collections of my class in an ArrayList. To avoid some really ugly
casting I'd like to subclass ArrayList to get a typed version.
Has anyone done this? Do you have any advice for me? How about some
sample code?
--
W... more >>
how to resolve ambiguous overloaded operators
Posted by azhitlenok NO[at]SPAM nanoink.net at 10/7/2003 10:08:46 AM
Hi,
My question is how to resolve in C# ambiguous overloaded operators?
Let say, I have two unrelated classes A and B, each one implements
overloaded operator + with the first parameter of type A, and the
second one of type B. Let say, these are not my classes and I know
nothing about the im... more >>
NetworkStream & inconsistent protocols
Posted by mike b at 10/7/2003 9:49:46 AM
Hi,
I have been working with what i believe is, an poorly designed
client/protocol, and this is causing me no end of headaches determining the
end of a 'fragment'. The header of each fragment ends in a constant fasion
(single line consisting of a carriage return) however the payload afterwar... more >>
debugging in design time
Posted by fragget at 10/7/2003 9:45:19 AM
hi-
i am trying to debug some design-time compenents. i have
instructions from this article.
http://msdn.microsoft.com/msdnmag/issues/03/04/Design-
TimeControls/default.aspx
however, when i get to this part
"Set Start Application to Devenv.exe path\devenv.exe"
the field is ready on... more >>
Is there a class like DataGrid.HitTestInfo for keyboard
Posted by GG at 10/7/2003 8:50:58 AM
Is there a class similar to DataGrid.HitTestInfo for Keyboard moving?
Need to get the coordinates of the grid when the user is using the shift
key and arrows
Thanks
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!... more >>
Constraints on Generics ??
Posted by andrew queisser at 10/7/2003 8:10:28 AM
I've read some material on the upcoming Generics for C#. I've
seen two types of syntax used for constraints:
- direct specification of the interface in the angle brackets
- where clauses
I looked at the files in the Gyro download but I couldn't find any
mention of constraints. Can anyone enli... more >>
Working with DataView VB.NET to C#
Posted by Liz at 10/7/2003 7:52:34 AM
Working with a DataGrid/DataView in VB, I have the
following code
VB.NET
//set the OrderID field of a newly added product
_productsData.Item(_productsData.Count - 1) ("OrderID") =
_order.orderID;
I need to convert this to C#??
Liz... more >>
Which reference is needed for IPersistMemory interface?
Posted by Winston at 10/7/2003 7:51:12 AM
Hi,
I have to use the IPersistMemory interface but I don't know wich reference I
have to add to my C#-project to get access to that interface.
What reference has to be added?
Any help appreciated,
Winston
... more >>
charset and content-transfer-encoding in c#
Posted by jain_brajesh NO[at]SPAM indiatimes.com at 10/7/2003 7:10:46 AM
Hi,
i m working on a vb 6.0 to c# conversion project. It is a mailing
application.Existing code uses CDO library for that and this code uses
content-type-encoding and charset properties for the message
existing code is like that
Dim m As CDO.Message
m.HTMLBodyPart.Charset = MsgCharset
... more >>
Integrating Microsoft Index Server
Posted by Duncan at 10/7/2003 6:01:46 AM
Hi,
I'll be very gratefull, if I get information how to
instance Microsoft Index Server(if it is possible?) and
how to use Index Server methods in C#.
Best regards
Duncan... more >>
while compiling windows service
Posted by raghavendra at 10/7/2003 5:52:21 AM
while compiling windows service
Project configuration skipped because it is not selected in this solution
configuration
Regards,
Raghavendra
... more >>
Database Retrieval - Newbie question
Posted by sue_kailasam NO[at]SPAM hotmail.com at 10/7/2003 5:38:23 AM
Hello
I'm on the learning curve for c# and .Net. I program in vb.
I'm writing a small application in c# and .net and the database in
Oracle.
I want to open the database and send a query to retreive some values
from the table and store that value in a variable, and if the value is
present... more >>
Displaying System RAM in c#
Posted by Jonny at 10/7/2003 3:59:27 AM
How do I display the system RAM in C# ?? Do I have to get
it from the Registry or is there a function for it?
If so how??
Thanks
/Jonny... more >>
basic param passing question
Posted by spacehopper_man NO[at]SPAM yahoo.com at 10/7/2003 3:50:45 AM
I'm an expert C# programmer (honest) but...
the following code prints 'Oranges', not 'ORANGES' - this confuses me
because I thought reference types (eg string) where passed
by...err..reference - so changing where the reference points to in a
method ought to change the behaviour outside the me... more >>
Why Linux and open source sucks
Posted by Mike at 10/7/2003 3:06:12 AM
Open source programs in general suck pretty bad also. Here are some
loose facts regarding why projects like Linux, PHP, MYSQL, and
other open source programs suck:
- Linux is simply a clone of an operating system over 20 years
old similar to DOS (Unix). That's ALL Linux is. The kernal was tak... more >>
New control
Posted by Bom at 10/7/2003 2:38:21 AM
Hi,
I created a new control and build a Dll of it.
Then I open a windows application (C#) and add this dll to
the toolbox. When I will put it on my form I receive
following error :
An exception occurred while trying to create an instance
of NSDataListView.DataListView. The exception w... more >>
Re: VS .NET 2003 is locking files
Posted by Mountain Bikn' Guy at 10/7/2003 2:32:21 AM
I am having the problem described by many people and also discussed in the
Microsoft Knowledge Base Article - 313512. The solutions mentioned in that
article do not solve my problem, or apparently, the problems of many other
people using VS.NET.
I have several projects that produce DLLs > 64k ... more >>
How to pass event to parent of control
Posted by fragget at 10/7/2003 2:26:56 AM
hi-
i have a custom control that can be dragged onto a form.
the control can be dragged around the form with the mouse.
i want to draw a selection box around my control when it is selected
to be dragged.
on the mouse down event of my control i want to pass the
size of the control and the l... more >>
Could not write to output file ...it is being used by another process
Posted by Mountain Bikn' Guy at 10/7/2003 1:40:28 AM
I am having serious problems with the following IDE bug:
Could not write to output file 'x.dll' -- 'The process cannot access the
file because it is being used by another process. '
and
BUG: "Could Not Copy Temporary Files to the Output Directory" Error Message
When You Build a Solution Tha... more >>
Poperty with parameter in VB to C#
Posted by Bom at 10/7/2003 1:29:17 AM
hi,
I have following VB code :
default Public ReadOnly Property Item(ByVal Index As
Integer) As DataColumnHeader
Get
Return CType(list.Item(Index),DataColumnHeader)
End Get
End Property
How can I in C# pass an argument to a property (getter
accessor)?
I started as follows but thats ... more >>
problems VB.NET to C#
Posted by Liz at 10/7/2003 12:20:27 AM
Can any one tell me how I express the following VB.NET
code in C#????
1.
Private Sub _productsData_ListChanged( _
ByVal sender As Object, _
ByVal e As System.ComponentModel.ListChangedEventArgs) _
Handles _productsData.ListChanged
.. . .
2.
DataView1.Item(_productsData.Count - 1)... more >>
Set readonly in constructor of a derived class.
Posted by William Stacey at 10/7/2003 12:10:08 AM
I know the following is not allowed, but shouldn't it be? sharedObject is
part of Derived and should be able to be set in the constructor - no? tia
public abstract class Base1
{
protected readonly object sharedObject;
}
public class Derived : Base1
{
public Derived()
{
sharedO... more >>
|