Hello everyone,

I'm new to this...Last night I made a program in Visual Studio 2005, and when I brought it to school today to run, it wouldn't because they don't have .NET 2.0 installed...

Is there a way I can compile my program with the .NET 2.0 framework inside it? (Don't care about size)

Or what can I do? Apart from install the framework?

Recommended Answers

All 12 Replies

Instead, figure out how to compile it without the need for the Framework. Then it can run on any Windows computer, with or without .NET

I was trying to remake it in VB 6.0 at school....But that doesn't allow you to add a web browser.

I need a web browser in it.

Install the .NET framework 2, there is no reason not to have it installed and it's easy enough.

The school will not install it...I reckon, and I probably don't have permissions.

Although they will have to install it next year (VCE program has been updated, so they get the latest software, probably visual studio 2005, as 2007 won't be out by then) I want it now :p

Although, I will try and install it myself, or ask the head of ICT

As I said...

Instead, figure out how to compile it without the need for the Framework. Then it can run on any Windows computer, with or without .NET

There was web access long before .NET, so don't use technology that is limiting you.

As I said...

There was web access long before .NET, so don't use technology that is limiting you.

Yes, but in the .NET framework you can just drag an internet browser in...

However, is it possible to compile in the 1.1 framework?

Yes, but in the .NET framework you can just drag an internet browser in...

You can certainly drag on a web browser in VB6.0. Look in the extended/full control list.. I'll walk you through because I don't remember exactly myself..

Right click your toolbox and hit components, or go to project > components; then browse through the list until you reach "Microsoft Internet Controls", check the box, and you'll have a new component in the toolbox called WebBrowser. Use it like this: WebBrowser1.Navigate("AN_URL")

Matt

You can certainly drag on a web browser in VB6.0. Look in the extended/full control list.. I'll walk you through because I don't remember exactly myself..

Right click your toolbox and hit components, or go to project > components; then browse through the list until you reach "Microsoft Internet Controls", check the box, and you'll have a new component in the toolbox called WebBrowser. Use it like this: WebBrowser1.Navigate("AN_URL")

Matt

Yah, When I do this it crashes.

Crashes no matter what school computer I do it on :(

does it give an error or does it just hang indefinately? does it crash when you drop the control or when you try to use it?

it may be the case that your school computers have firewalls and your application isn't in the list of programs trusted to use the internet.

i just tried it out (i use Norton Internet Security) and; while you're developing/debugging, VB6.0 needs to be granted permission to use the net (gives a low warning), and when you build the app (and i expect everytime you rebuild the app) it needs to be given the same permission (but gives a high warning).

you can test if that's the problem by trying to open a local file, but with regard to connecting to actual webpages, this'll probably be the case with any software you write in any language!

Matt

does it give an error or does it just hang indefinately? does it crash when you drop the control or when you try to use it?

Matt

Not when I use it..I tick the box, press OK or Apply and it crashes.

Hi,

There are 2 ways how to add .net framework redistributable into project - but it'll create an installer ;)
However, you can also use Delphi and you 'll have webBrowser component without need of installing any framework...

1 - Open project in VS, then click Project / [Project name] Properties / Publish / Prerequisites. There you can select .net Framework 2, which will be included in the project. (You'll have to put .net framework redistributable into Project's folder on your own, then show VS a path).

Then you'll have to click Build / Publish in main manu to publish your project.

2 - If you're using an app with more files, it's better to use a typical installer. The way to add prerequisites in there is:
Project / Properties / Prerequisites


This works in VS 2005 Professional. If you 're using the Express edition, then only first way may work for you.


Stevie

Every compiled program has dependencies. .NET programs require the .NET Framework. There is no way to write a program in th .NET environment without .NET Framework on the client machine, as WaltP keeps stating.

You could write in another language, such as VB 6.0, but it requires the vbrunxxx.dll as a dependency, and so on.

Any language that supports COM can re-use the Web Browser Control to have an internal web browser.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.