3 Replies - 7983 Views - Last Post: 06 May 2009 - 08:47 PM Rate Topic: -----

#1 hendrikbez  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 40
  • Joined: 20-August 08

Go to next form

Post icon  Posted 06 May 2009 - 03:06 AM

On my main form I only have buttons that when you click on a button it goes to next form.

On my other forms, I have data in ms acces that is been called on.

So on my main form, when I click button 1 it should then show my label text(see code) then when next form is loaded it should then open next form, but now it open form, then it show label text


	Private Sub MySub(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnblokkies.Click, btnAfkortings.Click, btnDamme.Click, btnHoofstede.Click, btnMotor.Click, btnRiviere.Click, btnRomeinse.Click, btnSimbole.Click, btnStede.Click

		btnblokkies.Visible = False
		btnAfkortings.Visible = False
		btnDamme.Visible = False
		btnexit.Visible = False
		btnHoofstede.Visible = False
		btnMotor.Visible = False
		btnOmtrent.Visible = False
		btnRiviere.Visible = False
		btnRomeinse.Visible = False
		btnSimbole.Visible = False
		Me.Label1.Location = New System.Drawing.Point(12, 9)
		Me.ClientSize = New System.Drawing.Size(400, 70)

		Me.Label1.ForeColor = Color.FromArgb(255, RanNum.Next(0, 255), RanNum.Next(0, 255), RanNum.Next(0, 255))
		Label1.Text = "Besig om te laai'! Wag asseblief"
		Label1.Visible = True
		Application.DoEvents()


	End Sub



	Private Sub btnblokkies_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnblokkies.Click

		Dim frm_blokkies As New frm_Blokkies
		frm_blokkies.Show()

	End Sub





	Private Sub btnRomeinse_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnRomeinse.Click

		Dim frm_romeinse As New frm_Roemeinse
		frm_Roemeinse.Show()
	End Sub



ext......

Is This A Good Question/Topic? 0
  • +

Replies To: Go to next form

#2 mark.bottomley  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 176
  • View blog
  • Posts: 990
  • Joined: 22-April 09

Re: Go to next form

Posted 06 May 2009 - 07:57 AM

You have both routines handling btnblokkies.Click. I don;t know how you can control the order of the event path so you can try by putting all the handler code in MySub and switch on which button called you to launch the form after handling the label change
Was This Post Helpful? 0
  • +
  • -

#3 tasha9112  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 25
  • Joined: 02-May 09

Re: Go to next form

Posted 06 May 2009 - 09:29 AM

can you explain a little more what you mean please? thanks
Was This Post Helpful? 0
  • +
  • -

#4 hendrikbez  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 40
  • Joined: 20-August 08

Re: Go to next form

Posted 06 May 2009 - 08:47 PM

View Posttasha9112, on 6 May, 2009 - 08:29 AM, said:

can you explain a little more what you mean please? thanks


I have got it working at home last nite
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1