Results 1 to 1 of 1

Thread: [2005] Help Using Tool Strip Control

Threaded View

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Oct 2006
    Posts
    81

    [2005] Help Using Tool Strip Control

    I'm a little confused and could use some help. I'm doing a project for class and there is a part somewhat confusing. I have a table (tblCourses) with Id#, title, credit hours, and grades. The interface has several tool strip bars with queries to run if you press a particular tool strip. The code asks me to write some sort of statement but the book tells me if I just add a tool strip control associated with the query it should display when the app runs and I press the tool strip. It is pretty confusing and maybe someone knows what type of statement would be appropriate in this case. Here is the code I have:

    VB Code:
    1. Public Class MainForm
    2.  
    3.     Private Sub bindingNavigatorSaveItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles bindingNavigatorSaveItem.Click
    4.         If Me.Validate Then
    5.  
    6.             'I wrote this part
    7.             Me.TblCoursesBindingSource.EndEdit()
    8.             Me.TblCoursesTableAdapter.Update(Me.CoursesDataSet.tblCourses)
    9.  
    10.         Else
    11.             System.Windows.Forms.MessageBox.Show(Me, "Validation errors occurred.", "Save", System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.Warning)
    12.         End If
    13.  
    14.     End Sub
    15.  
    16.     Private Sub MainForm_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load, MyBase.Load, MyBase.Load, MyBase.Load, MyBase.Load, MyBase.Load, MyBase.Load
    17.         'TODO: This line of code loads data into the 'CoursesDataSet.tblCourses' table. You can move, or remove it, as needed.
    18.         'I wrote this part
    19.  
    20.         Me.TblCoursesTableAdapter.Fill(Me.CoursesDataSet.tblCourses)
    21.  
    22.     End Sub
    23.  
    24.     Private Sub exitButton_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles exitButton.Click
    25.         Me.Close()
    26.     End Sub
    27.  
    28.     Private Sub FillToolStripButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles FillToolStripButton.Click
    29.         Try
    30.             'I'm confused about this part
    31.  
    32.  
    33.         Catch ex As System.Exception
    34.             System.Windows.Forms.MessageBox.Show(ex.Message)
    35.         End Try
    36.  
    37.     End Sub
    38. End Class

    As always, all help in understanding is very much appreciated.
    Last edited by raypjr; Nov 29th, 2006 at 05:43 PM. Reason: Correct Title

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width