• 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. Peer reviewed

    information systems assignment 2

    4 star(s)

    Expert systems can be used for the following tasks within Rufus, * Predicting prices * Stock control * Purchasing * Promotions * Where to put certain products to get best result * Abnormal usage * Prevent Fraud An expert system is Able to store and manipulate knowledge so that they

  2. 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

  1. Computing Project

    Films Table (Design View) Loans Table (Deign View) Usernames and Passwords Table (Design View) 3. Details of SQL Used Overdue Loans Query SELECT [Loans Table].MemberID, [Loans Table].DVDId, [Films Table].FilmTitle, [Loans Table].DateBorrowed, [Loans Table].DateBack, [Loans Table].LoanID, [Loans Table].Price FROM [Members Table] INNER JOIN ([Films Table] INNER JOIN [Loans Table] ON [Films Table].DVDId = [Loans Table].DVDId)

  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 ...

    (Wikipedia, 2011) Depending on how precise our numbers are required to be and how many decimal points we need to go to, we can choose either a single precision type or double precision type, abbreviated to single and double respectively. A double point variable of course requires double the memory capacity as a single.

  2. Computers would not work the same without programs. The programs on computers were made ...

    There exists a relationship between the computer program and how a computer processes and stores data. The computer program carries a highly important job for the computer, which processes commands and gives a set of rules for the computer to follow.

  1. Computing Project

    14/03/2008 13:00:00 31321694 189 Alwark way, Nottingham, NT895TT Stephanie Jacob 20/03/2008 14:15:00 32668736 3A Leicester road, Nottingham,NT65JS Alex Wright 20/03/2008 16:45:00 35694784 78 Ratcliffe Road, Newcastle, NW156AS Neil Lawrence 21/03/2008 10:30:00 52854725 25 Ashby Square,Dundee, DN124AA Khris Johnson 20/03/2008 10:30:00 54587952 22 Aspire Street, Newcastle, NW1236GH Robert Taylor 14/03/2008 08:00:00

  2. Free essay

    What is Visual Programming

    NumericalUpDown * PictureBox * ProgressBar * Radiobutton * RichTextBox * Textbox * ToolTip * TreeView * WebBrowser * Flow LayoutPanel * Groupbox * Panel * Splitcontainer * Tabcontrol * Tablelayoutpanel * Contextmenustrip * Menustrip * Statusstrip * Toolstrip I obtained the functions for these programming languages from the following interfaces

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