DirectAnimation Animated Header --DAViewerControl Class DirectAnimation Animated Header --DAViewerControl Class* Microsoft DirectAnimation SDK
*Index  *Topic Contents
*Previous Topic: DAVector3 Class
*Next Topic: Java Reference - Classes and Interfaces

DAViewerControl Class


The DAViewerControl displays a DirectAnimation model in an HTML page. Here is an example of how it is specified:


<DIV ID=controlDiv>
<OBJECT ID="DAViewer"
        STYLE="position:absolute; left:10; top:10;width:450;height:450"
        CLASSID="CLSID:B6FFC24C-7E13-11D0-9B47-00C04FC2F51D">
</OBJECT>
</DIV>

DAViewerControl Subroutines

bullet1.gifAddBehaviorToRun

bullet1.gifDrag

bullet1.gifMove

bullet1.gifSetFocus

bullet1.gifShowWhatsThis

bullet1.gifStart

bullet1.gifZOrder


AddBehaviorToRun

DAViewerControl Class

Adds DABehavior objects that are not a part of the model. When the system starts the model, it retrieves these additional behaviors and runs them with the same start time as the behaviors included in the model.

viewObj.AddBehaviorToRun(
  bvr
  )

Parameters
bvr
The DABehavior object to add.

As an example, consider the following VBScript sample, which displays the local time as a text value.


<HTML>
<BODY>
<CENTER><INPUT TYPE="TEXT" NAME="txtInp" VALUE=""></CENTER>
<OBJECT ID="DAControl" WIDTH=400 HEIGTH=300
CLASSID="CLSID:B6FFC24C-7E13-11D0-9B47-00C04FC2F51D">
</OBJECT>
</HTML>
</BODY>

<OBJECT ID="DAControl" WIDTH=400 HEIGTH=300
CLASSID="CLSID:B6FFC24C-7E13-11D0-9B47-00C04FC2F51D">
</OBJECT>

<SCRIPT LANGUAGE="VBScript">
Sub window_onLoad
   Set m = DAControl.MeterLibrary
   Set timeVal = m.Localtime
   Set timeVal = timeVal.AnimateProperty( "txtInp.value", "VBScript", false, .01 )
   DAControl.AddBehaviorToRun( timeVal )
   DAControl.Start
End Sub
</SCRIPT>


Drag

DAViewerControl Class

Begins, ends, or cancels a drag operation of any object except Line, Menu, Shape, and Timer. For more information, consult a Visual Basic Reference.

controlObj.Drag(
  Action
  )


Move

DAViewerControl Class

Moves an object. For more information, consult a Visual Basic reference.

controlObj.Move(
  left,
  [top],
  [width],
  [height]
  )


SetFocus

DAViewerControl Class

Moves the focus to the specified object. For more information, consult a Visual Basic Reference.

controlObj.SetFocus( )


ShowWhatsThis

DAViewerControl Class

Displays a selected topic in a Help file using the What's This popup provided by Windows 95 Help. For more information, consult a Visual Basic reference.

controlObj.ShowWhatsThis( )


Start

DAViewerControl Class

Starts the model.

controlObj.Start( )


ZOrder

DAViewerControl Class

Places a specified object at the front or back of the z-order within its graphical level. For more information, consult a Visual Basic reference.

controlObj.ZOrder(
  [Position]
  )

DAViewerControl Properties

bullet1.gifBackgroundImage

bullet1.gifContainer

bullet1.gifDragIcon

bullet1.gifDragMode

bullet1.gifHeight

bullet1.gifHelpContextID

bullet1.gifImage

bullet1.gifIndex

bullet1.gifLeft

bullet1.gifMeterLibrary

bullet1.gifName

bullet1.gifObject

bullet1.gifParent

bullet1.gifPixelLibrary

bullet1.gifSound

bullet1.gifTabStop

bullet1.gifTag

bullet1.gifToolTipText

bullet1.gifTop

bullet1.gifUpdateInterval

bullet1.gifVisible

bullet1.gifWhatsThisHelpID

bullet1.gifWidth


BackgroundImage

DAViewerControl Class

Sets the background image for situations where the browser does not support windowless controls.

controlObj.BackgroundImage

Return Values

Returns a DAImage object.


Container

DAViewerControl Class

Returns the container of an object. For more information, consult a Visual Basic reference.

controlObj.Container


DragIcon

DAViewerControl Class

Returns/sets the icon to be displayed as the pointer in a drag-and-drop operation. For more information, consult a Visual Basic reference.

controlObj.DragIcon


DragMode

DAViewerControl Class

Returns/sets a value that determines whether manual or automatic drag mode is used. For more information, consult a Visual Basic reference.

controlObj.DragMode


Height

DAViewerControl Class

Returns/sets the height of an object. For more information, consult a Visual Basic reference.

controlObj.Height


HelpContextID

DAViewerControl Class

Specifies the default Help file context ID for an object. For more information, consult a Visual Basic reference.

controlObj.HelpContextID


Image

DAViewerControl Class

Establishes the DAImage displayed by the model.

controlObj.Image


Index

DAViewerControl Class

Returns/sets the number identifying a control in a control array. For more information, consult a Visual Basic reference.

controlObj.Index


Left

DAViewerControl Class

Returns/sets the distance between the internal left edge of an object and the left edge of its container. For more information, consult a Visual Basic reference.

controlObj.Left


MeterLibrary

DAViewerControl Class

Sets the unit of measurement to meters and the positive y-axis to up.

controlObj.MeterLibrary

Return Values

Returns the DAStatics object.

See Also

PixelLibrary


Name

DAViewerControl Class

Returns the name used in code to identify an object. For more information, consult a Visual Basic reference.

controlObj.Name


Object

DAViewerControl Class

Returns an object in a control. For more information, consult a Visual Basic reference.

controlObj.Object


Parent

DAViewerControl Class

Returns the object on which this object is located. For more information, consult a Visual Basic reference.

controlObj.Parent


PixelLibrary

DAViewerControl Class

Sets the unit of measurement to pixel and the positive y-axis to down. Pixel measurements are only available for constructing behaviors. When inquiring for a value, the returned measurement is always in meters.

controlObj.PixelLibrary

Return Values

Returns the DAStatics object.

See Also

Pixel, PixelConstructionMode


Sound

DAViewerControl Class

Establishes the sound behavior when the model is displayed.

controlObj.Sound

Return Values

Returns the DASound object.


TabStop

DAViewerControl Class

Returns/sets a value indicating whether a user can use the TAB key to give the focus to an object. For more information, consult a Visual Basic reference.

controlObj.TabStop


Tag

DAViewerControl Class

Stores any extra data needed for your program. For more information, consult a Visual Basic reference.

controlObj.Tag


ToolTipText

DAViewerControl Class

Returns/sets the text displayed when the mouse is paused over the control. For more information, consult a Visual Basic reference.

controlObj.ToolTipText


Top

DAViewerControl Class

Returns/sets the distance between the internal top edge of an object and the top edge of its container.

controlObj.Top


UpdateInterval

DAViewerControl Class

Sets the interval for updating the model, in seconds (a double). Examples of where this property is useful include navigational controls and menu elements, which can use a low update rate.

controlObj.UpdateInterval


Visible

DAViewerControl Class

Returns/sets a value that determines whether an object is visible or hidden. For more information, consult a Visual Basic reference.

controlObj.Visible


WhatsThisHelpID

DAViewerControl Class

Returns/sets an associated context number for an object. For more information, consult a Visual Basic reference.

controlObj.WhatsThisHelpID


Width

DAViewerControl Class

Returns/sets the width of an object. For more information, consult a Visual Basic reference.

controlObj.Width

DAViewerControl Events

bullet1.gifDragDrop

bullet1.gifDragOver

bullet1.gifGotFocus

bullet1.gifLostFocus


DragDrop

DAViewerControl Class

Occurs when a drag-and-drop operation is completed. For more information, consult a Visual Basic reference.

controlObj.DragDrop(
  source,
  x,
  y
  )


DragOver

DAViewerControl Class

Occurs when a drag-and-drop operation is in progress. For more information, consult a Visual Basic reference.

controlObj.DragOver(
  source,
  x,
  y,
  state
  )


GotFocus

DAViewerControl Class

Occurs when an object receives the focus. For more information, consult a Visual Basic reference.

controlObj.GotFocus( )


LostFocus

DAViewerControl Class

Occurs when an object loses the focus. For more information, consult a Visual Basic reference.

controlObj.LostFocus( )

© 1998 Microsoft Corporation. All rights reserved. Terms of Use.

*Top of Page