📄 samples.txt
字号:
SAMPLES.TXT
Samples Notes for Microsoft (R) Visual Basic (R)
Professional Edition
Version 4.0
(C) Copyright Microsoft Corporation, 1995
========
Contents
========
Sample Description
------ -----------
1 MAPI (VBMAIL.MAK)
2 Multimedia MCI (MCITEST.MAK)
3 Outline (PHONE.MAK)
4 Picture Clip (REDTOP.MAK)
5 Data Access (VISDATA.MAK)
6 Communications (VBTERM.MAK, DIALER.MAK)
7 Data Outline (BROWSER.MAK)
8 OLE Automation (CLIENT.MAK, SOCCER.MAK, GRAVITY.MAK, GRAVTEST.MAK)
9 Add-ins (SPY.MAK, ALIGN.MAK)
10 Data Form Designer (DFD.MAK)
11 IconWorks (ICONWRKS.EXE, ICONWRKS.HLP)
12 Crystal Reports (CROCXSAM.MAK)
Note: Some of the sample applications use conditional compilation to make
calls to 16-bit and 32-bit APIs. If you are using the 16-bit version of Visual
Basic in a 32-bit operating environment, the sample applications will still
make calls to 16-bit APIs.
========================================
1: MAPI Sample Application (VBMAIL.MAK)
========================================
This sample program demonstrates the use of the MAPI controls by
sending and receiving electronic mail. It uses the messaging application
programming interface (MAPI) controls: MAPI messages and MAPI session.
Note: To run this sample, you need a MAPI-compliant messaging
system such as the one contained in Microsoft Windows for
Workgroups.
BACKGROUND:
The MAPI session control establishes a MAPI session and signs off
from a MAPI session. The MAPI messages control allows you to
perform a variety of messaging systems functions after a messaging
session has been established. These functions include accessing,
downloading, and sending messages, displaying the details and
address book dialog boxes, accessing data attachments, resolving
recipient names during addressing, and performing compose, reply,
reply-all, forward, and deleting actions on messages.
FILES:
MAILLST.FRM.......Form for displaying the list of mail messages.
MAILOPTF.FRM......Form for setting options.
MAILSUP.BAS.......Module of support procedures for the example.
MSGVIEW.FRM.......Form in which a viewed message is displayed.
NEWMSG.FRM........Form for creating a new message.
VBMAIL.FRM........The main form.
VBMAIL.MAK........The project file for this sample application.
TO RUN:
From the Visual Basic File menu, choose Open Project and
select the VBMAIL.MAK file, which is listed in the
\SAMPLES\MAPI subdirectory of the main Visual Basic directory.
Press F5 or choose Start from the Run menu to run the application.
===================================================
2: Multimedia MCI Sample Application (MCITEST.MAK)
===================================================
This sample program demonstrates the use of some of the device types
supported by the Media Control Interface (MCI). The three device
types used in this program are listed in the following table.
Device type Description
----------- -----------
CDAudio Plays audio discs from the CD-ROM drive.
Sequencer Plays MIDI sequencer sound files (*.MID).
WaveAudio Plays digitized waveform sound files (*.WAV).
HARDWARE REQUIREMENTS:
To access a CD-ROM drive or a sound card, the hardware,
along with any supporting device drivers, should be installed
and configured for the machine. The following table lists
the hardware required for the MCI device types used in this
program.
Device type Hardware
----------- --------
CDAudio CD-ROM drive.
Sequencer Sound card (for instance, Sound Blaster Pro (TM))
WaveAudio Sound card.
SOFTWARE REQUIREMENTS:
For the multimedia MCI control to work, MCI services must be present.
These services are provided in the Microsoft Windows operating system
version 3.1.
To access a specific MCI device type, the corresponding MCI device
driver must be installed. The following table lists the device
drivers required for the MCI device types used in this program.
Device type Device driver
----------- -------------
CDAudio MCICDA.DRV
Sequencer MCISEQ.DRV
WaveAudio MCIWAVE.DRV
The [mci] section of the SYSTEM.INI file contains a list of the
installed MCI device types. This is what your file would look
like if all three of the above device types were installed:
[mci]
CDAudio=mcicda.drv
WaveAudio=mciwave.drv
Sequencer=mciseq.drv
BACKGROUND:
The multimedia MCI control provides a high-level interface for using
multimedia devices. Using the property settings of a control, you
can determine the settings and the actions of a device.
The multimedia MCI control can also recognize what actions are
relevant for the current state of a device. For example, if you
click a "Pause" button while playing a movie, the "Play" button
is automatically re-enabled.
FILES:
ABOUTBOX.FRM.......Form for the About box.
ABOUTBOX.FRX.......The binary portion of the About box form.
CD.FRM.............The form for playing compact disc audio.
CD.FRX.............The binary portion of the compact disc form.
GLOBAL.BAS.........Public data types and declarations.
MCITEST.BAS........Public Sub and Function procedures.
MCITEST.FRM........The main form.
MCITEST.FRX........The binary portion of the main form.
MCITEST.MAK........The project file for this sample application.
MCITEST.MID........Sample MIDI sequencer file.
MCITEST.WAV........Sample waveform file.
OPENDLG.FRM........Form for holding the common dialog control.
WAVE.FRM...........Form for playing waveform and MIDI files.
TO RUN:
From the Visual Basic File menu, choose Open Project and
select the MCITEST.MAK file, which is listed in the
\SAMPLES\MCI subdirectory of the main Visual Basic directory.
Press F5 or choose Start from the Run menu to run the application.
==========================================
3: Outline Sample Application (PHONE.MAK)
==========================================
This sample program demonstrates the use of the Outline control
with an address book database application.
BACKGROUND:
The outline control allows users to graphically present hierarchically
structured data in a variety of different ways.
FILES:
PHONE.FRM.........The main form.
PHONE.FRX.........The binary portion of the main form.
PHONE.MAK.........The project file for the sample application.
PHONE.MDB.........Database file.
FIRSTTAB.BMP......Bitmap for the project.
LASTTAB.BMP.......Bitmap for the project.
MIDTAB.BMP........Bitmap for the project.
TO RUN:
From the Visual Basic File menu, choose Open Project and
select the PHONE.MAK file, which is listed in the
\SAMPLES\OUTLINE subdirectory of the main Visual Basic directory.
Press F5 or choose Start from the Run menu to run the application.
================================================
4: Picture Clip Sample Application (REDTOP.MAK)
================================================
This sample program demonstrates one of the many possible uses of
the picture clip control.
BACKGROUND:
This sample application uses the picture clip control to spin a top.
FILES:
INFOFORM.FRM......The information form.
INFOFORM.FRX......The binary portion of the information form.
REDTOP.FRM........The main form.
REDTOP.FRX........The binary portion of the main form.
REDTOP.MAK........The project file for the sample application.
TO RUN:
From the Visual Basic File menu, choose Open Project and
select the REDTOP.MAK file, which is listed in the
\SAMPLES\PICCLIP subdirectory of the main Visual Basic directory.
Press F5 or choose Start from the Run menu to run the application.
=========================
5: VisData (VISDATA.MAK)
=========================
This sample program demonstrates various programming techniques
used to access data through the Data Access Object (DAO) layer
built into the Visual Basic, Professional Edition.
Note: To access ODBC data sources with this sample you must
first install ODBC using the ODBC setup program provided
with Visual Basic, Professional Edition.
VisData behaves like a general purpose database utility
capable of the following functions:
1. Database and table creation.
2. Table modification (adding and deleting fields and indexes).
3. Data browsing/modifying using the three recordset types.
(table, dynaset, and snapshot) and three form types
(single record, data control, and data grid).
4. Property browsing on all objects.
5. Form demonstrating the new data-bound list and
data-bound combo box controls.
6. Import/export to all supported data types.
7. Direct SQL statement execution for any SQL supported
functions such as Insert, Update, Delete, Drop, Create,
Dump, and so forth.
8. AdHoc Query builder that helps users unfamiliar with SQL
create complex queries with Where clauses, Joins, Order
By, and Group By expressions while limiting output to
selected columns.
9. Transaction processing.
10. Copying table structures and data to same or different database.
11. Support of Jet MDB, Dbase III and IV, FoxPro 2.x, Paradox
3.x and 4.x, Btrieve, Text, Excel, and SQL Server both DDL and DML.
12. QueryDef creation, modification, and execution.
13. JET security creation/modification.
14. Relation/referential Integrity creation and modification.
15. Management of attached tables.
16. Use as an add-in to Visual Basic (see VISDATA.TXT).
The code contains comments to help explain the use of the various
methods in the data access layer. Code and forms may be copied from
this application to other applications with minimal modification.
FILES:
ABOUTBOX.FRM......Standard About box for the application.
ADDFIELD.FRM......Form to add fields to tables.
ADDINDEX.FRM......Form used to add indexes to Tables.
ADDUDP.FRM........Form to add user-defined properties.
ATTACH.FRM........Attached table list.
CPYSTRU.FRM.......Form to copy table structures.
DATAFORM.FRM......Data control form.
DATAGRID.FRM......Form used to display data in a data-bound grid control.
DATATYPE.FRM......Data type selector for import/export utility.
DCPROP.FRM........Data control property form.
DFD.FRM...........Data Form Designer add-in form.
DYNASNAP.FRM......Form to display data in single record mode.
ERRORS.FRM........Errors collection form.
EXPNAME.FRM.......Export name prompt.
FIND.FRM..........Form used to find records in a Dynaset.
GRPSUSRS.FRM......Jet security form.
IMPTBLS.FRM.......Import tables list.
JOIN.FRM..........Form used to add joins to the Query Builder.
LISTCBO.FRM.......DBList and DBCombo form.
LOGINFRM.FRM......Jet WorkSpace logon dialog box.
MUOPT.FRM.........Multiuser options dialog.
NEWATTCH.FRM......New attachment form.
NEWPW.FRM.........New password dialog.
NEWUG.FRM.........New User/Group dialog.
OPENDB.FRM........Form used to open an ODBC database.
PROPSHT.FRM.......Property browser.
QUERY.FRM.........Form used to build Queries.
RELATION.FRM......Jet Relations browser.
REPLACE.FRM.......Form to perform global replace operations on a Table.
SEEK.FRM..........Form used to get input for Seek function.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -