nV News Forums


nV News Forums (http://www.nvnews.net/vbulletin/index.php)
-   Software Development (http://www.nvnews.net/vbulletin/forumdisplay.php?f=53)
-   -   .NET forms (http://www.nvnews.net/vbulletin/showthread.php?t=84466)

Sycario 01-17-07 08:48 AM

.NET forms
I've been writing web apps with VB.net for almost 2 years but now I am writing an installer for our app. What I need it to do is load 1 form and get all settings it needs for choosing the next form before using the one specified. It will have to automatically go to next form without a prompt or anything. I read in the XML and it sets a mode (install or update). Based on that I need to either load the install form or the update form. I can't figure out how to do this. I know the xml part but this is my first time working with forms. Is there an easier way to do this?


superklye 01-17-07 08:54 AM

Re: .NET forms
So wait...are they inputting data that needs to go from one form to another (i.e. username, password, etc) or are they two separate forms using the same XML data or both?

You can either use the querystring or use the POST function of an HTML form in order to pass variables such as usernames between two pages. Querystring isn't recommended for sending sensitive data because you can see them in the address bar.

Is that what you were talking about, or did I completely misunderstand?

Sycario 01-17-07 09:11 AM

Re: .NET forms
This is for a program, not a web app. I need it to go to either the form for updating or the form for installing. Basically I need to get the mode from the xml before going to the correct form. I was thinking that I need a form to load and get the info before going to where it needs to go. I am not sure if this is the correct way to do it though. The form it will first load should automatically go to the next form. The first form should have no prompt of any kind, I was just going to use it for deciding which form to go to next.

superklye 01-17-07 09:15 AM

Re: .NET forms
Oh...I don't know much about non-web programming. Sorry dude. :(

Greasy 01-17-07 10:39 AM

Re: .NET forms
Why not just use the built in installer by creating a depolyement package?

Monolyth 01-17-07 11:00 AM

Re: .NET forms

Originally Posted by Greasy
Why not just use the built in installer by creating a depolyement package?

I have to agree with this, is there any particular reason you require the XML? Building a deployment package can update if the application is already installed install if need be.

Head_slinger 01-17-07 12:39 PM

Re: .NET forms

Deployment packages are only really for deploying code you have wrote in VS, they are limited when deploying other stuff, not sure what he is doing.

To open new Forms do this.

Create a new form object (right click project -> Add -> WindowsForm)
Give it a name (i will call it TestForm).

Then to open that dialog simply:

//Create a new instance of the form
TestForm myForm = new TestForm();

//Call the ShowDialog method

You can pass variables etc. to the new form by creating a custom constructor.

Hope this helps!


I just re-read your post, do you want to process the xml file before showing the user the Form. If this is the case simply put the code for reading in the xml in the constructor for the main form, do your processing and customise the form as appropriate.

Sycario 01-17-07 01:28 PM

Re: .NET forms
The program does alot more than just install or patch. I don't know much about the deployment but this is .net 1.1

The patcher executes alot of sql scripts to update the databases. Here is the code I used to make it work:


        Dim NextForm As Form
        If LCase(SetupMode) = "patch" Then
            NextForm = New MainPatchForm
        ElseIf LCase(SetupMode) = "install" Then
            NextForm = New MainInstallForm
        End If

All times are GMT -5. The time now is 08:51 PM.

Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2015, Jelsoft Enterprises Ltd.
Copyright 1998 - 2014, nV News.