Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

How do make a form loading... ( have progress)

Posted on 2004-08-29
13
188 Views
Last Modified: 2010-04-23
How do make a form loading... ( have progress)
I make a program but it loading very low, as i need form progreaa
please, help me
0
Comment
Question by:LearnITvn
  • 5
  • 3
  • 3
  • +1
13 Comments
 
LVL 25

Expert Comment

by:RonaldBiemans
ID: 11929199
What do you mean by have progress ? Do you mean a progress bar. What are you doing in the load event of that form. What causes it to be slow ? A bit more information is needed.
0
 
LVL 10

Expert Comment

by:123654789987
ID: 11929205
This depends on the amount of operations u are doing in the page_load of the form. If u have a datagrid for example then u might have to use paging to populate the data ( if the data is huge).

Do tell me what are the kind of controls u have in the form the operations u are performing at page_load
0
 

Author Comment

by:LearnITvn
ID: 11929598
thanks for reply
1-I want make a form loading have progress bar
2-how do make it?
0
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 

Author Comment

by:LearnITvn
ID: 11929614
thanks for reply
1-I want make a form loading have progress bar
2-how do make it?
0
 
LVL 25

Expert Comment

by:RonaldBiemans
ID: 11929787
Hi LearnITvn,

Still a bit more information is needed, What are you doing in the load event (calculations, loading data from a database etc..)

RB
0
 
LVL 25

Expert Comment

by:RonaldBiemans
ID: 11929791
If you could post your form load event, we can  see what is happening?
0
 
LVL 8

Expert Comment

by:wguerram
ID: 11932867
After showing the form call the refresh method of the form.

f.Show()
f.Refresh()
0
 

Author Comment

by:LearnITvn
ID: 11937970
hi RonaldBiemans
my program loading data from a database
have two form, - progress form & main form
i don't can active main form while progress loading

how do run main form while progress form loading

To wguerram:
I tried f.Show()f.Refresh() but unsuccessful
0
 
LVL 10

Accepted Solution

by:
123654789987 earned 50 total points
ID: 11940093
When the progress bar is activated on another form, it means that u have delegated control to the progress form. The very purpose of having a progress bar means that u are having some background operations happening like - Retriving data or updating data or loading a form.

What operation do u want to do on your main form when progress form is activated?

0
 
LVL 8

Assisted Solution

by:wguerram
wguerram earned 200 total points
ID: 11942717
Here is the Module that runs both forms

'This is the progress form
' Form2
I just added a ProgressBar and change its modifiers property to Public

'This is the main form
Public Class Form1
    Public ProgressForm As Form2

    'Instead of a timer you would have your code when opening the database a other stuff
    Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
       
        'I am using the reference to ProgressForm, since this have an instance of the Progress form
        With ProgressForm.ProgressBar1
            .Value += 1
            If .Value = .Maximum - 1 Then
                Timer1.Enabled = False
                ProgressForm.Close()
            End If
        End With
       
    End Sub    
End Class


Module Module1
    Public Sub main()
        Dim frmMainForm As New Form1
        Dim frmProgress As New Form2
        frmMainForm.ProgressForm = frmProgress

        frmProgress.TopMost = True 'This will make the progress form be always on top

        frmProgress.Show()
        Application.Run(frmMainForm)

    End Sub
End Module
0
 

Author Comment

by:LearnITvn
ID: 12061282
very good, thanks
0
 
LVL 8

Expert Comment

by:wguerram
ID: 12064479
Hi LearnITvn,

It looks like it worked for you but i think you forgot to accept the answer.
0
 

Author Comment

by:LearnITvn
ID: 12082642
Hi wguerram
I'm new member
how do accept the answer
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Exit the loop 4 49
Web Form VB.Net  import CSV 4 43
VB.Net Tranfer data between to VB.Net apps 8 40
How to repeat the data 4 17
Introduction When many people think of the WebBrowser (http://msdn.microsoft.com/en-us/library/2te2y1x6%28v=VS.85%29.aspx) control, they immediately think of a control which allows the viewing and navigation of web pages. While this is true, it's a…
Microsoft Reports are based on a report definition, which is an XML file that describes data and layout for the report, with a different extension. You can create a client-side report definition language (*.rdlc) file with Visual Studio, and build g…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question