all groups > c# > january 2004 > threads for monday january 26
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
Events, delegates, callbacks and methods
Posted by Michael McDowell at 1/26/2004 11:32:22 PM
I'm confused:
"why do we need to assign a method to a delegate then assign the delegate to
an event why not just assign the method to the events event handler"
and
"how does making a callback to some method differ from calling the method as
per normal"?
If anyone's got a minute or two ... more >>
Screen Position ?
Posted by WJ at 1/26/2004 11:15:43 PM
In c# Windows Form, there are 2 properties: Top and Left. How do I get the
Height & Width that match with those of the screen at run time ? I donot
want to do "Maximize" to cover the whole screen.
Thanks
John
... more >>
Click on button
Posted by Tamir Khason at 1/26/2004 10:18:26 PM
How to detect on general click event if the sender (object) is button?
... more >>
Strongly typed Datasets and explicit cast..
Posted by Oscar Thornell at 1/26/2004 9:45:41 PM
Hi,
I have a general all purpose class that can take the name of a stored
procedure and return a dataset...
This general dataset that is returned I wish to cast to a strongly typed
dataset of my choosing.
I have the XML Schema and a generated specialization of the DataSet that I
wan´t to c... more >>
ColorDialog and custom colors...
Posted by SpotNet at 1/26/2004 9:28:11 PM
Hi Newsgroup,
I've been creating (almost done) Common Dialog class libraries (under one
name space) with highly customisable common dialogs. With my ColorDialog I
am able to completely hide (make invisible) the custom colours palette and
move the OK, Cancel and Help buttons a little under t... more >>
Class and namespace with same name
Posted by _eddie at 1/26/2004 9:18:10 PM
Easier to show than to explain:
file 1:
---------------------------------------------------
namespace Somename {
public class Somename {
....
}
}
file 2:
--------------------------------------------------
using Somename;
......
Somename s1 = new Somename; // E... more >>
Multiple matching interfaces...
Posted by n! at 1/26/2004 9:16:47 PM
Hiya,
One thing I used interfaces for when using C++ was defining lots of
header files for each interface being used, and allowing users to simply
#include the appropriate header file and use the interface immediately, no
linking required.
I had hoped that C# would allow me to do simi... more >>
FileSystemWatcher
Posted by raghu at 1/26/2004 9:11:12 PM
Hi All
Anyone help me to set multiple drives for FileSystemWatcher component.
FileSystemWatcher watcher=new FileSystemWatcher();
watcher.Path = "c:\"
this is working fine.
If i give
watcher.Path = "c:\,d:\"
its throwing exception. Is there anyway to achive this?
thanks in advance... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
anonymous arrays
Posted by Paul E Collins at 1/26/2004 8:40:12 PM
This does what you'd expect ...
string[] foo = { "bar", "baz", "quux" };
.... so why is this a syntax error?
private string[] foo()
{
return { "bar", "baz", "quux" };
}
I know that it works with 'new string[]' inserted, but I don't understand
why assignment and 'return' disagree o... more >>
DATAGRID - How can I change UpdateCommand dynamically ?
Posted by andrew.dodgshun NO[at]SPAM eistream.com.au at 1/26/2004 8:36:06 PM
I have 2 grids - one shows a list of table names in a database and
when you click on a table name the other grid dynamically populates
the grid with the table contents. My problem is that I cannot get any
changes I do in the grid of a given table saved back to the database
unless I nominate a pa... more >>
I forget it - HELP
Posted by Tamir Khason at 1/26/2004 7:32:18 PM
I forget to do this shorter way:
A != B | A != C | A !=D |.....etc
As far as I remember it is something like
A != {B|C|D} ....
Please help
... more >>
class initialisation vallidation
Posted by Adie at 1/26/2004 7:28:28 PM
Hi, wonder if anyone could give me some code advice.
I'm wondering about the best way to validate if all inputs are present
and correct for object creation in an ASP.NET application.
Not sure how to explain this, but I really want to separate the
interface from the business logic as I may e... more >>
wmi memory leak?
Posted by cs at 1/26/2004 5:21:17 PM
if I repeatedly call the following method on my winxp machine (and many
others) the svchost.exe process increases its memory very very quickly, and
doesnt go back donw, I have machines that after a day have svchosts taking 1
gig of ram, thank god I have 3 more to spare!
public static void Get... more >>
word reference
Posted by selen at 1/26/2004 4:55:47 PM
Hello
I add Microsoft Word 10.0 Object Library from reference com.
and I am writing my code to create an instance of a Word application.My code
is
Word.ApplicationClass oWordApp = new Word.ApplicationClass();
But my application give me error :
The type or namespace name 'ApplicationClass' does... more >>
Passing parameters to and from a Form object
Posted by David K. at 1/26/2004 4:33:02 PM
Hello,
I am a novice to C#.
Say I have two Windows Form: A and B (not a DialogBox).
Suppose I want from Form A object to create and display Form B object
(passing it parameters).
When closing the Form B object, I would like to get the return parameter/s.
Can anybody show me a way of doing it?
... more >>
mouse coordinates relative to a control
Posted by Robin Senior at 1/26/2004 4:05:09 PM
Hi,
I'm trying to drag and drop onto a Panel on my form. The panel is inside
a groupBox, which of course is inside my form.
When dropping the item onto my Panel, I want it to appear at that point
on the Panel, and therefore need the mouse coordinates relative to the
Panel and not the form ... more >>
DLL Newby Questions...
Posted by Bernardo at 1/26/2004 3:56:05 PM
Hi,
I had to convert a Win32 EXE project with some forms and classes into a DLL Project.
When I instace the new DLL project from a test program I see all forms and classes...
There is any way to just see one class, for example some forms and classes are only private and only one is public.
... more >>
How can i start a help-file like help.chm?
Posted by Christina Feichter at 1/26/2004 3:43:17 PM
Hello All
How can i start a help-file like help.chm?
Thanks... more >>
How to handling the file concurrency issue?
Posted by Mullin Yu at 1/26/2004 3:42:25 PM
I create a component to write the error log as follow, but it seems
sometimes locked by other processes, and pop up the I/O exception.
How can we handling the concurrency issue at file level? Retry accessing the
file if catch error => like waiting and polling.
Thanks!
private void LogErro... more >>
Design Questions
Posted by jeffshantz NO[at]SPAM msn.com at 1/26/2004 3:40:14 PM
Hello all,
This may not be the appropriate forum, but I'm going to try my luck.
I'm designing an ASP.NET application in C# for my company. The
application grabs call center statistics for CSR's on a nightly basis,
and imports that data into its own database. Thus, the application is
used ... more >>
Extending Visual SourceSafe by using C#
Posted by mjewett NO[at]SPAM starbucks-dot-com.no-spam.invalid at 1/26/2004 3:30:51 PM
Hi all,
Here's the deal: I need to extend VSS (6.0) by coding a DLL add in.
I've read all (not much out there) of the documentation on this,
however, it's either grossly out of date (examples using Visual
Studio 6) or the code snippets are in VB (5.0!). So I was wondering
if anyone out there... more >>
Deploying applications with dotnetfx and MDAC
Posted by Ann Marinas at 1/26/2004 3:27:55 PM
Hi All!
I am kinda confused with deploying a dotnetfx & MDAC together with my .NET
applications.
I was reading the "Redistributing the .NET Framework" on MSDN
(http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnnetdep/h
tml/redistdeploy1_1.asp) and it says there that I need ... more >>
split data
Posted by Mike at 1/26/2004 3:23:45 PM
I'm new to the C# world and learning as I go.
I have a question, I'm getting data back from my database such as
name/region.
How can I split this and only return the region?
... more >>
Getting the application startup path in a console app
Posted by Scafe at 1/26/2004 3:16:06 PM
hi, how can i get the startup path of a console application?
thanks for any help... more >>
Socket Disconnected event.
Posted by Ashwin Kambli at 1/26/2004 3:07:10 PM
Hi,
I have a simple socket application. There is a server, and there are many
TCP connections to the server.
Now, if any one of those connections is lost, is there a way of triggering
an event on the server for this.
What I need is to set up a delegate to handle this disconnection (Delegate
ha... more >>
Dynamic ASP page on the fly using C#
Posted by Dmitri Shvetsov at 1/26/2004 3:04:52 PM
Hi All,
Is it possible at all, and if yes, then how? Or it's very/extremely hard to
do that? Maybe somebody knows...)
I'm writing a Web App using VS2003/C#/MSSQL.
I'm currently having about 100 different questions, some questions are
having relations to another questions and should be pub... more >>
get objekts
Posted by Abzieher Thomas at 1/26/2004 3:00:14 PM
hallo,
i hva got an form with ten textboxes
and now i want to set all text properties of each to "test"
is ther anpossibility to do this like this
for (i=0 ; i++, i>10)
setProp("text"+i.toStrin()", "text", "test");
thanks for your help
... more >>
How to block itemCheck event when I doubleClick in a listView
Posted by Bright Sun at 1/26/2004 2:58:18 PM
Hi,
I have a ListView that is shown in Details mode, and the
Checkboxes property is set to true. My problem is that I
dont want the checkboxes being activated when items in
the ListView are double-clicked. Is this possible?
Thanks!
Bright
... more >>
Create Custom Control
Posted by Pablo Salazar at 1/26/2004 2:42:43 PM
Hi People.
Somebody can help me.
Some time ago I began to develop database project for a college.
Actually control don't adjust that I need.
I need to create a control from beginning ( from 0).
can you tell me where can i find information about create custom control?
Thanks.
Pablo Salazar
... more >>
asp.net word excel
Posted by selen at 1/26/2004 2:40:27 PM
I want to open Microsoft word, excel and PowerPoint with asp.net and save
it. How can I do that?
Thanks.........
... more >>
Get all files in all directories
Posted by ntuyen01 NO[at]SPAM yahoo.com at 1/26/2004 2:36:31 PM
I need a routine to get all the files in the root dir and all
directories and subdirectories.
For example: I have these directories structure
C:\
Dir1
subdir1
file1.txt
file2.txt
Dir2
Subdir2
subsubdir2
file3.txt
file4.txt
test.doc
test2.doc
and ... more >>
Adding a reboot to a Setup Project
Posted by A at 1/26/2004 2:25:25 PM
Hi all,
I am trying to add a reboot to a setup project. The help simply says to add
the reboot property in the action sequence. The closest I can come to
figuring out what they mean is to add a custom action...but then why have
ScheduleReboot Action properties? Can anyone help me with this?... more >>
Choosing a programming language for use in the future...
Posted by murl NO[at]SPAM cbsmemphis.com at 1/26/2004 2:06:05 PM
I currently am programming apps using the vb.net language and haven't
seen to many problems with it, since migrating from vb6. I love the
enviornment, and the ease of use but wonder could my apps be better in
c#? I have studied vb6, vb.net, and c++, and am currently learning
alot about c#, and w... more >>
ShellExecute to Start Menu programs
Posted by MCzajk at 1/26/2004 1:50:51 PM
Is there a function similar to ShellExecute, which I can hook to when the
program is started using Start Menu icon?
MCzajk
... more >>
Test for DBNull
Posted by MFRASER at 1/26/2004 1:49:57 PM
How do I test for DBNull? The following does not work.
System.Data.DataRow aRow;
if (aRow["ServerName"] != null)
{
aServer = (string)aRow["ServerName"];
}
... more >>
Can you save a type created with TypeBuilder?
Posted by Jax at 1/26/2004 1:46:04 PM
I'm having difficulty with creating dynamic types, TypeBuilder is attained through module builder which in turn comes from assembly builder. I assumed that if you save the assembly you'd save the type (made with the typebuilder) as well. When I save and load the assembly it comes back as having no t... more >>
XmlDocument.SelectSingleNode(XPATH)
Posted by discussion NO[at]SPAM discussion.microsoft.com at 1/26/2004 1:43:26 PM
Hi,
How can I make the XPath case INsensitive for SelectSingleNode()?
Thanks.
... more >>
Mouse click on the frame of a form (C#)
Posted by neoasimov NO[at]SPAM hotmail.com at 1/26/2004 1:13:40 PM
Hello,
There is what I want to do. I worked on the problem since 6 hours but
I had a problem (probably stupid) and I dont know how to resolve it.
I need to have an Mouse Event Click when I click on the frame of a
window form ( like the title bar of a window).
If I handle the mouse... more >>
ado.net with c#
Posted by naveen at 1/26/2004 12:59:34 PM
can anyone suggest me a book which helps in working with database
sqlserver2000 using c# with good examples
... more >>
Hide the 1st Column of the DataGrid?
Posted by CBuck at 1/26/2004 12:46:07 PM
Hi, I was wondering if it was possible to hide the first column of the datagrid (windows form control). The column that I am referring to is the column created by the control that is gray in color and contains the selection arrow. My goal is to use the datagrid in place of a ListView control for p... more >>
Difference between indexers / collections?
Posted by dkode NO[at]SPAM cfl.rr.com at 1/26/2004 12:28:12 PM
Ok,
Consider the following example:
School Class
- StudentCollection Property
StudentCollection Class : CollectionBase
- Add
- Item
- Remove
Student Class
- Name Property
- Age Property
Now,
Up until this point, whenever I had a set of objects I needed to store
in a collecti... more >>
Intelisence and C Sharp
Posted by google NO[at]SPAM gencode.com at 1/26/2004 11:47:15 AM
I have a basic question about something as simple as Intelisence.
When making variables in VB.NET I do
Dim a as <<<----- and right here pops up intelesence of my type
options, so that helps me decide what I may want, Double, Single,
Int32, Integer etc.
Well with C# I put in
a <<<---- and o... more >>
Find identical files
Posted by Lars von Wedel at 1/26/2004 11:35:58 AM
Hello,
I have a rather large number of files and I would like to check for
duplicates. Name or date are not relevant.
I found the MD5 class which seems to be suitable. Can I use the returned
byte[] as an index in a hashtable in order to create a mapping from
key and identical files (i.e. ... more >>
XML writing error
Posted by Abdessamad Belangour at 1/26/2004 11:28:56 AM
Hi all,
I have developped an application that generate XML documents.
At most time it works fine, but sometimes (when the size of data to export
is big) i got the error message :
<< The StartElement token in the Epilog state will generate a nonvalid XML
document :
at System.XML.XMLTextWriter.A... more >>
C#, .net and COM+ returning a recordset to classic ASP.
Posted by Karl Stankiewicz at 1/26/2004 11:21:38 AM
Does any know how to return a recordset object from COM+ component written
in C# so that it can be used as a Recordset in classic ASP?
I have the frame component written i'm just not sure what object/class i
should return. I tried returning SqlDataReader and ASP 3.0 found it to be
ADO type da... more >>
Fonts
Posted by Mike at 1/26/2004 11:11:09 AM
I am trying to find out how many characters I can fit in a line
I am using a Courier fixed font
My font size is 10 and 12 (ithink its points but not sure what the other type of measurements would be).
My page is 11 inches wide by 8.5 long and 8.5 wide by 11 long
Can someone assist me in calcu... more >>
Calling all xsl/ado .net experts!
Posted by suzy at 1/26/2004 10:47:21 AM
Hello, just a quick question which I hope has a simple answer...
I have an SP which performs an inner join on 2 tables (User and UserStatus)
and I used the dataset's .GetXml() method to return the following:
<User>
<UserId>1</UserId>
<UserStatusId>1</UserStatusId>
<UserType>1... more >>
Number Rounding/Formating
Posted by Eric at 1/26/2004 10:40:50 AM
Hi,
In my application I need to round a number to 3 decimal places. I am using
the Math.Round method which works fine. The problem I am running into is
when the number has no decimals like 5 because I need to show it as 5.000.
How can I accomplish this?
Thanks
... more >>
Of Icon handle lifetime and when is it truly disposed
Posted by Terry at 1/26/2004 10:32:44 AM
There are a number of things about using unmanaged resources in Windows
Forms programming that is unclear to me.
In C++, if you loaded an icon resource using "ExtractIcon()", the resource
was valid until you called "DestroyIcon()". If you didn't, you had a leak.
In C#, I need to load icons... more >>
msn messenger style popups with c# (alerts)
Posted by Jason Gleason at 1/26/2004 9:34:28 AM
How can i make msn messenger style popups (like alerts/when someone messages
you for the first time - the little box that appears in the bottom right
hand corner of your screen) with c#?
... more >>
Adding EventHandlers to a webform
Posted by dkode NO[at]SPAM cfl.rr.com at 1/26/2004 8:37:25 AM
Just curious,
What is the proper way to add event handlers for web controls in a
ascx/aspx page in csharp?
The way I've been doing it up until this point is adding the +=
eventhandler in the Page_Init method.
Is there a more effecient way/proper way to do this?
thanks... more >>
Access control from other form
Posted by hkshk NO[at]SPAM gmx.net at 1/26/2004 8:09:11 AM
Hello all,
I have this problem:
I have 2 forms. Form1 contains a checkbox, which I want to uncheck
from Form2.
I set the checkbox to be "public static" and when I try to change a
property (e.g. Form1.checkBox1.Text="Sample") I get this error:
An unhandled exception of type 'System.NullRefe... more >>
Word Template
Posted by Ruslan Shlain at 1/26/2004 8:05:24 AM
Hello everyone.
I have a question that I tried to find an answer over the weekend but did
not succeeded.
I have a Word template with a couple of "tags" ( <<My Tag>>) that I need to
replace with data from the DB. Please point me in the right direction on how
to approach this. Code samples, link... more >>
Call Stack
Posted by Jim Heavey at 1/26/2004 7:54:24 AM
My application abends when I press a tab on the tab control. I have tried
to trace what is happening, but is never shows me the line of code which is
failing, I only get a message box telling me I have a null pointer
exception.
I understand that I can use the "Call Trace Stack" tab in the ... more >>
[OT] Under the Hood of OOP
Posted by C# Learner at 1/26/2004 5:14:15 AM
I'm a bit curious about how OOP works "under the hood".
Consider this (C++) class implementation:
<code>
class MyClass
{
int x;
void Method();
};
</code>
Now, as I understand it, this would actually be compiled down to
something like this:
<code>
struct MyClass
{
int... more >>
Play wav file on PocketPC 2003
Posted by Rajesh Singla at 1/26/2004 4:12:20 AM
Does anybody knows how to play wav file on PocketPC 2003.
Thanks
Raj
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!... more >>
ToolBars
Posted by Ann Marinas at 1/26/2004 3:36:48 AM
Hello all!
I have a question regarding toolbars...
I was wondering if a toolbar has the ability to merge with another toolbar,
just like in the usual menu bars.
Thanks a million!
-A
... more >>
Nested Classes
Posted by C# Learner at 1/26/2004 3:36:41 AM
Is it not possible to declare a nested class in a seperate file from
its "parent" class -- i.e. in a similar way to the idea of spreading
namespaces over more than one file?... more >>
BeginInvoke equivalent in a class library
Posted by arkam NO[at]SPAM caramail.com at 1/26/2004 3:19:54 AM
Hi,
I found a sample on internet :
formMain.BeginInvoke(new MyClickHandler(this.OnMyClick));
I would like to do the same but in a class library where there is no forms !
Where can I find a BeginInvoke equivalent for a class library ?
Thanks
Arkam... more >>
Dataset connected to an Oracle stored Proc
Posted by Jawahar Rajan at 1/26/2004 1:44:17 AM
Is it possible for a Dataset that is added to a C# project to be based on a
stored Procedure?
Can I use either a OracleClient or Microsoft Oracle Client?
Any help is appreciated.
Jawahar
... more >>
Much larger memory use, normal?
Posted by Afanasiy at 1/26/2004 1:40:21 AM
Should I be concerned with the amount of memory my C# applications use?
I have 2 gigs of ram, and I use most of that without running any C#
applications. So, when I see C# applications in development, which are
using much more memory than their Delphi and Python equivalents, I am a
bit wo... more >>
Where to Learn Csharp step-by-step
Posted by light_wt at 1/26/2004 1:31:05 AM
Hi
I am taking the 2555 class and a lot of the material is over my head. I don't like the MS's book because there is no step-by-step on interacting with the VS.NET
Is there good free resource in the web?
If not, I have pulled a few books in the following. I am wondering which book has the co... more >>
design question : struct or class
Posted by phoenix at 1/26/2004 12:17:18 AM
Hello,
I've got a design question. I need to keep track of some variables and I am
planning to put them inside a class or struct. Basically I'm talking about
10 bools, 20 ints and 2 arrays of ints. The size of the arrays would depend
on some external value (going from 0 to around 1000 max). I... more >>
|