|
-
Jul 31st, 2002, 03:10 AM
#1
Thread Starter
New Member
2 things: Show Form and .Net Framwork
I am currently developing an application with VB.NET. I just upgraded from VB6. I have 2 questions:
1) How do I open a form and only one instance of the form. For example, I am using the following code:
Dim frm as New frmMain
frm.Show()
This works fine but I only want the form to open once. If I click this button again, it opens another instance of the form.
2) When I package and deploy my applicaiton, are my users required to have XP or the .Net framework installed on their machines? Can I package and deploy a VB.Net application to run on a machine running Win95 or 98? Is the framework included in the installation of my packaged program?
-
Jul 31st, 2002, 08:46 AM
#2
Frenzied Member
1. Check to see if the form is already open, if it is dont open another one, you'll run out of memory eventually.
2. .NET programs can run on all Windows version as long as the framework is installed. The .NET framework redistributable is 21 megs, you wont be pakaging it onless you distibute your apps on CDs, so your users will have to download it from MS site.
-
Jul 31st, 2002, 02:39 PM
#3
Hyperactive Member
Re: 2 things: Show Form and .Net Framwork
Originally posted by ChrisMalter
I am currently developing an application with VB.NET. I just upgraded from VB6. I have 2 questions:
1) How do I open a form and only one instance of the form. For example, I am using the following code:
Dim frm as New frmMain
frm.Show()
This works fine but I only want the form to open once. If I click this button again, it opens another instance of the form.
2) When I package and deploy my applicaiton, are my users required to have XP or the .Net framework installed on their machines? Can I package and deploy a VB.Net application to run on a machine running Win95 or 98? Is the framework included in the installation of my packaged program?
1. Here is a solution thats even simpler:
Public Class SomeForm
...
...
Dim frm as new frmMain
public sub SomeProcedure()
frm.Show
end sub
end class
Now every time you call 'SomeProcedure', a new form wont be created.
2. What the last guy said.
-
Jul 31st, 2002, 08:17 PM
#4
PowerPoster
The framework isn't, and supposedly, won't be available for Windows 95, but 98 and up are supported.
-
Aug 1st, 2002, 07:05 AM
#5
Junior Member
.Net framework can be packaged
Yes, you can bundle the framework with a build. I have not had to try it since all the target servers have had .Net for running web services but I have read it is possible. You'll see a small circle and a line through it denoting the .Net framework is a dependency and not packaged in your MSI (setup project) by default.
When you view the build data of your app you should see a warning that the .Net framework is currently not part of the build and the target machines will require it to run this app. The name is given to you within the warning.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|