problems with loading forms and firing off picBox click events
Hi,
[5][green]Form and PictureBox Help[/green][/5]
I am working a project that is suppose to load a startup welcome form then close the frmwelcome(1 st form) and then open the main form ( ane once i close the second i want it to close everything).
Also I am having problem with the click events for picBox i have used the .net drop down menu to create the events but for some reason they just don't fire off the events. The only event that work is the mnuExit even on a menu list and that's it.
Any one can help it sure would be appreciated thx.
[3][green]ADO.Net Help[/green][/3]
Also if anyone could give me some advice on ado.net, what my program is suppose to do is when i click on the table(circles) it will show the name of the people sitting there and the table number. And when i double click it will clear the table and the fields will be black. thx
[3][red]Splash welcome Code[/red][/3]
Public Class frmWelcome
Inherits System.Windows.Forms.Form
' Private mblnOKtoHide As Boolean = False
Private Timing As Integer = 100
#Region " Windows Form Designer generated code "
#End Region
Private Sub frmWelcome_Load(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles MyBase.Load
' display form then close and load booking form
Me.Timer1.Enabled = True
End Sub
Private Sub Timer1_Tick(ByVal sender As Object, _
ByVal e As System.EventArgs) Handles Timer1.Tick
Me.close -= 0.01
If Me.Opacity = 0 Then
' mblnOKtoHide = True
Me.Close()
End If
End Sub
End Class
[5][green]main form with the picboxes and other items[/green][/5]
Public Class frmBookingDay
Inherits System.Windows.Forms.Form
#Region " Windows Form Designer generated code "
#End Region
Private Sub mnuExit_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles mnuExit.Click
' close program
Me.Close()
End Sub ' mnuExit_Click()
Private Sub picDayTableOne_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles picDayTableOne.Click
'- Store the text entered to limit the list box to the
' data adapter's parameter
Me.OleDbDataAdapter1.SelectCommand.Parameters(0).Value = Me.txtDayTable.Text
'- Clear the current data in the dataset
Me.DataSet11.Clear()
'- Fill the customer list dataset
Me.OleDbDataAdapter1.Fill(Me.DataSet11)
'- Fill the initial entry's individual dataset
RefreshIndividual()
End Sub
Private Sub picDayTableTwo_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles picDayTableTwo.Click
'- Store the text entered to limit the list box to the
' data adapter's parameter
Me.OleDbDataAdapter1.SelectCommand.Parameters(0).Value = _
Me.txtDayTable.Text
'- Clear the current data in the dataset
Me.DataSet11.Clear()
'- Fill the customer list dataset
Me.OleDbDataAdapter1.Fill(Me.DataSet11)
'- Fill the initial entry's individual dataset
RefreshIndividual()
End Sub
Private Sub picDayTableThree_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles picDayTableThree.Click
'- Store the text entered to limit the list box to the
' data adapter's parameter
Me.OleDbDataAdapter1.SelectCommand.Parameters(0).Value = _
Me.txtDayTable.Text
'- Clear the current data in the dataset
Me.DataSet11.Clear()
'- Fill the customer list dataset
Me.OleDbDataAdapter1.Fill(Me.DataSet11)
'- Fill the initial entry's individual dataset
RefreshIndividual()
End Sub
Private Sub PicDayTableFour_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles PicDayTableFour.Click
'- Store the text entered to limit the list box to the
' data adapter's parameter
Me.OleDbDataAdapter1.SelectCommand.Parameters(0).Value = _
Me.txtDayTable.Text
'- Clear the current data in the dataset
Me.DataSet11.Clear()
'- Fill the customer list dataset
Me.OleDbDataAdapter1.Fill(Me.DataSet11)
'- Fill the initial entry's individual dataset
RefreshIndividual()
End Sub
Private Sub picDayTableFive_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles picDayTableFive.Click
'- Store the text entered to limit the list box to the
' data adapter's parameter
Me.OleDbDataAdapter1.SelectCommand.Parameters(0).Value = _
Me.txtDayTable.Text
'- Clear the current data in the dataset
Me.DataSet11.Clear()
'- Fill the customer list dataset
Me.OleDbDataAdapter1.Fill(Me.DataSet11)
'- Fill the initial entry's individual dataset
RefreshIndividual()
End Sub
Private Sub picDayTableSix_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles picDayTableSix.Click
'- Store the text entered to limit the list box to the
' data adapter's parameter
Me.OleDbDataAdapter1.SelectCommand.Parameters(0).Value = _
Me.txtDayTable.Text
'- Clear the current data in the dataset
Me.DataSet11.Clear()
'- Fill the customer list dataset
Me.OleDbDataAdapter1.Fill(Me.DataSet11)
'- Fill the initial entry's individual dataset
RefreshIndividual()
End Sub
Private Sub picDayTableOne_DoubleClick(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles picDayTableOne.DoubleClick
'- Store the selected customer ID into the
' parameter of the SQL data adapter
Me.OleDbDataAdapter1.SelectCommand.Parameters(0).Value = _
Me.picDayTableOne.Text
'- Fill the dataset
Me.OleDbDataAdapter1.Fill(Me.DataSet11)
End Sub ' RefreshIndividual()
Private Sub mnuAbout_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles mnuAbout.Click
Here is an answer to part of your problem; VB.NET code is as follows:
>> main form ( ane once i close the second i want it to close everything).
Private Sub frmSample_Closing(ByVal sender As Object, _
ByVal e As System.ComponentModel.CancelEventArgs) Handles MyBase.Closing
End
End Sub
Bookmarks