Recent Post

Thursday, 3 July 2025

Visual Basic - Class 8 CBSE Computer Notes

Visual Basic - Class 8 CBSE Computer Notes | By Pratap Sanjay Sir

📘 Visual Basic - Class 8 CBSE Notes

🔰 Introduction to Visual Basic

  1. Visual Basic (VB) is a high-level programming language developed by Microsoft.
  2. It allows you to create Windows-based applications with graphical interfaces.
  3. It is suitable for beginners and school students.
Introduction to VB

💡 Event-Driven Programming

  1. VB uses event-driven programming, meaning code runs based on events like button clicks or mouse moves.
  2. Events are actions performed by the user that trigger specific responses.
Event Driven Concept

💻 Visual Studio 2017 Express

  1. Visual Studio Express is an IDE (Integrated Development Environment) by Microsoft.
  2. It includes tools to design forms, write code, test and debug applications.
VS 2017 Express

🚀 Starting Visual Studio Express

  1. Go to Start → Search "Visual Studio 2017 Express".
  2. Click to open the IDE.
  3. Select "New Project" → Windows Forms App.

🧩 Components of the Window

  1. Menu Bar – Contains File, Edit, View, etc.
  2. Toolbox – Provides GUI controls like buttons, labels, textboxes.
  3. Form – The design area for your application window.
  4. Properties Window – Used to change the settings of controls.
  5. Solution Explorer – Displays files in the project.
Window Components

🔄 Modes of Visual Studio

  1. Design Mode – Used to design the layout (drag and drop controls).
  2. Run Mode – Used to test/run the application.
  3. Break Mode – Used to debug code.

🛠️ Properties, Methods & Events

  1. Properties – Define control features (Text, Color, Font).
  2. Methods – Built-in actions (e.g., Show(), Close()).
  3. Events – Triggered by user actions (Click, Load).

🎛️ Various Controls in VB

  1. Label – Displays text.
  2. TextBox – Accepts input from user.
  3. Button – Performs an action on click.
  4. CheckBox, RadioButton, PictureBox, ListBox – Other useful controls.

🔠 Label Control

  1. Used for displaying static information on form.
  2. Set the Text property to change what it displays.

📝 TextBox Control

  1. Used to receive input from the user.
  2. Text property stores what the user typed.

🔘 Button Control

  1. Used to perform an action when clicked.
  2. Click event triggers the assigned code.

⚙️ Working with Controls

  1. Drag control from toolbox to form.
  2. Select control → Use Properties Window to change its name, text, color, etc.
  3. Double-click control to write code for its event.
Working with Controls

🔧 Changing Properties of Controls

  1. Click on a control to open its Properties window.
  2. Change values like Name, Text, Size, Color as needed.

📥 Commonly Used Functions

  1. MsgBox(): Shows a message box.
    MsgBox("Hello Student!")
  2. InputBox(): Gets input from the user.
    name = InputBox("Enter your name")

💾 Saving a VB Application

  1. Go to File → Save All.
  2. Choose location and name your project.

📂 Opening an Existing VB Project

  1. Open Visual Studio → File → Open → Project/Solution.
  2. Select the .sln (Solution) file to load your project.







🔔 Subscribe to My Channel

No comments:

"कोशिश करो तो सब कुछ हो सकता है, न करो तो कुछ नहीं हो सकता।"