Click here to Skip to main content
15,914,109 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: Currency Round Off Pin
Richard MacCutchan22-Sep-13 4:55
mveRichard MacCutchan22-Sep-13 4:55 
GeneralRe: Currency Round Off Pin
Biplob Singha Shee22-Sep-13 6:00
Biplob Singha Shee22-Sep-13 6:00 
GeneralRe: Currency Round Off Pin
Richard MacCutchan22-Sep-13 7:01
mveRichard MacCutchan22-Sep-13 7:01 
GeneralRe: Currency Round Off Pin
Biplob Singha Shee22-Sep-13 7:13
Biplob Singha Shee22-Sep-13 7:13 
GeneralRe: Currency Round Off Pin
Richard Deeming23-Sep-13 1:56
mveRichard Deeming23-Sep-13 1:56 
GeneralRe: Currency Round Off Pin
Richard MacCutchan23-Sep-13 3:05
mveRichard MacCutchan23-Sep-13 3:05 
AnswerRe: Currency Round Off Pin
Biplob Singha Shee23-Sep-13 10:21
Biplob Singha Shee23-Sep-13 10:21 
QuestionHow to use Background worker from a form to fill another form? Pin
Suhayb Bashir Yousif20-Sep-13 22:47
Suhayb Bashir Yousif20-Sep-13 22:47 
Okay, so basically I have 3 forms..
The first form asks the user questions, the second form is a loading gif while the third form processes the information into a database. So all the processing happens in the third form while the second form shows a gif saying that the form is loading.

Now when I insert a background worker into the third form, the form freezes and the second form doesnt even show up. What am I doing wrong?

This is my code:

Form 2:
VB
Private Sub Wait1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        ProfileSetup.Show()
        ProfileSetup.Visible = False
    End Sub


Form3:
VB
Private Sub ProfileSetup_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Me.Visible = False
        TextBox1.ReadOnly = True
        TextBox1.Enabled = False
        TextBox2.ReadOnly = True
        TextBox2.Enabled = False
        TextBox3.ReadOnly = True
        TextBox3.Enabled = False
        TextBox4.ReadOnly = True
        TextBox4.Enabled = False
        TabControl1.Hide()
        GroupBox1.Hide()
        TabControl1.SendToBack()
        GroupBox1.SendToBack()
        CheckForIllegalCrossThreadCalls = False
        BackgroundWorker1.RunWorkerAsync()
    End Sub

    Private Sub BackgroundWorker1_DoWork(ByVal sender As System.Object, ByVal e As System.ComponentModel.DoWorkEventArgs) Handles BackgroundWorker1.DoWork
    TextBox1.Text = UsersTableAdapter1.LoggedInUser(True)
    TextBox2.Text = UsersTableAdapter1.PasswordGet(TextBox1.Text)
    TextBox3.Text = UsersTableAdapter1.EmailGet(TextBox1.Text)
    Variables.avatar = PictureBox1.BackgroundImage
    original = PictureBox1.BackgroundImage
    previous = PictureBox202
    PictureBox202.Hide()
    TextBox4.Text = UsersTableAdapter1.RankGet(UsersTableAdapter1.LoggedInUser(True))
    End Sub

    Private Sub BackgroundWorker1_RunWorkerCompleted(ByVal sender As Object, ByVal e As System.ComponentModel.RunWorkerCompletedEventArgs) Handles BackgroundWorker1.RunWorkerCompleted
        Wait1.Close()
        Me.Visible = True
    End Sub


What I actually want the program to do is display form 2 with the gif while form 3 is getting ready, when it is ready form 3 opens in gui mode while form 2 closes.

Any help please?
AnswerRe: How to use Background worker from a form to fill another form? Pin
Richard MacCutchan21-Sep-13 0:03
mveRichard MacCutchan21-Sep-13 0:03 
GeneralRe: How to use Background worker from a form to fill another form? Pin
Suhayb Bashir Yousif22-Sep-13 4:40
Suhayb Bashir Yousif22-Sep-13 4:40 
GeneralRe: How to use Background worker from a form to fill another form? Pin
Richard MacCutchan22-Sep-13 4:51
mveRichard MacCutchan22-Sep-13 4:51 
GeneralRe: How to use Background worker from a form to fill another form? Pin
Suhayb Bashir Yousif22-Sep-13 4:58
Suhayb Bashir Yousif22-Sep-13 4:58 
GeneralRe: How to use Background worker from a form to fill another form? Pin
Richard MacCutchan22-Sep-13 5:09
mveRichard MacCutchan22-Sep-13 5:09 
AnswerRe: How to use Background worker from a form to fill another form? Pin
Eddy Vluggen21-Sep-13 8:44
professionalEddy Vluggen21-Sep-13 8:44 
GeneralRe: How to use Background worker from a form to fill another form? Pin
Suhayb Bashir Yousif22-Sep-13 4:41
Suhayb Bashir Yousif22-Sep-13 4:41 
GeneralRe: How to use Background worker from a form to fill another form? Pin
Dave Kreskowiak22-Sep-13 8:53
mveDave Kreskowiak22-Sep-13 8:53 
Questionthread runs 21 times then exits Pin
Member 1028281518-Sep-13 7:32
Member 1028281518-Sep-13 7:32 
Question[Solved] Problem when using multiple projects in a solution - Code is being ignored) Pin
msultana17-Sep-13 16:04
msultana17-Sep-13 16:04 
QuestionRe: Problem when using multiple projects in a solution - Code is being ignored) Pin
Eddy Vluggen18-Sep-13 7:05
professionalEddy Vluggen18-Sep-13 7:05 
AnswerRe: Problem when using multiple projects in a solution - Code is being ignored) Pin
TnTinMn18-Sep-13 9:53
TnTinMn18-Sep-13 9:53 
GeneralRe: Problem when using multiple projects in a solution - Code is being ignored) Pin
msultana22-Sep-13 14:26
msultana22-Sep-13 14:26 
Questionnewbie needs help with creating database application Pin
spsix17-Sep-13 7:04
spsix17-Sep-13 7:04 
AnswerRe: newbie needs help with creating database application Pin
Richard MacCutchan17-Sep-13 7:34
mveRichard MacCutchan17-Sep-13 7:34 
AnswerRe: newbie needs help with creating database application PinPopular
Mycroft Holmes17-Sep-13 13:09
professionalMycroft Holmes17-Sep-13 13:09 
GeneralRe: newbie needs help with creating database application Pin
GuyThiebaut18-Sep-13 2:49
professionalGuyThiebaut18-Sep-13 2:49 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.