 Advanced Control Help Table of Contents

How To ...

The Advanced Control Library provides Microsoft Visual Basic Applications with the System Disk Information.. A Visual Basic Code Sample, titled FILEMGR.MAK, is also supplied to highlight the use of AdvControls.

Controls

Disk Format

Disk Copy

Disk Commands

File Search

Version

AdvControls Version 1.0

Includes

ADVSRCH.VBX	Disk Search Control, superclass listbox type.
ADVFRMT.VBX	Disk Format Control, button control type.
ADVCOPY.VBX	Disk Copy Control, button control type.
ADVSYS.VBX	DOS System Commands, button control type.
Filemgr.mak	Visual Basic sample file.
Filemgr.frm	Visual Basic sample file.

Information in this document is subject to change without notice. Microsoft, MS-DOS, Visual Basic, Windows, and Windows NT are registered trademarks of Microsoft Corporation.

License

See the License Agreement License, see Registration form, print the form and send it in., see Ordering. which covers Payment options and other information.

Contacts

Advanced Applications	Compuserve	72713,2106
6700 North Tryon Street Box 560991.	Voice	(704) 597-3948
Charlotte, NC 28256-0991  USA

Copyright notice

Copyright notice.

Copyright © 1994 - 1995 Advanced Application, All rights reserved.

Portions Copyright by Microsoft Corporation.

Windows is a trademark of Microsoft Corp.

Various other product names mentioned in passing are trademarks or service marks of their respective owners.


Disk Format
Disk Format control

The Disk Format control utilizes Microsofts File Manager performing either Drive A/B disk formatting. With this command, you will always be able to ensure that proper drive types, File Allocation Table (FAT) sectoring, Directory Table information, Boot sector writing, and system file updates will function according to the highest standards without compromising user performance.

Figure 1 - Disk Format and Disk Copy.

It should be noted that while the command is being performed that the user will not actually see File Manager being executed, that application is hidden from view, but rest assured that it is actually being called.

Properties

The DiskFormat1 AdvFormat is a subclass of the Microsoft Command Button.  Thereby ensuring standard button properties.

Events

Standard Microsoft command button type.


Disk Copy
Disk Copy control

The Disk Copy control utilizes Microsofts File Manager performing either Drive A/B disk copying. With this command, you will always be able to ensure that proper drive types, File Allocation Table (FAT) sectoring, Directory Table information, Boot sector writing, and system file updates will function according to the highest standards without compromising user performance.

Figure 2 - Disk Format and Disk Copy.

It should be noted that while the command is being performed that the user will not actually see File Manager being executed, that application is hidden from view, but rest assured that it is actually being called.

Properties

The DiskCopy1 AdvFormat is a subclass of the Microsoft Command Button.  Thereby ensuring standard button properties.

Events

Standard Microsoft command button type.


Disk System
Disk System control

The Disk System control provides Microsoft Windows ReStarting; System ReBooting; and MS-DOS Prompt capabilities from within your Microsoft Visual Basic application.

Properties

The Disk System is a subclass of the Microsoft Command Button.  Thereby ensuring standard button properties with the addition of the following:

Property	Description
SystemType	0 - ReStart Windows 1 - ReBoot System 2 - MS DOS Prompt

Events

Standard Microsoft command button type.


File Search
File Search control

The File Search control is a superclass of the Microsoft Listbox providing a listbox with a Caption, Maximinize Button, Control Box, Thick and expandable Borders, with the capabilities of being moved on the form while in run mode. The superclassed listbox is capable of performing somewhat normal list box text listing functions or system file functions.

Figure 3 - Search Control.

Files Listbox capabilities are as follows:

Normal files listbox;

Read only and Normal files listbox;

Hidden and Normal files listbox;

System and Normal files listbox;

Volume ID listbox;

Subdirectory and Normal files listbox;

All file types listbox.

Also by double clicking on listed files within the file listbox, you will provide the users with the ability to either run the selected executable or batch file. Or if the perform the operation as determined within the Microsoft Windows WIN.INI Association listing. If an association does not exist, the user may select to associate the selected file thereby updating the WIN.INI file.

Properties

The following properties depict the non standard properties available with AdvSearch Properties box:

About	About Box
Caption	ListBox Caption
FileList	0 - File List 1 - Normal List
FileType	0 - Normal files list 1 - Read only/Normal files list 2 - Hidden/Normal files list 3 - System/Normal files list 4 - Volume ID list 5 - Subdirectory/Normal files list 6 - All file types list

The following AdvSearch items are code defined Properties:

ListText	The selected text as determined by the list index.
ListIndex	The current index number of the selected item.
ListCount	Number of items in the list box.
SelectCount	Number of selected items in the list box.
Selected	Returns a value which specifies whether the item is selected within the listbox. if return = 0 then the item not selected. if return <> 0 then the item is selected.
SelectAll	Selects all items within the list box.
SelectClear	Deselects all items within the list box.
ListTextLength	Returns the Text length for the selected item within the list box.
AddItem	if FileList  = 0; then AddItem acts as a file listbox with syntax: c:\*.*. if FileList = 1; then AddItem acts as a normal listbox class.
RemoveItem	Remove the item determined by the index.
Clear	Clears the listbox

Events

The following standard events have been provided:

GotFocus	standard event
KeyDown	standard event
KeyPress	standard event
KeyUp	standard event
LostFocus	standard event
MouseDown	standard event
MouseMove	standard event
MouseUp	standard event


List Index
ListIndex property

An application receives a ListIndex message to determine the index of the item that

has the focus rectangle in a multiple-selection listbox. The item may or may not be selected. An application sends a ListIndex message to position the index on a single point within the listbox.

Input

Sets the listbox index.

Returns

The return value is the zero-based index of the item that has the focus rectangle in a list box.

Example

See the Search1. Selected example.

Figure 5 - ListIndex.


List Text
ListText property

An application sends an ListText message to retrieve the index of the currently selected item, if any, in a single-selection listbox

Input

None.

Returns

The returned text is based on the index of the item in the list box.

Example

See the Search1. Selectedexample.

Figure 6 - ListText.


List Count
ListCount property

An application sends an ListCount message to retrieve the number of items in a list box.

Input

None.

Returns

The return value is the count of number items in a list box.

Example

MsgBox = ListCount =  & Search1.ListCount

Figure 7 - List Count.


Select Count
SelectCount property

An application sends an ListCount message to retrieve the total number of selected items in a multiple-selection list box.

Input

None.

Returns

The return value is the count of selected items in a list box.

Example

MsgBox = ListCount =  & Search1.SelectCount

Figure 8 - SelectCount.


Selected
Selected property

An application sends an Selected property message to retrieve the selection state of an item.

Input

None.  To query the item, use ListIndex, (see the below example).

Returns

The return value is a positive number if an item is selected; otherwise, it is zero.

Example

Dim I as Integer

Dim strTemp as String

For I = 0 To Search1.ListCount - 1

Search1.ListIndex = I

If Search1.Selected <> 0 Then

strTemp = Search1.ListText

MsgBox "Selected = " & strTemp

End If

Next

Figure 9 - Selected.


SelectAll
SelectAll property

An application sends an SelectAll property message to select all items in a list box.

Input

None.  To query the item, use ListIndex, (see the below example).

Returns

The return value is a positive number if an item is selected; otherwise, it is zero.

Example

Dim I as Integer

I = Search1.SelectAll


SelectClear
SelectClear property

An application sends an SelectClear property message to deselect all selected items in a list box.

Input

None.  To query the item, use ListIndex, (see the below example).

Returns

The return value is a positive number if an item is selected; otherwise, it is zero.

Example

Dim I as Integer

I = Search1.SelectClear


ListTextLength
ListTextLength property

An application sends an ListTextLength property message to retrieve the selected text length.

Input

None.  To query the item, use ListIndex, (see the below example).

Returns

The return value is a positive number specifing the text length; otherwise, it is zero.

Example

Dim I as Integer

Search1.ListIndex = I

I = Search1.ListTextLength

MsgBox TextLength =  & I

Figure 10 - Selected.


No Help Available

No help is available for this area of the window.


Regristing the software
Software Ordering

AdvControl is distributed as for evaluation for thirty days (License). Please remember that using unlicensed shareware past the evaluation period is unethical and illegal. To register and receive the latest version of AdvControl, please complete the order form and include US$30.00. Foreign orders add US$5.00 for international postage and handling.

Any questions about the status of shipment, refunds, registration options, product details, technical support, volume discounts, dealer pricing, site licenses, etc., must be directed to Advanced Applications directly (see below). Multiple, network and site licenses are available. Contact Advanced Applications for terms and conditions. Prices subject to change without notice.

Contacts

Advanced Applications	Compuserve	72713,2106
6700 North Tryon Street Box 560991.	Voice	(704) 597-3948
Charlotte, NC 28256-0991  USA

Ordering Information

Select Registration form, and then after printing the form, send it in. or by utilizing CompuServe  - Go SWREG, Registration ID: 4720


License
License Agreement

This software is licensed shareware. You may distribute at no charge, except for media or connect time charges, unmodified copies of the ADVCONTROL files. Select Registration form, and then after printing the form, send it in.

AdvControl is supplied "as is". The author disclaims all warranties, expressed or implied, including, without limitation, the warranties of merchant ability and of fitness for any purpose. The author assumes no liability for damages, direct or consequential, which may result from the use of AdvControl. You also agree to not hold Advanced Applications liable for any damages, direct or consequential which may result from the use of AdvControl. By purchasing, using, distributing AdvControl, you are agreeing to all of these conditions.

AdvControl is provided free of charge for a thirty day evaluation period. Any use beyond this period requires that AdvControl be registered with the author, Advanced Applications. This registration fee will license one copy of AdvControl for use on a single computer. Multi-user, network and site licenses are available; contact Advanced Applications for terms.

As purchaser of this software, you are granted a royalty-free license to distribute executable files generated using the AdvControls as well as distributing the AdvControla provided you accept the conditions of the License Agreement. Remember, AdvControl must be registered prior to distributing with your applications, those persons, companies, business, etc., will be fully prosecuted for distrubuting AdvControl without proper registration.

Government users: This software and documentation are subject to restrictions set forth in The Rights in Technical Data and Computer Software clause at 252.227-7013 and elsewhere.

If you believe AdvControl is valuable and useful, please give it to anyone else you think would be interested, and encourage them to register their copy. Copy registration also provides notification of Revision Updates, these upgrades will be supplied at a upgrade price.


Copyright warning
Copyright

This computer software package is protected by copyright law and international treaties. Unauthorized distribution of this package, or any portion of it, may result in severe civil and criminal penalties, and will be prosecuted to the maximum extent possible under the law.


Registration Form

To:	Advanced Applications

6700 North Tryon Street

Box 560991

Charlotte, NC  28256-0991

Attn.: AdvControl, Revision 1.0

Fm:	(Name)

(Company)

(Address)

(City, State)

(Country)

(ZIP/Post)

(Phone)

(Fax)

(Software)	AdvControls

Price	$30.00

Copies	 (Number of copies).

Subtotal	$	 ($30.00 x Copies).

Tax	$	 (6% North Carolina State).

Shipping	$ 5.00

Total	$	 (Latest Release/updates).

(Do not write below this line)

Receive Date:

Serial Number:

Check/MO Number:

Notification Sent:

Sent by/Date:


sample code
Visual Basic Sample Code

This text discusses the supplied Visual Basic Code used to illustrate AdvControls. Each topic highlights each command as it is used in the sample FileMgr.mak application.

FileMgr.mak File Listing

Listing	Description
FILEMGR.FRM	Advanced Application Sample
C:\WINDOWS\SYSTEM\THREED.VBX	Visual Basic Control
ADVSRCH.VBX	Advanced Applications Control
ADVCOPY.VBX	Advanced Applications Control
ADVFRMAT.VBX	Advanced Applications Control
ADVSYS.VBX	Advanced Applications Control
ProjWinSize=97,530,248,215	Project Window
ProjWinShow=2	Project Window
IconForm="frmFileManage"	Project
Title=" FILEMGR "	Project
ExeName="FILEMGR.EXE"	Project

Sections

About Box

The following examples depicts the AdvSearch ListBox. Following the picture example, is the Microsoft Visual Basic source code for the VB FileManager applications.

Figure 11 - File Manager Sample

Example Code:

Sub chkFiles_Click (Value as Integer)

If chkFiles.Value = 0 Then

Search1.FileList = 1    ' List Files

Else

Search1.FileList = 0    ' Normal List

End If

End Sub

Sub cmdAdd_Click (Value As Integer)

Dim strReturn As String

Search1.FileType = iSelect

Search1.AddItem txtAdd.Text

DoEvents

End Sub

Sub cmdClear_Click (Value As Integer)

Search1.Clear

End Sub

Sub cmdProperties_Click (Index As Integer)

Dim I As Integer

Dim strTemp As String

Select Case Index

Case 0

MsgBox "ListCount = " & Search1.ListCount

Case 1

MsgBox "ListIndex = " & Search1.ListIndex

Case 2

MsgBox "SelectCount = " & Search1.SelectCount

Case 3

strTemp = Search1.ListText

MsgBox "ListText = " & strTemp

Case 4

For I = 0 To Search1.ListCount - 1

earch1.ListIndex = I

If Search1.Selected <> 0 Then

strTemp = Search1.ListText

MsgBox "Selected = " & strTemp

End If

Next

Case 5

I = Search1.SelectAll

Case 6

I = Search1.SelectClear

Case 7

I = Search1.ListTextLength

MsgBox "TextLength = " & I

End Select

End Sub

Sub Form_Load ()

Dim I As Integer

Search1.AddItem "c:\*.*"

I = Search1.FileType

optSelect(I).Value = True

chkFiles.Value = 1

Search1.PositionLeft = 120

Search1.PositionTop = 60

Search1.SizeHeight = 290

Search1.SizeWidth = 445

End Sub

Sub Search1_KeyUp (KeyCode As Integer, Shift As Integer)

Dim strMessage As String

Dim strAnswer, strDefVal, strTitle

strTitle = "Search1 Property Demo"

strMessage = "ListText = " & Search1.ListText

MsgBox strMessage, MB_ICONINFORMATION, strTitle

strMessage = "Enter an index value from 0 to " & Search1.ListCount - 1 & "."

strDefVal = "0"

strAnswer = InputBox(strMessage, strTitle, strDefVal)

Search1.ListIndex = CInt(strAnswer)

strMessage = "ListText = " & Search1.ListText

MsgBox strMessage, MB_ICONINFORMATION, strTitle

End Sub


About Box
AdvControl About Box

AdvControl is supplied as a development tool providing disk utilities not normally found with Microsoft Visual Basic.

Thank you for choosing AdvControl as one of your development tools. If you have any questions, comments, suggestions or otherwise opinions, please feel free to contact us here at Advanced Applications.

Thank you.