Posts

Showing posts from February, 2018

Control Structures examples

Module Module1     Sub Main()         'Dim a As Integer         'Dim b As Integer         'a = 10         'b = 20         'If (a > b) Then         '    Console.Write(" a is big number")         'Else         '    Console.Write(" b is big number")         'End If         '' While Loop         'Dim number As Integer         'number = 1         'While number <= 100         '    number = number + 1         '    Console.WriteLine("Number is{0}", number)         'End While         '' DO While Loop         'Dim number As Long         'numb...

Visual Basic 6 (VB6) Operators

Operators in Visual Basic Arithmetical Operators Operators Description Example Result + Add 5+5 10 - Substract 10-5 5 / Divide 25/5 5 \ Integer Division 20\3 6 * Multiply 5*4 20 ^ Exponent (power of) 3^3 27 Mod Remainder of division 20 Mod 6 2 & String concatenation "George"&" "&"Bush" "George Bush" Relational Operators Operators Description Example Result > Greater than 10>8 True < Less than 10<8 False >= Greater than or equal to 20>=10 True <= Less than or equal to 10<=20 True <> Not Equal to 5<>4 True = Equal to 5=7 False Logical Operators Operators Description OR Operation will be true if either of the operands is true AND Operation will be true only if both the operands are true

VB 6.0 - Working with Variables

Lesson 6 : Working with Variables 6.1 Assigning Values to Variables After declaring various variables using the Dim statements, we can assign values to those variables. The syntax of an assignment is Variable=Expression The variable can be a declared variable or a control property value. The expression could be a mathematical expression, a number, a string, a Boolean value (true or false) and more. The following are some examples variable assignment: firstNumber=100 secondNumber=firstNumber-99 userName="John Lyan" userpass.Text = password Label1.Visible = True Command1.Visible = false Label4.Caption = textbox1.Text ThirdNumber = Val(usernum1.Text) X = (3.14159 / 180) * A 6.2 Operators in Visual Basic To compute inputs from users and to generate results, we need to use various mathematical operators. In Visual Basic, except for + and -, the symbols for the operators are different from normal mathematical operators, as shown in Table 6.1. Table 6....

visual basic 6.0 - Managing VB Data

5. Managing VB Data Data types in Visual Basic 6 By default Visual Basic variables are of variant data types. The variant data type can store numeric, date/time or string data. When a variable is declared, a data type is supplied for it that determines the kind of data they can store. The fundamental data types in Visual Basic including variant are integer, long, single, double, string, currency, byte and boolean. Visual Basic supports a vast array of data types. Each data type has limits to the kind of information and the minimum and maximum values it can hold. In addition, some types can interchange with some other types. A list of Visual Basic's simple data types are given below. 1. Numeric Byte Store integer values in the range of 0 - 255 Integer Store integer values in the range of (-32,768) - (+ 32,767) Long Store integer values in the range of (- 2,147,483,468) - (+ 2,147,483,468) Single Store floating point value in the range of (-3.4x10-38) - (+ 3.4x1038) ...

Control Structures In Visual Basic 6.0

Control Structures In Visual Basic 6.0 Control Statements are used to control the flow of program's execution. Visual Basic supports control structures such as if... Then, if...Then ...Else, Select...Case, and Loop structures such as Do While...Loop, While...Wend, For...Next etc method. If...Then selection structure The If...Then selection structure performs an indicated action only when the condition is True; otherwise the action is skipped. Syntax of the  If...Then  selection If <condition> Then statement End If e.g.: If average>75 Then txtGrade.Text = "A" End If If...Then...Else selection structure The  If...Then...Else  selection structure allows the programmer to specify that a different action is to be performed when the condition is True than when the condition is False. Syntax of the  If...Then...Else  selection If <condition > Then statements Else statements End If e.g.: If average>50 Then txtGrade.Text = "P...

Visual Basic 6.0 (VB) - Syllabus

Visual Basic 6.0 (VB) - Detailed Syllabus Visual Basic 6.0 – Programming Fundamentals Notes in Hindi as well as English language Notes covered only Programming Fundamentals portion and Controls and User Interface elements portion was not covered in the notes since Visual Basic 6.0 was quite wide and needed a lot of time and effort to create notes. For learning application development, you can check out Mini Projects Guide, Mini Project Source Codes, Sample Projects topics of this website. I have explained all the topics with detailed proper examples so hope someone will benefit a large. VB 6.0 Syllabus 1 Introduction 2 OOPS Programming 3 Variables, Constants & Associated Functions 4 Subroutines, Functions and VB6 Language 5 Controls 6 Building GUI with Forms, Menus and MDI Forms 7 Building Classes : The Foundation of VB OOP 8 Using ActiveX Controls 9 Problem Solving : Handling Errors & Debugging your Programs 10 Database Programming 1) Introduction...

C# Tutorial For Beginners | The Complete Tutorial to Learn C Sharp

Image
C# Tutorial For Beginners | The Complete Tutorial to Learn C Sharp Complete C# Tutorial Welcome to C# Tutorial  It is a free online C# Tutorial in which you will get great number of C# programs and definitions in easiest way. Our experts have tried to keep program complete and easy to understand so you can copy the program and run them on your own way. C# (pronounced C Sharp) is new  technology that is much powerful and easy to learn. It consists of thousands of prebuilt classes and interfaces that lets programmer to write powerful code in very less time. If you are beginners then don’t worry and just start with very first lesson and do exercises regularly. I promise you to in very short time you will be able to write complex programming module without getting help of any third party resources. To run C# code, Visual Studio is the best editor. Either you can choose console based application to run program directly or you can write program on notepad and then ru...