How to Use the Cursor to View Values in VB
- 1). Launch Microsoft Visual Studio, click "New Project" from the left pane of your computer screen, and expand "Visual Basic" below "Installed Templates." Click "Windows" and double-click "Windows Forms Application" from the center of the dialog window to create a new project.
- 2). Double-click "Button" from the "Toolbox" pane to add a new button to your form. Double-click the button to create a new click event for the button. Add the following code:
Dim stringValue As String
Dim otherVal As Integer
stringValue = "my value is: "
otherVal = 10
MessageBox.Show(stringValue & otherVal) - 3). Click the line that starts with "MessageBox" and press "F9" to add a breakpoint. Press "F5" to run the program and click "Button1."
- 4). Move your mouse cursor over the variable "stringValue" to display a "DataTip" with the value of the variable. Perform the same process to the "otherVal" variable to view its value. Press "F5" to continue running the program.