Calling a form

  • Thread starter Thread starter BobAchgill
  • Start date Start date
B

BobAchgill

I have a MainForm and would like to call up a DownLoad
form to let the user execute code associated with that
form to download some files from the host.

How do I call the Download form from the Mainform? I
tried several things I saw in the Help and but did not
hit on the right thing.
 
Hi

in your main form

dim obj as new donloadform
obj.show

hth Peter
 
i think like this, i do it like this to open forms from my parrent form.

dim downloadform as new Form1
downloadform.mdiparent = me
downloadform.show
 
Bob,

1. If the download form is another form in your Windows Forms app:

From MainForm, assuming the name of the download form is DownloadForm:

Dim downloadForm As New DownloadForm()
downloadForm.Show() ' or ShowDialog depending on whether you want modal or
non-modal behavior.

2. If the download form is a web form page on a remote server:

On MainForm add a button named Download. Double click it to open the
handler for the button.

Add this code to open the web page:

System.Diagnostics.Process.Start("url goes here")

See:
http://msdn.microsoft.com/library/d...l/frlrfsystemdiagnosticsprocessclasstopic.asp


--
Mike

Mike McIntyre
Visual Basic MVP
www.getdotnetcode.com
 
If you want to use the main form and download form in the same time use:
/////
dim frmDownload as new DownLoadForm
frmDownload.Show
\\\\\

If you want the main form disabled while the user working with the download
form use this:
/////
dim frmDownload as new DownloadForm
frmDownload.ShowDialog
frmDownload.Dispose
\\\\\
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top