HELP - VB TIPS. ANIMATE AN IMAGE BOX Insert a module. In this module, create a global variable: Global x

Size: px
Start display at page:

Download "HELP - VB TIPS. ANIMATE AN IMAGE BOX Insert a module. In this module, create a global variable: Global x"

Transcription

1 HELP - VB TIPS Load an image to an image box from a certain folder If you use this method, won t work on N:\ To load an image to a image control Image1.Picture = LoadPicture("H:\MyVBfolder\stop.gif") Load an image to an image box when the image is in the same folder as the.exe To load an image to a image control Image1.Picture = LoadPicture("stop.gif") ANIMATE AN IMAGE BOX Insert a module. In this module, create a global variable: Global x In your form, code a timer. In this example I have 6 images in the same folder as my vb project and forms. They are named them with a number (example guyrunning01.gif, guyrunning02.gif), so I could access each image with the following code: Private Sub Timer1_Timer() x = x + 1 If x = 6 Then x = 1 Image1.Picture = LoadPicture("guyrunning0" & x & ".gif") 'What is happening? x starts at so this code will load image guyrunning01. When the timer runs again based on the interval, x = 1, so if x = x + 1, x now equal 2 and loads image guyrunning02.gif. Get it? ANIMATING LINES ON THE ROAD Code to move lines to make car appear as it is moving. There are two images and one starts at a top position of and one starts at a top position of -480 Private Sub timelines_timer() img1.top = img1.top img2.top = img2.top If img2.top > 6840 Then img2.top = 3840

2 If img1.top > -480 Then img1.top = COLLISION CODE Think about where you would want to put this code. For an object named red and object named blue. If red.left > (blue.left - red.width) And red.left < (blue.left + blue.width) And _ red.top > (blue.top - red.height) And red.top < (blue.top + blue.height) Then lbl.caption = "collision" Else lbl.caption = "no collision" CLICK ON A BUTTON AND THE PICTURE ON BUTTON WILL CHANGE Private Sub Command10_Click() 'Image changes based on the number 0 or 1 Text6.Text = Val(Text6.Text + 1) If Text6.Text = 2 Then Text6.Text = 0 If Text6.Text = 1 Then Command10.Picture = LoadPicture("H:\MyDocuments\yield.gif") Else Command10.Picture = LoadPicture("H:\MyDocuments\stop.gif")

3 4 IMAGES APPEAR RANDOMLY, WITH ONLY ONE SHOWING AT A TIME Private Sub Timer1_Timer() Dim a As Integer Randomize a = (Rnd * 4) + 1 Label1.Caption = a If a = 1 Then Image1.Visible = True Image2.Visible = False Image3.Visible = False Image4.Visible = False If a = 2 Then Image2.Visible = True Image1.Visible = False Image3.Visible = False Image4.Visible = False If a = 3 Then Image3.Visible = True Image1.Visible = False Image2.Visible = False Image4.Visible = False If a = 4 Then Image4.Visible = True Image1.Visible = False Image2.Visible = False Image3.Visible = False

4 MOVE OBJECT WITH ARROW KEYS. OBJECT IS NAMED SHIP Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer) 'this code moves an object up and down If KeyCode = 40 Then Let ship.top = ship.top If KeyCode = 38 Then Let ship.top = ship.top Private Sub Form_KeyUp(KeyCode As Integer, Shift As Integer) 'this code moves an object left and right If KeyCode = 39 Then Let ship.left = ship.left If KeyCode = 37 Then Let ship.left = ship.left - 200

5 ADD SOUND add a MODULE to your project and name it modsound Add the following code under the general declarations in modsound Option Explicit Public Declare Function sndplaysound Lib "winmm.dll" Alias "sndplaysounda" _ (ByVal lpszsoundname As String, ByVal uflags As Long) As Long Public Const SND_SYNC = &H0 Public Const SND_ASYNC = &H1 Public Const SND_NODEFAULT = &H2 Public Const SND_LOOP = &H8 Public Const SND_NOSTOP = &H10 Public Sub PlaySound(strSound As String) Dim wflags% wflags% = SND_ASYNC Or SND_NODEFAULT sndplaysound strsound, wflags% add the code below to THE FORM you want the sound on make sure your sound file (.wav) is in the same folder as your as project and form Private Sub Command1_Click() PlaySound App.Path & "\FileName.wav" STOP SOUND from Mr. Maki retval& = sndplaysound(vbnullstring, 0) Insert were an action takes place and sound needs to be ended

6 TO CLEAR ALL LABELS IN A FORM, YOU CAN USE THIS CODE 'sets all label.caption properties to "" Dim lbl As Control For Each lbl In frmwhatever If TypeOf lbl Is Label Then lbl.caption = "" Next TO CLEAR ALL TEXTBOXES IN A FORM, YOU CAN USE THIS CODE Dim txt As Control 'sets all textbox.text properties to "" For Each txt In frmwhatever If TypeOf txt Is TextBox Then txt.text = "" Next

Universitas Sumatera Utara

Universitas Sumatera Utara 43 L A M P I R A N 44 Penulisan Kode Program Aplikasi Game Tetris A. Kode program aplikasi game tetris untuk form1 ( MainF.frm ) adalah sebagai berikut. Dim BANK As Database Dim RS As DAO.Recordset Private

More information

Human Factors Engineering Short Course Topic: A Simple Numeric Entry Keypad

Human Factors Engineering Short Course Topic: A Simple Numeric Entry Keypad Human Factors Engineering Short Course 2016 Creating User Interface Prototypes with Microsoft Visual Basic for Applications 3:55 pm 4:55 pm, Wednesday, July 27, 2016 Topic: A Simple Numeric Entry Keypad

More information

Project : Version : Date : 11/04/2016 Author : Freeware, for evaluation and non-commercial use only Company : Comments:

Project : Version : Date : 11/04/2016 Author : Freeware, for evaluation and non-commercial use only Company : Comments: Lampiran 1 Listing program dari seluruh sistem. /***************************************************** This program was produced by the CodeWizardAVR V2.04.9 Evaluation Automatic Program Generator Copyright

More information

Function: function procedures and sub procedures share the same characteristics, with

Function: function procedures and sub procedures share the same characteristics, with Function: function procedures and sub procedures share the same characteristics, with one important difference- function procedures return a value (e.g., give a value back) to the caller, whereas sub procedures

More information

Visual Basic 6 Lecture 7. The List Box:

Visual Basic 6 Lecture 7. The List Box: The List Box: The function of the List Box is to present a list of items where the user can click and select the items from the list or we can use the List Box control as a simple memory to save data.

More information

Start Visual Basic. Session 1. The User Interface Form (I/II) The Visual Basic Programming Environment. The Tool Box (I/II)

Start Visual Basic. Session 1. The User Interface Form (I/II) The Visual Basic Programming Environment. The Tool Box (I/II) Session 1 Start Visual Basic Use the Visual Basic programming environment Understand Essential Visual Basic menu commands and programming procedure Change Property setting Use Online Help and Exit Visual

More information

Angel International School - Manipay 1 st Term Examination November, 2015

Angel International School - Manipay 1 st Term Examination November, 2015 Grade 10 Angel International School - Manipay 1 st Term Examination November, 2015 Information & Communication Technology Duration: 3.00 Hours Part 1 Choose the appropriate answer 1) Find the correct type

More information

Programming with visual Basic:

Programming with visual Basic: Programming with visual Basic: 1-Introdution to Visual Basics 2-Forms and Control tools. 3-Project explorer, properties and events. 4-make project, save it and its applications. 5- Files projects and exercises.

More information

Angel International School - Manipay 1 st Term Examination November, 2015

Angel International School - Manipay 1 st Term Examination November, 2015 Angel International School - Manipay 1 st Term Examination November, 2015 Information & Communication Technology Grade 11A & C Duration: 3.00 Hours Part 1 Choose the most appropriate answer. 1) Find the

More information

The Control Properties

The Control Properties The Control Properties Figure Before writing an event procedure for the control to response to a user's input, you have to set certain properties for the control to determine its appearance and how it

More information

NATIONAL DIPLOMA IN COMPUTER TECHNOLOGY

NATIONAL DIPLOMA IN COMPUTER TECHNOLOGY UNESCO-NIGERIA TECHNICAL & VOCATIONAL EDUCATION REVITALISATION PROJECT-PHASE II NATIONAL DIPLOMA IN COMPUTER TECHNOLOGY OOBASIC/VISUAL BASIC PROGRAMMING COURSE CODE: COM 211 YEAR I SEMESTER II PRACTICAL

More information

CMPT 110 MIDTERM OCTOBER 18, 2001

CMPT 110 MIDTERM OCTOBER 18, 2001 CMPT 110 MIDTERM OCTOBER 18, 2001 1 What will be displayed when the command button is clicked? 7% Level of difficulty 7 (out of 10) Assume there is a command button called cmdbutton Assume there is a picturebox

More information

Chapter 1. Block Diagram. Text .. 1

Chapter 1. Block Diagram. Text .. 1 Chapter 1 ก Visual Basic Scilab ก ก Visual Basic Scilab ก ก (Temporary File) ก ก ก ก ก ก Visual Basic ก (Interface) ก Scilab Text File ก Visual Basic ก ก ก ก Block Diagram ก ก Visual Basic ก Scilab ก.sce

More information

11-1 11-1.1 11-1.2 11-2 11-2.1 11-2.2 108 II 11-1 Timer 11-1.1 Windows 11-1 11-1 Visual Basic Animation Animation 11 109 Animation Animation RLE AVI AVI 11-2 Visual Basic Animation / Microsoft Windows

More information

Visual Basic. The Integrated Development Environment. Menu Bar

Visual Basic. The Integrated Development Environment. Menu Bar Visual Basic Visual Basic is initiated by using the Programs option > Microsoft Visual Basic 6.0 > Visual Basic 6.0. Clicking the Visual Basic icon, we can view a copyright screen enlisting the details

More information

PROGRAM 1: SIMPLE CALCULATOR

PROGRAM 1: SIMPLE CALCULATOR PROGRAM 1: SIMPLE CALCULATOR Option Explicit Dim operand1 As Double, operand2 As Double Dim op1 As Double, op2 As Double Dim operator As String Dim cleardisplay As Boolean Private Sub Cmdclear_Click()

More information

Lab 3 The High-Low Game

Lab 3 The High-Low Game Lab 3 The High-Low Game LAB GOALS To develop a simple windows-based game named High-Low using VB.Net. You will use: Buttons, Textboxes, Labels, Dim, integer, arithmetic operations, conditionals [if-then-else],

More information

CSE 1530: Introduction to Computer Use II - Programming. 1a. [4 points, one point each] Define/explain any four of the following terms.

CSE 1530: Introduction to Computer Use II - Programming. 1a. [4 points, one point each] Define/explain any four of the following terms. 1. Basic Knowledge 1a. [4 points, one point each] Define/explain any four of the following terms. Algorithm: A set of step-by-step instructions that when completed, solve a problem. Procedural programming:

More information

Upgrading Applications

Upgrading Applications C0561587x.fm Page 77 Thursday, November 15, 2001 2:37 PM Part II Upgrading Applications 5 Your First Upgrade 79 6 Common Tasks in Visual Basic.NET 101 7 Upgrading Wizard Ins and Outs 117 8 Errors, Warnings,

More information

IS 320 Spring 96 Page 1 Exam 1. Please use your own paper to answer the following questions. Point values are shown in parentheses.

IS 320 Spring 96 Page 1 Exam 1. Please use your own paper to answer the following questions. Point values are shown in parentheses. IS 320 Spring 96 Page 1 Please use your own paper to answer the following questions. Point values are shown in parentheses. 1. (10) Consider the following segment of code: If txtansicode.text < "0" Or

More information

Data Acquisition over Ethernet using Serial Device Server - NPort 5210 PRL-TN

Data Acquisition over Ethernet using Serial Device Server - NPort 5210 PRL-TN Data Acquisition over Ethernet using Serial Device Server - NPort 5210 PRL-TN-2010-96 Data Acquisition over Ethernet using Serial Device Server - NPort 5210 PRL-TN-2010-96 Introduction 1 Serial Device

More information

Using BasicX Block Data Objects with PlaySound

Using BasicX Block Data Objects with PlaySound Basic Express Application Note Using BasicX Block Data Objects with PlaySound Introduction The BasicX system library includes a procedure called PlaySound, which can be used to generate audio signals from

More information

Before We Begin. Introduction to Computer Use II. Overview (1): Winter 2006 (Section M) CSE 1530 Winter Bill Kapralos.

Before We Begin. Introduction to Computer Use II. Overview (1): Winter 2006 (Section M) CSE 1530 Winter Bill Kapralos. Winter 2006 (Section M) Topic E: Subprograms Functions and Procedures Wednesday, March 8 2006 CSE 1530, Winter 2006, Overview (1): Before We Begin Some administrative details Some questions to consider

More information

2Practicals Visual Basic 6.0

2Practicals Visual Basic 6.0 2Practicals Visual Basic 6.0 Practical 1: 1. Navigation of Visual Basic Integrated Development Environment The Visual Basic IDE is made up of a number of components Menu Bar Tool Bar Project Explorer Properties

More information

3. Can every Do-Loop loop be written as a For-Next loop? Why or why not? 4. Name two types of files that can be opened and used in a VB program.

3. Can every Do-Loop loop be written as a For-Next loop? Why or why not? 4. Name two types of files that can be opened and used in a VB program. CE 311 K Fall 005 Second Exam - Examples Answers at the bottom. 1. What are two categories of flow control structures?. Name three logical operators in Visual Basic (VB). 3. Can every Do-Loop loop be written

More information

Lab Sheet 4.doc. Visual Basic. Lab Sheet 4: Non Object-Oriented Programming Practice

Lab Sheet 4.doc. Visual Basic. Lab Sheet 4: Non Object-Oriented Programming Practice Visual Basic Lab Sheet 4: Non Object-Oriented Programming Practice This lab sheet builds on the basic programming you have done so far, bringing elements of file handling, data structuring and information

More information

In this tutorial we will create a simple calculator to Add/Subtract/Multiply and Divide two numbers and show a simple message box result.

In this tutorial we will create a simple calculator to Add/Subtract/Multiply and Divide two numbers and show a simple message box result. Simple Calculator In this tutorial we will create a simple calculator to Add/Subtract/Multiply and Divide two numbers and show a simple message box result. Let s get started First create a new Visual Basic

More information

ElseIf: Another Conditional Statement

ElseIf: Another Conditional Statement If This, Then What? If color = true Then If thecolor = blue Then lblsuess.caption = blue fish lblsuess.caption = red fish lblsuess.caption = thenumber & & fish Take out a piece of paper. Write your name

More information

Misc. Issues Table of Contents

Misc. Issues Table of Contents Misc. Issues Table of Contents Misc. Issues...1 Coding FAQ...2 Form/Control...2 When I create a form and I put, for example, a label control on it, how can I access to properties of this control?...2 SQL...2

More information

5.) In which direction will the statement picplayer.left -= 5 animate picplayer? A. to the right B. to the left C. up the screen D.

5.) In which direction will the statement picplayer.left -= 5 animate picplayer? A. to the right B. to the left C. up the screen D. Visual Basic Practic Final Exam Name: Period: Choose the best answer. 1.) Which concept has to do with strings such as "Mr." and "Minich"? A. Concatenation B. Boolean logic C. Collision Detection D. Boundary

More information

Universitas Sumatera Utara

Universitas Sumatera Utara Option Explicit DefLng A-Z '--------------------------------------------------------------------------------------------- #Const Test = False '---------------------------------------------------------------------------------------------

More information

MIS 216 SPRING 2018 PROJECT 4

MIS 216 SPRING 2018 PROJECT 4 MIS 216 SPRING 2018 PROJECT 4 Subs / Functions Arrays / Classes 1. Start a new project a. Create a folder on your desktop name it yourinitialsproject3 as in tnjproject3. b. FILE NEW PROJECT c. Change the

More information

Remote Web Server. Develop Locally. foldername. publish project files to

Remote Web Server. Develop Locally. foldername. publish project files to Create a Class and Instantiate an Object in a Two-Tier Tier Web App By Susan Miertschin For ITEC 4339 Enterprise Applications Development 9/20/2010 1 Development Model foldername Remote Web Server Develop

More information

Chapter 6 Sub Procedures

Chapter 6 Sub Procedures Sub Procedures A set of statements that perform a specific task. Divide a program into smaller, more manageable blocks of code. An event procedure is written for a specific object event, while a sub procedure

More information

C:\MasterPageWeb\HAPR\docu\HAPR_VB6_version15sept06.rtf 19/10/08. HARP_VB projet en VB6

C:\MasterPageWeb\HAPR\docu\HAPR_VB6_version15sept06.rtf 19/10/08. HARP_VB projet en VB6 HARP_VB projet en VB6 Option Explicit Dim Value As Integer Dim i As Integer Dim il As Long Dim LL, L1S, L250µS, L500µS, L1mS, L2mS, L5mS, L10mS As Single Dim offsetdepart As Long Dim police(256, 8) As

More information

PROJECT ELECTRONIC CONTROL GAS INJECTION SYSTEM

PROJECT ELECTRONIC CONTROL GAS INJECTION SYSTEM PROJECT ELECTRONIC CONTROL GAS INJECTION SYSTEM SOURCE CODE VISUAL BASIC Dim WR As Boolean Dim pw Dim data Dim oxg Public index1 Dim index2 Dim k Dim u Dim refd Dim datar1$(1000, 9) Dim c_data Dim A$(10)

More information

Mr.Khaled Anwar ( )

Mr.Khaled Anwar ( ) The Rnd() function generates random numbers. Every time Rnd() is executed, it returns a different random fraction (greater than or equal to 0 and less than 1). If you end execution and run the program

More information

OPTIS Labs Tutorials 2013

OPTIS Labs Tutorials 2013 OPTIS Labs Tutorials 2013 Table of Contents Virtual Human Vision Lab... 4 Doing Legibility and Visibility Analysis... 4 Automation... 13 Using Automation... 13 Creation of a VB script... 13 Creation of

More information

IS 320 A/B Winter 1998 Page 1 Exam 1

IS 320 A/B Winter 1998 Page 1 Exam 1 IS 320 A/B Winter 1998 Page 1 Use your own paper to answer the questions. You may do work on this document but transfer your answers to separate sheets of paper. Turn in this document as well as your answers

More information

Crystal Reports. Overview. Contents. Using Crystal Reports Print Engine calls (API) in Microsoft Visual Basic

Crystal Reports. Overview. Contents. Using Crystal Reports Print Engine calls (API) in Microsoft Visual Basic Using Crystal Reports Print Engine calls (API) in Microsoft Visual Basic Overview Contents This document describes how to preview a report using Microsoft (MS) Visual Basic, by making direct API calls

More information

Download the files from you will use these files to finish the following exercises.

Download the files from  you will use these files to finish the following exercises. Exercise 6 Download the files from http://www.peter-lo.com/teaching/x4-xt-cdp-0071-a/source6.zip, you will use these files to finish the following exercises. 1. This exercise will guide you how to create

More information

Revision for Final Examination (Second Semester) Grade 9

Revision for Final Examination (Second Semester) Grade 9 Revision for Final Examination (Second Semester) Grade 9 Name: Date: Part 1: Answer the questions given below based on your knowledge about Visual Basic 2008: Question 1 What is the benefit of using Visual

More information

Unit 4. Lesson 4.1. Managing Data. Data types. Introduction. Data type. Visual Basic 2008 Data types

Unit 4. Lesson 4.1. Managing Data. Data types. Introduction. Data type. Visual Basic 2008 Data types Managing Data Unit 4 Managing Data Introduction Lesson 4.1 Data types We come across many types of information and data in our daily life. For example, we need to handle data such as name, address, money,

More information

Functions and Procedures. Functions. Built In Functions. Built In Functions in VB FIT 100 FIT 100

Functions and Procedures. Functions. Built In Functions. Built In Functions in VB FIT 100 FIT 100 Functions Functions and Procedures Similarities: Little mini-programs that are named and include a series of code statements (instructions) to be executed when called. Differences: Functions have a specific

More information

LAMPIRAN FORM 1 Universitas Sumatera Universitas Utara

LAMPIRAN FORM 1 Universitas Sumatera Universitas Utara LAMPIRAN FORM 1 Private Sub Text2_KeyPress(KeyAscii As Integer) If KeyAscii = vbkeyreturn Then Set tbladministrator = New ADODB.Recordset With tbladministrator.open "SELECT * FROM Administrator WHERE userid

More information

IT3101 -Rapid Application Development Second Year- First Semester. Practical 01. Visual Basic.NET Environment.

IT3101 -Rapid Application Development Second Year- First Semester. Practical 01. Visual Basic.NET Environment. IT3101 -Rapid Application Development Second Year- First Semester Practical 01 Visual Basic.NET Environment. Main Area Menu bar Tool bar Run button Solution Explorer Toolbox Properties Window Q1) Creating

More information

Beispiel Joystick. Code frm_joytest

Beispiel Joystick. Code frm_joytest Beispiel Joystick Code frm_joytest Option Explicit Private j_id, j_error, j_cbjc As Long Private j_caps As JOYCAPS Private j_info As JOYINFO Private j_infoex As JOYINFOEX Private j_run As Boolean Private

More information

Department of Computer and Mathematical Sciences. Lab 7: Selection

Department of Computer and Mathematical Sciences. Lab 7: Selection Unit 2: Visual Basic.NET, pages 1 of 11 Department of Computer and Mathematical Sciences CS 1408 Intro to Computer Science with Visual Basic.NET 7 Lab 7: Selection Objectives: The main objective of this

More information

PROGRAMMING TECHNIQUES

PROGRAMMING TECHNIQUES Subclassing? Class modules aren t just for business rules. by Karl E. Peterson f all the innovations Visual Basic 4.0 introduced, the most revolutionary is probably the new Class module. By now, you ve

More information

Service & Support. How do you create a weekly timer with WinCC flexible? WinCC flexible 2008 SP2. FAQ October Answers for industry.

Service & Support. How do you create a weekly timer with WinCC flexible? WinCC flexible 2008 SP2. FAQ October Answers for industry. Cover sheet www.infoplc.net How do you create a weekly timer with WinCC flexible? WinCC flexible 2008 SP2 FAQ October 2011 Service & Support Answers for industry. Question This entry originates from the

More information

VISUAL BASIC II CC111 INTRODUCTION TO COMPUTERS

VISUAL BASIC II CC111 INTRODUCTION TO COMPUTERS VISUAL BASIC II CC111 INTRODUCTION TO COMPUTERS Intended Learning Objectives Able to build a simple Visual Basic Application. 2 The Sub Statement Private Sub ControlName_eventName(ByVal sender As System.Object,

More information

The following are required to duplicate the process outlined in this document.

The following are required to duplicate the process outlined in this document. Technical Note ClientAce WPF Project Example 1. Introduction Traditional Windows forms are being replaced by Windows Presentation Foundation 1 (WPF) forms. WPF forms are fundamentally different and designed

More information

VB FUNCTIONS AND OPERATORS

VB FUNCTIONS AND OPERATORS VB FUNCTIONS AND OPERATORS In der to compute inputs from users and generate results, we need to use various mathematical operats. In Visual Basic, other than the addition (+) and subtraction (-), the symbols

More information

Objectives. After completing this topic, the students will: Understand of the concept of polymorphism Know on How to implement 2 types of polymorphism

Objectives. After completing this topic, the students will: Understand of the concept of polymorphism Know on How to implement 2 types of polymorphism Polymorphism Objectives After completing this topic, the students will: Understand of the concept of polymorphism Know on How to implement 2 types of polymorphism Definition Polymorphism provides the ability

More information

Fundamentals of Computer Science Laboratory 2 Sequential programs

Fundamentals of Computer Science Laboratory 2 Sequential programs Fundamentals of Computer Science 2010-2011 Laboratory 2 Sequential programs Objetivos: VB Controls: command button (cmd), form (frm, label (lbl), text box (txt) and picture box (pct) VB controls properties:

More information

Visual Basic Course Pack

Visual Basic Course Pack Santa Monica College Computer Science 3 Visual Basic Course Pack Introduction VB.NET, short for Visual Basic.NET is a language that was first introduced by Microsoft in 1987. It has gone through many changes

More information

20. VB Programming Fundamentals Variables and Procedures

20. VB Programming Fundamentals Variables and Procedures 20. VB Programming Fundamentals Variables and Procedures 20.1 Variables and Constants VB, like other programming languages, uses variables for storing values. Variables have a name and a data type. Array

More information

CSC 112 :: Test #2 Study Guide with Answers April 25, 2012 Short Answer Questions

CSC 112 :: Test #2 Study Guide with Answers April 25, 2012 Short Answer Questions CSC 112 :: Test #2 Study Guide with Answers April 25, 2012 Short Answer Questions (1-6) Regarding the code for Lab #7: Private Const NUMLABELS As Integer = 5 Private lblelement(numlabels) As Label ' Array

More information

UNIT 1 INTRODUCTION TO VISUAL BASICS 6.0

UNIT 1 INTRODUCTION TO VISUAL BASICS 6.0 UNIT 1 INTRODUCTION TO VISUAL BASICS 6.0 The VB6 IDE (Integrated Development Environment) is a very simple and fully featured IDE. If you start out programming in VB6 you may end up being too spoiled to

More information

Repetition Structures

Repetition Structures Repetition Structures There are three main structures used in programming: sequential, decision and repetition structures. Sequential structures follow one line of code after another. Decision structures

More information

Please answer questions in the space provided. Question point values are shown in parentheses.

Please answer questions in the space provided. Question point values are shown in parentheses. IS 320 Spring 99 Page 1 Please answer questions in the space provided. Question point values are shown in parentheses. 1. (15) Assume you have the following variable declarations and assignments: Dim A

More information

1. We insert elements inside (CompoBox) tool through Items property ( ) 2. ComboBox tool use to choose just one item from the list ( )

1. We insert elements inside (CompoBox) tool through Items property ( ) 2. ComboBox tool use to choose just one item from the list ( ) st Q: Put ( ) or ( ) for the following sentence:. We insert elements inside (CompoBox) tool through Items property ( ) 2. ComboBox tool use to choose just one item from the list ( ) 3. VB.Net allows adding

More information

Iteration -- Once Is Not Enough

Iteration -- Once Is Not Enough Iteration -- Once Is Not Enough ),7 Congratulations! The Day Find project is done! -- Reflect This is a significant accomplishment Understand a fundamental algorithm -- binary search Know how to search

More information

GUI Design and Event- Driven Programming

GUI Design and Event- Driven Programming 4349Book.fm Page 1 Friday, December 16, 2005 1:33 AM Part 1 GUI Design and Event- Driven Programming This Section: Chapter 1: Getting Started with Visual Basic 2005 Chapter 2: Visual Basic: The Language

More information

Contents Introduction Getting Started Visual Basic Form Configuration Entering the VB Code

Contents Introduction Getting Started Visual Basic Form Configuration Entering the VB Code Your comments and suggestions on the operation of this software are welcome. Please address them to: ICONICS 100 Foxborough Blvd. Foxborough, MA 02035 Tel: 508-543-8600 Fax: 508-543-1503 E-mail: support@iconics.com

More information

A Complete Tutorial for Beginners LIEW VOON KIONG

A Complete Tutorial for Beginners LIEW VOON KIONG I A Complete Tutorial for Beginners LIEW VOON KIONG Disclaimer II Visual Basic 2008 Made Easy- A complete tutorial for beginners is an independent publication and is not affiliated with, nor has it been

More information

( ) 1.,, Visual Basic,

( ) 1.,, Visual Basic, ( ) 1. Visual Basic 1 : ( 2012/2013) :. - : 4 : 12-14 10-12 2 http://www.institutzamatematika.com/index.ph p/kompjuterski_praktikum_2 3 2 / ( ) 4 90% 90% 10% 90%! 5 ? 6 "? : 7 # $? - ( 1= on 0= off ) -

More information

In this lecture we will briefly examine a few new controls, introduce the concept of scope, random numbers, and drawing simple graphics.

In this lecture we will briefly examine a few new controls, introduce the concept of scope, random numbers, and drawing simple graphics. Additional Controls, Scope, Random Numbers, and Graphics CS109 In this lecture we will briefly examine a few new controls, introduce the concept of scope, random numbers, and drawing simple graphics. Combo

More information

Add the backgrounds. Add the font.

Add the backgrounds. Add the font. To find all sprites, font, and backgrounds look in your resources folder under card game. Pick sprites for the following: The Mouse Desired Objects A disappearing animation for the desired objects Clutter

More information

Visual Basic

Visual Basic 12-1 12-2 12-3 12-1.1 12-1.2 12-2.1 12-2.2 12-3.1 12-3.2 12-4 12-5 12-4.1 12-4.2 12-5.1 12-5.2 140 II 12-1 data file 12-1.1 record field 4 12-1 4 12 141 12-1... 12-1.2 sequential file random file binary

More information

Chapter 13. Graphics, Animation, Sound, and Drag-and-Drop. McGraw-Hill. Copyright 2011 by The McGraw-Hill Companies, Inc. All Rights Reserved.

Chapter 13. Graphics, Animation, Sound, and Drag-and-Drop. McGraw-Hill. Copyright 2011 by The McGraw-Hill Companies, Inc. All Rights Reserved. Chapter 13 Graphics, Animation, Sound, and Drag-and-Drop McGraw-Hill Copyright 2011 by The McGraw-Hill Companies, Inc. All Rights Reserved. Objectives (1 of 2) Use Graphics methods to draw shapes, lines,

More information

Write the code for the click event for the Move>> button that emulates the behavior described above. Assume you already have the following code:

Write the code for the click event for the Move>> button that emulates the behavior described above. Assume you already have the following code: IS 320 Spring 2000 page 1 1. (13) The figures below show two list boxes before and after the user has clicked on the Move>> button. Notice that the selected items have been moved to the new list in the

More information

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Label1.Text = Label1.

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Label1.Text = Label1. 練習問題 1-1 Label1 Label1.Text = Label1.Text + 2 練習問題 1-2 Button2 Label1 Label1.Text = Label1.Text+ 2 Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click

More information

Bulk Transfers Using Visual Basic 6.0

Bulk Transfers Using Visual Basic 6.0 Revision 0.BMay 11, 2001 Introduction This document describes Bulk_XferVB, a small Windows application that uses Bulk Transfers to move data in and out of EZ-USB / EZ-USB FX devices using the EZ-USB General

More information

VISUAL BASIC SERVER INTERFACE CODE. Visual Basic 6 Graphical Interface 103. Visual Basic Module rtsscomm.bas Code.115

VISUAL BASIC SERVER INTERFACE CODE. Visual Basic 6 Graphical Interface 103. Visual Basic Module rtsscomm.bas Code.115 APPENDIX E VISUAL BASIC SERVER INTERFACE CODE Page E.1: E.2: E.3: E.4: E.5: Visual Basic 6 Graphical Interface 103 Visual Basic Form gyrofront.frm Code.....104 Visual Basic Module mydatatypes.bas Code..114

More information

Text box. Command button. 1. Click the tool for the control you choose to draw in this case, the text box.

Text box. Command button. 1. Click the tool for the control you choose to draw in this case, the text box. Visual Basic Concepts Hello, Visual Basic See Also There are three main steps to creating an application in Visual Basic: 1. Create the interface. 2. Set properties. 3. Write code. To see how this is done,

More information

Language Fundamentals

Language Fundamentals Language Fundamentals VBA Concepts Sept. 2013 CEE 3804 Faculty Language Fundamentals 1. Statements 2. Data Types 3. Variables and Constants 4. Functions 5. Subroutines Data Types 1. Numeric Integer Long

More information

Type Storage Range of Values

Type Storage Range of Values University of Misan College of Engineering Department of Civil Engineering Course Title: Visual Basic Second Stage Fourth Lecture Visual Basic Data There are many types of data that we come across in our

More information

COPYRIGHTED MATERIAL. Visual Basic: The Language. Part 1

COPYRIGHTED MATERIAL. Visual Basic: The Language. Part 1 Part 1 Visual Basic: The Language Chapter 1: Getting Started with Visual Basic 2010 Chapter 2: Handling Data Chapter 3: Visual Basic Programming Essentials COPYRIGHTED MATERIAL Chapter 1 Getting Started

More information

VBA and the Internet

VBA and the Internet Presented by Jerry Winters Of VB CAD On December 4, 2002 Autodesk University 2002 Las Vegas, NV 1 The Internet What is it? Not technically, but functionally. What do you use it for? Communication? Research?

More information

Unit 7. Lesson 7.1. Loop. For Next Statements. Introduction. Loop

Unit 7. Lesson 7.1. Loop. For Next Statements. Introduction. Loop Loop Unit 7 Loop Introduction So far we have seen that each instruction is executed once and once only. Some time we may require that a group of instructions be executed repeatedly, until some logical

More information

You can call the project anything you like I will be calling this one project slide show.

You can call the project anything you like I will be calling this one project slide show. C# Tutorial Load all images from a folder Slide Show In this tutorial we will see how to create a C# slide show where you load everything from a single folder and view them through a timer. This exercise

More information

IS 320 A/B Spring 97 Page 1 Exam 1

IS 320 A/B Spring 97 Page 1 Exam 1 IS 320 A/B Spring 97 Page 1 Please use the paper supplied by the instructor to answer the questions. Question point values are shown in parentheses. 1. (18) What output is generated by the three MsgBox

More information

Cruising Sacramento/ A PowerPoint Slide Show (Project #8)

Cruising Sacramento/ A PowerPoint Slide Show (Project #8) Cruising Sacramento/ A PowerPoint Slide Show (Project #8) Start PowerPoint: Microsoft Office PowerPoint 2007 PowerPoint should open as a presentation. If not Click the Office button and select New.. Select

More information

Lecture 4 DLLs and Custom Hardware Programming

Lecture 4 DLLs and Custom Hardware Programming Lecture 4 DLLs and Custom Hardware Programming Dynamically Link Libraries (DLL) Generating EXE file involves: (1) Compile source, which generates object/libraries files (.OBJ,.LIB), and (2) Linking object

More information

ต วอย างการสร างฟอร ม เมน การใช งาน

ต วอย างการสร างฟอร ม เมน การใช งาน ต วอย างการสร างฟอร ม เมน การใช งาน Option Explicit Dim conn As New ADODB.Connection Dim rs As New ADODB.Recordset Dim Sql As String Private Sub Command6_Click() Form2.Hide Form3.Show Private Sub Command7_Click()

More information

maxbox Starter 14 Start with Asynchronous Programming 1.1 Set a Sound

maxbox Starter 14 Start with Asynchronous Programming 1.1 Set a Sound maxbox Starter 14 Start with Asynchronous Programming 1.1 Set a Sound Today we spend another small time in programming with asynchronous programming. We will concentrate on creating an API call of a DLL

More information

An InputBox( ) function will display an input Box window where the user can enter a value or a text. The format is

An InputBox( ) function will display an input Box window where the user can enter a value or a text. The format is InputBox( ) Function An InputBox( ) function will display an input Box window where the user can enter a value or a text. The format is A = InputBox ( Question or Phrase, Window Title, ) Example1: Integer:

More information

Creating Java Programs with Greenfoot

Creating Java Programs with Greenfoot Creating Java Programs with Greenfoot Using Loops, Variables, and Strings 1 Copyright 2012, Oracle and/or its affiliates. All rights Overview This lesson covers the following topics: Create a while loop

More information

Respond to Data Entry Events

Respond to Data Entry Events Respond to Data Entry Events Callahan Chapter 4 Understanding Form and Control Events Developer s Goal make data entry easy, fast, complete, accurate Many form- and control-level events occur as user works

More information

The ActiveX Interface of Facon Communication Server

The ActiveX Interface of Facon Communication Server The ActiveX Interface of Facon Communication Server (Doc.V1.0 05/13/2003) Methods OpenProject SaveProject Connect Disconnect AddGroup EditGroup DeleteGroup AddItem DeleteItem GetItem SetItem Description

More information

Using PowerPoint to Create an Interactive Multimedia Portfolio Ben Johnson

Using PowerPoint to Create an Interactive Multimedia Portfolio Ben Johnson Using PowerPoint to Create an Interactive Multimedia Portfolio Ben Johnson www.psd.k12.co.us/staff/benj Getting Started 1. Launch PowerPoint from the start button. Select the Design Template radio button.

More information

Running a Calculation Script using a MaxL Script

Running a Calculation Script using a MaxL Script Well, now that you know how to code a basic Essbase Command Script, we will describe the various methods for executing it. They are as follows: Chapter 5 1. EssCmd Drag and Drop: Your client software should

More information

بسن اهلل الزمحن الزحين اكواد الفيجوال بيسك تأليف : أمحد صادق

بسن اهلل الزمحن الزحين اكواد الفيجوال بيسك تأليف : أمحد صادق بسن اهلل الزمحن الزحين اكواد الفيجوال بيسك تأليف : أمحد صادق مقذمح : يضم هذا انكرية انصغيز اكثز اكىاد انثيسك اهميح تانىسثح نهمثرذئيه وانهغاخ انثسيطح انر قذ يصعة انحصىل عهيها نرشرد مىضىعاذها وقذ قمد تجمعها

More information

Control Properties. Example: Program to change background color

Control Properties. Example: Program to change background color Control Properties Before writing an event procedure for the control to response to an event, you have to set certain properties for the control to determine its appearance and how will it work with the

More information

Visual Basic.NET. 1. Which language is not a true object-oriented programming language?

Visual Basic.NET. 1. Which language is not a true object-oriented programming language? Visual Basic.NET Objective Type Questions 1. Which language is not a true object-oriented programming language? a.) VB.NET b.) VB 6 c.) C++ d.) Java Answer: b 2. A GUI: a.) uses buttons, menus, and icons.

More information

Honors Computer Science Python Mr. Clausen Program 7A, 7B

Honors Computer Science Python Mr. Clausen Program 7A, 7B Honors Computer Science Python Mr. Clausen Program 7A, 7B PROGRAM 7A Turtle Graphics Animation (100 points) Here is the overview of the program. Use functions to draw a minimum of two background scenes.

More information

22. VB Programming Fundamentals Data Access with Data Objects

22. VB Programming Fundamentals Data Access with Data Objects 22. VB Programming Fundamentals Data Access with Data Objects 22.1 Data Access Object MS Data Access Object (DAO) enables you to use a programming language to access and manipulate data in local or remote

More information

AAXA Technologies P700 HD LED Pico Projector - Troubleshooting & Firmware Update Guide

AAXA Technologies P700 HD LED Pico Projector - Troubleshooting & Firmware Update Guide Troubleshooting: Image is blurred/picture not bright enough The Projector is not in focus Adjust the focus with the focus adjustment dial until the image comes into focus. Move the projector so that it

More information