To register for an Internet.com membership to receive newsletters and white papers, use the Register button ABOVE.
To participate in the message forums BELOW, click here
VBForums  

VB Wire News
MSDN Subscribers: Download the VS 2010 Release Candidate
MSDN Subscribers: Download the VS 2010 Release Candidate
Sell Your Code and Make Money?
Creating your own Tetris game using VB.NET
Article :: Improving Software Economics, Part 4 of 7: Top 10 Principles of Iterative Software Management



Go Back   VBForums > Visual Basic > Visual Basic .NET

Reply Post New Thread
 
Thread Tools Search this Thread Display Modes
Old Jun 9th, 2006, 07:34 PM   #1
Lasering
Fanatic Member
 
Lasering's Avatar
 
Join Date: May 06
Location: Lisboa
Posts: 539
Lasering is on a distinguished road (10+)
Resolved [RESOLVED] SplashScreen with ProgressBar

Hi!!!

I have a "main" form named MuShop and I have another form called Entrada (The SplashScreen form) in this form i've a progressbar.
In MuShop Load event i'v this lines of code
VB Code:
  1. Me.Hide()
  2. Entrada.ApplicationTitle.Text = My.Application.Info.Title
  3. Entrada.Version.Text = System.String.Format(Entrada.Version.Text, My.Application.Info.Version.Major, My.Application.Info.Version.Minor)
  4. Entrada.Copyright.Text = My.Application.Info.Copyright
  5. Entrada.Show()
  6. ByItem_()
  7. Search_()
  8. Entrada.Close()
  9. Me.Show()
In ByItem and in Search subs i'v loops and other code that increase the progressbar value(from Entrada).

With this code the the progressbar reachs the value 100 but the textboxs are not showned correcty they stay like "invisible" (i can beyond the form). So i tried a diffenrent code:
VB Code:
  1. Me.Hide()
  2. Entrada.ApplicationTitle.Text = My.Application.Info.Title
  3. Entrada.Version.Text = System.String.Format(Entrada.Version.Text, My.Application.Info.Version.Major, My.Application.Info.Version.Minor)
  4. Entrada.Copyright.Text = My.Application.Info.Copyright
  5. Entrada.ShowDialog()
  6. Me.Dispose()
  7. ByItem_()
  8. Search_()
  9. Entrada.Close()
  10. Me.Show()
With this code the textboxes stay fine but the progressbar stays like inactive as it wans't get orders althougth they are there.

So anyone know a way to solve this?
__________________

Reference: MSDN Regex: Regular-Expressions.info
Controls: XPCC|Code Project|Quantum|API: Api Guide

Albert Einstein:
"Imagination is more important than knowledge."
"Everything should be made as simple as possible, but not simpler."
"Great spirits have often encountered violent opposition from weak minds."
Lasering is offline   Reply With Quote
Old Jun 10th, 2006, 05:32 AM   #2
Coool
Hyperactive Member
 
Coool's Avatar
 
Join Date: Feb 06
Location: System.Coool
Posts: 315
Coool is on a distinguished road (10+)
Re: SplashScreen with ProgressBar

If it's not necessary to hide the main form then show Entrada form as modelly using

<objEntrada>.ShowDialog()

and if it's necessay to hide main form then simply run
ByItem_()
Search_()
In different thread ( u can use BackgroundWorker). but to show progress u need an Inter-Thread communication .. This can be done by delegate.

Lots of thread of delegate and backgroudworker is available in forum.
__________________
I am using .NET 2005 with XP sp2
Please Help Us To Save Ana
Coool is offline   Reply With Quote
Old Jun 10th, 2006, 05:49 AM   #3
Atheist
Networker
 
Atheist's Avatar
 
Join Date: Aug 05
Location: Sweden
Posts: 7,328
Atheist is a name known to all (1000+)Atheist is a name known to all (1000+)Atheist is a name known to all (1000+)Atheist is a name known to all (1000+)Atheist is a name known to all (1000+)Atheist is a name known to all (1000+)Atheist is a name known to all (1000+)Atheist is a name known to all (1000+)Atheist is a name known to all (1000+)
Re: SplashScreen with ProgressBar

Cross-threading I love it
__________________
---My Flickr photo stream. Have a look!


Rate posts that helped you.
I do not reply to PM's with coding questions.
How to Get Your Questions Answered
LINQ examples | Save/load a forms layout | TCP client/server connection | Retrieving the EventHandler for any Event by code.
Check out the work in progress: Obtuze - A Neural Network for OCR
Atheist is offline   Reply With Quote
Old Jun 10th, 2006, 08:18 AM   #4
Lasering
Fanatic Member
 
Lasering's Avatar
 
Join Date: May 06
Location: Lisboa
Posts: 539
Lasering is on a distinguished road (10+)
Re: SplashScreen with ProgressBar

Hi!!!

I tried to look in forum for delegate and i'v being reding many threads but i still can figure it how can i make progressbar working and the form to be show correctly.

Can anyone help me here?
__________________

Reference: MSDN Regex: Regular-Expressions.info
Controls: XPCC|Code Project|Quantum|API: Api Guide

Albert Einstein:
"Imagination is more important than knowledge."
"Everything should be made as simple as possible, but not simpler."
"Great spirits have often encountered violent opposition from weak minds."
Lasering is offline   Reply With Quote
Old Jun 10th, 2006, 08:55 AM   #5
Atheist
Networker
 
Atheist's Avatar
 
Join Date: Aug 05
Location: Sweden
Posts: 7,328
Atheist is a name known to all (1000+)Atheist is a name known to all (1000+)Atheist is a name known to all (1000+)Atheist is a name known to all (1000+)Atheist is a name known to all (1000+)Atheist is a name known to all (1000+)Atheist is a name known to all (1000+)Atheist is a name known to all (1000+)Atheist is a name known to all (1000+)
Re: SplashScreen with ProgressBar

Heres an example:
VB Code:
  1. Delegate Sub dlgSetInteger(ByVal value As Integer)
  2.     Private Sub SetProgressBar1Value(ByVal value As Integer)
  3.         If Me.ProgressBar1.InvokeRequired Then
  4.             Me.ProgressBar1.Invoke(New dlgSetInteger(AddressOf SetProgressBar1Value), New Object() {value})
  5.         Else
  6.             Me.ProgressBar1.Value = value
  7.         End If
  8.     End Sub

And now, instead of using:
VB Code:
  1. ProgressBar1.Value = 100
to set a value, write like this:
VB Code:
  1. SetProgressBar1Value(100)
__________________
---My Flickr photo stream. Have a look!


Rate posts that helped you.
I do not reply to PM's with coding questions.
How to Get Your Questions Answered
LINQ examples | Save/load a forms layout | TCP client/server connection | Retrieving the EventHandler for any Event by code.
Check out the work in progress: Obtuze - A Neural Network for OCR
Atheist is offline   Reply With Quote
Old Jun 10th, 2006, 10:10 AM   #6
Lasering
Fanatic Member
 
Lasering's Avatar
 
Join Date: May 06
Location: Lisboa
Posts: 539
Lasering is on a distinguished road (10+)
Re: SplashScreen with ProgressBar

It dont work I put like this:

In MainForm (MuShop):
Delegate Sub dlgSetInteger(ByVal value As Integer)
Private Sub SetProgressBar1Value(ByVal value As Integer)
If Entrada.Principal.InvokeRequired Then
Entrada.Principal.Invoke(New dlgSetInteger(AddressOf SetProgressBar1Value), New Object() {value})
Else
Entrada.Principal.Value = value
End If
End Sub

In Search_():
SetProgressBar1Value(10)

In MainForm Load:
Entrada.ShowDialog()
ByItem_()
Search_()
Entrada.Close()
Me.Show()

Why doesnt work??!?
__________________

Reference: MSDN Regex: Regular-Expressions.info
Controls: XPCC|Code Project|Quantum|API: Api Guide

Albert Einstein:
"Imagination is more important than knowledge."
"Everything should be made as simple as possible, but not simpler."
"Great spirits have often encountered violent opposition from weak minds."
Lasering is offline   Reply With Quote
Old Jun 10th, 2006, 10:25 AM   #7
Atheist
Networker
 
Atheist's Avatar
 
Join Date: Aug 05
Location: Sweden
Posts: 7,328
Atheist is a name known to all (1000+)Atheist is a name known to all (1000+)Atheist is a name known to all (1000+)Atheist is a name known to all (1000+)Atheist is a name known to all (1000+)Atheist is a name known to all (1000+)Atheist is a name known to all (1000+)Atheist is a name known to all (1000+)Atheist is a name known to all (1000+)
Re: SplashScreen with ProgressBar

Do you get any errors?
__________________
---My Flickr photo stream. Have a look!


Rate posts that helped you.
I do not reply to PM's with coding questions.
How to Get Your Questions Answered
LINQ examples | Save/load a forms layout | TCP client/server connection | Retrieving the EventHandler for any Event by code.
Check out the work in progress: Obtuze - A Neural Network for OCR
Atheist is offline   Reply With Quote
Old Jun 10th, 2006, 10:55 AM   #8
Lasering
Fanatic Member
 
Lasering's Avatar
 
Join Date: May 06
Location: Lisboa
Posts: 539
Lasering is on a distinguished road (10+)
Re: SplashScreen with ProgressBar

No But the ProgressBar (Principal) from Entrada doenst "move".

I'v notice another curious thing if i put this code:
Entrada.ApplicationTitle.Text = My.Application.Info.Title
Entrada.Version.Text = System.String.Format(Entrada.Version.Text, My.Application.Info.Version.Major, My.Application.Info.Version.Minor)
Entrada.Copyright.Text = My.Application.Info.Copyright
Entrada.ShowDialog()

The ApplicationTitle.text, Version.text ... stays good but if i put this code:

Entrada.ShowDialog()
Entrada.ApplicationTitle.Text = My.Application.Info.Title
Entrada.Version.Text = System.String.Format(Entrada.Version.Text, My.Application.Info.Version.Major, My.Application.Info.Version.Minor)
Entrada.Copyright.Text = My.Application.Info.Copyright
The ApplicationTitle.Text ... doens show the correct text. Why?
__________________

Reference: MSDN Regex: Regular-Expressions.info
Controls: XPCC|Code Project|Quantum|API: Api Guide

Albert Einstein:
"Imagination is more important than knowledge."
"Everything should be made as simple as possible, but not simpler."
"Great spirits have often encountered violent opposition from weak minds."

Last edited by Lasering; Jun 10th, 2006 at 11:01 AM.
Lasering is offline   Reply With Quote
Old Jun 10th, 2006, 11:03 AM   #9
Atheist
Networker
 
Atheist's Avatar
 
Join Date: Aug 05
Location: Sweden
Posts: 7,328
Atheist is a name known to all (1000+)Atheist is a name known to all (1000+)Atheist is a name known to all (1000+)Atheist is a name known to all (1000+)Atheist is a name known to all (1000+)Atheist is a name known to all (1000+)Atheist is a name known to all (1000+)Atheist is a name known to all (1000+)Atheist is a name known to all (1000+)
Re: SplashScreen with ProgressBar

You need to replace:

VB Code:
  1. Entrada.ShowDialog()

with:

VB Code:
  1. Entrada.Show()

Because the lines underneath will not be executed unless entreda is closed, when you use showdialog.

When using ShowDialog, the form behaves as a dialog, i.e it "pauses" your application until it has been closed.
__________________
---My Flickr photo stream. Have a look!


Rate posts that helped you.
I do not reply to PM's with coding questions.
How to Get Your Questions Answered
LINQ examples | Save/load a forms layout | TCP client/server connection | Retrieving the EventHandler for any Event by code.
Check out the work in progress: Obtuze - A Neural Network for OCR

Last edited by Atheist; Jun 10th, 2006 at 11:07 AM.
Atheist is offline   Reply With Quote
Old Jun 10th, 2006, 11:40 AM   #10
Lasering
Fanatic Member
 
Lasering's Avatar
 
Join Date: May 06
Location: Lisboa
Posts: 539
Lasering is on a distinguished road (10+)
Re: SplashScreen with ProgressBar

Ok i get a way of the code:
Entrada.ApplicationTitle.Text = My.Application.Info.Title
Entrada.Version.Text = System.String.Format(Entrada.Version.Text, My.Application.Info.Version.Major, My.Application.Info.Version.Minor)
Entrada.Copyright.Text = My.Application.Info.Copyright

desapear but now when i put Entrada.show() the progressbar freezes and dont move. And if i put Entrada.Showdialog() the progressbar moves but the labels stay like transparents

How can i have the progressbar and the labels working good?
__________________

Reference: MSDN Regex: Regular-Expressions.info
Controls: XPCC|Code Project|Quantum|API: Api Guide

Albert Einstein:
"Imagination is more important than knowledge."
"Everything should be made as simple as possible, but not simpler."
"Great spirits have often encountered violent opposition from weak minds."
Lasering is offline   Reply With Quote
Old Jun 10th, 2006, 11:52 AM   #11
Atheist
Networker
 
Atheist's Avatar
 
Join Date: Aug 05
Location: Sweden
Posts: 7,328
Atheist is a name known to all (1000+)Atheist is a name known to all (1000+)Atheist is a name known to all (1000+)Atheist is a name known to all (1000+)Atheist is a name known to all (1000+)Atheist is a name known to all (1000+)Atheist is a name known to all (1000+)Atheist is a name known to all (1000+)Atheist is a name known to all (1000+)
Re: SplashScreen with ProgressBar

wrap your code in a try statement

Like this:

VB Code:
  1. Try
  2.             'Put your code here
  3.         Catch ex As Exception
  4.             MessageBox.Show(ex.Message)
  5.         End Try

And let's see what it says.
__________________
---My Flickr photo stream. Have a look!


Rate posts that helped you.
I do not reply to PM's with coding questions.
How to Get Your Questions Answered
LINQ examples | Save/load a forms layout | TCP client/server connection | Retrieving the EventHandler for any Event by code.
Check out the work in progress: Obtuze - A Neural Network for OCR
Atheist is offline   Reply With Quote
Old Jun 10th, 2006, 12:07 PM   #12
Coool
Hyperactive Member
 
Coool's Avatar
 
Join Date: Feb 06
Location: System.Coool
Posts: 315
Coool is on a distinguished road (10+)
Wink Re: SplashScreen with ProgressBar

Ok, I think u need a real demo.. Here i am attaching a sample..

it is without try catch block .. So, just look at the funda..

Enjoy
Attached Files
File Type: rar BackgroundWorkerExample.rar (45.7 KB, 48 views)
__________________
I am using .NET 2005 with XP sp2
Please Help Us To Save Ana
Coool is offline   Reply With Quote
Old Jun 10th, 2006, 12:13 PM   #13
Lasering
Fanatic Member
 
Lasering's Avatar
 
Join Date: May 06
Location: Lisboa
Posts: 539
Lasering is on a distinguished road (10+)
Re: SplashScreen with ProgressBar

Hi!!!

Lool it doesn't say nothing.

I put the code in MainForm Load event like this:
Entrada.ShowDialog()
Try
ByItem_()
Search_()
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try
Entrada.Close()
Me.Show()

and no results so i tried this
Try
Entrada.ShowDialog()
ByItem_()
Search_()
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try
Entrada.Close()
Me.Show()
Again no results. No MessageBox the progressbar dont move but the labels good.

Any more ideias?
__________________

Reference: MSDN Regex: Regular-Expressions.info
Controls: XPCC|Code Project|Quantum|API: Api Guide

Albert Einstein:
"Imagination is more important than knowledge."
"Everything should be made as simple as possible, but not simpler."
"Great spirits have often encountered violent opposition from weak minds."
Lasering is offline   Reply With Quote
Old Jun 10th, 2006, 12:21 PM   #14
Coool
Hyperactive Member
 
Coool's Avatar
 
Join Date: Feb 06
Location: System.Coool
Posts: 315
Coool is on a distinguished road (10+)
Re: SplashScreen with ProgressBar

Have u looked at the example i attached in the previous thread ...

Call

ByItem_()
Search_()

methods in BackgroundWorker1_DoWork event.. What u need to look at is SetHeader Method , update code to change the value of progressbar rather to change the Form's Text property.
__________________
I am using .NET 2005 with XP sp2
Please Help Us To Save Ana
Coool is offline   Reply With Quote
Old Jun 10th, 2006, 12:38 PM   #15
Lasering
Fanatic Member
 
Lasering's Avatar
 
Join Date: May 06
Location: Lisboa
Posts: 539
Lasering is on a distinguished road (10+)
Re: SplashScreen with ProgressBar

Let me explain all again!!

I've to forms MuShop, the mainform and Entrada, the splashscreen.
In Entrada i'v none code its empty it has only the labels and the progressbar called Principal.

In MuShop i've a Load Event that calls the Sub Search_() and Sub ByItem_().
In Search_() Sub and in ByItem_() Sub i've this line of code Entrada.Principal.Value=Entrada.Principal.Value+10.

What i want is:

1)When the program starts shows Entrada form (the splash screen)
2)The Principal (Progressbar) "moves", but for that the program will have to go to Search_() and ByItem_()
3)While the Principal moves the labels in Entrada are shown correctly
4)When the Principal.value=100 (When he finishs to read Search_() and ByItem_() the Principal.value is 100) he closes Entrada and returns to MuShop.

Was i clear? If not pls tell me!!!

Ops while i has editing this post u give the example lool
__________________

Reference: MSDN Regex: Regular-Expressions.info
Controls: XPCC|Code Project|Quantum|API: Api Guide

Albert Einstein:
"Imagination is more important than knowledge."
"Everything should be made as simple as possible, but not simpler."
"Great spirits have often encountered violent opposition from weak minds."

Last edited by Lasering; Jun 10th, 2006 at 12:57 PM.
Lasering is offline   Reply With Quote
Old Jun 10th, 2006, 12:48 PM   #16
Coool
Hyperactive Member
 
Coool's Avatar
 
Join Date: Feb 06
Location: System.Coool
Posts: 315
Coool is on a distinguished road (10+)
Re: SplashScreen with ProgressBar

Just download attachment i uploaded in 12th post of this Thread..
Anyway code with slight modification is as below..

Form1 is main Class
Form2 is class having ProgressBar

VB Code:
  1. Public Class Form1
  2.     Private counter As Integer = 0
  3.     Private Delegate Sub HideShowFormDelegate()
  4.     Private Delegate Sub SetHeaderDelegate(ByVal val As Integer)
  5.     Public Sub SetHeader(ByVal val As Integer)
  6.         If Me.InvokeRequired Then
  7.             Me.Invoke(New SetHeaderDelegate(AddressOf SetHeader), val)
  8.         Else
  9.             counter += val
  10.             BackgroundWorkerExample.Form2.ProgressBar1.Value = counter 'BackgroundWorkerExample is project name --> in 2005 u can use this
  11.         End If
  12.     End Sub
  13.     Public Sub HideForm()
  14.         If Me.InvokeRequired Then
  15.             Me.Invoke(New HideShowFormDelegate(AddressOf HideForm))
  16.         Else
  17.             Me.Hide()
  18.         End If
  19.     End Sub
  20.     Public Sub ShowForm()
  21.         If Me.InvokeRequired Then
  22.             Me.Invoke(New HideShowFormDelegate(AddressOf ShowForm))
  23.         Else
  24.             BackgroundWorkerExample.Form2.Close()
  25.             Me.Show()
  26.         End If
  27.     End Sub
  28.     Private Sub BackgroundWorker1_DoWork(ByVal sender As System.Object, ByVal e As System.ComponentModel.DoWorkEventArgs) Handles BackgroundWorker1.DoWork
  29.         Call HideForm()
  30.         Dim varloop As Integer = 0
  31.         While varloop <= 3
  32.             varloop += 1
  33.             Threading.Thread.Sleep(1000)
  34.             Call SetHeader(varloop)
  35.         End While
  36.         Call ShowForm()
  37.         BackgroundWorker1.CancelAsync()
  38.     End Sub
  39.     Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
  40.         BackgroundWorkerExample.Form2.Show()
  41.         BackgroundWorker1.WorkerSupportsCancellation = True
  42.         BackgroundWorker1.RunWorkerAsync()
  43.     End Sub
  44. End Class
__________________
I am using .NET 2005 with XP sp2
Please Help Us To Save Ana
Coool is offline   Reply With Quote
Old Jun 10th, 2006, 01:01 PM   #17
Lasering
Fanatic Member
 
Lasering's Avatar
 
Join Date: May 06
Location: Lisboa
Posts: 539
Lasering is on a distinguished road (10+)
Re: SplashScreen with ProgressBar

Ok i downloaded the example. Its good but the form2 when the form1 back to the "scene" doesn't desapear!
__________________

Reference: MSDN Regex: Regular-Expressions.info
Controls: XPCC|Code Project|Quantum|API: Api Guide

Albert Einstein:
"Imagination is more important than knowledge."
"Everything should be made as simple as possible, but not simpler."
"Great spirits have often encountered violent opposition from weak minds."
Lasering is offline   Reply With Quote
Old Jun 10th, 2006, 01:04 PM   #18
Coool
Hyperactive Member
 
Coool's Avatar
 
Join Date: Feb 06
Location: System.Coool
Posts: 315
Coool is on a distinguished road (10+)
Re: SplashScreen with ProgressBar

Hum,

VB Code:
  1. Public Sub ShowForm()
  2.         If Me.InvokeRequired Then
  3.             Me.Invoke(New HideShowFormDelegate(AddressOf ShowForm))
  4.         Else
  5.             BackgroundWorkerExample.Form2.Close() ' Add this one
  6.             Me.Show()
  7.         End If
  8.     End Sub

Btw, When next time when u add Vb code then put it inside VBCODE tags
__________________
I am using .NET 2005 with XP sp2
Please Help Us To Save Ana
Coool is offline   Reply With Quote
Old Jun 10th, 2006, 01:19 PM   #19
Lasering
Fanatic Member
 
Lasering's Avatar
 
Join Date: May 06
Location: Lisboa
Posts: 539
Lasering is on a distinguished road (10+)
Re: SplashScreen with ProgressBar

Ok it worked!!! But ins't there a easy way to do this (if not i will use coool code, but i like a second opinion)
__________________

Reference: MSDN Regex: Regular-Expressions.info
Controls: XPCC|Code Project|Quantum|API: Api Guide

Albert Einstein:
"Imagination is more important than knowledge."
"Everything should be made as simple as possible, but not simpler."
"Great spirits have often encountered violent opposition from weak minds."
Lasering is offline   Reply With Quote
Old Jun 10th, 2006, 01:28 PM   #20
Coool
Hyperactive Member
 
Coool's Avatar
 
Join Date: Feb 06
Location: System.Coool
Posts: 315
Coool is on a distinguished road (10+)
Re: SplashScreen with ProgressBar

I think one day u will going to use this one then why not today .. however, If u really want some another way this is as under..

When u want to hide main form and show Form2 .. just resize main form make it smaller than Form2, set it's location beside Form2 such that user can't watch it.

Change main form's location in Form2's move event .. or make Form2 Dialog and border with Fixed Size..

ReSet main form's size after closing Form2..

HOWEVER, This should only be the LAST SOLUTION if can't SOLVE IT.
__________________
I am using .NET 2005 with XP sp2
Please Help Us To Save Ana
Coool is offline   Reply With Quote
Old Jun 10th, 2006, 07:01 PM   #21
Lasering
Fanatic Member
 
Lasering's Avatar
 
Join Date: May 06
Location: Lisboa
Posts: 539
Lasering is on a distinguished road (10+)
Re: SplashScreen with ProgressBar

Thks Coool for the ideia but i think i came with a better one! For curious people here it goes:

In Form1 Load event i just put this Frm2.ShowDialog()
In Form2 load event i put this Timer1.Start() (Timer interval = 100)
Then in Timer1_Tick event i put this code:
Timer1.Stop()
Call Subs (In my case Search_() and ByItem_() )
Me.Close
In Subs Search_() and ByItem_() i put lines like this one:
ProgressBar1.Value=ProgressBar1.Value +10 (In my case ProgressBar name is Principal)
__________________

Reference: MSDN Regex: Regular-Expressions.info
Controls: XPCC|Code Project|Quantum|API: Api Guide

Albert Einstein:
"Imagination is more important than knowledge."
"Everything should be made as simple as possible, but not simpler."
"Great spirits have often encountered violent opposition from weak minds."
Lasering is offline   Reply With Quote
Old Jun 10th, 2006, 09:24 PM   #22
aloreefy
New Member
 
Join Date: Jun 06
Posts: 4
aloreefy is an unknown quantity at this point (<10)
Re: [RESOLVED] SplashScreen with ProgressBar

your problem is a matter of organizing subroutines. Just try to copy (not just call them) the ByItem_() and the other subroutine in the splash form itself and not in the MuShop form if this is possible and let these routines change the value of the prgress bar from the same form. Good???
aloreefy is offline   Reply With Quote
Old Jun 11th, 2006, 02:30 AM   #23
Coool
Hyperactive Member
 
Coool's Avatar
 
Join Date: Feb 06
Location: System.Coool
Posts: 315
Coool is on a distinguished road (10+)
Re: [RESOLVED] SplashScreen with ProgressBar

aloreefy .. I don't think ur idea will work fine looking at the use of Splash From .. because nce u call the subroutine on the Splash form .. it will freeze Splash Form till the completion of subroutine.. Any event like form click won't work until the process completion .. so u better to run the process that takes long time to complete on another thread.. This is the funda.
__________________
I am using .NET 2005 with XP sp2
Please Help Us To Save Ana
Coool is offline   Reply With Quote
Old Jun 12th, 2006, 05:00 PM   #24
aloreefy
New Member
 
Join Date: Jun 06
Posts: 4
aloreefy is an unknown quantity at this point (<10)
Re: [RESOLVED] SplashScreen with ProgressBar

What I meant Mr.Coool is to let the Splash form do something for you. Those long-time processes who run in the By_Iem and Search_() subroutines are called only once during the whole run of the program, surely, because they both affect the progress bar in the Splash form which appears only once at the start of the program (this is the normal case of any program). So why don't make the splash form do something for you??
aloreefy is offline   Reply With Quote
Old Jun 12th, 2006, 10:32 PM   #25
Coool
Hyperactive Member
 
Coool's Avatar
 
Join Date: Feb 06
Location: System.Coool
Posts: 315
Coool is on a distinguished road (10+)
Re: [RESOLVED] SplashScreen with ProgressBar

Ok ... As u wish, but for just once, put one button on SplashScreen Form and click it while this two methods are running .. u will come to know what i m trying to say ..

AND TELL ME IF UR CLICK RAISE ERROR OR UR PROGRAM SEEMS TO FREEZE..
__________________
I am using .NET 2005 with XP sp2
Please Help Us To Save Ana
Coool is offline   Reply With Quote
Old Jun 13th, 2006, 07:16 PM   #26
aloreefy
New Member
 
Join Date: Jun 06
Posts: 4
aloreefy is an unknown quantity at this point (<10)
Re: [RESOLVED] SplashScreen with ProgressBar

Dear Coool

Why put any button on a Splash screen, I mean, this is just a splash screen, an introductory form that just shows to the user till the program finishes all necessary steps while loading. So, let the splash screen finalize these steps and show the steps progress on its own progress bar.

Thanks
aloreefy is offline   Reply With Quote
Reply

Go Back   VBForums > Visual Basic > Visual Basic .NET


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 12:20 PM.




To view more projects, click here

Acceptable Use Policy


The Network for Technology Professionals

Search:

About Internet.com

Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | E-mail Offers

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.