Universitas Sumatera Utara

Size: px
Start display at page:

Download "Universitas Sumatera Utara"

Transcription

1 Option Explicit DefLng A-Z ' #Const Test = False ' Private Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (Destination As Any, Source As Any, ByVal Length As Long) Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wmsg As Long, ByVal wparam As Long, lparam As Any) As Long Private Const EM_GETFIRSTVISIBLELINE As Long = &HCE Private Const EM_LINESCROLL As Long = &HB6 Private Declare Sub GetObject Lib "gdi32" Alias "GetObjectA" (ByVal hobject As Long, ByVal ncount As Long, lpobject As Any) Private Type BITMAP bmtype As Long bmwidth As Long bmheight As Long bmwidthbytes As Long bmplanes As Integer bmbitspixel As Integer bmbits As Long End Type Private PicOrigProps As BITMAP Private PicStegoProps As BITMAP Private Picbyte As Byte Private AndMask As Byte Private OrMask As Byte Private i, j, k Private Pointer Private Increment Private Ascii Private BytCount As Long Private ModCount As Long Private PicByteCompare As Byte # ' Private CanQuit As Boolean Private SecretText As String Private DroppedFilename As String Private Const EdiMask As String = "(00000)" Private Const VertBar As String = " " Private Const FtBmp As String = "Bitmap Pictures (*.bmp)" & VertBar & "*.bmp" Private Const FtJpg As String = "JPEG Pictures (*.jpg, *.jpeg)" & VertBar & "*.jp*" Private Const FtRtf As String = "RTF Text files (*.rtf)" & VertBar & "*.rtf" Private Const FtTxt As String = "Text files (*.txt)" & VertBar & "*.txt" Private Const FtAll As String = "All files (*.*)" & VertBar & "*.*" Private Const NoSave As String = "You haven't saved the picture yet. " & vbcrlf & vbcrlf Private Declare Sub InitCommonControls Lib "comctl32" () Private Sub bthide_click() Dim TopLine As Long PicStego = PicOrig GetObject PicStego, Len(PicStegoProps), PicStegoProps With PicStegoProps If opbpb Then Increment = 1 BtHide.Enabled = False

2 Else 'OPBPB = FALSE/0 Increment =.bmbitspixel / 8 If.bmBitsPixel = 8 Then OrMask = 64 'this seems quite good, but anyway... MsgBox "Citra digital Penampung pesan adalah citra dengan format di luar yang ditentukan. Citra yang dihasilkan akan memiliki tampilan yang berbeda dengan aslinya dan mungkin hasilnya akan kurang memuaskan.", vbinformation Else 'NOT.BMBITSPIXEL... OrMask = 1 'use the lsb for minimum color shift AndMask = &HFF And Not OrMask If TextFits(Len(EdiMask & Format$(Len(rtfText), EdiMask) & rtftext), PicStegoProps) Then SecretText = Encrypt(EdiMask & Format$(Len(rtfText), EdiMask), txpw) & Encrypt(rtfText, txpw) Enabled = False Screen.MousePointer = vbhourglass 'save textbox top line TopLine = SendMessage(rtfText.hWnd, EM_GETFIRSTVISIBLELINE, 0, ByVal 0) 'save text box posn 'initialize pointer Pointer =.bmbits BytCount = 0 ModCount = 0 # ' 'hide text For i = 1 To Len(SecretText) 'scroll text for a visual feedback rtftext.selstart = i - 1 For j = 0 To 7 'get a byte from pic CopyMemory Picbyte, ByVal Pointer, 1 PicByteCompare = Picbyte # ' 'set/reset/leave bit Picbyte = (Picbyte And AndMask) Or IIf(Asc(Mid$(SecretText, i, 1)) And 2 ^ j, OrMask, 0) BytCount = BytCount + 1 ModCount = ModCount - (Picbyte <> PicByteCompare) # ' 'restore byte in pic CopyMemory ByVal Pointer, Picbyte, 1 'inrement pointer Pointer = Pointer + Increment Next j, i 'done - restore text box top line position SendMessage rtftext.hwnd, EM_LINESCROLL, 0, ByVal TopLine - SendMessage(rtfText.hWnd, EM_GETFIRSTVISIBLELINE, 0, ByVal 0) Screen.MousePointer = vbdefault MsgBox ModCount & " bytes of " & BytCount & " modified, total picsize is " &.bmheight *.bmwidth *.bmbitspixel / 8 & " Bytes" # ' btsave.enabled = True

3 Enabled = True PicStego.Refresh CanQuit = False Else 'NOT TEXTFITS(LEN(EDIMASK... btsave.enabled = False PicStego = LoadPicture(vbNullString) CanQuit = True End With 'PICSTEGOPROPS Private Sub btload_click() Const Cet As String = "Can't extract text." If CanQuit = False Then i = (MsgBox(NoSave & "Load a new picture anyway?", vbquestion Or vbyesno) = vbyes) Else 'NOT CANQUIT... i = True If i Then 'can load a new picture With cdlg If Len(DroppedFilename) Then 'file dropped.filename = DroppedFilename DroppedFilename = vbnullstring i = 0 Else 'LEN(Droppedfilename) = FALSE/0.Filename = vbnullstring.flags = cdlofnlongnames.filter = FtBmp & VertBar & FtJpg & VertBar & FtAll.FilterIndex = 1.ShowOpen i = Err If i = 0 Then btsave.enabled = False PicStego = LoadPicture(vbNullString) CanQuit = True PicOrig = LoadPicture(.Filename) i = Err If i Then MsgBox.Filename & vbcrlf & "is not a valid picture file.", vbcritical Else 'I = FALSE/0 GetObject PicOrig, Len(PicOrigProps), PicOrigProps rtftext = vbnullstring If PicOrigProps.bmBitsPixel < 8 Then BtHide.Enabled = False MsgBox "The Picture must have at least 8 Bits per Pixel.", vbcritical Else 'NOT PICORIGPROPS.BMBITSPIXEL... Enabled = False With PicOrigProps

4 BtHide.Enabled = True SecretText = vbnullstring If.bmBitsPixel = 8 Then OrMask = 64 Else 'NOT.BMBITSPIXEL... OrMask = 1 AndMask = &HFF And Not OrMask If opbpb Then Increment = 1 Else 'OPBPB = FALSE/0 Increment =.bmbitspixel / 8 Pointer =.bmbits For i = 1 To Len(EdiMask) * 2 'get marker and length Ascii = 0 For j = 0 To 7 CopyMemory Picbyte, ByVal Pointer, 1 If Picbyte And OrMask Then Ascii = Ascii Or 2 ^ j Pointer = Pointer + Increment Next j SecretText = SecretText & Chr$(Ascii) Next i SecretText = Decrypt(SecretText, txpw) If Left$(SecretText, Len(EdiMask)) = EdiMask Then 'found Marker - try to extract text SecretText = Mid$(SecretText, Len(EdiMask) + 2, Len(EdiMask) - 2) 'this should be the length If IsNumeric(SecretText) Then Screen.MousePointer = vbhourglass k = Val(SecretText) SecretText = vbnullstring For i = 1 To k Ascii = 0 For j = 0 To 7 CopyMemory Picbyte, ByVal Pointer, 1 If Picbyte And OrMask Then Ascii = Ascii Or 2 ^ j Pointer = Pointer + Increment Next j SecretText = SecretText & Chr$(Ascii) Next i rtftext = Decrypt(SecretText, txpw) rtftext.selstart = 0 Display "Text extracted.", vbblack, False Screen.MousePointer = vbdefault Else 'ISNUMERIC(SECRETTEXT) = FALSE/0 Display Cet, vbred, True Else 'NOT LEFT$(SECRETTEXT,... Display Cet, vbred, True End With 'PICORIGPROPS BtHide.Enabled = True Enabled = True

5 End With 'CDLG Private Sub btloadtext_click() With cdlg.filename = ModifyFilename(.Filename, "").Flags = cdlofnlongnames.filter = FtRtf & VertBar & FtTxt & VertBar & FtAll.FilterIndex = 1.ShowOpen i = Err If i = 0 Then rtftext = "" i = FreeFile Open.Filename For Input As i If.FilterIndex = 1 Then rtftext = Input(LOF(i) - 1, i) Else 'NOT.FILTERINDEX... rtftext.text = Input(LOF(i) - 1, i) Close i Display "Text loaded.", vbblack, False End With 'CDLG Private Sub btsave_click() With cdlg.filename = ModifyFilename(.Filename, "bmp").flags = cdlofnlongnames Or cdlofnoverwriteprompt.filter = FtBmp.FilterIndex = 1.ShowSave If Err = 0 Then SavePicture PicStego,.Filename CanQuit = True End With 'CDLG rtftext.text = " " txpw.text = " " BtHide.Enabled = False btload.enabled = False btsave.enabled = False Private Sub btsavetext_click() With cdlg.filename = ModifyFilename(.Filename, "").Flags = cdlofnlongnames Or cdlofnoverwriteprompt

6 .Filter = FtRtf & VertBar & FtTxt.FilterIndex = 1.ShowSave i = Err If i = 0 Then i = FreeFile ModifyFilename.Filename, IIf(.FilterIndex = 1, "rtf", "txt") Open.Filename For Output As i Print #i, IIf(.FilterIndex = 1, rtftext, rtftext.text) Close i End With 'CDLG Private Function CRC4(Text As String, Key As String) As String 'Found at PSC and modified to include keylength 'The version found at PSC would accept abc and abcabc for example as identical keys :-(( Dim X(0 To 255), Y(0 To 256) For i = 0 To 255 X(i) = i Next i i = 0 j = Len(Key) + 1 Do If j > Len(Key) Then j = 1 Y(i) = Len(Key) i = i + 1 Y(i) = Asc(Mid$(Key, j, 1)) j = j + 1 i = i + 1 Loop Until i > 255 j = 0 For i = 0 To 255 j = (j + X(i) + Y(i)) Mod 256 GoSub Swap Next i i = 0 j = 0 For k = 1 To Len(Text) i = (i + 1) Mod 256 j = (j + X(i)) Mod 256 GoSub Swap CRC4 = CRC4 & Chr$(Asc(Mid$(Text, k, 1)) Xor X((X(i) + (X(j) Mod 256)) Mod 256)) Next k Exit Function Swap: X(i) = X(i) Xor X(j) X(j) = X(j) Xor X(i) X(i) = X(i) Xor X(j) Return Private Function Decrypt(Text As String, Key As String) As String Decrypt = CRC4(Text, Key)

7 Private Sub Display(Text As String, Color As Long, Bold As Boolean) lbused.fontbold = Bold lbused.forecolor = Color lbused = Text Private Function Encrypt(Text As String, Key As String) As String Encrypt = CRC4(Text, Key) Private Sub Command1_Click() End Private Sub Form_Initialize() InitCommonControls Private Sub Form_Load() CanQuit = True DroppedFilename = Command$ If Len(DroppedFilename) Then DroppedFilename = Mid$(DroppedFilename, 2, Len(DroppedFilename) - 2) 'remove quotes at either end If InStr(DroppedFilename, """") = 0 Then If Len(Dir$(DroppedFilename)) Then 'user dropped a file onto the.exe icon btload_click Else 'NOT INSTR(DROPPEDFILENAME,... MsgBox "Please drop only one file.", vbcritical DroppedFilename = vbnullstring Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer) If CanQuit = False Then Cancel = (MsgBox(NoSave & "Quit anyway?", vbquestion Or vbyesno) = vbno) Private Function ModifyFilename(Filename As String, Filetype As String) As String 'Remove existing filetype if any and append new filetype if any i = InStrRev(Filename, ".") If i Then Filename = Left$(Filename, i - 1) ModifyFilename = Filename & IIf(Len(Filetype), "." & Filetype, vbnullstring) Private Sub opbpb_mouseup(button As Integer, Shift As Integer, X As Single, Y As Single) BtHide.Enabled = False Private Sub opbpp_mouseup(button As Integer, Shift As Integer, X As Single, Y As Single) Private Function TextFits(NumChars As Long, Props As BITMAP) As Boolean Dim Percent As Single With Props Percent = 6400 * NumChars * Increment /.bmheight /.bmwidth /.bmbitspixel End With 'PROPS If NumChars < And Percent <= 99.9 Then Display Format$(Percent, "0.0") & "% of available space used.", vbblack, False

8 TextFits = True Else 'NOT NUMCHARS... Display "Text too long / Picture too small.", vbred, True TextFits = False Private Sub txpw_change() btload.enabled = (Len(txPW) >= 2) Private Sub txpw_gotfocus() txpw_change Private Sub rtftext_change() lbtext = "Text " & Len(rtfText.Text) & " bytes + " & Len(rtfText) - Len(rtfText.Text) & " formatting" Private Sub rtftext_keydown(keycode As Integer, Shift As Integer) Display "Text modified.", vbblack, False ':) Ulli's VB Code Formatter V ( :18:33) = 528 Lines

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

frmconfiguremsde 1.0.0

frmconfiguremsde 1.0.0 frmconfiguremsde 1.0.0 00001 Option Explicit 00002 ' demo project showing how to create a custom MSDE install 00003 ' by Bryan Stafford of New Vision Software - newvision@mvps.org 00004 ' this demo is

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

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

Understanding the MsgBox command in Visual Basic

Understanding the MsgBox command in Visual Basic Understanding the MsgBox command in Visual Basic This VB2008 tutorial explains how to use the MsgBox function in Visual Basic. This also works for VBS MsgBox. The MsgBox function displays a message in

More information

Lookup Project. frmlookup (Name: object is a combo box, style 2); use 4 labels: 2 for phone, 2 for mail. MsgBox Function:

Lookup Project. frmlookup (Name: object is a combo box, style 2); use 4 labels: 2 for phone, 2 for mail. MsgBox Function: Lookup Project frmlookup (Name: object is a combo box, style 2); use 4 labels: 2 for phone, 2 for mail. MsgBox Function: Help About, in a Message Box lookup.vbp programmed by C.Gribble Page 2 Code for

More information

variables programming statements

variables programming statements 1 VB PROGRAMMERS GUIDE LESSON 1 File: VbGuideL1.doc Date Started: May 24, 2002 Last Update: Dec 27, 2002 ISBN: 0-9730824-9-6 Version: 0.0 INTRODUCTION TO VB PROGRAMMING VB stands for Visual Basic. Visual

More information

University of Technology Laser & Optoelectronics Engineering Department Visual basic Lab.

University of Technology Laser & Optoelectronics Engineering Department Visual basic Lab. DriveListBox Control, DirListBox Control, and FileListBox Control CommonDialog Control 1 2 DriveListBox Control disk drive Important Properties object.drive [= drive] Drive Floppy disks "a:" or "b:", and

More information

Information Hiding In Images Using Randomly Selected Points

Information Hiding In Images Using Randomly Selected Points Republic of Iraq Ministry Of Higher Education And Scientific Research University Of Baghdad College Of Science Department Of Computer Science Information Hiding In Images Using Randomly Selected Points

More information

End Sub. Sub Kunci() Dim i As Integer For i = 0 To 4 Txtfield(i).Locked = True Next i grddatagrid.enabled = False End Sub

End Sub. Sub Kunci() Dim i As Integer For i = 0 To 4 Txtfield(i).Locked = True Next i grddatagrid.enabled = False End Sub Source Aplikasi Sistem Informasi Akademik GENERAL Dim db As Connection Dim WithEvents adoprimaryrs1 As Recordset Dim WithEvents adoprimaryrs2 As Recordset Dim WithEvents rscaridata As Recordset Dim cekid

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

Programming Concepts and Skills. Arrays continued and Functions

Programming Concepts and Skills. Arrays continued and Functions Programming Concepts and Skills Arrays continued and Functions Fixed-Size vs. Dynamic Arrays A fixed-size array has a limited number of spots you can place information in. Dim strcdrack(0 to 2) As String

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

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

Visual Basic ,

Visual Basic , Visual Basic 6.0..!"# !"# $#%$$"& ( ( 6.0) 2 $, -&, - 1.,. Caption Hello, On O ff. * + +, -. 1-Arrow, + - 4 +, 2- Cross. - project1.vbp, 4-form1.frm. 2/59 !"# $#%$$"& ( ( 6.0) 3 $, -&, - 3/59 !"# $#%$$"&

More information

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

HELP - VB TIPS. ANIMATE AN IMAGE BOX Insert a module. In this module, create a global variable: Global x 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

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 , ,. Caption Hello, On Off. * + +, -. 1-Arrow, , 2- Cross. - project1.vbp, 4-form1.frm.

Visual Basic , ,. Caption Hello, On Off. * + +, -. 1-Arrow, , 2- Cross. - project1.vbp, 4-form1.frm. Visual Basic 6.0 1.,. Caption Hello, On Off. * + +, -. 1-Arrow, + - 4 +, 2- Cross. - project1.vbp, 4-form1.frm...!"# 2/59 3...

More information

IFA/QFN VBA Tutorial Notes prepared by Keith Wong

IFA/QFN VBA Tutorial Notes prepared by Keith Wong Chapter 2: Basic Visual Basic programming 2-1: What is Visual Basic IFA/QFN VBA Tutorial Notes prepared by Keith Wong BASIC is an acronym for Beginner's All-purpose Symbolic Instruction Code. It is a type

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

'... '... '... Module created: unknown '... Proj finished: March 21, 2012 '... '...

'... '... '... Module created: unknown '... Proj finished: March 21, 2012 '... '... ThisWorkbook - 1 If g_bdebugmode Then '... Module created: unknown '... Proj finished: March 21, 2012 '************************* CLASS-LEVEL DECLARATIONS ************************** Option Explicit Option

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

Visual Basic ,

Visual Basic , Visual Basic 6.0 1.,. Caption Hello, On O ff. * + +, -. 1-Arrow, + - 4 +, 2- Cross. - project1.vbp, 4-form1.frm...!"# 2/59 3...

More information

Quick Reference Guide

Quick Reference Guide SOFTWARE AND HARDWARE SOLUTIONS FOR THE EMBEDDED WORLD mikroelektronika Development tools - Books - Compilers Quick Reference Quick Reference Guide with EXAMPLES for Basic language This reference guide

More information

LAMPIRAN A : LISTING PROGRAM

LAMPIRAN A : LISTING PROGRAM LAMPIRAN A : LISTING PROGRAM 1. frmmenu.frm Dim CN As Connection Dim rshapus As Recordset Private Sub DfaHasil_Click() Call frmlap.cetak Private Sub Form_Load() Set CN = New ADODB.Connection CN.ConnectionString

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

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

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

More information

Reverse Engineering & Memory patching

Reverse Engineering & Memory patching Reverse Engineering & Memory patching Author Richard Davy Email rd@secureyour.it Sage Line 50 Version 2010 Fully updated and patched http://www.sage.co.uk/ Attack tools Softice, IDA Pro, Excel 2003 After

More information

Visual Programming 1. What is Visual Basic? 2. What are different Editions available in VB? 3. List the various features of VB

Visual Programming 1. What is Visual Basic? 2. What are different Editions available in VB? 3. List the various features of VB Visual Programming 1. What is Visual Basic? Visual Basic is a powerful application development toolkit developed by John Kemeny and Thomas Kurtz. It is a Microsoft Windows Programming language. Visual

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

The name of this type library is LabelManager2 with the TK Labeling Interface reference.

The name of this type library is LabelManager2 with the TK Labeling Interface reference. Page 1 of 10 What is an ActiveX object? ActiveX objects support the COM (Component Object Model) - Microsoft technology. An ActiveX component is an application or library that is able to create one or

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

LAMPIRAN LIST PROGRAM

LAMPIRAN LIST PROGRAM LAMPIRAN LIST PROGRAM 1. Modules Public conn As New ADODB.Connection Public rstb_pendekatan As ADODB.Recordset Public rstb_solusi As ADODB.Recordset Public rstb_alasan As ADODB.Recordset Public rstb_pilihan

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

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

VISUAL BASIC 6.0 OVERVIEW

VISUAL BASIC 6.0 OVERVIEW VISUAL BASIC 6.0 OVERVIEW GENERAL CONCEPTS Visual Basic is a visual programming language. You create forms and controls by drawing on the screen rather than by coding as in traditional languages. Visual

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

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

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

LISTING PROGRAM. Form Splash

LISTING PROGRAM. Form Splash LISTING PROGRAM Form Splash Private Sub Form_Load() lblversion.caption = "Version " & App.Major & "." & App.Minor & "." & App.Revision lblproductname.caption = App.Title lblcopyright.caption = App.LegalCopyright

More information

Tech-Talk Using the PATROL Agent COM Server August 1999 Authored By: Eric Anderson

Tech-Talk Using the PATROL Agent COM Server August 1999 Authored By: Eric Anderson Tech-Talk Using the PATROL Agent COM Server August 1999 Authored By: Eric Anderson Introduction Among the many new features of PATROL version 3.3, is support for Microsoft s Component Object Model (COM).

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

LAMPIRAN. Universitas Sumatera Utara

LAMPIRAN. Universitas Sumatera Utara 61 LAMPIRAN 61 Listing Program Form 1 ( Barang ) Dim CnSuzuya As ADODB.Connection Dim CommBar As ADODB.Command Dim rsbar As ADODB.Recordset Dim StrSql As String Dim psn As Byte Private Sub Form_Load()

More information

Excel & Visual Basic for Applications (VBA)

Excel & Visual Basic for Applications (VBA) Class meeting #18 Monday, Oct. 26 th GEEN 1300 Introduction to Engineering Computing Excel & Visual Basic for Applications (VBA) user interfaces o on-sheet buttons o InputBox and MsgBox functions o userforms

More information

LISTING PROGRAM. 1. Form Login. Private Sub BATAL_Click() End End Sub

LISTING PROGRAM. 1. Form Login. Private Sub BATAL_Click() End End Sub LISTING PROGRAM 1. Form Login Private Sub BATAL_Click() End Sub Bersih() USERNAME.Text = "" PASSWORD.Text = "" Private Sub Form_Load() Bersih Private Sub OK_Click() Sql = "select*from tbl_login where username='"

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

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

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

6/14/2010. VBA program units: Subroutines and Functions. Functions: Examples: Examples:

6/14/2010. VBA program units: Subroutines and Functions. Functions: Examples: Examples: VBA program units: Subroutines and Functions Subs: a chunk of VBA code that can be executed by running it from Excel, from the VBE, or by being called by another VBA subprogram can be created with the

More information

Introduction to Computer Use II

Introduction to Computer Use II Winter 2006 (Section M) Topic F: External Files and Databases Using Classes and Objects Friday, March 31 2006 CSE 1530, Winter 2006, Overview (1): Before We Begin Some administrative details Some questions

More information

DATABASE AUTOMATION USING VBA (ADVANCED MICROSOFT ACCESS, X405.6)

DATABASE AUTOMATION USING VBA (ADVANCED MICROSOFT ACCESS, X405.6) Technology & Information Management Instructor: Michael Kremer, Ph.D. Database Program: Microsoft Access Series DATABASE AUTOMATION USING VBA (ADVANCED MICROSOFT ACCESS, X405.6) AGENDA 3. Executing VBA

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

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

( ) 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

Balloon OCX by SkySof Software Inc. last updated: 10/26/05

Balloon OCX by SkySof Software Inc. last updated: 10/26/05 Balloon OCX by SkySof Software Inc. last updated: 10/26/05 Balloon OCX is an ActiveX Control for creating cool, customized tooltips for all of your Visual Basic controls. To add the Balloon OCX component

More information

'This library is to be used in the context of data management of IoT devices

'This library is to be used in the context of data management of IoT devices Annex A: Full Code '' 'Library created by Pol Sarmiento Lozano @TDdeviceAPI ' 'This library is to be used in the context of data management of IoT devices ' 'This library relates to the URL requests available

More information

CC Pilot XS. Video interface description

CC Pilot XS. Video interface description CC Pilot XS Video interface description Table of Contents Introduction... 3 Purpose... 3 References... 3 History... 3 Introdution... 4 Starting CCVideoXS... 4 Controlling CCVideoXS... 5 Windows messages...

More information

MICROSOFT EXCEL 2000 LEVEL 5 VBA PROGRAMMING INTRODUCTION

MICROSOFT EXCEL 2000 LEVEL 5 VBA PROGRAMMING INTRODUCTION MICROSOFT EXCEL 2000 LEVEL 5 VBA PROGRAMMING INTRODUCTION Lesson 1 - Recording Macros Excel 2000: Level 5 (VBA Programming) Student Edition LESSON 1 - RECORDING MACROS... 4 Working with Visual Basic Applications...

More information

Sub Programs. To Solve a Problem, First Make It Simpler

Sub Programs. To Solve a Problem, First Make It Simpler Sub Programs To Solve a Problem, First Make It Simpler Top Down Design Top Down Design Start with overall goal. Break Goal into Sub Goals Break Sub Goals into Sub Sub Goals Until the Sub-Sub Sub-Sub Sub-Sub

More information

Learn Visual Basic 6.0

Learn Visual Basic 6.0 6-1 Learn Visual Basic 60 6 Error-Handling, Debugging and File Input/Output Review and Preview In this class, we expand on our Visual Basic knowledge from past classes and examine a few new topics We first

More information

Chapter 2.4: Common facilities of procedural languages

Chapter 2.4: Common facilities of procedural languages Chapter 2.4: Common facilities of procedural languages 2.4 (a) Understand and use assignment statements. Assignment An assignment is an instruction in a program that places a value into a specified variable.

More information

softmc Servotronix Motion API Reference Manual Revision 1.0

softmc Servotronix Motion API Reference Manual Revision 1.0 Servotronix Motion API Reference Manual Revision 1.0 Revision History Document Revision Date 1.0 Nov. 2014 Initial release Copyright Notice Disclaimer Trademarks 2014 Servotronix Motion Control Ltd. All

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

4 Working with WSH objects

4 Working with WSH objects 4 Working with WSH objects In the preceding chapter I have discussed a few basics of script programming. We have also used a few objects, methods and properties. In this chapter I would like to extend

More information

Appendix E SLAMM Source Code

Appendix E SLAMM Source Code Appendix E SLAMM Source Code Attribute VB_Name = "CalcMainModule"... 2 Attribute VB_Name = "CalcPollutants"... 38 Attribute VB_Name = "Procedures"... 50 Attribute VB_Name = "CalcWetDetention"... 91 Attribute

More information

Computer Net Revision

Computer Net Revision First:In the following Form window, if it is required to store entries from the user in variables. Define the corresponding Data Type for each input. 1. 2. 3. 4. 1 2 3 4 1- Less number of bytes means more

More information

CS130/230 Lecture 12 Advanced Forms and Visual Basic for Applications

CS130/230 Lecture 12 Advanced Forms and Visual Basic for Applications CS130/230 Lecture 12 Advanced Forms and Visual Basic for Applications Friday, January 23, 2004 We are going to continue using the vending machine example to illustrate some more of Access properties. Advanced

More information

1) Identify the recording mode, by which you can record the non-standard object in QTP

1) Identify the recording mode, by which you can record the non-standard object in QTP 1) Identify the recording mode, by which you can record the non-standard object in QTP A) Standard recording B) Analog recording C) Low level recording D) None 2) By default, how many no of tables would

More information

Lab Manual Visual Basic 6.0

Lab Manual Visual Basic 6.0 Lab Manual Visual Basic 6.0 What is Visual Basic? VISUAL BASIC is a high level programming language evolved from the earlier DOS version called BASIC. BASIC means Beginners' All-purpose Symbolic Instruction

More information

Java Notes. 10th ICSE. Saravanan Ganesh

Java Notes. 10th ICSE. Saravanan Ganesh Java Notes 10th ICSE Saravanan Ganesh 13 Java Character Set Character set is a set of valid characters that a language can recognise A character represents any letter, digit or any other sign Java uses

More information

3 IN THIS CHAPTER. Understanding Program Variables

3 IN THIS CHAPTER. Understanding Program Variables Understanding Program Variables Your VBA procedures often need to store temporary values for use in statements and calculations that come later in the code. For example, you might want to store values

More information

Creating a Dynamo with VBA Scripts

Creating a Dynamo with VBA Scripts Creating a Dynamo with VBA Scripts Creating a Dynamo with VBA 1 Table of Contents 1. CREATING A DYNAMO WITH VBA... 3 1.1 NAMING CONVENTIONS FOR DYNAMO OBJECTS...3 1.2 CREATING A DYNAMO...4 1.3 DESIGNING

More information

NOTES: Procedures (module 15)

NOTES: Procedures (module 15) Computer Science 110 NAME: NOTES: Procedures (module 15) Introduction to Procedures When you use a top-down, structured program design, you take a problem, analyze it to determine what the outcome should

More information

On Railway Reservation. U G D C A Semester VI. Roll No DA

On Railway Reservation. U G D C A Semester VI. Roll No DA On Railway Reservation U G D C A Semester VI Submitted to: Dr. P. K. Sen (Co-ordinator) Submitted By: (Name of Student) Roll No. 14836DA Contents 1. Acknowledgement 2. Objectives 3. Declaration 4. Analysis

More information

'... '... '... Developer: William H. White (consultant) '... With: TEKsystems Inc. '... For: AIG. Financial Information Systems

'... '... '... Developer: William H. White (consultant) '... With: TEKsystems Inc.   '... For: AIG. Financial Information Systems ThisWorkbook - 1 Developer: William H. White (consultant) With: TEKsystems Inc. www.teksystems.com For: AIG Financial Information Systems 1 NY Plaza, 15th floor Current contact: william.white@aig.com (212)

More information

Updating Your Local Program Webpage

Updating Your Local Program Webpage I. Go to www.soor.org Updating Your Local Program Webpage II. III. IV. On the top right hand side of the home page of www.soor.org click on LPC LOGIN. Type in your Username and Password, then click the

More information

Sébastien Mathier wwwexcel-pratiquecom/en Variables : Variables make it possible to store all sorts of information Here's the first example : 'Display the value of the variable in a dialog box 'Declaring

More information

How to modify convert task to use variable value from source file in output file name

How to modify convert task to use variable value from source file in output file name Page 1 of 6 How to modify convert task to use variable value from source file in output file name The default SolidWorks convert task add-in does not have support for extracting variable values from 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

ENGG1811 Computing for Engineers Week 9 Dialogues and Forms Numerical Integration

ENGG1811 Computing for Engineers Week 9 Dialogues and Forms Numerical Integration ENGG1811 Computing for Engineers Week 9 Dialogues and Forms Numerical Integration ENGG1811 UNSW, CRICOS Provider No: 00098G W9 slide 1 References & Info Chapra (Part 2 of ENGG1811 Text) Topic 21 (chapter

More information

VISUAL BASIC PROGRAMMING (44) Technical Task KEY. Regional 2013 TOTAL POINTS (485)

VISUAL BASIC PROGRAMMING (44) Technical Task KEY. Regional 2013 TOTAL POINTS (485) 5 Pages VISUAL BASIC PROGRAMMING (44) Technical Task KEY Regional 2013 TOTAL POINTS (485) Graders: Please double-check and verify all scores! Property of Business Professionals of America. May be reproduced

More information

by NetMedia, Inc. All rights reserved. Basic Express, BasicX, BX-01, BX-24 and BX-35 are trademarks of NetMedia, Inc.

by NetMedia, Inc. All rights reserved. Basic Express, BasicX, BX-01, BX-24 and BX-35 are trademarks of NetMedia, Inc. Version 2.0 1998-2002 by NetMedia, Inc. All rights reserved. Basic Express, BasicX, BX-01, BX-24 and BX-35 are trademarks of NetMedia, Inc. Microsoft, Windows and Visual Basic are either registered trademarks

More information

MICROSOFT EXCEL VISUAL BASIC FOR APPLICATIONS INTERMEDIATE

MICROSOFT EXCEL VISUAL BASIC FOR APPLICATIONS INTERMEDIATE MICROSOFT EXCEL VISUAL BASIC FOR APPLICATIONS INTERMEDIATE NOTE Unless otherwise stated, screenshots of dialog boxes and screens in this book were taken using Excel 2003 running on Window XP Professional.

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

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

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

An overview about DroidBasic For Android

An overview about DroidBasic For Android An overview about DroidBasic For Android from February 25, 2013 Contents An overview about DroidBasic For Android...1 Object-Oriented...2 Event-Driven...2 DroidBasic Framework...2 The Integrated Development

More information

LISTING PROGRAM. 1. Menu Utama

LISTING PROGRAM. 1. Menu Utama LISTING PROGRAM 1. Menu Utama Dim rsupdate As Recordset Dim rscari As Recordset Dim strusername As String * 10 Dim Status As String * 1 Dim JumUser As Integer Public system_mon As String Public service_mon

More information

Technical Note #70. GE PMCS App Note 70 Page 1 of 9. Broadcast Time Syncronization Utility

Technical Note #70. GE PMCS App Note 70 Page 1 of 9. Broadcast Time Syncronization Utility GE PMCS App Note 70 Page 1 of 9 Technical Note #70 Broadcast Time Syncronization Utility Home Product Information Case Studies FAQs Download Area 'Virtual' Demo Glossary of Terms Links Contact Us Search

More information

S.2 Computer Literacy Question-Answer Book

S.2 Computer Literacy Question-Answer Book S.2 C.L. Half-yearly Examination (2012-13) 1 12-13 S.2 C.L. Question- Answer Book Hong Kong Taoist Association Tang Hin Memorial Secondary School 2012-2013 Half-yearly Examination S.2 Computer Literacy

More information

Las Vegas, Nevada, December 3 6, Kevin Vandecar. Speaker Name:

Las Vegas, Nevada, December 3 6, Kevin Vandecar. Speaker Name: Las Vegas, Nevada, December 3 6, 2002 Speaker Name: Kevin Vandecar Course Title: Introduction to Visual Basic Course ID: CP11-3 Session Overview: Introduction to Visual Basic programming is a beginning

More information

Instructor s Notes Programming Logic Printing Reports. Programming Logic. Printing Custom Reports

Instructor s Notes Programming Logic Printing Reports. Programming Logic. Printing Custom Reports Instructor s Programming Logic Printing Reports Programming Logic Quick Links & Text References Printing Custom Reports Printing Overview Page 575 Linking Printing Objects No book reference Creating a

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

Tutorial, Source code, Request Program Visual Basic

Tutorial, Source code, Request Program Visual Basic Tutorial, Source code, Request Program Visual Basic Oleh : Moh. A Azis Membuat Form Data Barang Program Persediaan Barang Form Data Barang digunakan untuk menyimpan data barang dan memberikan info mengenai

More information

Introduction to Microsoft Message Queuing Services (MSMQ)

Introduction to Microsoft Message Queuing Services (MSMQ) 3 Introduction to Microsoft Message Queuing Services (MSMQ) Distributed applications run on two or more computers. They communicate with one another by passing data over machine boundaries through appropriate

More information

Higher Computing Science Software Design and Development - Programming Summary Notes

Higher Computing Science Software Design and Development - Programming Summary Notes Higher Computing Science Software Design and Development - Programming Summary Notes Design notations A design notation is the method we use to write down our program design. Pseudocode is written using

More information

REFERENCE MATERIALS. Assignment, Display, and Input Evaluates expression and assigns the result to the variable a.

REFERENCE MATERIALS. Assignment, Display, and Input Evaluates expression and assigns the result to the variable a. a expression Assignment, Display, and Input Evaluates expression and assigns the result to the variable a. DISPLAY (expression) Displays the value of expression, followed by a space. INPUT () Accepts a

More information

MILWAUKEE AREA TECHNICAL COLLEGE ONLINE APPLICATION INSTRUCTIONS

MILWAUKEE AREA TECHNICAL COLLEGE ONLINE APPLICATION INSTRUCTIONS MILWAUKEE AREA TECHNICAL COLLEGE ONLINE APPLICATION INSTRUCTIONS Thank you for your interest in employment opportunities at Milwaukee Area Technical College. **Please note the following when submitting

More information

University of Technology Laser & Optoelectronics Engineering Department Visual basic Lab. List of items

University of Technology Laser & Optoelectronics Engineering Department Visual basic Lab. List of items List of items ListBox Control Properties List object.list(index) [= string] List1.List(0) List1.List(1) list ItemData list AddItem list NewIndex List1.AddItem "Judy Phelps" List1.ItemData(List1.NewIndex)

More information

Data Types Literals, Variables & Constants

Data Types Literals, Variables & Constants VISUAL BASIC Data Types Literals, Variables & Constants Copyright 2013 Dan McElroy Under the Hood As a DRIVER of an automobile, you may not need to know everything that happens under the hood, although

More information