BCA / B.Tech 17 min read

What is VB.NET and IDE in Hindi | वीबी.नेट क्या है ?

RK

लेखक Ratan Kumawat · संस्थापक, NotesMedia

प्रकाशित:

त्वरित सारांश और मुख्य बिंदु

  • • विषय फोकस: .Net Notes in Hindi | डॉट नेट नोट्स हिंदी में (BCA / B.Tech Syllabus)
  • • मुख्य विषय: What is VB.NET and IDE in Hindi | वीबी.नेट क्या है ? - General Topics
  • • अवलोकन: Quick Answer: VB.NET (full form: Visual Basic .NET) Microsoft की बनाई एक object-oriented programming language है, जो .NET platform पर चलती है। यह पुरानी...
  • • मुख्य अवधारणाएं: VB NET IDE, Visual Basic NET event driven RAD Hindi, Visual Studio features debugging,VB NET IDE, Visual Basic NET event driven RAD, Visual Studio features debugging
Quick Answer: VB.NET (full form: Visual Basic .NET) Microsoft की बनाई एक object-oriented programming language है, जो .NET platform पर चलती है। यह पुरानी Visual Basic 6 का नया version है। VB.NET का code पहले MSIL में compile होता है और फिर CLR उसे चलाता है। इसमें code लिखने और forms design करने के लिए IDE (Integrated Development Environment), यानी Visual Studio, use होता है।

VB.NET Kya Hai? (What is VB.NET)

VB.NET एक high-level, object-oriented और event-driven language है। Microsoft ने इसे 2002 में .NET Framework के साथ launch किया था। इसकी syntax English जैसी आसान है: blocks End If, End Sub, Next जैसे शब्दों से बंद होते हैं, curly brackets { } नहीं लगते। इसलिए beginners के लिए यह आसान मानी जाती है।

VB.NET से आप ये बना सकते हैं:

  • Console applications (black screen पर चलने वाले programs)
  • Windows Forms applications (buttons, textboxes वाले desktop software)
  • Web applications (ASP.NET के साथ)
  • Class libraries (DLL files, जिन्हें दूसरे projects use करते हैं)
Advertisement

VB.NET Full Form

VB.NET = Visual Basic .NET। "Visual" इसलिए क्योंकि इसमें forms को drag-and-drop से visually design करते हैं। "Basic" पुरानी BASIC language से आया है (Beginner's All-purpose Symbolic Instruction Code)। ".NET" उस Microsoft platform का नाम है जिस पर यह चलती है।

VB.NET की Features

  • Fully object-oriented: class, object, inheritance, polymorphism, encapsulation सब support करती है।
  • Event-driven: button click, key press, form load जैसे events पर code चलता है।
  • Case-insensitive: Dim Total और dim total एक ही हैं।
  • Structured exception handling: Try...Catch...Finally से errors संभाले जाते हैं।
  • Automatic memory management: CLR का garbage collector बेकार objects की memory खुद free करता है।
  • Language interoperability: VB.NET में बनी class को C# project में use कर सकते हैं, क्योंकि दोनों MSIL में बदलते हैं।

VB.NET Program कैसे चलता है?

Program.vb ──VB compiler (vbc)──▶ MSIL code (.exe / .dll)
                                       │
                                       ▼
                              CLR (Common Language Runtime)
                                       │  JIT compiler
                                       ▼
                               Native machine code → CPU

VB.NET compiler code को सीधे machine code नहीं, बल्कि MSIL (Microsoft Intermediate Language) में बदलता है। Program चलाने पर CLR उस MSIL को JIT compiler से machine code में बदलकर चलाता है। Detail में पढ़ें: CLR in Hindi और MSIL in Hindi.

VB6 vs VB.NET

PointVB6 (Visual Basic 6)VB.NET
PlatformCOM based, VB6 runtime.NET, CLR पर चलता है
OOPअधूरी (class inheritance नहीं)पूरी OOP, Inherits keyword
Error handlingOn Error GoToTry...Catch...Finally (On Error भी चलता है)
Integer का size16-bit32-bit
Array की शुरुआतOption Base 1 से 1 भी हो सकती थीहमेशा index 0 से
MemoryReference countingGarbage collection

What is IDE? VB.NET का IDE (Visual Studio)

IDE का full form है Integrated Development Environment। यह एक ऐसा software है जिसमें code लिखना, form design करना, compile करना, run करना और debug करना, सब एक ही जगह होता है। VB.NET का IDE Microsoft Visual Studio है।

What is VB.NET and IDE in Hindi | वीबी.नेट क्या है ?

VB.NET IDE: Menu bar, Toolbox, Form Designer, Solution Explorer और Properties Window

IDE के मुख्य Parts

Partकाम
Menu Barसबसे ऊपर; File, Edit, View, Project, Build, Debug, Tools, Window, Help menus। नया project बनाना, save करना, run करना।
ToolbarSave, Start (Run), Debug, Build जैसे कामों के shortcut buttons।
Solution ExplorerProject की पूरी structure: forms, classes, modules और दूसरी files।
ToolboxButton, Label, TextBox, PictureBox, ListBox जैसे controls, जिन्हें drag-and-drop से form पर रखते हैं।
Properties Windowचुने हुए control या form की properties बदलना: Text, BackColor, Size, Font, Name आदि।
Form DesignerGUI बनाने की जगह, जहाँ controls drag-and-drop से रखे जाते हैं।
Code EditorCode लिखने की window; syntax highlighting, IntelliSense (auto completion) और auto indentation के साथ।
Output WindowBuild और run के समय errors, warnings और दूसरे messages।
Object BrowserProject और libraries की सारी classes, modules, methods और properties की list।

IDE Settings (Options)

पुराने VB6 में Tools → Options dialog में Editor, Editor Format, General और Docking tabs होते थे। Visual Studio में भी यही settings Tools → Options में मिलती हैं:

  • Editor settings: code editor का behaviour, जैसे auto completion, indentation।
  • Format (fonts and colors): code का font, size और colors।
  • General settings: IDE की आम settings।
  • Docking: windows को pin, float या dock करना, ताकि screen पर आपकी पसंद से जमें।

Useful Shortcut Keys (Visual Studio, default settings)

Keyकाम
F5Program को debugging के साथ run करना
Ctrl + F5Debugging के बिना run करना
F4Properties Window खोलना
F9Breakpoint लगाना/हटाना
F10 / F11Step Over / Step Into (debugging में line-by-line चलना)

Visual Studio install करने और उसके IDE की और detail: Visual Studio 2008 IDE in Hindi.

Visual Development और Event-Driven Programming

VB.NET में आप पहले form पर controls रखते हैं (visual design), फिर हर control के event के लिए code लिखते हैं। Form पर Button को double-click करने पर IDE अपने आप उसका Click event handler बना देता है:

Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
    MsgBox("Hello " & TextBox1.Text)
End Sub

User TextBox में "Ravi" लिखकर button दबाए, तो message box में "Hello Ravi" दिखेगा। Handles Button1.Click बताता है कि यह Sub किस event पर चलेगा। Windows Forms project बनाने के steps: Windows Application in .NET in Hindi.

VB.NET Basics: Variables, Control Flow, Arrays

Variables और Data Types

Variable Dim keyword से declare होता है: Dim marks As Integer = 78। Common data types: Integer, Double, String, Boolean (True/False), Date।

  • Scope: variable कहाँ use हो सकता है। Sub/Function के अंदर declare हुआ local variable सिर्फ वहीं चलता है; module या class level पर declare हुआ variable पूरे module/class में।
  • Lifetime: variable कितनी देर memory में रहता है। Local variable Sub खत्म होते ही खत्म हो जाता है; Static से declare करने पर value अगली call तक बची रहती है।

Constants

Const PassMarks As Integer = 33: constant की value program के दौरान बदली नहीं जा सकती।

Worked Example: Console Program

Module Module1
    Sub Main()
        Dim name As String = "Ravi"
        Dim marks As Integer = 78
        Const PassMarks As Integer = 33

        If marks >= PassMarks Then
            Console.WriteLine(name & " is Pass")
        Else
            Console.WriteLine(name & " is Fail")
        End If

        For i As Integer = 1 To 3
            Console.WriteLine("Line " & i)
        Next

        Dim n As Integer = 1
        Do While n <= 2
            Console.WriteLine("Do While: " & n)
            n += 1
        Loop

        Console.ReadLine()
    End Sub
End Module

Output:

Ravi is Pass
Line 1
Line 2
Line 3
Do While: 1
Do While: 2

Loops: For...Next, While...End While, Do While...Loop और Do...Loop Until। Conditions: If...Then...Else...End If और Select Case।

Dim grade As Char = "A"c
Select Case grade
    Case "A"c
        Console.WriteLine("Excellent")
    Case "B"c
        Console.WriteLine("Good")
    Case Else
        Console.WriteLine("Invalid Grade")
End Select

यहाँ grade = "A" है, इसलिए output आएगा: Excellent।

Advertisement

Arrays और Collections

Dim nums() As Integer = {10, 20, 30}     ' single-dimensional
Dim arr(4) As Integer                     ' 5 elements: index 0 से 4
Dim matrix(2, 2) As Integer               ' multi-dimensional, 3 x 3
Dim subjects As New List(Of String)       ' collection, size अपने आप बढ़ता है
subjects.Add("Java")
subjects.Add("VB.NET")

Exam trap: VB.NET में Dim arr(4) का मतलब 4 नहीं, 5 elements है, क्योंकि 4 upper bound (आखिरी index) है। C# में new int[4] से 4 elements बनते हैं।

Subroutines, Functions, MsgBox और InputBox

Sub कोई value return नहीं करता; Function value return करता है।

Function Add(ByVal a As Integer, ByVal b As Integer) As Integer
    Return a + b                         ' returning value
End Function

Sub Greet(ByVal name As String, Optional ByVal city As String = "Jaipur")
    Console.WriteLine("Hello " & name & " from " & city)
End Sub

Function Total(ByVal ParamArray nums() As Integer) As Integer
    Dim sum As Integer = 0
    For Each x As Integer In nums
        sum += x
    Next
    Return sum
End Function
  • Add(2, 3) → 5
  • Greet("Amit") → Hello Amit from Jaipur (optional argument की default value लगी)
  • Total(1, 2, 3) → 6 (ParamArray से variable number of arguments)

MsgBox user को message दिखाता है: MsgBox("Saved")। InputBox user से input लेता है: Dim city As String = InputBox("Enter city")।

OOP in VB.NET और Forms के साथ काम

Public Class Animal
    Public Name As String
    Public Sub New(ByVal n As String)          ' constructor
        Name = n
    End Sub
    Public Overridable Sub Speak()
        Console.WriteLine(Name & " makes a sound")
    End Sub
End Class

Public Class Dog
    Inherits Animal                            ' inheritance
    Public Sub New(ByVal n As String)
        MyBase.New(n)                          ' parent का constructor
    End Sub
    Public Overrides Sub Speak()               ' overriding
        Console.WriteLine(Name & " barks")
    End Sub
End Class

Dim d As New Dog("Tommy") और d.Speak() से output आएगा: Tommy barks। Constructor का नाम हमेशा Sub New होता है। Override करने के लिए parent में Overridable और child में Overrides लिखना ज़रूरी है।

Forms को load, show और hide करना:

  • Dim f As New Form2() फिर f.Show(): दूसरा form खोलना (पहला भी चलता रहता है)।
  • f.ShowDialog(): form को modal खोलना; जब तक वह बंद न हो, पीछे वाला form use नहीं होगा।
  • Me.Hide(): current form छिपाना; Me.Close(): बंद करना।
  • एक form से दूसरे को control करना: f.Label1.Text = "Welcome"। यह इसलिए चलता है क्योंकि VB.NET designer में controls default रूप से Friend होते हैं, यानी उसी project में accessible।

एक form के अंदर दूसरा form (MDI): किसी form को दूसरे form के अंदर child window की तरह खोलना हो, तो parent form की IsMdiContainer property True रखें और child form का MdiParent set करें:

Me.IsMdiContainer = True        ' यह form अब parent (MDI container) है
Dim frm As New Form2()
frm.MdiParent = Me              ' Form2 इसी form के अंदर खुलेगा
frm.Show()

Exam के लिए Important Questions

Short Questions (2–3 marks)

  1. VB.NET का full form क्या है? (Visual Basic .NET)
  2. IDE क्या है? (Integrated Development Environment: code लिखने, design, run और debug करने का एक software)
  3. Toolbox और Properties Window में क्या फ़र्क है?
  4. Sub और Function में अंतर लिखिए। (Function value return करता है)
  5. Dim a(5) As Integer में कितने elements हैं? (6)

Long Questions (5–10 marks)

  1. VB.NET क्या है? इसकी features और VB6 से अंतर लिखिए।
  2. VB.NET IDE के मुख्य parts समझाइए।
  3. VB.NET में optional arguments, ParamArray और function से value return करना example से समझाइए।
  4. VB.NET में inheritance और overriding एक program से explain कीजिए।

FAQs

VB.NET और C# में कौन सी language बेहतर है?

दोनों .NET पर चलती हैं, दोनों MSIL में compile होती हैं और एक ही libraries use करती हैं। फ़र्क मुख्यतः syntax का है: VB.NET English जैसे keywords use करती है, C# की syntax C/Java जैसी है। आज नए projects और jobs में C# ज़्यादा use होती है।

क्या VB.NET case-sensitive है?

नहीं। Total, total और TOTAL VB.NET में एक ही नाम हैं। C# case-sensitive है।

VB.NET program run करने के लिए क्या चाहिए?

Code लिखने और बनाने के लिए Visual Studio (IDE), और program चलाने वाले computer पर .NET runtime (CLR)।

VB.NET में comment कैसे लिखते हैं?

Single quote ' से (या REM से)। उसके बाद की पूरी line comment होती है। VB.NET में C जैसा multi-line comment नहीं होता।

अक्सर पूछे जाने वाले प्रश्न (FAQs)

Quick Answer: VB.NET (full form: Visual Basic .NET) Microsoft की बनाई एक object-oriented programming language है, जो .NET platform पर चलती है।
.Net Notes in Hindi | डॉट नेट नोट्स हिंदी में के पाठ्यक्रम में What is VB.NET and IDE in Hindi | वीबी.नेट क्या है ? एक महत्वपूर्ण अध्याय है। यह मुख्य सिद्धांतों, परीक्षा प्रश्नों और सूत्रों को समझने के लिए अत्यधिक आवश्यक है।
हाँ, NotesMedia पर आपको What is VB.NET and IDE in Hindi | वीबी.नेट क्या है ? के महत्वपूर्ण प्रश्नोत्तर, हल किए गए उदाहरण और नोट्स बिल्कुल मुफ्त मिलेंगे। अधिक अभ्यास के लिए आप हमारा ऐप भी डाउनलोड कर सकते हैं।
Advertisement

In this Chapter

What is VB.NET and IDE in Hindi | वीबी.नेट क्या है ?
Introduction of .Net in Hindi
Web Services in Hindi | वेब सर्विसेस हिंदी में
WSDL in Hindi | WSDL हिंदी में
Boxing & Unboxing in ADO.NET in Hindi
CLR Full Form – CLR क्या है (Common Language Runtime)
Common Types System in Hindi
MSIL in Hindi
Assemblies & Class Libraries in Hindi
Project of .Net in Hindi
Intermediate Language in Hindi
Object Orientation in Hindi
Managed Execution in Hindi
Rapid Development in Hindi
Windows Presentation Foundation in Hindi
Whats new For .NET framework 3.5?
Windows Workflow Foundation (WWF) in Hindi
Windows Card Space in Hindi
Windows Communication Foundation in Hindi
How To Install and Use The Visual Studio 2008
How to Working With Visual Studio 2008
Types of Visual Studio 2008 in Hindi
Visual Studio 2008 IDE in Hindi
How To Create Console Application in Hindi
Introduction of C# in .NET in Hindi
Classes of .NET With C# in Hindi
Properties of .NET With C# in Hindi
Structs in C# .NET in Hindi
Delegates & Events in Hindi
Generic Collections in .NET (C#) in Hindi
Type Safety in Hindi
Nullable Types in .NET in Hindi
ADO.NET in Hindi | ADO.NET क्या है?
SQL Connection Object in Hindi
SQL Command in Hindi
LINQ in Hindi | LINQ क्या है?
What is Using Stored Procedures?
Windows Application in .NET in Hindi | Windows Application क्या है?
BCA || .NET with C# 2023 Paper | MDSU Exam Paper
.NET with C# All Important Questions and Answers in Hindi (MDSU)
BCA || .NET with C# 2025 Paper | MDSU Exam Paper