Friday, May 10, 2019

Introduction to Visual Basic
A brief description of Visual Basic
Getting to know the Visual Basic environment
1.1 A brief description of Visual Basic
VISUAL BASIC® is a high level programming language evolved from the earlier DOS
version called BASIC. BASIC stands for Beginners' All-purpose Symbolic Instruction
Code. The program codes in Visual Basic resemble the English language. Different
software companies produce different versions of BASIC, such as Microsoft®
QBASIC, QUICKBASIC, GWBASIC, and IBM BASICA and so on.
Visual Basic is a fairly easy programming language and it is for anybody who is
interested in programming but lacks professional training in software engineering.
Learning VISUAL BASIC will help young children to improve their logical thinking
skills and develop their minds. You can choose to program in VISUAL BASIC purely
for fun and enjoyment or create more advanced applications such as educational
courseware and commercial software.
VISUAL BASIC is a visual and events driven programming Language. These are the
main divergences from the old BASIC. In BASIC, programming is done in a text￾based environment and the program is executed sequentially. In VISUAL BASIC,
programming is done in a graphical environment. In old BASIC, you have to write a
text-based procedure to design the interface, but Visual Basic enables you to design
the interface by dragging and resizing the objects as well as changing their colors,
just like any windows-based programs.
Visual Basic is event-driven because users may click on a certain object randomly,
so each object has to be programmed independently to be able to response to those
actions (events). Examples of events are clicking a command button, entering text
into a text box, selecting an item in a list box etc. Therefore, a VISUAL BASIC
Program is made up of many subprograms, each with its own program code which can be executed independently and at the same time can be linked together in one
way or another.
1.2 The Visual Basic Environment
Upon start up, Visual Basic 6.0 will display the dialog box as shown in Figure 1.1.
You can choose to start a new project, open an existing project or select a list of
recently opened programs. A project is a collection of files that make up your
application. There are various types of applications that can be created; however, we
shall concentrate on creating Standard EXE programs (EXE means executable
program). Now, click on the Standard EXE icon to go into the VISUAL BASIC
programming environment.
Join my group on Messenger by visiting: https://m.me/join/Abb_p1hdmWm08Zx4

Private Sub Command1_Click() If Text1.Text = password Then Text1.Visible = False Label1.Visible = True Label1.Caption = "Login Successful" Else Label1.Visible = True Label1.Caption = "Login Fail! Please enter your password again" Text1.Text = "" End If End Sub Private Sub Form_Load() password = "1234" End Sub Private Sub Text1_Click() Label1.Visible = False End Sub

Saturday, February 16, 2019

C Program & I/O statements

C Program & I/O statements.

 Structure of C Language program
 // Comments     Optional # Preprocessor
directive   Compulsory Global Variables;
 Optional
 main ( )     Compulsory Function {
Local variables; Statements;
}
 User defined function 1   Optional
Function {
Local variables; Statements;
}
 User defined function 2    Optional
Function
…      User defined function n   Optional
Function

Compilation & Execution of C program 
Preprocessor:    
The source code is firstly passed through
the preprocessor. It expends this code by
performing the preprocessing directives and
then passes it to the compiler.
Compiler:
The expended code is passed to the compiler.
 It converts this code into the machine's
assembly language code.

Assembler:  
It converts the assembly code into object code. The name of the object file is same as
the source file. In DOS the object file has
extension “.obj" and in UNIX the extension
is ' .o „.

Linker:
 Generally, all programs written in c use
library functions.  Library functions are
precompiled and their object code is
stored in library files with ' .lib ' or ' .a '
extension. The linker combines the object
code of the library functions with the object
code of our program.

      Our program may also contain references to 
functions that are defined in other files. The 
linker links the object code of these files also 
to our program. So the job of linker is to 
combine the object code of our program 
with the object code of other files and object 
code of library functions. The output of the 
linker is an executable file. 

Wednesday, February 13, 2019

BASICS OF HEAT TRANSFER

Difference between heat and temperature
In heat transfer problems, we often interchangeably use the terms heat and temperature. Actually,
there  is  a distinct difference between the two. Temperature is  a measure of the amount of energy
possessed by the molecules of a substance. It manifests itself as a degree of hotness, and can be used
to predict  the  direction of heat  transfer.  The  usual  symbol for temperature  is T. The  scales  for
measuring temperature in SI units are the Celsius and Kelvin temperature scales. Heat, on the other
hand, is energy in transit. Spontaneously, heat flows from a hotter body to a colder one. The usual
symbol for heat is Q. In the SI system, common units for measuring heat are the Joule and calorie.