|
Why might it not work ? I did this last night and still got nowhere. If I create a file and save it, do I need to add it to the project somewhere as well ?
Christian
The tragedy of cyberspace - that so much can travel so far, and yet mean so little.
"I'm thinking of getting married for companionship and so I have someone to cook and clean." - Martin Marvinski, 6/3/2002
|
|
|
|
|
Christian Graus wrote:
If I create a file and save it, do I need to add it to the project somewhere as well ?
Yes, it will have to be added to the project or it won't get compiled. How did you go about creating a file and saving it? If you go through the IDE it should be added to the project for you.
How I add a new class: Right click my project in the Solution Explorer, choose Add then Add New xxxxx (class, component, windows form, etc).
Ah! Just a shot in the dark, do the namespaces match between your two files? Come to think of it, my example didn't have a namespace for foo.cs
If you change the namespace you can let the IDE help you a little, right click on the project and choose Properties, then change the Default Namespace to the base namespace you use.
HTH,
James
Sonork ID: 100.11138 - Hasaki
"Smile your little smile, take some tea with me awhile.
And every day we'll turn another page.
Behind our glass we'll sit and look at our ever-open book,
One brown mouse sitting in a cage."
"One Brown Mouse" from Heavy Horses, Jethro Tull 1978
|
|
|
|
|
No, I didn't do it quite like this, but I did it through the IDE. I made sure my namespaces matched, but I'll try it fllowing what you said and see how it goes.
Thanks.
Christian
The tragedy of cyberspace - that so much can travel so far, and yet mean so little.
"I'm thinking of getting married for companionship and so I have someone to cook and clean." - Martin Marvinski, 6/3/2002
|
|
|
|
|
If you're compiling as part of the same project, you don't need #include; the compiler can automatically access the classes in all the files that are compiled together.
If you're compiling into separate assemblies (aka dlls), you'll need to add the referenced one either to the project or using /r on the command line.
|
|
|
|
|
Thanks - it seems the way I added the file did not make it part of the proejct, I did the exact same thing this morning, but added the class by right clicking in the class view and it all worked fine.
Christian
The tragedy of cyberspace - that so much can travel so far, and yet mean so little.
"I'm thinking of getting married for companionship and so I have someone to cook and clean." - Martin Marvinski, 6/3/2002
|
|
|
|
|
Anybody can tell me how do I get the byte representation of an integer?
E.g. int iValue=500, then the byte representation is 00 00 01 F4.
Thanks.
|
|
|
|
|
int iValue = 500;
byte byte0 = iValue; // byte0 is 0xF4
byte byte1 = iValue >> 8; // byte1 is 0x01
byte byte2 = iValue >> 16; // byte2 is 0x00
byte byte3 = iValue >> 24; // byte3 is 0x00
|
|
|
|
|
Anybody know how can I make a Custom Controls for a ProgressBar to add these functionnalities : SetBkColor, SetBarColor, FlatStyle ?
Thanks
|
|
|
|
|
You can update the enabled/disabled status of menu items using the Popup event for the menu, but how do you update the status for toolbar buttons?
|
|
|
|
|
A toolbar is displayed at all times so you should update it when you need to (ie the button should change state when the button's representive action has changed state).
It makes sense to update a menu in the popup event because the menu isn't always displayed.
HTH,
James
Sonork ID: 100.11138 - Hasaki
"Smile your little smile, take some tea with me awhile.
And every day we'll turn another page.
Behind our glass we'll sit and look at our ever-open book,
One brown mouse sitting in a cage."
"One Brown Mouse" from Heavy Horses, Jethro Tull 1978
|
|
|
|
|
Not that I'm a C# programmer or even interested in C#, but I was just wondering how C# would be pronounced in real life. I always thought it was said "C NET."
First Programmer: "How many bits are in a bite?"
Second Programmer: "You spelled bytes wrong."
First Programmer: *stares* "It's a joke, moron."
Second Programmer: "Joke...?"
|
|
|
|
|
|
|
If I understand the discussion of "Deploying a C# App" correctly, you can use the C# compiler to generate an executable that can run on any of the Win OS systems (95/98/ME/NT/2000/XP)...
I am right?
|
|
|
|
|
Windows 95 is not supported
Minimum Configuration Requirements
This section describes the minimum configuration requirements for a computer where the .NET Framework redistributable package is to be installed. If the minimum requirements are not met, Dotnetfx.exe setup will block the installation of the redistributable package. Specifically, note that you cannot install the .NET Framework redistributable package on a computer running the Microsoft Windows 95 operating system.
Andres Manggini.
Buenos Aires - Argentina.
|
|
|
|
|
But can you make an exe that doesn't need the .NET dlls and stuff...one that would use existing MFC/VB stuff?
|
|
|
|
|
No.
I vote pro drink
|
|
|
|
|
Hi, Im a newbie starting in the C# world and I was wondering what to do to make an executable on C# (using .NET) so it can be run on computers with a different OS than the one it was made on. Whenever I test out my programs on my computer with Windows 98 it gives an error in the windows version, I make the programs on Windows XP. Id really appriciate any help.
Thanks.
|
|
|
|
|
Simon Krynine wrote:
Whenever I test out my programs on my computer with Windows 98 it gives an error
Have you install .net platform on your win98?
Mazy
"So,so you think you can tell,
Heaven from Hell,
Blue skies from pain,...
How I wish,how I wish you were here." Wish You Were Here-Pink Floyd-1975
|
|
|
|
|
|
Simon Krynine wrote:
No I havent...
So that's the problem,you can use your .net applications(C# or VB.NET) only in OS that have .net platform.I think some new version of xp have .net platform so you can run your applications without any problem.I think you can dl .net platform here in CP or you can do it in MS site.
Mazy
"So,so you think you can tell,
Heaven from Hell,
Blue skies from pain,...
How I wish,how I wish you were here." Wish You Were Here-Pink Floyd-1975
|
|
|
|
|
I got the same problem.
you need to have .NET on target machine.
http://msdn.microsoft.com/downloads/default.asp?url=/downloads/sample.asp?url=/msdn-files/027/001/829/msdncompositedoc.xml.
try to download this and have fun.
- Anand
|
|
|
|
|
Just to share with you guys,
Hotmail is not accepting CAB file as an attachment. Anybody tried?
-Anand
|
|
|
|
|
M$ does not accept M$
Are you sure?
Mazy
"So,so you think you can tell,
Heaven from Hell,
Blue skies from pain,...
How I wish,how I wish you were here." Wish You Were Here-Pink Floyd-1975
|
|
|
|
|
I tried (5 times)to attach CAB file, but no luck..
Its not giving any error, but simply ignores what you doing..
|
|
|
|