Contacts

Six programming lessons in Visual Basic. Six programming lessons in Visual Basic Learning Learning Visual Basic 6.0

Educational institution: KSU "Gymnasium №6"

The Republic of Kazakhstan

City of families

East Kazakhstan region

Lesson Topic: Visual Basic Programming Language. Microsoft Visual Basic 6.0 download. Acquaintance with the components of the programming environment. First project in Microsoft Visual Basic 6.0.

Educational tasks:

1. Acquaintance with the components of the programming environment.

2. To introduce the structure of the integrated environment

Developing tasks:

    Develop students with algorithmic thinking.

    Expand the knowledge of students in the field of algorithmization ..

Basic knowledge and skills:

Know: The composition of the integrated environment,

Be able to:

    Launch Microsoft Visual Basic 6.0 program.

    Save, open applications.

    set the values \u200b\u200bof the properties of objects using the project properties window

    Place objects on the form and run to execute a finished project.

Ensuring classes:

one). PC - EUM - 12 pcs.

2). Distribution material "My first program".

Literature:

    N.G. Volchenkov "Programming on Visual Basic 6.0"

    S.N. Lukin "Tutorial of work on Visual Basic 6.0"

Methods: Wonderful, practical, design.

Work forms: Lecture, practical work, frontal survey.

During the classes

    Organizational moment (3min.)

Message Students themes, Tasks (educational) and plan

conduct lesson.

    Studying a new material (Teacher's lecture with a demonstration of Visual Basic Programming Environment).

As a result of the launch, the Visual Basic Main Window appears on the screen, in the center of which you see another window - Invitation to start creating a new project

(See Figure).

If the invitation does not appear, then click on the File menu item, and then select Add Project in the drop-down menu - and it will appear.

You are invited to choose the type of project you want to create. While we have a fairly standard type. Click in the Invitation window in the New bookmark on the Standard EXE icon, and then on the Open button. The following picture arises in front of you, saying that you can proceed to design (the appearance of the picture you can have a little different):

IN
working Screen ID - Integrated Visual Basic Wednesday

1. Integrated Wednesday Visual Basic

The composition of the integrated environment:

1) program title (application name, document name, control buttons);

2) menu line (standard and specific command groups);

3) Toolbar (Standard - assumes a number of the most frequently used features that can be found in the File, Project, Debug, Run; Edit menu - used when working with the program code; Debug - Used to test the program and correct errors; Form Editor - Used for Size changes, movement and alignment of control elements);

4) Form designer window (working area for designing mold layout and elements located on it;

5) Project Explorer window (represents the reflection of the project structure);

6) Toolbox control panel (overview of the main controls is given below);

7) project properties window (Properties);



isual B.

2. Place objects on the form, for example, form or

Well, let's start the assembly. Take button(CommandButton) and put on the form. To do this, click on the button, and then take the mouse inside the shape of a small "frame". What does it mean to spend a "frame"? This means put the mouse cursor somewhere inside the shape, click on the left mouse button and, without releasing the key, "drag" the mouse is a bit of the male. At the same time, the cursor will reach the "Frame". Release the mouse. At the site of the frame there will be a button with the protrusion Command1.

At the edges of the button you will see 8 black squares - markerssize changes. If you click on the form by the button, they will disappear if you click on the button again - will appear. Just do not need double clicks. Drag by the mouse of any of the markers - the sizes of the button will change. You can carry the button in the form if you catch a mouse for the marker, but for any place inside the button. To destroy the button, right-click on it and in the attachment of the context menu, select the Delete option. Do all this. And now, if you destroyed it, then create again.

Similarly, place an object text field(TextBox). Now we have two objects on the form.

3. We write a program

Let's come up with a task for our project. Let it occur on the screen when you press the button. Let's order the computer when you press the button to change the color of the form on the red. The command (operator) is written for this:

Form1 . Backcolor \u003d vbred.

Tell me what is written here.

Form1 is the name of our form (Visual Basic gave him and we will not change it yet)

BackColor - translated "background color", that is, this is a color to which the shape is painted (while he is gray)

vBRED is a red color (Red - Red, VB - Visual Basic)

Thus, our operator can be translated as:

Form1 . color \u003d red

On the left of the point we write the name of the object, to the right of it - it war, and to the right of the sign of equality - recognition of this property. Point writing necessarily.

Visual Basic will perceive our operator as an order to change the color of the form on red. Now how do we do to make the computer to execute this operator when you press the button, and not at any other point? Sit down for your computer. Pro-

believe whether we are in design mode. Make a double click on the Command1 button. You will have a new window - the program code window or simply code window. So that we are not confused, in the title window is present

word (Code).

Now the code window must have this kind:

Click the Start button.

On the screen again a familiar form of form with a button and text field appears. Click on the button - the shape has become red.

Congratulations! Your first project has earned.

If you want to start a new project, then perform File- NEW PROJECT.

III. Independent work

1. Having separately each control element on the form of your first project, familiarize yourself with their main properties (in the Properties window on the left).

2. By moving each element of the mouse pointer, change the positions of the elements on the form,

3. Add Label control and set the Caption property for it - "My first program".

V. Total lesson

The lesson received the first ideas about the programming environment in the Visual Basic language. To create a project, you must select the form and install the necessary controls, the actions of which are described by the program code. Forms are the foundations of the graphical application interface. In the forms there are objects giving the user the ability to manipulate data and manage the application

Vi. Task at home

    Prepare a presentation on subgroups on the topic: "Integration Wednesday Visual Basic"

Note: When studying a new material, students make the necessary records under the guidance of the teacher in the notebook.

Name Visual Basic (VB.) speaks for himself, indicating that it is embodied by a visual programming style and Visual- programs do not write traditional ways of programming, and design From a set of special objects in the form of Windows applications. In other words, to create an application on the visual algorithmic language of the high level Visual Basic- means to develop a full-fledged graphic Windows-approach.

Word " Basic. "In the name VB. indicates only the fact that the syntax of programs and its operators include and develop further to the convenient vocabulary Basic. (B.eginners. A.llpurpose S.ymbolic I.nSTRUCTION. C.oDE). But if you know the usual Q.Basic., very soon make sure that Visual Basic.very much different from it, and in version VB.NET is in one row with C.++ ,C.# ,Java. , and other new visual languages.

To the question than is ( IDEI.ntegrated D.evelopment. E.nvironment) - an integrated application development environment of the Nisual Basic application - compiler or interpreter, you can get an answer: "and the other".

IDE Visual Basic as an interpreter

The main feature of the development environment software applications (PP)- as interpreter It is the fact that the programs created in it are performed only in the development environment itself. The program can be started directly from the medium and if there are errors in it, they are immediately recognized. All this is observed in the IDE Visual Basic, where you can run the application directly. In this case, Visual Basic uses Threated-P-Code technology, in which each entered code string is converted to the intermediate code - Threated-P-Code. This is not an intermediate machine code dependent on the interpreter, which is performed faster than when working with a conventional interpreter.

At the same time, Visual Basic immediately checks the program syntax and gives a message about a detected error. Another advantage of this technology is the ability to convenient search for errors in debug mode.

However, Visual Basic provides the ability to create and executable *. Oh files, so it can be attributed to compilers.

IDE Visual Basic as a compiler

Visual Basic 6.0 cannot be called a clean compiler, as in contrast, for example, from Visual C ++, Visual Basic does not create an executable file immediately when started from the development environment. To create such a file you need to do it clearly (run the command File \\ Make * .exe). The so-called "Native Compiler" - the compiler, however, creates a machine code. Thus. Visual Basic combines the capabilities of both the interpreter and the compiler.

Visual editions of Visual Basic :

    Edition for beginnersLearning Edition)

Edition of Visual Basic for beginners (former standard) is intended for inexperienced programmers. This publication provides only the main features for creating applications and a basic set of controls.

    Edition for professionalsPROFESSIONAL EDITION)

The publication for professionals provides more tools and auxiliary means necessary for professional programmers. It contains a number of additional control elements, provides advanced access to databases and creating an OLE-server application.

    Industrial editionENTERPRISE EDITION)

Industrial publication is an expansion of publications for professionals and is intended for developers of corporate systems. This publication includes a large number of controls and means that allow you to develop not only single-user programs, but also complex client-server applications. Industrial publication also contains a number of special tools (for example, Visual Source SAFE, designed to compare versions and project management). Using ODBC drivers provides optimized access to external databases. Another example of server developer version Microsoft SQL. and Microsoft Transaction Server.

The purpose of modern secondary education is the formation of key competencies in students. Key competencies include one of the most important skills - the ability to live in the information world. For social adaptation and professional self-determination, modern schoolchildren requires a personal computer skills, various programming languages, the ability to create projects in various programming environments.

This program has the following objectives:

1. The concept of the programming language of Visual Basic.

2. Cnowledge with the components of the Visual Basic Programming Environment.

3. Skills for creating projects in this programming environment.

This program meets the tasks of modern school education, performing educational, educational and developing tasks.

Basic educational tasks of this project:

  • Learn Visual Basic Programming Language.
  • Teach students working in Visual Basic programming environment;
  • Give basic skills to create projects in this programming environment;

The main educational tasks of the project:

  • To educate personal qualities in schoolchildren who contribute to successful social adaptation: purposefulness, objectivity in self-esteem, responsibility, cognitive interest.

The main developing tasks of the project:

  • To form key competencies in students who contribute to successful social adaptation;
  • Develop the desire for self-development and personal growth through cognitive activities.

The Visual Basic Study Program is based on a serial and logical lesson system. The system of lessons to study the programming language Visual Basic includes six lessons, each of which has its own goals and tasks and gradually solves the main task: learning a new programming language Visual Basic.

Lesson number 1. Subject: Programming language Visual Basic. Download Visual Basic 6.0 program. Acquaintance with the components of the elements of this programming environment. View and analyze the proposed project.

Lesson number 2. Subject: Programming language Visual Basic. Creating the simplest project in Visual Basic.

Lesson number 3. Subject: Programming language Visual Basic. Creating projects in this programming environment.

Lesson number 4. Subject: Programming language Visual Basic. Creating a project to fulfill computation in conjunction with the teacher, and then independent work on the creation of the project ..

Lesson number 5. Subject: Programming language Visual Basic. Working with user procedures and functions.

Lesson number 6. Topic: Programming language Visual Basic. Work with arrays.

In this system of lessons, various forms of learning (individual, group) are used, various learning methods (theoretical, practical, project), various forms of work (lecture, independent work of a training character, followed by self-test, frontal survey, project creation).

This lesson system is proposed for testing in the 11th grade of secondary school subject to the availability of a computer science office with personal computers and a Microsoft Visual Studio Visual Basic 6.0 instrumental system.

11
but I
2008

Visual Basic 6.0 step by step


ISBN: 5-9570-0042-6, -
Format: DJVU, scanned pages
Year of release: 1999
Halworson M.
Genre: Programming on Visual Basic
Publisher: Ecom.
Number of pages: 708
Description: The popular series "Step by step" is designed for those who master the new software products on courses or independently. Having studied this book, you will pass the main programming course on Microsoft Visual Basic 6.0. The secret, how to become a professional program developer on Visual Basic is to write programs that require you to apply the most diverse possibilities of Visual Basic. Among them: thorough knowledge and ability to practice the standard toolbar controls and ActiveX components; the ability to correctly install and manipulate properties, features and events of the object; the ability to write a clear and clear software code with the ability to reuse some program segments in the future; The ability to create a visual and efficient user interface. In each of the lessons of this course, the reader's attention is focused on these principles of programming. You will find that you can immediately apply the skills and knowledge you have received by studying examples contained in this book when creating more complex applications on Visual Basic to perform real practical tasks. The book includes a CD with all examples from the lessons of this book.
Extra. Information: Unfortunately, files from the disk are not attached


27
may
2010

Visual Basic 6.0 (V. Sergeev)

ISBN: 5-8206-0019-3.

Year of release: 2004
Genre: Programming
Publisher: BHV-Petersburg
Russian language
Number of pages: 974
Description: This book will help you create different applications on Microsoft Visual Basic 6.0. Do not forget to say thanks and to hear on the distribution !!!


28
jan.
2013

Chess. Step by step (Zhuravlev N.I.)

ISBN: 978-5-94693-251-6, 978-5-94693-250-9
Format: PDF Scanned Pages
Author: Zhuravlev N.I.
Year of release: 2012
Genre: textbooks, reference books, encyclopedia
Publisher: Russian Chess House
Russian language
Number of pages: 314
Description: Before you tutorial playing chess, which will be useful not only to beginners, but also the arresters. His author, a famous master and writer, offers beginners to make an exciting journey into a chess world. You have to go away from exploring the rules of the game to the ability to use typical techniques and carry out beautiful combinations. All those ...


15
mar.
2010

Culinary skills - step by step (V.I. Okunev, A.P. Shabalova)

ISBN: 5-88294-072-9
Format: PDF Scanned Pages
Year of release: 1998
Genre: Illustrated Cookbook
Publisher: Ural Ltd
Russian language
Number of pages: 610
Description:
From publishers: The book offered to the reader opens a series of "Culinary Mastery". In it you will find recipes for the preparation of various dishes - from snacks to desserts. Excellent illustrated edition will interest both beginner and experienced culinary. The book is intended for a wide range of readers.
From yourself: the book, indeed, is good - an extensive selection of interesting and delicious recipes, each of which is rich ...


24
mar.
2013

Cozy apartment. 100 ideas. Repair step by step number 3

Format: PDF Scanned Pages
Year of release: 2012
Publisher: LLC "Edipress Ukraine"
Genre: Interior, Design, Repair Language: Russian
Number of pages: 80
Description: By doing repairs in your apartment, everyone expects to create something special, individual! After all, so I want to return to the cozy apartment after a turmozy business day, where there is no place to go and reign order and peace. The magazine will help you create an interior with your inimitable character and atmosphere. The best interiors, apartments, recommendations of architects and advice of professional masters - everything so that you are a trainer ...


24
may
2010

Modern programming practice on Microsoft Visual Basic and Visual C #. (Francesco Balen, Giuseppe Dimauro)

ISBN: 5-9573-1019-0, 5-901635-11-6
Format: HTML, eBook (computer originally)
Year of release: 2006
Posted by: Fordu Mikhail
Genre: Esoterica
Publisher: IG "All", oxygen
Number of pages: 480
Description:
From the publisher: the book "The First Gate" continues the series "Hackers of dreams" - publications of the Russian group of researchers, several decades who kept the essence of their hearing. The modern society of Russian-speaking followers of Castaneda and people interested in the changed states of consciousness consists of a few practitioners and a huge number of "dusoviers". Parties not practicing ...


25
may
2010

Microsoft Visual Basic 2010 Step by Step 2010 (MICHAEL HALVORSON)

Format: PDF, OCR without errors
Year of release: 2010
Genre: Programming
Publisher: Microsoft Press
English language
Number of pages: 548
Description: This book will help you create different applications on Microsoft Visual Basic 2010. Do not forget to say thanks !!!


19
dec
2014

Step at the edge (James Hedley Chase)


Author: James Hedley Chase
Year of release: 2008
Genre: Detective
Publisher: you can't buy anywhere
Artist: Nikolay Koziy
Duration: 09:39:48.
Description: The main hero ENSON works as an insurance agent. For twelve years of service, he becomes a famous most techniques to which scammers are resorted to the sake of profit. But he is sure: the firm in which he works is disbounds. Only a turn of fate makes him think ...


25
but I
2010

Beginners about Visual C ++ 2010 / Beginning Visual C ++ 2010 (Ivor Horton / Ivor Horton)

Type: Audiobniga
Genre fiction
Publisher: "Extra Print"
Year of release: 2007
Artist: E.V. Malishevsky
Sound time: 13 h. 46 min.
Format / Quality Audio: MP3, 96 Kbps, 44.1 KHz, Mono
Description: A astronomer accidentally discovers near Jupiter an unknown cosmic body with strange properties, which received the name of the star monster. In the meantime, strange and frightening phenomena begin to occur on Earth. A direct connection between events in the sky and on Earth has been proven. Naturally, it can not not interest the special services of the whole world. In Russia, a group of studies of the aliens is created in to ...


27
dec
2015

Shaman's path. Step 6. Everything is just starting (Mahanenko Vasily), Maxim Suslov]

Format: Audiobook, MP3, 48Kbps
Posted by: Mahanenko Vasily
Year of release: 2015
Genre: Fantasy
Publisher: IDDK
Artist: Maxim Suslov
Duration: 14:18:49
Description: A new immersion in the world of Barlion is one of the best world of the project Litrpg! Shaman's adventures continue! Dmitry Mahan, the legendary shaman of the Game World of Barlion, was safely serving a sentence in virtual reality. Eleven months of adventure and battles to the eight-year-old prison is a very good replacement. That's just Barlion did not hurry to let go of the shaman, washing the line between the two reality. I had ...


10
aug.
2016

C # 6.0. Directory. Full language description. 6th edition (Joseph Albahari, Ben Albahari)

ІSBN: 978-5-8459-2087-4, 978-1-491-92706-9
Format: RDF, ORR with errors
Posted by: Joseph Albahari, Ben Albahari
Translator: Y. Artemenko
Year of release: 2016
Genre: Computer Literature, Programming
Publisher: Williams.
Russian language
Number of pages: 1040
Description: This guide that has become a bestseller allows you to get accurate answers to almost any questions on C # 6.0, CLR and main assemblies .Net FRAMEWORK. After his appearance in 2000, C # has become a language with outstanding flexibility and power, but its permanent growth and improvement means the need for an additional study. ...


03
jul
2012

Lagging behind the step, or on the step of the back (Henning Mankelle)

Format: Audiobook, MP3, 128Kbps
Posted by: Henning Mankelle
Year of release: 2005
Genre: Detective
Publisher: ABook-Club
Artist: Mikhail Yegenkov
Duration: 17:16:27
Description: Summer Night On the eve of Ivanov's Day in the Hagestad National Park, a group of youth is going. Two girls and a guy, dressed in the costumes of the eighteenth century, drink wine and sow vintage drinking songs. In the midst of the fun, someone methodically shoots due to the bushes of all three. The corpses of young people disappear without a trace, and in two months suddenly they are found at the site of the murder. What is it - the face of the crazy ...


02
sen.
2009

Microsoft Visual Studio 2008. In the script

Format: DJVU, OCR without errors
Year of release: 2009
Author: Lars Powers, Mike Snell
Genre: Programming
Publisher: BHV-Petersburg
Number of pages: 1200
Description: Receptions of work in the integrated Visual Studio 2008 development environment, as well as new technologies and elements of the medium intended for creating effective modern applications are considered. Work is described with decisions, projects, editors and visual designers. New features of C # and Visual Basic programming languages \u200b\u200bare shown. In addition, it is considered to create various types of applications, including using ASP.NET, Web- ...


Today we consider the line () method on the example of a program in which the horizontal and vertical hatching are drawn when pressed on the form.

To begin with, creating a new project. Click "File", "New Project" and select "Standard EXE" (Figure 1).

Figure 1 - Project selection

On the screen will appear an empty form "Form1" of the new project (Figure 2).


Figure 2 - Empty form of a new project

Two times click on the form. The code editor window opens. Select the Form_Click () procedure (Figure 3).


Figure 3 - Code Editor Window

To fill the form by vertical lines, you need the line () method to put in the FOR cycle. The cycle will lead from 1 to 20,000 with an interval 100. There will be a variable x (by analogy of the X coordinate, since it changes when it moves the vertical lines). Let us give the resulting program code:

Private Sub Form_Click () for x \u003d 1 to 2000 STEP 100 Line (X, 1) - (X, 20000) Next X End Sub
Run the project and click on form. The result is visible in Figure 4.


Figure 4 - the result of the operation of the given code

To display another horizontal hatch, we introduce another cycle by analogy, only now we will change the y coordinate. The code of the new cycle is as follows:

For y \u003d 1 to 20,000 STEP 100 Line (1, y) - (20,000, y) Next y
The result of the operation of two cycles with LINE () methods is shown in Figure 5.


Figure 5 - the result of two cycles

If you want to embello in the color of the line, add the desired color through the comma after the line () method. For example:

Line (X, 1) - (X, 20000), VBGreen or Line (1, Y) - (20000, Y), VBGreen
The result of color transformation is shown in Figure 6.


Figure 6 - result of color transformation



Did you like the article? Share it