README.TXT Release Notes for Microsoft (R) Visual Basic (TM) Professional Edition Version 3.00 (C) Copyright Microsoft Corporation, 1993 This document contains release notes for Microsoft Visual Basic Professional Edition version 3.0 for Windows. Information in this document is more current than that in the manuals or online Help. ------------------------ How to Use This Document ------------------------ To view README.TXT on screen in Windows Notepad, maximize the Notepad window. To print README.TXT, open it in Windows Write, Microsoft Word, or another word processor. Then select the entire document and format the text in 10-point Courier before printing. ******************************************************************* Read Part 1 - Software Installation Information - before installing. ******************************************************************* ======== Contents ======== Part Description ---- ----------- 1 Software Installation Information 2 Notes and Tips 3 Notes for "Learning Microsoft Visual Basic" Tutorial 4 Notes for Microsoft Visual Basic Online Help 5 Notes for Microsoft Visual Basic "Programmer's Guide" 6 Notes for Microsoft Visual Basic "Language Reference" 7 Notes for Microsoft Visual Basic "Custom Control Reference" 8 Notes for Microsoft Visual Basic "Data Access Guide" ========================================= Part 1: Software Installation Information ========================================= To install Visual Basic, use the Program Manager or File Manager to start SETUP.EXE as you would any other Windows-based application. For example, if you are installing from drive A: - From the Program Manager File menu, choose Run. - In the Run dialog box, type A:SETUP and choose OK. Or - From the File Manager, double-click the SETUP.EXE file icon on drive A. ------------------------------------ File Sharing for OLE and Data Access ------------------------------------ You will need SHARE.EXE to enforce file and byte range locking if the following programs are running simultaneously: - Two Visual Basic applications that perform data access - Two instances of one Visual Basic application that performs data access - Microsoft Access and a Visual Basic application that performs data access If you are running Microsoft Windows 3.0 or Windows 3.1 (i.e. not Windows for Workgroups), you will need to change your AUTOEXEC.BAT as follows: SHARE /L:500 /F:5100 If the /L or the /F setting to SHARE has a larger value than listed here, leave the setting as it is rather than reducing it. Please make this change as soon as possible in your system. Note ---- If you ship .EXE files to users that use OLE or data access, they must add this setting to their AUTOEXEC.BAT file as well. ----------------------- Visual C++ and GRID.VBX ----------------------- If you plan to install Microsoft Visual C++(TM) Development System for Windows on your system, you may overwrite the grid control in your Windows \SYSTEM directory. Before installing Visual C++, make a backup of GRID.VBX. If you have already installed Visual C++, you can re-install GRID.VBX by running Setup again, choosing the Custom Installation button, and then selecting the Microsoft Visual Basic option. ----------------------------------------------------- Using Visual Basic 3.0 with SQL Server and Access 1.0 ----------------------------------------------------- If you choose to install the SQL Server ODBC driver, you will find the file INSTCAT.SQL in the \VB\ODBC directory. This is a stored procedure file that the SQL Server administrator must run on the server to prepare the server to accept Visual Basic as a client. However, this version of INSTCAT.SQL is incompatible with Microsoft Access 1.0. If you are also using Access 1.0 as a client for that SQL Server, you should use the INSTCAT.SQL that was included with Access 1.0. Visual Basic 3.0 will work correctly with INSTCAT.SQL from Access 1.0 except that it will be unable to delete indexes from tables. ---------------------- Setup and LZEXPAND.DLL ---------------------- Visual Basic's Setup program uses LZEXPAND to install ODBC. If you encounter a system error while Visual Basic is calculating free disk space, check for this file in your Windows \SYSTEM directory. If an older version of LZEXPAND.DLL exists along your path, remove the file and continue with Setup. ====================== Part 2: Notes and Tips ====================== ---------------------------------------------------- Data Access Compatibility - Visual Basic 2.0 and 3.0 ---------------------------------------------------- The new functionality of the Microsoft Access engine in Visual Basic 3.0 will affect the behavior of your VB 2.0 code. Visual Basic 3.0 will now assume that all SQL statements take the form of Access SQL (see the Access documentation). You can passthrough SQL to ODBC; as a second parameter to the CreateDynaset method, you must specify &H40 to indicate SQL passthrough. Note that if you used backend-specific SQL with CreateDynaset, you must add this parameter. ---------- ATI Driver ---------- If you have an ATI Wonder card, moving the data control around at design time may cause a GP fault. Contact ATI for more information. ------------------------------------------------------ BackColor Displayed Incorrectly with 256-Color Bitmaps ------------------------------------------------------ If you have a 256-color bitmap in any control (or the form) that has a BackColor property, it is possible that the background color of that object will not display correctly if no color in the bitmap's palette matches the background color. ---------------------------------- "Communication Link Failure" Error ---------------------------------- If you receive a "Communication Link Failure" error when executing queries against a Microsoft or Sybase SQL Server, you can retry the operation with asynchronous execution disabled. To do this, add the following entry to your VB.INI file: [Debug] RmtTrace=16 Visual Basic will continue to run synchronously until this line is removed from VB.INI. --------------- OLE Class Names --------------- To get a reference to a currently running OLE application by using its class name, you must use: GetObject(, "classname") that is, GetObject has to have an empty file name. A file name of "" will create a new instance of the server for class name. This is contradictory to what is documented. -------------------------------- OLE Control: In-Place Activation -------------------------------- The Visual Basic OLE 2.0 control supports "Inside-Out Activation," which corresponds to "activation on GetFocus." If a server designates this capability and you specify AutoActivate = GETFOCUS, then: - The object is initially deactivated the first time the control gets the focus. - The object is not fully deactivated when the control loses focus. Instead, the object is directed to tear down any floating user interface it may have, such as tool pallettes. Note that AutoActivate = GETFOCUS is only supported if the server claims to be "inside-out-capable," further reducing the possibility of looping re-activation when a non-insitu server closes and gives focus back to the control. ----------------------------------------------- OLE Control: Pasting Objects from the Clipboard ----------------------------------------------- Applications that provide objects behave differently when an object is deleted. When you delete an OLE object (set Action = 10), the object's application may or not close. If the application does close, any objects on the Clipboard associated with that application may also be closed. Because of this, you may not be able to cut an object (copy, then delete), since deleting the object may also cause the data on the Clipboard to be deleted. Another instance of this behavior is when you try to copy an object, then paste the object back onto itself. This action may cause an error, because in order to paste over an existing object, the existing object is first deleted. If the application associated with the object closes, and subsequently deletes any objects it has on the Clipboard, the Clipboard no longer contains an object to paste. --------------------------------- OLE Control: The PasteOK Property --------------------------------- The following applies to objects on the Clipboard that come from an OLE object: - When PasteOK returns True, there is no guarantee that the Paste operation will succeed. For example, PasteOK returns True and the Paste fails when there is a linked object on the Clipboard and you are pasting into an object whose OleTypeAllowed property is set to 1 (Embedded). - PasteOK returns False when there is a linked object on the Clipboard and you are pasting into an object whose OleTypeAllowed property is set to 0 (Linked). ------------------------ OLE Control: Link Target ------------------------ You cannot activate a linked object as hidden (set Verb = -3). You can, however, activate an embedded object as hidden. ----------------------------- OLE Constants in CONSTANT.TXT ----------------------------- OLE has also defined two new standard verbs relating to the two states that an in-place-active object can have. The following corresponding constants have been added to CONSTANT.TXT: Constant Description -------- ----------- VERB_INPLACEUIACTIVATE Object is fully in-place active, including floating UI. Only one at a time per top-level form can be in this state. VERB_INPLACEACTIVATE Object is semi-active; it is running and ready to respond to user input like clicking within the object or changing the mouse pointer as the user moves the mouse over different parts of the object. Any number of objects can be in this state at a time. So, if you have a number of inside-out-capable objects on a form, where the user has specified AutoActivate = ONGETFOCUS, the objects take turns at being in-place-UI-Active. The new verbs allow the Visual Basic programmer to cause these objects to be in the in-place-active state. For example, if you want to create a form with several of these objects, and you want the form to be as responsive as possible to user input, you would put the following code for each control into your Form_Load event handler: OLEControl.Verb = VERB_INPLACEACTIVATE OLEControl.Action = OLE_ACTIVATE See the file CONSTANT.TXT for more information. ------------------------------------ Windows 3.0 and the PopupMenu Method ------------------------------------ Under Windows 3.0, pop-up menus invoked during a MouseDown event in some cases do not recognize menu selections made with the mouse. If that occurs, you can still make a selection using the arrow keys and the Enter key. ------------------------------------------ Saving ASCII Forms in Source Code Managers ------------------------------------------ When using source code managers, you need to change the read-only bit on the binary file (.FRX) as well as the form file (.FRM) to save the form. -------------------------------- Crystal Reports for Visual Basic -------------------------------- All prices in the Crystal Reports for Visual Basic editor, CRW.EXE, are listed in US dollars. If you are calling Crystal Services from outside the United States for support or more information, please contact your local international long distance carrier if you need assistance. ============================================================ Part 3: Notes for "Learning Microsoft Visual Basic" Tutorial ============================================================ ----------------------- Save Project Before Run ----------------------- The Save Project Before Run Environment Option (under the Options menu) should be set to "No" when running the "Learning Visual Basic" tutorial. Some of the lessons may be impaired if this option is set to "Yes." By default, this setting is "No." ==================================================== Part 4: Notes for Microsoft Visual Basic Online Help ==================================================== ------------------ Error Message Help ------------------ Online Help is not available for dialogs or error messages that occur at design time. For ISAM errors, use the Search dialog in Help. -------------------------------- "Couldn't find installable ISAM" -------------------------------- An external file dynamic link library (DLL) file couldn't be found. This file is required for operations such as attaching or accessing external tables. Possible causes: 1) An entry in the [Installable ISAM] section in VB.INI or .INI is incorrect. For example, this error occurs if you're accessing a Paradox external table, and the Paradox entry of the .INI file points to a nonexistent directory. Exit Visual Basic, make necessary corrections in VB.INI or .INI using Microsoft Windows Notepad or another text editor, restart Visual Basic, and try the operation again. 2) One of the entries in the [Installable ISAM] section in VB.INI points to a network drive, and that drive isn't connected. Check to make sure the network is available and the proper drive letter is established, and try the operation again. ============================================================= Part 5: Notes for Microsoft Visual Basic "Programmer's Guide" ============================================================= Page Section/Note ---- ------------ 188 The New Keyword In the example at the top of the page, the local form variable F is declared with the New keyword using the Dim statement. To make the form variable and the loaded form instance persist, use a Static or Global variable instead. 194 Determining the Type of an Object Variable You can use the If...TypeOf statement to determine the control type of a custom control: If TypeOf object Is objecttype The identifier you use for 'object' is the class name of the custom control. See the section "Specific Control Object Types" (p. 186) for more information. 461 The Options Property The constant values shown are in hexidecimal and should be preceded with the &H notation. For example, DB_SQLPASSTHROUGH = &H40, not decimal 40. See online Help (Options Property) or the file DATACONS.TXT for the correct values. 462 The RecordSource Property The following text and example should be changed: For example, the following SQL query returns all of the columns in the bibliography for authors who live in New York: Data1.DatabaseName = "BIBLIO.MDB" Data1.RecordSource = "Select * from Titles where state = 'NY'" Data1.Refresh The above should read: For example, the following SQL query returns all of the columns in the bibliography for publishers based in New York: Data1.DatabaseName = "BIBLIO.MDB" Data1.RecordSource = "Select * from Publishers where state = 'NY'" Data1.Refresh 465 Adding a New Record In the second paragraph in this section, the last sentence should read, "Notice that using the buttons on the data control or one of the Move methods to move to another record will automatically save your added record." 530 Determining How an Object Is Displayed In the first paragraph, the second sentence should read, "the Icon check box," not "th eIcon check box." 550 Creating Invisible Objects In the sample code, the following line has incorrect syntax: MyWord = ObjVar.SuggestWord MyWord The code should look like this: MyWord = ObjVar.SuggestWord (MyWord) 552 Limitations in Visual Basic Under the discussion "Arrays and User-Defined Types," the third bulleted item should read: "You cannot...Assign the return value of a property or method to an array variable or a variable of a user-defined type." 554 Closing an Object In the paragraph after the sample code, second sentence: It is not true that invoking a Close method on an object sets variables that refer to the object to Nothing. 582 Determining the Files You Need to Distribute The following additional files are required for distributing your Visual Basic applications: DLL Name Required by (Professional Edition Only) -------- --------------------------------------- PDIRJET.DLL Crystal Reports for Visual Basic PDBJET.DLL Crystal Reports for Visual Basic MSAJT110.DLL Crystal Reports for Visual Basic MSAES110.DLL Crystal Reports for Visual Basic PDSODBC.DLL ODBC and Crystal Reports for Visual Basic ============================================================= Part 6: Notes for Microsoft Visual Basic "Language Reference" ============================================================= Page Section/Note ---- ------------ 21-22 Action Property (OLE) In the Settings table, in Setting 5, the reference to None in the second sentence of the third paragraph should read as follows: "If the Paste was not successful, the OleType property will be set to 3 (None)." In Setting 12, the constant should be OLE_READ_FROM_FILE, not ReadFromFile. In Setting 14, the constant should be OLE_INSERT_OBJ_DLG. 41 AutoActivate Property In the Note, replace the words "the double-click event" with "a DblClick event." 53 BorderStyle Property The OLE control cannot have a setting of 2. Remove the setting and description for Setting 2 in the OLE control table. 65 Check Box Control Add DataField and DataSource to the Properties list. 82 Color Property The "Applies To" line should read "Common dialog (Color dialog)." 89 Common Dialog Control Add "FilterIndex" and "MaxFileSize" to the Properties (File dialogs) list. 93 Connect Property In the Note, change "SourceTable" to "SourceTableName." 97 Copies Property The "Applies To" line should read "Common dialog (Print dialog)." 100 CreateDatabase Function In the code example, replace "False" with "DBVERSION10." Also, in the table above the code example, replace "DB_COMPACT_ENCRYPT" with "DB_ENCRYPT." 111 Data Control Add UpdateControls and UpdateRecord to the Methods list. 112 Database Object In the Properties list, the QueryTimeout Property should be identified as being available only in the Professional Edition. 117 DataText Property In the code example, change the two instances of "MSDRAW" to "MSGRAPH." 134 DefaultExt Property The "Applies To" line should read "Common dialog (File dialogs)." 185 Field Object The Properties list should refer to SourceField and SourceTable, not SourceFieldName and SourceTableName. 195 FileTitle Property The "Applies To" line should read "Common dialog (File dialogs)." Add the following to the Remarks section: Note: If the OFN_NOVALIDATE flag is set, the FileTitle property will not return a value. 198 Filter Property (Common Dialog) At the beginning of the topic, add "Applies To...Common dialog (File dialogs)." In the Remarks section, after the third paragraph, add this text: Here is an example of a Filter in which the user can choose text files or picture files that include bitmaps and icons: Text(*.txt)|*.txt|Pictures(*.bmp;*.ico)|*.bmp;*.ico 199 FilterIndex Property The "Applies To" line should read "Common dialog (File dialogs)." 229 Frame Control Add the Name Property to the Properties list. 231 FromPage, ToPage Properties The "Applies To" line should read "Common dialog (Print dialog)." 240 GetAttr Function The final Sub...End Sub block in code should read as follows: Sub File1_Click () Const ATTR_READONLY = 1, ATTR_HIDDEN = 2 ' Declare constants. Const ATTR_SYSTEM = 4, ATTR_ARCHIVE = 32 Dim Attr, FName, Msg ' Declare variables. If Right(Dir1.Path, 1) = "\" Then ' See if root file. FName = Dir1.Path & File1.FileName ' Get file path. Else FName = Dir1.Path & "\" & File1.FileName ' Get file path. End If Attr = GetAttr(FName) ' Get attributes. If Attr > 7 Then Attr = Attr Xor ATTR_ARCHIVE ' Disregard Archive. Select Case Attr ' Look up attributes. Case 0: Msg = "Normal" Case ATTR_READONLY: Msg = "Read-Only" Case ATTR_HIDDEN: Msg = "Hidden" Case ATTR_HIDDEN + ATTR_READONLY: Msg = "Hidden and Read-Only" Case ATTR_SYSTEM: Msg = "System" Case ATTR_READONLY + ATTR_SYSTEM: Msg = "Read-Only and System" Case ATTR_HIDDEN + ATTR_SYSTEM: Msg = "Hidden and System" Case ATTR_READONLY + ATTR_HIDDEN + ATTR_SYSTEM: Msg = "Read-Only," - + Msg = " Hidden, and System" End Select MsgBox UCase(FName) & " is a " & Msg & " file." ' Display message. End Sub 256 hDC Property The Usage line should read: {[form.] [commondialog. | picturebox.] | Printer.}hDC Also, the second paragraph of the Remarks should read, "With a common dialog control, this property returns a device context for the printer selected in the Print dialog box when the..." (the rest of the text remains the same). 258 Height, Width Properties The See Also line should refer to the "Width # Statement," not the "Width Statement." 274 Image Control Add DataField and DataSource to the Properties list. 280 InitDir Property The "Applies To" line should read "Common dialog (File dialogs)." 297 KeyDown, KeyUp Events The See Also should refer to the SendKeys Statement, not the SendKeys Method. 299 KeyPress Events The See Also should refer to the SendKeys Statement, not the SendKeys Method. 303 Label Control Add the DataField, DataSource, and Parent properties to the Properties list. 336- ListFields Method 338 In the second table, the fifth and sixth entries in the Field column should be SourceTable and SourceField, not SourceTableName and SourceFieldName. The code example and the headings of the table below it should also refer to SourceTable and SourceField. 345 ListTables Method In Remarks, the first paragraph under the TableType field table should read: "When you use the ListTables method to create a Snapshot, you can evaluate the contents of the Attributes field in the Snapshot by referring to the TableDef property settings table in the Attributes property topic. 361 Max, Min Properties (Common Dialog) At the beginning of the topic, add "Applies To...Common dialog (Font, Print dialogs)." 363 MaxFileSize Property The "Applies To" line should read "Common dialog (File dialogs)." 390 Name Property The "Applies To" line should include the Database object. 432 Partition Function In the code in Example 3, the second five lines of code duplicate the first five lines and should be deleted. 439 Picture Box Control Add DataField and DataSource to the Properties list. 444 PopupMenu Method In the Syntax line, there should be a comma immediately before the y. 455 PrinterDefault Property The "Applies To" line should read "Common dialog (Print dialog)." 536- SourceFieldName, SourceTableName Properties 537 All references to SourceFieldName and SourceTableName in this topic should refer to "SourceField" and "SourceTable" instead. 538 SourceTableName Property There should be a full entry for the "SourceTableName" topic. See online Help for the text of this topic. 565 Text Box Control The second piece of art is incorrect. It should show a text box on a form but instead shows a menu title and menu items on a form. Also, add DataField and DataSource to the Properties list. 595 Validate Event In the third paragraph following the Constants table, change "edit buffer" to "copy buffer." 619 Trappable Errors In Appendix B, the odd header is wrong. It should read "Trappable Errors," not "Trappable Error Messages." 634 Trappable Error Messages In Table B.6 ("Data Access Trappable Error Messages"), Error #3137 should be deleted. =================================================================== Part 7: Notes for Microsoft Visual Basic "Custom Control Reference" =================================================================== Page Section/Note ---- ------------ xxii Visual Basic Executable (.EXE) Files The Visual Basic run-time file is listed incorrectly. The first bulleted item should read VBRUN300.DLL, not VBRUN200.DLL. 147 Graph Control In Example 1, the following line contains two "=" characters: Graph1.LabelText = "Data point" = Str$(i%) The line should read: Graph1.LabelText = "Data point" + Str$(i%) 148 Graph Control In Example 2, the following line contains two "=" characters: Graph1.LabelText = "Label" = Str$(i%) The line should read: Graph1.LabelText = "Label" + Str$(i%) 176 Key Status Control The table for the Value property incorrectly states that False is the default value. The default value is determined by the state of the keyboard. 180 MAPI Session Control There should be no footnotes, since the MAPI controls are only available in Visual Basic. 186 MAPI Messages Control There should be no footnotes, since the MAPI controls are only available in Visual Basic. ============================================================ Part 8: Notes for Microsoft Visual Basic "Data Access Guide" ============================================================ Page Section/Note ---- ------------ 23 Creating New Table Definitions Delete the following line of code from the example: On Error Resume Next