• Join over 1.2 million students every month
  • Accelerate your learning by 29%
  • Unlimited access from just £6.99 per month
Page
  1. 1
    1
  2. 2
    2
  3. 3
    3
  4. 4
    4
  5. 5
    5
  6. 6
    6
  7. 7
    7
  8. 8
    8
  9. 9
    9
  10. 10
    10
  11. 11
    11
  12. 12
    12
  13. 13
    13
  14. 14
    14
  15. 15
    15
  16. 16
    16
  17. 17
    17
  18. 18
    18
  19. 19
    19
  20. 20
    20
  21. 21
    21

Investigating Visual Programs

Extracts from this document...

Introduction

BTEC Visual Programming Unit 32 Title: Investigating Visual Programs Task 1 As you investigate the programs, List and explain the differences you find as you work in the environments. Explain the benefits of working in a visual environment instead of a non-visual environment? P6 Visual Basic Visual Basic is probably the most popular and powerful of all. It has many advanced features which allow you to write great programs in a short time with a minimum of code and sometimes no code at all from your part if you're to use the application wizard. QBasic QBasic (a name derived from QuickBASIC, BASIC being an acronym for Beginner's All-purpose Symbolic Instruction Code) is a variant of the BASIC programming language. The source code is compiled to an intermediate form within the integrated development environment (IDE), and this intermediate form is immediately interpreted on demand within the IDE. QBasic and VB are really just sets of commands to tell the computer what to do. There are significant differences between QBasic and VB. The first and most obvious difference between Qbasic and Visual basic is that a Qbasic is a dos program whereas VB (Visual Basic) is a windows program. That means that while they both have successful communities of enthusiastic a programmer, Qbasic is old. And while it is perfectly good as a programming language, the operating system that it works and compiles in is getting less and less compatible with modern computers. So while the programs it makes might be intrinsically flawless, they are not useful. On the other hand since VB is a newer programming language, it can be used to make programs that can be distributed and possibly sold because the programs it makes are compatible with modern computers. Even programs that are not so good can be useful if made by VB. A second difference is in the way the programs are and can be made. ...read more.

Middle

ball.Width > Me.Width Then 'sets goright equals to false goright = False 'sets goleft equals to true goleft = True End If 'looks if the ball is at the left side of the form If ball.Left < Me.Width - Me.Width Then 'sets goright equals to true goright = True 'sets goleft equals to false goleft = False End If End Sub Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer) 'looks if the left key is down If KeyCode = vbKeyLeft Then 'makes the paddle go 120 twips to the left (twip is vb's opposite to pixel but its not same size its much smaller) paddle.Left = paddle.Left - 120 'looks if the right key is down ElseIf KeyCode = vbKeyRight Then 'makes the paddle go 120 twips to the right paddle.Left = paddle.Left + 120 End If End Sub Private Sub Form_Load() 'sets godown equals to true godown = True 'sets goup equals to false goup = False 'sets goleft equals to true goleft = True 'sets goright equals to false goright = False 'sets lifes equals to 5 lifes = 5 End Sub Private Sub moveball_Timer() 'if goright equals to true then... If goright = True Then 'make the ball go right ball.Left = ball.Left + 40 'if goright equals to false then... ElseIf goright = False Then 'do nothing End If 'if goleft equals to true then... If goleft = True Then 'make the ball go left ball.Left = ball.Left - 40 'if goleft equals to false then... ElseIf goleft = False Then 'do nothing End If 'if goup equals to true then... If goup = True Then 'make the ball go up ball.Top = ball.Top - 40 'if goup equals to false then... ElseIf goup = False Then 'do nothing End If 'if godown equals to true then... If godown = True Then 'make the ball go down ball.Top = ball.Top + 40 'if godown equals to false then... ...read more.

Conclusion

Each Module provides a distinct purpose. I have identified the Modules below. * CMD_Click( ) * SWAP ( ) * COMPARE() CMD_Click( ) : If CMD(Index).Caption <> "" Then 'To check that block is not empty If selected block is not in first row: If Index > 3 Then If CMD(Index - 4).Caption = "" Then To check that empty block is in first row or not Call SWAP(Index, -4) 'if Ok Swap Call COMPARE 'To check all number are arranged or not Exit Sub End If End If If selected block is not in last row: If Index < 12 Then If CMD(Index + 4).Caption = "" Then 'To check that empty block is in first row or not Call SWAP(Index, 4) 'if Ok Swap Call COMPARE 'To check all number are arranged or not Exit Sub End If End If If selected block is not in last column: < If (Index + 1) Mod 4 <> 0 Then If CMD(Index + 1).Caption = "" Then 'To check that adjacent right block is empty Call SWAP(Index, 1) 'if Ok Swap Call COMPARE 'To check all number are arranged or not Exit Sub End If End If If selected block is not in first column: If Index Mod 4 <> 0 Then If CMD(Index - 1).Caption = "" Then 'To check that adjacent left block is empty Call SWAP(Index, -1) 'if Ok Swap Call COMPARE 'To check all number are arranged or not Exit Sub End If End If End If SWAP ( ): Module to swap selected number with empty block: TEMP = CMD(A).Caption CMD(A).Caption = CMD(A + B).Caption CMD(A + B).Caption = TEMP COMPARE(): 'Module to check that all number are arranged in 'order or not if so, Show win Screen For x = 0 To 14 If CMD(x).Caption = x + 1 Then flag = flag + 1 ElseIf CMD(x).Caption <> x + 1 Then flag = 0 Exit Sub End If If flag = 14 Then Load frmwin frmwin.Show End If Next x ?? ?? ?? ?? G:\Unit 32 Visual Programming\Assignment1\investigating visual programs.doc\Manmeet Singh (Kaur) ...read more.

The above preview is unformatted text

This student written piece of work is one of many that can be found in our AS and A Level Computer Science section.

Found what you're looking for?

  • Start learning 29% faster today
  • 150,000+ documents available
  • Just £6.99 a month

Not the one? Search for your essay title...
  • Join over 1.2 million students every month
  • Accelerate your learning by 29%
  • Unlimited access from just £6.99 per month

See related essaysSee related essays

Related AS and A Level Computer Science essays

  1. Visual basic

    * Need for comments and naming conventions. Recommended Techniques to Minimize "Bugs" * Setting "Option Explicit" to force explicit declaration of variables * Commenting the code * Using the syntax checker * Using the recommended naming conventions * Setting a tight scope on the variables and procedures * Perform range

  2. Control Unit, Memory Unit, and Arithmetic Logic Unit. The CPU or Central Processing ...

    Notice that the question asked for three answers. The sensible response would seem to be to number them. The expected answers are the three single line responses. The contents of the brackets give extra information which would not be expected in this question. However, if the question had said 'Describe...'

  1. Computing Project

    This procedure displays the Rent Out A DVD Form procedure TFmMenu.BtnReturnDvdClick(Sender: TObject); This procedure displays the Return DVD Form procedure TFmMenu.BtnLoansOverdueClick(Sender: TObject); This procedure displays the Loans Overdue Form Register A Member Form procedure TFmRegAMem.BtnNewMemberClick(Sender: TObject); This procedure adds the details of a new member to the Members Table procedure

  2. Explain sequence, selection and iteration as used in computer programming; outline the benefits of ...

    Basic to help illustrate this: Example of a Selection Control Structure in Visual Basic 1. Dim Num(2) As Integer 2. Console.WriteLine("Hello user, welcome to the program.") 3. Console.WriteLine("Enter your first number: ") 4. Num(0) = Console.ReadLine() 5. Console.WriteLine("Enter your second number: ") 6. Num(1) = Console.ReadLine() 7. Num(2) = Num(0)

  1. Explain sequence, selection and iteration as used in computer programming; outline the benefits of ...

    Below is a table of these two floating point types with their ranges and size in bytes: Decimal Number Types Data Type Storage Size Range / Value Single 32 bits / 4 bytes -3.402823E38 to -1.401298E-45 for negative values; 1.401298E-45 to 3.402823E38 for positive values Double 64 bits / 8

  2. Smart Card System

    Producing the output is also an important factor in output designing. The output may be need produced in report, on the monitor screen, in audio format or video format. Each different output has their own different meaning in contributing information.

  1. With diagrams compare and contrast the relative advantages and disadvantages of digital transmission over ...

    These two clocks must be accurate enough to not have the frequency drift by more than 10% during the transmission of the remaining bits in the word. (This requirement was set in the days of mechanical teleprinters and this is easily met by modern electronic equipment.)

  2. Computing Project

    PROCEDURE AND VARIABLE LIST/ DESCRIPTIONS FOR PROGRAMS OR LIST OF PACKAGE ITEMS DEVELOPED Type of item Item Name Descriptions Table Student Details Holds all the details of the students that the instructor teaches, this includes first name, last name, address, phone number and the details of their next lesson that has been booked.

  • Over 160,000 pieces
    of student written work
  • Annotated by
    experienced teachers
  • Ideas and feedback to
    improve your own work