|
-
May 13th, 2011, 05:18 AM
#1
Thread Starter
Lively Member
[RESOLVED] Startup form issues :s
Ok, what i'm trying to do it make my program have an auto update feature, which i already have implemented but i'm chaning the way my program starts so now i need to mix everything around.
This is some information that you will need to try and understand my problem:
My project uses a Splash Screen (frmSplash)
My main form is 'frmMain'
My download update form is 'frmDownloader'
Now when my splash screen launches, it checks for updates. If there is an update is changes a public variable 'blnUpdate' to True.
Then when 'frmMain' loads i have this little clause in the Form_Load event:
Code:
If blnUpdate = True Then
frmDownloader.Show()
Me.Hide()
Exit Sub
End If
But for some reason frmMain still appears (so does frmDownloader).
Any Ideas?
EXPERIENCED VB6 CODER
IF YOU SEE ANY FAILURE IN MY CODING, PLEASE LET ME KNOW AS I'VE ONLY JUST STARTED LEARNING VB.NET AND I WILL APPRECIATE ANY HINTS AND TIPS YOU HAVE TO OFFER! 
-
May 13th, 2011, 05:32 AM
#2
Re: Startup form issues :s
You can't hide a form that hasn't been shown. You shouldn't even be creating the main form if you don't want to show it.
-
May 13th, 2011, 05:38 AM
#3
Thread Starter
Lively Member
Re: Startup form issues :s
 Originally Posted by jmcilhinney
You can't hide a form that hasn't been shown. You shouldn't even be creating the main form if you don't want to show it.
Where can i prevent frmMain from showing then? As it's my startup form, when the splashscreen times out it automatically opens.
I'm not quite sure where i have to intervene to show the downloader form.
EXPERIENCED VB6 CODER
IF YOU SEE ANY FAILURE IN MY CODING, PLEASE LET ME KNOW AS I'VE ONLY JUST STARTED LEARNING VB.NET AND I WILL APPRECIATE ANY HINTS AND TIPS YOU HAVE TO OFFER! 
-
May 13th, 2011, 05:40 AM
#4
Re: Startup form issues :s
You need to create a seperate .exe for your updater, otherwise your .exe will never be updated.
Start your normal .exe and check for update. If update available, call the update.exe en close your .exe.
-
May 13th, 2011, 05:43 AM
#5
Thread Starter
Lively Member
Re: Startup form issues :s
 Originally Posted by Radjesh Klauke
You need to create a seperate .exe for your updater, otherwise your .exe will never be updated.
Nah i don't directly update the .exe file. I do it a wierd way:
1) Downloads an installer package.
2) Runs installer package
3) Closes my .exe
4) Installer package finishes installing & opens updated .exe
EXPERIENCED VB6 CODER
IF YOU SEE ANY FAILURE IN MY CODING, PLEASE LET ME KNOW AS I'VE ONLY JUST STARTED LEARNING VB.NET AND I WILL APPRECIATE ANY HINTS AND TIPS YOU HAVE TO OFFER! 
-
May 13th, 2011, 05:44 AM
#6
Re: Startup form issues :s
It's not weird, but why so "complicated"?
-
May 13th, 2011, 05:50 AM
#7
Thread Starter
Lively Member
Re: Startup form issues :s
 Originally Posted by Radjesh Klauke
It's not weird, but why so "complicated"?
Mainly because the installer .exe it downloads is already compressed so i don't have to use other functions to decompress the file after i download it.
EXPERIENCED VB6 CODER
IF YOU SEE ANY FAILURE IN MY CODING, PLEASE LET ME KNOW AS I'VE ONLY JUST STARTED LEARNING VB.NET AND I WILL APPRECIATE ANY HINTS AND TIPS YOU HAVE TO OFFER! 
-
May 13th, 2011, 05:54 AM
#8
Re: Startup form issues :s
Okay.
- you don't need a splash_screen;
- check for update on the main form;
- if update found open the frm_update;
- download your update_installer;
- if download complete execute the installer from the frm_update and close the app;
- now the installer needs to take-over.
-
May 13th, 2011, 07:49 AM
#9
Thread Starter
Lively Member
Re: Startup form issues :s
I just want the splash screen to show before the program for shits n giggles.
Is there any way around it?
EXPERIENCED VB6 CODER
IF YOU SEE ANY FAILURE IN MY CODING, PLEASE LET ME KNOW AS I'VE ONLY JUST STARTED LEARNING VB.NET AND I WILL APPRECIATE ANY HINTS AND TIPS YOU HAVE TO OFFER! 
-
May 13th, 2011, 07:56 AM
#10
Re: Startup form issues :s
Don't create a splash-screen, but a standard form which does your thing and when it's done load the other.
-
May 13th, 2011, 07:57 AM
#11
Thread Starter
Lively Member
Re: Startup form issues :s
Yer fair enough, thanks for the help fellas
EXPERIENCED VB6 CODER
IF YOU SEE ANY FAILURE IN MY CODING, PLEASE LET ME KNOW AS I'VE ONLY JUST STARTED LEARNING VB.NET AND I WILL APPRECIATE ANY HINTS AND TIPS YOU HAVE TO OFFER! 
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
|