all groups > c# > february 2004
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
3D modelling in opengl and c#
Posted by Rameshika at 2/29/2004 11:11:05 PM
Hi All
I am new to 3D modelling in VISUAL .NET C#.I am planning to draw the entire roof (showing the roof material, roof angle, roof shape,ceiling shape, ceiling material) of the house and planning to use OpenGL. Please let me know whether I can use opengl with C# and also how to add referanc... more >>
Overloading relational operators
Posted by Jon Shemitz at 2/29/2004 10:21:32 PM
Why aren't overloads of relational operators like <, ==, and >= not
restricted to returning a bool type? When would you EVER want == to
return, say, a double?
The best I can imagine, here, is that I might want to compare two
numbers for equality and get an Eta object that's basically the
diff... more >>
Garbage Collector
Posted by C# Learner at 2/29/2004 9:58:16 PM
This is probably a silly question but I'll ask to be sure.
Say I have a constructor that looks like this:
public MyClass()
{
items = new string[10];
for (int i = 0; i < items.Length; ++i) {
items[i] = new String();
}
}
Is the following then necessary?
~MyClass()
{
for (int ... more >>
Constant string problem
Posted by james_morris1232000 NO[at]SPAM yahoo.com.au at 2/29/2004 9:57:41 PM
I have a problem with a header file which was written in C++ which I
need to implement in C#.
The header file in C++ IS something like this,
........
#ifdef __cplusplus
extern "C" {
void WINAPI _libmain ( long JobNo );
void * WINAPI _getjobfield ( void *vJobRec, short field, short
subf... more >>
How to do FTP in .NET?
Posted by Gary Hendricks at 2/29/2004 9:33:22 PM
Does anyone have any idea how to do FTP in .NET? Thanks.
Best Regards,
Gary Hendricks
http://www.digital-music-guide.com
... more >>
Comparing Strings
Posted by C# Learner at 2/29/2004 9:03:35 PM
I want to compare two strings, in a numeric fashion.
e.g.:
string a = "10";
string b = "2";
int comparison = String.Compare(a, b);
// comparison is now <0, but I want it to be >0 in this case
// since 10 is more than 2, numerically
Is this possible, without having to write my own comp... more >>
implicit operator bool - question 2
Posted by Jon Shemitz at 2/29/2004 8:48:44 PM
Why would you ever want to define both "public static bool operator
true" and "public static bool operator false" when you can just define
"public static implicit operator bool"?
Is there syntax where the two are not equivalent? Or are there cases
where you might legitimately want both false a... more >>
implicit operator bool - question 1
Posted by Jon Shemitz at 2/29/2004 8:48:26 PM
How come I can write code like "if (L)" but NOT code like "if (L ==
true)" when L is a class with an implicit operator bool?
///////////
List L = new List();
public class List
{
private long count = 0;
public static implicit operator bool (List L)
{
return L.count > 0;
... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
returning row number of listview row clicked
Posted by at 2/29/2004 6:57:31 PM
How can I know what row number I clicked on in a listview? I need a method
that returns an int corresponding to the row number I clicked on in my
listview.
Thanks.
... more >>
C# Equivalent to: For i = 30 To 32
Posted by nile7 NO[at]SPAM email-dot-com.no-spam.invalid at 2/29/2004 6:19:35 PM
I can't find any "short" code to make this work without taking 100s of
lines (because I have to keep repeating this process several times).
But this is what I have so far:
int i = 7;
do
{
aryBadCoor.SetValue(i + " 25", v);
v++;
i++;
} while (!(i ==39))
The VB.NET one ... more >>
ADSI in NT40
Posted by tangolp NO[at]SPAM yahoo.com at 2/29/2004 5:52:34 PM
I'm new with ADSI with .Net. I'm developing a windows application to
get the NT group name based on the user id. The application installed
successfully on the target computer (OS NT with the latest patch and
DSclient). Here is the code:
int idx = System.Security.Principal.WindowsIdentity.Ge... more >>
how do you connect to mssql2k?
Posted by Guy Brom at 2/29/2004 4:15:08 PM
Hi there,
What method do you use to connect to mssql2k?
Do you use Trusted-Connection (windows-based) or SQL security with a
specific username/password?
Thanks!
... more >>
TreeView Folder-tree
Posted by Per Rollvang at 2/29/2004 3:45:25 PM
Hi All!
I have a little problem with calling a TreeView-function recursive to fill
it with folder-paths. I.e
c:\Windows\System32\ should be displayed
c
Windows
System32
Anybody that can help me out with some good code, or a link?
TIA
Per Rollvang
... more >>
Windows service description
Posted by WRH at 2/29/2004 3:10:54 PM
Hello
When I look at windows services with the Windows
Administration tools Services utility (Win XP) I note that
many services have a description field (2nd column).
How can I add such a description for my service?
... more >>
still have NTD problem
Posted by wobbles at 2/29/2004 1:11:41 PM
Hi Everyone,
I did as previously suggested and checked to make sure I have:
1. IIS web server (on server)
2. IE 6.0 or higher at client machine
3. Client has the .net frame work installed
4. Client machine has add ur web server as a trusted site
I wasn't sure how to perform 4. How do I g... more >>
How do you spawn User Controls programmatically?
Posted by Shane Molton at 2/29/2004 12:56:05 PM
I have a few user controls and I don't want to add them to the main form. I simply want to be able to spawn them like pop-up windows
I added them to my project and call show(), but nothing happens. Any help would be appreciated.... more >>
reflection!!
Posted by cs at 2/29/2004 12:17:48 PM
I want to be able to write a little reflection program that can handdle any
kind of Event. So it must be able to add an event handler to an event it has
never seen before, this is a little tough to do since different events have
different signatures! Any idea how to do this? what I do witht he pa... more >>
application with nonstardard shape
Posted by BK at 2/29/2004 11:08:35 AM
Hi all!
How can I made an application that is not standard window-based
application, but instead of this it has a kind of "free form" shape?
For example, I have a transparent GIF image with circle inside and
transparent color outside the circle. And I would like that my
application looks lik... more >>
System.OutOfMemoryException Allocating byte array.
Posted by reg NO[at]SPAM ofeks.info at 2/29/2004 10:51:50 AM
Hi,
I am trying to allocate a byte array i na console app.
The process jumps over the 1 GB RAM and then throws
System.OutOfMemoryException.
It happens with diffrent sizes of allocation, on different computers,
using Framework 1.1.
Any ideas ?
Code:
static void Main(string[] args)... more >>
Determine unsafe member using reflection?
Posted by Don Kackman at 2/29/2004 10:01:06 AM
When a type's member is marked as unsafe
unsafe Int32* Ptr(){
Is it possible, using reflection, to determine that the member is unsafe
The best I could come up with for the above example is
methodInfo.ReturnType.IsPointe
Thanks
don... more >>
HttpWebRequest/Response problem - HELP
Posted by Taryon at 2/29/2004 9:32:00 AM
Hi All!
i have an handler to save some informations on the database. works very
fine. well. i change the sql INSERT string to include a new item. Now im
getting an INTERNAL SERVER ERROR - 500. and even i change to old code i
still have the error.
This is the client code.
HttpWebRequest... more >>
GetMenu()
Posted by Desperate at 2/29/2004 8:36:05 AM
I'am trying to hook other programs menu. I didn't know how to do that in c# so i used some API functions like GetForgroundWindow(), GetMenu(), GetMenuString() ..
These functions allso worked partially' I couldn't hook all application menu it worked on "caculator" but not on "word" for example (a p... more >>
System.IO.FileSystemWatcher class and user identity
Posted by bfallar3 NO[at]SPAM hotmail.com at 2/29/2004 7:00:29 AM
hello, i would like to seek your expertise on how to determine the
identity of the user (remote/local) that modified/created/deleted a
file?
i'm currenty developing a simple windows form app using C# that
monitors any changes in my filesystem using the FileSystemWatcher
class of System.IO nam... more >>
Dependant custom serialization
Posted by Yair at 2/29/2004 1:56:07 AM
Hi
I wish to implement my own serialization scheme, so I implemented ISerializable, and added the needed functions
GetObjectData(..), and the special constructor
The thing is: I need to make a runtime decision inside these functions, and on a given case - let dotnet's regular mechanism do the wor... more >>
What will happen to stream when XmlDocument is changed?
Posted by Peter Rilling at 2/29/2004 12:00:05 AM
I was I to load an Image or XmlDocument based on the data in the Stream, if
changes are made to the created object, will the stream be affected? In
other words, if new nodes are added to an XmlDocument after being loaded,
will the stream reflect those changes?
... more >>
webrequest session
Posted by ¼°È£ at 2/28/2004 10:05:59 PM
use HttpWebrequest.
get cookie in URL1
and use this cookie in URL2
how to coding?
... more >>
Comments on XML Documentation Comments (no pun intended)
Posted by C# Learner at 2/28/2004 9:49:20 PM
What are your views on XML documentation comments?
I always comment every class using <summary> tags, and comment *some*
methods. A lot of C# code that I've seen written by others uses
appropriate XML documentation comments for *every* method.
What do you think about this? Should _every_... more >>
Question about inheritance
Posted by Du Dang at 2/28/2004 8:54:58 PM
class Base
{
public Base (string str)
{
Console.WriteLine(str);
}
}
class Derived : Base
{
public Derived (int i)
{
// do some thing here based on "i" to generate a
string
... more >>
Query and list Network computers
Posted by Oshadha at 2/28/2004 8:46:06 PM
Hi All
I'm trying to query and get a list of all reachable computers in a network. I also heard that you can query active directory and find domain pc list. but my need is not to query active directory. In windows xp "My Network Places -> Microsoft Windows Network" provides all machines that are pr... more >>
memory leak in C#?
Posted by bobo at 2/28/2004 3:53:02 PM
GraphicsPath p=new GraphicsPath();
//p.AddLine(p1,p2);
//p.Widen(pen);
p.Dispose();
this code runs ok.
but if I uncomment the two lines above. the program finally crashes out of
memory? can somebody tell me why?
thank you.
... more >>
How can I get started as a c# developer
Posted by Ron at 2/28/2004 2:02:33 PM
I currently am learning c#.net on my own, still consider myself a rough
beginner. I have 6 years development experience with most of the time spent
on Lotus Notes/Domino/VB. Would like to get involved in a project to learn.
No job is too small. My time is flexible even though I work duing the ... more >>
how to use this VB.Net code in C#??
Posted by Jason at 2/28/2004 1:39:08 PM
CType(e.Item.Cells(3).Controls(0), TextBox).Text
I want to use this in c#
how can i DO that??
thx
... more >>
The network BIOS session limit was exceeded
Posted by Peter at 2/28/2004 1:24:19 PM
I have a C# program that checks directory on a UNIX server and once in a
while I get the following error 'The network BIOS session limit was
exceeded.' if I log off and log back on the error goes away. Does any one
know what is causing this error or how to prevent it?
Peter
--
Thanks
-... more >>
How to set a form full screen?
Posted by zhimin at 2/28/2004 1:24:12 PM
Hi!
How to set a form full screen, the title bar, close button, and system task
bar should hide while the form run. Like some game software such as Empero
Era, Brood, Quake and so on.
Thanks!
... more >>
Excel namespace in C#
Posted by skrishnan NO[at]SPAM snet.net at 2/28/2004 11:14:09 AM
I just created a Excel 2002 interop. When I view thru the object browser
I see Excel {}, does this mean this is the Excel Namespace, just a doubt.
So does {} mean namespace.... more >>
Arrays in structures
Posted by Peter Seaman at 2/28/2004 8:46:58 AM
I understand that structures are value types and arrays and classes are
reference types. But what about arrays as members of structures i.e. as in
C
struct x
{
int n;
int a[100];
}
How is such a structure (e.g. declared in C++ as a field in a class)
accessed in C#... more >>
Unable to start excel from .NET C#
Posted by skrishnan NO[at]SPAM snet.net at 2/28/2004 7:48:00 AM
This is my first attempt, please bear.
I referenced Excel 10.0 Object from VS .NET IDE, I think this creates
Interop Object for Excel.
I have the following code.
------code start----
using System;
using System.Runtime.InteropServices;
using Excel;
namespace ConsoleApplication3
{
... more >>
Newbie: Missing something obvious about instance references
Posted by glorfindel50 NO[at]SPAM hotmail.com at 2/28/2004 6:53:10 AM
Hi
I've been searching for a solution to my problem all day now but
haven't found anything which makes me think the solution is something
obvious. Any help is appreciated.
Suppose you have three classes in separate files and two namespaces.
using Pain.Common;
namespace Test
{
publi... more >>
Comparing arraylist
Posted by Robert Linder at 2/28/2004 4:01:53 AM
I am trying to compare arraylists in csharp.
I setup a simple test with empty arraylists.
string [] x1 = {};
string [] x2 = {};
Console.WriteLine( x1 == x2 ); // false
Console.WriteLine( x1.Equals(x2) ); // false
Console.WriteLine( x1.GetLength(0) == 0 ); // true
... more >>
Is There a Way to Avoid This Mess?
Posted by C# Learner at 2/28/2004 3:19:26 AM
Is there a way to avoid the following mess?
int i = 0;
if (someString != null) {
try {
i = Int32.Parse(someString);
} catch (FormatException) {
}
}
More specifically, is there a way of avoiding the ugly empty catch
statement?... more >>
Changing Desktop Wallpaper
Posted by tamerucar NO[at]SPAM superonline-dot-com.no-spam.invalid at 2/28/2004 3:18:15 AM
Hi,
How can I change desktop wallpaper?
I tried editing
"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\System"
key but it doesn't work. I tried this API call:
[DllImport("user32.dll", CharSet=CharSet.Auto)]
public static extern int SystemParametersInfo (int uActi... more >>
Any Tool that can explore DLL
Posted by John at 2/28/2004 12:25:13 AM
Hi,
In C#, we can use p/Invoke by using [DllImport()] to define extern function
to call C/C++ DLL. Is there any tool/wizard that we can use to explore the
DLL (without header file) and generate the [DllImport()] extern function
automatically?
Sometimes when I could not delete a file because... more >>
Register .NET assembly as COM component with REGASM
Posted by Andy Bates at 2/28/2004 12:06:44 AM
Hi -
I have a C# .NET assembly that exposes a COM interface (basically has an
interface and class with Guid attributes).
If I compile this under VS.NET (with the "Register for COM Interop"
selected). Then I can import the TLB into C++ and use the component as a
standard COM component, it cr... more >>
how to debug windows service
Posted by ÎÒÃνÄϺà at 2/27/2004 11:26:03 PM
how to debug a running service?=20
I can use "debug processes" to attach a running service,=20
but the program doesn't break at my break points.... more >>
What's the Best Way?
Posted by C# Learner at 2/27/2004 10:32:07 PM
What's the best way to achieve the following?
public class MyClass
{
public const byte[] TwoConstBytes = new byte[] { 0x01, 0x02 };
}... more >>
Help needed: How to reserve line break in a string
Posted by gr at 2/27/2004 8:21:05 PM
I need to display a string on the page. It may have Tab, new line feed etc. I need to preserve it. If I am setting it to Lable.Text, it is not been preserved. How can I do it?
Thank Yo
... more >>
Overriding events in an inherited class
Posted by Robert at 2/27/2004 7:00:53 PM
Hi,
I've inherited the XmlDocument class to include some custom methods that I
want to use on a particular XML file.
I need to know whether the document has changed since being loaded, and I
wanted to be clever and hook up to the events that are already defined in
the XmlDocument class (i.e... more >>
multi-threaded C# app started by service uses lots of memory ?
Posted by Martin Rojo at 2/27/2004 6:01:05 PM
Hi ALl
I've got a strange issue (on development, not production)
With .NET 1.1, I've got a multithreaded app that sends and received to MSMQ, also has uses a Remoting server so as to run mirrored with other apps of the same kind
The app is usually started by a service ( i.e. using Process.Star... more >>
System.Windows.Forms.ToolBar
Posted by genc ymeri at 2/27/2004 5:15:18 PM
hi,
I'm trying to have a toolbar similiar to MSOffice2003 but the toolbar which
comes with VSNet03 is not quite the same or at least I don't know where I
can assign/change the color properties.
Any idea ?
Thanks in advance.
PS:
fyi: I have installed in my system MSVisio03 and msoffice03... more >>
Hiding null properties of a component
Posted by Sujith Manuel at 2/27/2004 5:08:09 PM
Hi All,
I have one component developed in C#. It has got three properties and only
one of them will be having value at design time. This means that values of
other two properties will be null.
Whenever I drag & drop this component into a form, VS.NET is giving a
warning as :
" The object... more >>
|