By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
439,978 Members | 1,373 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 439,978 IT Pros & Developers. It's quick & easy.

my program won't work on computer without framework, dow do i make a program that runs on every windows 2k/xp system ?

P: n/a
Hello,

I'm so sorry, but i don't understand the concept of the .net environment
yet.
I made a simple program that retrieves the hostname and ipaddress of the
local computer.

But when i give thit .exe file to my friend he can't run it because he does
not have the framwork 1.1
I thought that the this framework is just a large library of classes wich
you can you when coding, but now i see that yhe program only works on
computers with this framework. it reminds me of Java programs wich only runs
at computers where the java is at latest and configured level.

i would like to know how i can make windows programs that run on every
windows 2000/xp computer.

hope some of you can explain me the concept, i am probably doing ans seeing
things wrong here.

grtx,
b
Nov 15 '05 #1
Share this Question
Share on Google+
11 Replies


P: n/a
bart <ba**@thatissecret.nlm> wrote:
I'm so sorry, but i don't understand the concept of the .net environment
yet.
I made a simple program that retrieves the hostname and ipaddress of the
local computer.

But when i give thit .exe file to my friend he can't run it because he does
not have the framwork 1.1
Yup.
I thought that the this framework is just a large library of classes wich
you can you when coding, but now i see that yhe program only works on
computers with this framework. it reminds me of Java programs wich only runs
at computers where the java is at latest and configured level.
Well, Java programs will work wherever a sufficient Java environment
for that program is available - if you write a program which only uses
Java 1.1 features, you can run that on a machine with only Java 1.1,
even though Java is now at 1.4.2. It's the same for .NET, although
stronger versioning makes it slightly harder to get something to work
on both .NET 1.0 and 1.1 if you're developing with a 1.1-based IDE.
(It's more likely to work properly when you do, however, for precisely
the same reason.)
i would like to know how i can make windows programs that run on every
windows 2000/xp computer.
Don't use .NET, basically.
hope some of you can explain me the concept, i am probably doing ans seeing
things wrong here.


Nope - you're just seeing it as a big issue when I don't think it needs
to be. If you wrote programs using DirectX9 features, would you expect
those programs to be available on machines without DirectX9 on them?
--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Nov 15 '05 #2

P: n/a
Hi Jon,

Is there a way i could use Visual Studio to make Windows programs that don't
require the framework dll's ?

I was just testing to make a simple program. I used the DnsGetHostname()
class to get the hostname the computer. I could see that this class uses the
system.dll in the framework directory.

could i just not compile this code (system.dll) into the executable ?

bart
"Jon Skeet [C# MVP]" <sk***@pobox.com> wrote in message
news:MP************************@msnews.microsoft.c om...
bart <ba**@thatissecret.nlm> wrote:
I'm so sorry, but i don't understand the concept of the .net environment
yet.
I made a simple program that retrieves the hostname and ipaddress of the
local computer.

But when i give thit .exe file to my friend he can't run it because he does not have the framwork 1.1


Yup.
I thought that the this framework is just a large library of classes wich you can you when coding, but now i see that yhe program only works on
computers with this framework. it reminds me of Java programs wich only runs at computers where the java is at latest and configured level.


Well, Java programs will work wherever a sufficient Java environment
for that program is available - if you write a program which only uses
Java 1.1 features, you can run that on a machine with only Java 1.1,
even though Java is now at 1.4.2. It's the same for .NET, although
stronger versioning makes it slightly harder to get something to work
on both .NET 1.0 and 1.1 if you're developing with a 1.1-based IDE.
(It's more likely to work properly when you do, however, for precisely
the same reason.)
i would like to know how i can make windows programs that run on every
windows 2000/xp computer.


Don't use .NET, basically.
hope some of you can explain me the concept, i am probably doing ans seeing things wrong here.


Nope - you're just seeing it as a big issue when I don't think it needs
to be. If you wrote programs using DirectX9 features, would you expect
those programs to be available on machines without DirectX9 on them?
--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too

Nov 15 '05 #3

P: n/a
bart <ba**@thatissecret.nlm> wrote:
Is there a way i could use Visual Studio to make Windows programs that
don't require the framework dll's ?
Yes - but only by writing unmanaged C++.
I was just testing to make a simple program. I used the DnsGetHostname()
class to get the hostname the computer. I could see that this class uses the
system.dll in the framework directory.

could i just not compile this code (system.dll) into the executable ?


No, because it's not just a case of it using a library - .NET is a
whole virtual execution environment, not just a set of libraries.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Nov 15 '05 #4

P: n/a
"Jon Skeet [C# MVP]" <sk***@pobox.com> wrote in message
news:MP************************@msnews.microsoft.c om...
Yes - but only by writing unmanaged C++.

Okay, when I choose a C++ project, i have following choices;

..NET
ATL
MFC
Win32
General

But when i choose Win32, i don't see the Forms, what do i do wrong?

what does unmanaged code mean? I read about it yesterday because i want to
use/access the IP helper dll, with a P/Invoke method.

Okay, here's what i want to code;

I want to make a windows program that detect connection to a network /
ipaddess change, and then based on the local IP adress i want to make
changes to my windows HOSTS file. I want to have a systray status icon and
be able to config from the systray icon.

where do i start best?

Bart

Nov 15 '05 #5

P: n/a
bart <ba**@thatissecret.nlm> wrote:
"Jon Skeet [C# MVP]" <sk***@pobox.com> wrote in message
news:MP************************@msnews.microsoft.c om...
Yes - but only by writing unmanaged C++.

Okay, when I choose a C++ project, i have following choices;

.NET
ATL
MFC
Win32
General

But when i choose Win32, i don't see the Forms, what do i do wrong?


Nothing - but Windows Forms are part of .NET, so you can't use them
without .NET.
what does unmanaged code mean? I read about it yesterday because i want to
use/access the IP helper dll, with a P/Invoke method.
Managed code is code which runs inside the virtual execution
environment .NET provides - memory is "safe" (i.e. you can't go off the
end of an array etc without getting an exception), you get garbage
collection, declarative security etc.

Unmanaged code is native code which executes directly within Windows,
using Win32 library functions etc.
Okay, here's what i want to code;

I want to make a windows program that detect connection to a network /
ipaddess change, and then based on the local IP adress i want to make
changes to my windows HOSTS file. I want to have a systray status icon and
be able to config from the systray icon.

where do i start best?


Well, if you want to write in C#, you *have* to use .NET. If you don't
mind writing in C/C++ and using the Win32 routines rather than the .NET
framework, choose MFC or Win32.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Nov 15 '05 #6

P: n/a
If you want to use Unmanaged C++, then you will have to do your own Windows
Forms. Just like in
VC++ 6.0 and earlier. The nice WinForms thing, is as others have said, only
available to you in .NET.
james

"bart" <ba**@thatissecret.nlm> wrote in message
news:40*********************@news.xs4all.nl...
"Jon Skeet [C# MVP]" <sk***@pobox.com> wrote in message
news:MP************************@msnews.microsoft.c om...
Yes - but only by writing unmanaged C++.

Okay, when I choose a C++ project, i have following choices;

.NET
ATL
MFC
Win32
General

But when i choose Win32, i don't see the Forms, what do i do wrong?

what does unmanaged code mean? I read about it yesterday because i want to
use/access the IP helper dll, with a P/Invoke method.

Okay, here's what i want to code;

I want to make a windows program that detect connection to a network /
ipaddess change, and then based on the local IP adress i want to make
changes to my windows HOSTS file. I want to have a systray status icon and
be able to config from the systray icon.

where do i start best?

Bart

Nov 15 '05 #7

P: n/a
virtual execution environment ?
garbage collection?

Let me think here, would it be possible that .NET is just made to protect
the monopolistic postion of Microsoft Windows?

I mean, there was already an environment with "virtual execution
environment" and "garbage collection"
yes, i am talking about JAVA

Good to know this stuff, i didn't know that .NET code is run in a "virtual
execution environment"

What I don't understand is that Visual Studio does not have a Visual way to
make normal (unmanaged) Windows code.
Are you sure there is no way to use forms like Borland has? I thought i
remembered that MFC was the microsoft way to distribute windows forms.

B


Nov 15 '05 #8

P: n/a
"bart" <ba**@thatissecret.nlm> wrote in news:40131629$0$322
$e*******@news.xs4all.nl:
Let me think here, would it be possible that .NET is just made to protect
the monopolistic postion of Microsoft Windows?
Both yes and no.
I mean, there was already an environment with "virtual execution
environment" and "garbage collection"
yes, i am talking about JAVA
They have many simlarities. But one major difference is Java is tied to a
language - .Net is not.
What I don't understand is that Visual Studio does not have a Visual way to
make normal (unmanaged) Windows code.
The upper versions do, but only via C++ and MFC or straight WinAPI's. Yucky
stuff.
Are you sure there is no way to use forms like Borland has? I thought i
Yes, use Delphi. :)
remembered that MFC was the microsoft way to distribute windows forms.


It is - but MFC is anything but visual. It is nothing like Winforms or
Delphi.
--
Chad Z. Hower (a.k.a. Kudzu) - http://www.hower.org/Kudzu/
"Programming is an art form that fights back"
ELKNews - Get your free copy at http://www.atozedsoftware.com

Nov 15 '05 #9

P: n/a
bart wrote:
I thought that the this framework is just a large library of classes


Even if that were the case, how would you propose to execute your
applications on PCs without that library of classes? From a redistributable
standpoint, .NET is no different than Visual Basic. Even dynamically-linked
MFC apps have to ensure that a compatible version of MFC is present on the
target system.

--
There are 10 kinds of people. Those who understand binary and those who
don't.

http://code.acadx.com
(Pull the pin to reply)
Nov 15 '05 #10

P: n/a
Bart.. FWIW, any W2000 or XP user with broadband access can go to
www.microsoft.com click on windows update and select the 1.1 NET
framework for downloading.

I suspect the answer to your question would be to write in C++ using the
MFC framework and statically link to the MFC library.

Regards,
Jeff
i would like to know how i can make windows programs that run on

every windows 2000/xp computer.<

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 15 '05 #11

P: n/a
> virtual execution environment ?
garbage collection?

Let me think here, would it be possible that .NET is just made to protect
the monopolistic postion of Microsoft Windows?
???
I mean, there was already an environment with "virtual execution
environment" and "garbage collection"
yes, i am talking about JAVA
You *might* want to catch up with current events. The reason that C# exists is
because of the legal issues between Sun and Microsoft regarding Java. MS
wanted to have its Java cake and eat it too, Sun wouldn't let them, so MS went
and made their own cake.
What I don't understand is that Visual Studio does not have a Visual way to
make normal (unmanaged) Windows code.
Are you sure there is no way to use forms like Borland has? I thought i
remembered that MFC was the microsoft way to distribute windows forms.


There is a little bit of abuse regarding the term 'forms'. In .NET, it has a
completely new and different meaning than what you are probably accustomed to.
In .NET, forms refers to Windows Forms which is a new subsystem for user
interfaces.

You can still use the same mechanism to design user interfaces using the visual
designer for C++ (unmanaged) projects in VS.NET. It is just as 'visual' as the
previous version in VS 6.

--
Bret Pehrson
mailto:br**@infowest.com
NOSPAM - Include this key in all e-mail correspondence <<38952rglkwdsl>>
Nov 15 '05 #12

This discussion thread is closed

Replies have been disabled for this discussion.