Results 1 to 5 of 5

Thread: 2 things: Show Form and .Net Framwork

  1. #1

    Thread Starter
    New Member
    Join Date
    Jul 2002
    Posts
    4

    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?

  2. #2
    Frenzied Member DevGrp's Avatar
    Join Date
    Nov 2001
    Location
    Charlotte, NC
    Posts
    1,256
    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.

  3. #3
    Hyperactive Member
    Join Date
    Feb 2002
    Posts
    261

    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.

  4. #4
    PowerPoster hellswraith's Avatar
    Join Date
    Jul 2002
    Location
    Washington St.
    Posts
    2,464
    The framework isn't, and supposedly, won't be available for Windows 95, but 98 and up are supported.

  5. #5
    Junior Member
    Join Date
    Jun 2002
    Posts
    16

    .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
  •  



Click Here to Expand Forum to Full Width