all groups > c# > august 2003
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 attach an event to an menu item
Posted by Jane at 8/31/2003 8:37:17 PM
Hi
I am using a Visual Studio .Net 7.0 trail version in
Windows XP.
I've dynamically created some menu items. Now I want to
attach an event to these items, what should I do?
Thanks
Jane... more >>
Open File Dialog
Posted by Claudio at 8/31/2003 11:40:25 AM
Is there a way to implement an OpenFileDialog on a web application?
... more >>
SqlDataReader question
Posted by PeteZ at 8/31/2003 9:17:14 AM
I'm having a problem where I exec a stored procedure (which SELECTs all rows
from a table, which has 100 rows) - each row has 8 columns.
When I exec the code (see below) I get 8 in oSQLDR.FieldCount (which I
expect but whenever I try and reference the data in the row
(oSQLDR.GetInt32(0);) I ge... more >>
Question of The bitwise or operator
Posted by ±èÀçȲ at 8/31/2003 8:07:20 AM
Why does follwing code generates the error..?
ulong a = 3;
int b = 15;
Console.WriteLine(a | b);
... more >>
How to copy a file from server to client
Posted by Shayer at 8/31/2003 7:46:17 AM
Hello
I want to copy a file from server to client machine. How can i do that. I
may have to use byte stream but how can i do that . Pls tell me
THanks
... more >>
Newbie: class access questions
Posted by Geoff Collier at 8/31/2003 7:37:41 AM
I have a form called frm_junk. On it there is a rich
text box called rtxt_output. I am having trouble
accessing this (or any) object on frm_junk from another
class. I have a class "test". When I tried to access
rtxt_output from "test" I got an error message indicating
that the protecti... more >>
Early/late binding
Posted by joe at 8/31/2003 3:49:34 AM
Hi,
In C#, objects are manipulated by their references only.
Does that mean that all calls to virtual functions are
resolved at run time?
Can a call to a virtual function be resolved at compile
time
Thanks... more >>
Unified Modeling Language
Posted by Hai Ly Hoang at 8/31/2003 1:48:04 AM
Hi
Can you tell me some website which I can download (freely) UML learning
material for beginner ?
Thanks
... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
How can I close windows in Form_Load ?
Posted by Boba at 8/31/2003 12:22:28 AM
Hello,
Is there any possible to stop the load of a specific
form and close it in the Form_Load event ?
With thanks.... more >>
A good way of programming?
Posted by Hans Kamp at 8/30/2003 11:40:33 PM
I am programming an easy game (not with a commercial purpose, just with
learning purpose), but I doubt whether the following way of programming is
proper or advisable.
The main form (BugEaterForm) that has a module, has the following objects:
- Snake, for drawing and being controlled;
- Playe... more >>
Problem passing structs in C#?
Posted by Schorschi NO[at]SPAM DSLExtreme.COM at 8/30/2003 9:16:20 PM
Can someone please point out why I am getting an 87 error? I am sure
it is obvious, but I am new to C# and seem to be having a lot of
stress understanding managed versus unmanaged code when API calls are
needed!
//
using System;
using System.Runtime.InteropServices;
//
namespace Dev... more >>
default value of type
Posted by Franz at 8/30/2003 9:05:21 PM
I would like to know if there is a list for default values of types (e.g.
int, float, bool, System.Drawing.Color, String, etc)?
Thanks.
--
Franz Wong
My C++ and C# Site (Traditional Chinese) : http://www.franzwong.com
... more >>
Why are arrays objects (on heap) instead of structs (on stack)?
Posted by Gomaw.Beoyr NO[at]SPAM no.spam.please.no at 8/30/2003 7:18:44 PM
Hello
Is there any explanation why Microsoft chose to implement
arrays as objects allocated on the heap instead of structs
allocated on the stack?
For "mathematical stuff", one normally wishes to avoid
unnecessary garbage collection, but that is exactly what's
going to happen if a lot of... more >>
Customizing FlexGrid w/ a check box
Posted by VR at 8/30/2003 7:02:42 PM
I am trying to embed a check box into a FlexGrid's cell,
but having a problem when I start scrolling the grid.
Here is my MyCheckBox class...
class MyCheckBox : CheckBox
{
void Init
(
AxMSFlexGridLib.AxMSFlexGrid oGrid,
int iRow,
int iCol
)
{
...
... more >>
Delegates ..
Posted by Pawan at 8/30/2003 6:56:26 PM
Hullo Mates,
I am looking for some resource on delegates and event raising in C# for
my threading application. Actually the whole delegation process seems very
confusing to me :( ... Well I am going through MSDN, still any further
resources with some examples on delegates that might help me ... more >>
adding quotation marks to a string?
Posted by vince at 8/30/2003 4:19:45 PM
need to create a string with embedded quotation marks,
like
string str1 = " they said "go away" ";
How can this be done?
Thanks,
vince... more >>
C# and SAX
Posted by Jeremy McPeak at 8/30/2003 3:48:01 PM
I have searched for information on C# and SAX, and have yet to find
anything. Is there any documentation on this subject?
... more >>
persistant variables with local scope?
Posted by Michael Roper at 8/30/2003 1:47:00 PM
Is there a C# approach that allows you to define locals with program
lifetime? That is, I don't want to have to expand the scope of a variable
just so I can make it persistent.
For example, something like:
class myClass
{
int iCallCounter = 0;
int CallCounter() { return ++iCallCounte... more >>
Single Sign On
Posted by Tom at 8/30/2003 1:43:34 PM
I am trying to establish an infrastructure whereby I want
only one login screen for my .net application users.
In my experience, if the user's domain is different than
the application domain, the user is presented with the
Windows login screen a second time.
Is it possible for the brow... more >>
Game programming with C#
Posted by Hans Kamp at 8/30/2003 12:59:19 PM
As a programming exercise I try to program a game.
In my case it is called BugEater. The purpose is that you are a snake. It
moves automatically but you can control it with the keys on your keyboard.
In the field where your snake is, there are candies that you must eat. The
more candies you ea... more >>
run another .exe
Posted by MP at 8/30/2003 12:26:55 PM
How I can run some .exe from c# application?
Thanks
... more >>
C# visual inheritance...
Posted by Gordon Smith at 8/30/2003 11:22:28 AM
Hi,
I'm trying to create a form in c# that I visually inherit
from.
It includes a button, that when I click, displays a "hello
world" message.
I then create an inherited form, and create an event
handler for the button that displays a "hello world 2"
message.
The problem is, that when ... more >>
Buttons and Scopes of Forms
Posted by Patrick De Ridder at 8/30/2003 11:17:38 AM
Button1 displays Form1. Button 2 displays Form2. etc.
The changes are brought about by Buttoin_Clicks. How do I get rid of
Form1 purely by pressing Button2? Because as soon as I press Button2,
I have lost the scope of Form1 and I can no longer do Form1.Close();
(Of course I can get rid of Fo... more >>
CommandType.StoredProcedure - where defined ?
Posted by PeteZ at 8/30/2003 9:55:40 AM
what using . . . . statement do I need to get this value
(CommandType.StoredProcedure) defined ?
even when I have defined the using statements:
using System;
using System.Data.SqlClient;
using System.Data.Common;
using System.Data.OleDb;
using System.Data.SqlTypes;
I still get a compil... more >>
Easy Hex string "0x1234" to integer conversion?
Posted by Ed Sutton at 8/30/2003 8:56:16 AM
Is there an easy conversion from a hex string, for example "0x1234" to an
int?
I have written my own many times in other languages, I was just wondering if
there might be something already available for doing this.
-Ed
... more >>
new and Virtual.. differences...?
Posted by superfrog at 8/30/2003 7:50:44 AM
Hi there,
while trying to learn polymorphism, i am confused between
the 2.
=======================================================
class Person
{
...
public void someMethod()
{
//do something
}
}
class Guy :Person
{
public new void someMethod()
{
// do something
}... more >>
Printing a mix of tables and other text
Posted by Dennis C. Drumm at 8/30/2003 6:40:54 AM
I was wondering if someone could suggest were/how I could get started with
setting up printing of a collection of text that includes tables from a grid
and other supporting information about the grid's contents. If you could
just point me at the classes that I should consider and some very broad
... more >>
The type initializer for "System.Drawing.SafeNativeMethods" threw an exception
Posted by Colin at 8/29/2003 10:44:14 PM
Hi there,
I have wrote a simple console app in C# to get the
dimensions for a jpeg file
/***
Image img = Image.FromFile(@"C:\TEMP\PvFile\1036437.jpg",
true);
LogEvent("Height = " + img.Height.ToString() + "; Width
= " + img.Width.ToString());
****/
But when I call this console app ... more >>
VB.NET Shared
Posted by Dean at 8/29/2003 7:52:44 PM
Hi,
what is the C# equivalent of VB.NET's Shared
e.g.
in VB.NET
Public Shared myColor As Color
does static do the same job?
public static Color myColor;
thanks,
Mori
... more >>
Who knows C# support multi-stream file or not?
Posted by ´óÑã at 8/29/2003 6:36:51 PM
I want to create a multi-stream file using C#,but System.IO.File.Create
method do not support this.
... more >>
P/Inkoke struct member alignment
Posted by John at 8/29/2003 6:29:17 PM
Hi,
What is the struct member aligment of a C# program? Are there any issues
with P/Invoke when passing structs to 3rd party C dlls?
Thanks
... more >>
Heeelp please, using enumerator in Property but its not getting saved...
Posted by Lucas Sain at 8/29/2003 3:56:45 PM
Hi,
I'm using an enumerator to store some options so that at design time X
options could be selected. All this works fine until the developer closes
the FORM where the property is and re-opens it.l.. the values are reset.
Why??? This is what I have:
public class LidColumnCollection : Coll... more >>
Firing Events
Posted by Christian at 8/29/2003 3:25:17 PM
Hi NG
maybe it's a silly question
if i have 2 buttons on a Windows Form,
button1 and button2:
button1 has delegates subscribed
this.button1.Click += new EventHandler(this.MethodA);
this.button1.Click += new EventHandler(this.MethodB);
.... // etc etc
i register a method to the Click eve... more >>
dynamically resizing forms
Posted by Nikhil Patel at 8/29/2003 3:13:43 PM
Hi all,
I dynamically create new controls and display them on the form. My
problem is that the user has to resize form manually to see controls whose
location property points to a point outside the form's area. So can you
please show me a way to resize the form after adding a dynamic control... more >>
Class Reference
Posted by Dim at 8/29/2003 3:08:39 PM
Sorry for crossposting!
Is there a complete reference of .NET Framework class libraries?
And i mean COMPLETE reference with full explanation of what each class
does and perhaps what
it's good for.
Reason for this is that recently i spent 2.5 days coding a class only to
find out that Fram... more >>
form visible property/OnShow event
Posted by LarryR at 8/29/2003 2:43:20 PM
I am trying to get a small form (using ShowDialog) to display over my main
for as soon as the main for is displayed. I can't seem to find an accesible
property or event that I can use to tell when my main form has finished
loading. Anyone have a suggestion?
To reply by email please remove x'... more >>
Parameter Passing between windows forms, C#
Posted by cware33 NO[at]SPAM yahoo.com at 8/29/2003 2:38:33 PM
I have two forms. From form one I have a listbox that when double
clicked I get the selected value (string) and store in a variable. I
parse the string to get the first 12 characters and store it in a
variable to query a sql db. I set break points to see the data as it
is passed from form1 an... more >>
Good and Free Editor
Posted by Michel Racicot at 8/29/2003 2:33:49 PM
Hi there, just downloaded the latest framework sdk and I want to find a
good freeware editor that recognize C# syntax. Is there some around? What
about free winforms editor?
Thank you
... more >>
Form.MinimumSize property doesn't work
Posted by sandman at 8/29/2003 2:14:22 PM
I set the MinimumSize property on my form but it doesn't
seem to work. I can still resize the form to any size I
want. What I'm trying to do is prevent the buttons from
vanishing when the form is resized. So I figured if I set
the minimum size it would stop the form from resizing past
the... more >>
Stream
Posted by spai NO[at]SPAM immunetolerance.org at 8/29/2003 1:56:30 PM
Hello there,
I have document a file in the C:\\ named test.doc.
I would like to read the contents of the file by assigning it to Stream class....
Stream fstream = ????
how do i achieve this....
any suggestions or help....
Kind Regards,
Srikanth Pai... more >>
Quantity of CPU time used by a thread
Posted by creepiecrawlies NO[at]SPAM hotmail.com at 8/29/2003 1:43:27 PM
Is there a way to measure or ask .NET to tell me what amount of time a
thread spent actually executing on the CPU?
For example, I may spawn a thread that spends 99.9% of its time
waiting for an event to be set, and then performs some action. If the
thread runs for 10 hours, how can I find out ... more >>
how can i do this in csharp?
Posted by thxBruin at 8/29/2003 1:13:12 PM
I have a c++ class like this:
class b : private a{...}
and now i want to convert it to csharp, but i don't know how can i do it by
csharp. When i build a test.cs like this:
Class b: private a{...}
vs2003 said error:cs1031 and cs1519.
... more >>
Execute external program synchronously
Posted by SC at 8/29/2003 1:11:37 PM
Hi,
I want tu run an external program from a c# program but i need to wait until
the external program ends. How can i do that? I try Process.Start but it do
asynchronously... Any help?
Bye
... more >>
C# language feature proposal
Posted by Merlin at 8/29/2003 1:01:24 PM
I believe that interfaces are one of the more useful
design constructs available in C#. However, there's one
thing that I feel is missing in them. I propose that
interfaces be expanded to allow the specification of
constructors. Admittedly, this makes things a bit
confusing in that seeing ... more >>
Exchager Server and C#
Posted by Raphael Iloh at 8/29/2003 12:20:43 PM
Hi all,
I'm looking at working with Exchange Server 2000 and .NET. The project is
web-based and requires access to all folders, particularly the inbox. Has
anyone worked extensively on using Exchange Server and ASP.NET, using C#? Is
there any resource on this subject out there that would be very... more >>
O/R Mapping tool like Apple has.....for .NET?!?!
Posted by gicio NO[at]SPAM web.de at 8/29/2003 11:53:30 AM
Hi!
I post this text 1 year ago. But no one really could give
me an answer. This is the text that I posted long time ago:
I have a fundamental question about
The way .NET handles the object orientated way of
Persistence. I am coming from JAVA and WebObjects (Apple)
World and I am looking... more >>
Get IntPtr for a byte array
Posted by Logan McKinley at 8/29/2003 11:11:28 AM
I have a third party Dll with a function which requires an IntPtr but the
data is in a byte array. I need to get the IntPtr for this byte array so I
can pass it into the function.
Thanks in advance,
~Logan
... more >>
How to Copy a file
Posted by Tom at 8/29/2003 10:57:12 AM
I am having trouble when I read a file and another process
is trying to update it.
So I need a rountine to copy a file in asp.net.
Can anyone assist?
Thanks
Tom
... more >>
convert a .bmp into arrays
Posted by Jeroen Ceuppens at 8/29/2003 10:37:36 AM
Is there a function of program to convert a .bmp into arrays?
... more >>
Determine proper width of Label?
Posted by David Sworder at 8/29/2003 9:39:53 AM
Hi,
A Windows form that I'm developing will have two controls: Label1 and
Label2. Both controls are of type Label (go figure). The text of Label1 will
not be known until runtime and may change at times. When the MyText property
of the containing form is set, I want to:
a) Set the La... more >>
|