亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? ch15.htm

?? 用vc開發(fā)activex
?? HTM
?? 第 1 頁 / 共 4 頁
字號(hào):
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<!--last modified on Tue, Apr 15, 1997 1:52 PM-->
<HTML>

<HEAD>
<!-- This document was created from RTF source by rtftohtml version 3.0.1 -->

	<META NAME="GENERATOR" Content="Symantec Visual Page 1.0">
	<META NAME="Author" Content="Steph Mineart">
	<META HTTP-EQUIV="Content-Type" CONTENT="text/html;CHARSET=iso-8859-1">
	<TITLE>Chapter 15</TITLE>
</HEAD>

<BODY TEXT="#000000" BGCOLOR="#FFFFFF">

<H1>Chapter 15<BR>
Testing and Using Your Components</H1>

<UL>
	<LI><A HREF="#Heading1">Testing and Using Your Components</A>
	<UL>
		<LI><A HREF="#Heading3">ActiveX Containers and Controllers</A>
		<UL>
			<LI><A HREF="#Heading4">Using Visual Basic as a Container</A>
			<LI><A HREF="#Heading5">Using Microsoft Visual C++ as a Container</A>
			<LI><A HREF="#Heading6">HTML and Web Browsers</A>
			<LI><A HREF="#Heading7">Listing 15.1 SAMPLEIE.HTM--Using an ActiveX Control in HTML
			Code</A>
			<LI><A HREF="#Heading8">Listing 15.2 SAMPLENN.HTM--Converted HTML Document</A>
			<LI><A HREF="#Heading9">ActiveX Control Pad</A>
			<LI><A HREF="#Heading10">Using the Microsoft Access, Word, and Excel Applications
			as ActiveX Control Containers</A>
		</UL>
		<LI><A HREF="#Heading11">Tools for Testing Your Component</A>
		<UL>
			<LI><A HREF="#Heading12">Visual C++ ActiveX Control Test Container</A>
			<LI><A HREF="#Heading13">Users</A>
			<LI><A HREF="#Heading14">Automated Tools</A>
		</UL>
		<LI><A HREF="#Heading15">From Here...</A>
	</UL>
</UL>

<P>
<HR SIZE="4">

<H1><A NAME="Heading1"></A>Testing and Using Your Components</H1>

<UL>
	<LI><B>Using Visual Basic as a container</B> 
<SPACER TYPE="VERTICAL" SIZE="2">
 Microsoft Visual Basic provides a rapid development environment for creating containers.
	Check out how to use an ActiveX control in Visual Basic.
	<P>
	<LI><B>Using Visual C++ as a container</B> 
<SPACER TYPE="VERTICAL" SIZE="2">
 Microsoft Visual C++ is one of the more difficult tools to use as a container, but
	using the Foundation Classes makes this easier.
	<P>
	<LI><B>ActiveX controls in Web pages</B> 
<SPACER TYPE="VERTICAL" SIZE="2">
 Using ActiveX controls in HTML greatly enhances Web pages. Instead of just containing
	information, Web pages can now be pieces of a system. Check out how to use ActiveX
	controls in Web pages.
	<P>
	<LI><B>Using Microsoft Access, Microsoft Excel, and Microsoft Word as containers</B>
	
<SPACER TYPE="VERTICAL" SIZE="2">
 Microsoft Office 97 has greatly improved its ActiveX capabilities. Find out how
	to use ActiveX controls in Microsoft Access, Microsoft Excel, and Microsoft Word.
	<P>
	<LI><B>Visual C++ OLE Control Test Container</B> 
<SPACER TYPE="VERTICAL" SIZE="2">
 Microsoft Visual C++ provides the OLE Control Test Container to test your control
	without ever leaving Visual C++.
</UL>

<P>Once you have created your ActiveX component, the next step is to use and test
your component. You will not typically wait to try out your component until after
it is completely implemented. More than likely, the first thing you will want to
do is compile your code and try to use your component before you've added any significant
functionality. You need to be aware of the types of container and testing applications
that are available to you as a developer.</P>
<P>Even more critical than the actual testing of the component is testing it as soon
as possible. Even with all of the banners being raised about reuse and compatibility,
there are still issues to be aware of, which depend upon the tools you use. Some
containers or tools may not support the features that your component supports, and
even worse, in some cases, container implementations may differ, resulting in slightly
different behavior. What may work in VB may result in a crash in VC++. A word of
advice: Test your components often and with all of the tools that you plan to use
your components with.</P>
<P>This chapter will focus on the types and numbers of tools available that can host
ActiveX Controls, as well as the tools that you can use to test your controls. Even
though the primary focus of the chapter is on ActiveX Controls, almost all of the
applications mentioned can launch and use ActiveX Automation Servers and even ActiveX
COM objects. Because there are so many and they change so rapidly, it is beyond the
scope of this book to address all of the ActiveX capabilities of all the tools available
to you. You will need to research the specific tool to see to what extent it supports
ActiveX and COM.
<H2><A NAME="Heading3"></A>ActiveX Containers and Controllers</H2>
<P>Applications that use ActiveX controls are called <I>container applications, </I>or
just containers. In this chapter, you will discover how to use your control in Microsoft
Visual Basic, Microsoft Visual C++, Web browsers, Microsoft ActiveX Control Pad,
and the Microsoft Office tools: Access, Word, and Excel. Visual Basic is probably
the easiest tool to use, and Visual C++ is probably the hardest. This chapter will
explain how to insert an ActiveX control into these containers, how to change the
control's properties, and how to code the events contained in the control. <BR>
<BR>
<IMG SRC="bar.gif" WIDTH="480" HEIGHT="6" ALIGN="BOTTOM" BORDER="0"></P>


<BLOCKQUOTE>
	<P><B>NOTE:</B> If a container application is to be distributed, all controls added
	to a container must be distributed with the container.

</BLOCKQUOTE>

<P><IMG SRC="bar.gif" WIDTH="480" HEIGHT="6" ALIGN="BOTTOM" BORDER="0">
<H3><A NAME="Heading4"></A>Using Visual Basic as a Container</H3>
<P>To place a control in a Visual Basic application, you can open an existing project
or create a new one. To create a new project, select <U>F</U>ile, <U>N</U>ew Project
from the Visual Basic menu, select Standard EXE from the New Project dialog, and
click the OK button. To open an existing project, select <U>F</U>ile, <U>O</U>pen
Project from the Visual Basic menu. If you want to open a recent project, select
the Recent tab, select the desired project from the File list box, and click the
<U>O</U>pen button. If the project you are looking for is not listed on the Recent
tab, select the Existing tab, and then select your project from the proper directory.
After you have selected the project, click the <U>O</U>pen button to open the project.</P>
<P>Next you need to create a form or open an existing one. To create a form, select
<U>P</U>roject, Add <U>F</U>orm from the Visual Basic menu. If the Add form dialog
appears, click Form on the New tab, and then click the form in the project window.
To open an existing form, click the form in the project window, and then click the
View Form button.</P>
<P>Now you need to add the control to the project. Select <U>P</U>roject, C<U>o</U>mponents
from the main menu, which brings up the Components dialog (see fig 15.1). Make sure
that the <U>S</U>elected Items Only check box, on the lower-right side of the Components
dialog, is not selected. The <U>S</U>elected Items Only option will limit the display
to the items previously selected. Search for the name of the control you want to
add on the Controls tab, and click the check box next to the control. To see the
path of a particular control, click the control name, and the path will display in
the frame at the bottom of the dialog. <B><BR>
<BR>
</B><A HREF="Art/15/15fig01.jpg"><B>FIG. 15.1</B></A> <I><BR>
Select </I><CITE>P</CITE><I>roject, C</I><CITE>o</CITE><I>mponents to display the
Components dialog.</I></P>
<P>If the control is not registered, it will not appear on the Controls tab. To select
an unregistered control, click the <U>B</U>rowse button, select your control from
the proper directory, and click the Open button to register your control.</P>
<P>After the control is checked, click the <U>A</U>pply button to add the control
to the Toolbox, and then click the OK button to close the Components dialog. If the
control file added contains more than one control, you will see more than one tool
added to the Toolbox. If the <TT>MFCControl</TT> control was added, you will see
three new tools, labeled with a purple OCX. If each control had a different icon,
you would see three different icons on the Toolbox. If you drag the mouse over the
icons on the Toolbox, tool tips appear to tell you which control you are selecting.
To place the control on the form, double-click the new tool button or click the new
tool button, and then click and drag the form. If the toolbox is not displayed, select
<U>V</U>iew, Toolbo<U>x</U> from the Visual Basic menu.</P>
<P>To set the properties at design time, you need to use the Properties grid located
on the right side of the screen, which lists all the changeable properties and their
current values. If the Properties grid is not displayed, click the control on the
form, and press F4 to display the Properties grid. The left column contains the property
names, and the right contains the current property values. Click the Alphabetic tab
on the Properties grid to list the properties alphabetically, or select the Categorized
tab to view the properties by property category. To change a value, click the cell
containing the name of the property you want to change, and then click property value
cell in the same row and edit the value.</P>
<P>Setting the properties in code is almost as easy. To set a control in code use
following syntax:</P>
<P><FONT COLOR="#0066FF"><TT>ControlName.PropertyName = Value</TT></FONT></P>
<P><TT>ControlName</TT> is the name of the control, <TT>PropertyName</TT> is the
name of the property, and <TT>Value</TT> is the new property value or a variable
containing the value.</P>
<P>Retrieving a property value is the reverse of the preceding:</P>
<P><TT>Variable = ControlName.PropertyNameVariable</TT> in this case is used to hold
the value of the property.</P>
<P>To execute the methods of the control, use the following syntax:</P>
<P><FONT COLOR="#0066FF"><TT>Variable = ControlName.Method Parameter1,...ParameterN</TT></FONT></P>
<P><TT>Variable</TT> is the name of the variable that will hold the return value
of the method. If the method has no return value, <TT>Variable</TT> and the <TT>=</TT>
will be eliminated. <TT>ControlName</TT> is the name of the control, <TT>Method</TT>
is the name of the method, and <TT>Parameter1,...ParameterN</TT><I> </I>represents
any parameters to be passed to the method.</P>
<P>The final step in the design process is coding the events. To code an event, follow
these steps:

<OL>
	<LI>If the Project Explorer window is not visible, Select <U>V</U>iew, <U>P</U>roject
	Explorer. The Project Explorer window appears.
	<P>
	<LI>Select the form that contains the control, and then select <U>V</U>iew, <U>C</U>ode
	to display the Code window (see fig. 15.2).
	<P><A HREF="Art/15/15fig02.jpg"><B>FIG. 15.2</B></A><B> </B><I><BR>
	Select </I><CITE>V</CITE><I>iew, </I><CITE>C</CITE><I>ode from the Visual Basic menu
	to display the Code window.</I></P>
	<LI>Select the control you want to add the event code for from the Object combo box,
	which is the combo box on the left.
	<P>
	<LI>Select the event you want to code from the Procedure combo box, which is the
	combo box on the right.
	<P>
	<LI>Enter the code between the <TT>Private Sub</TT> and <TT>End Sub</TT> statements.
</OL>

<P>Repeat Steps 4 and 5 to code any of the other events contained in the control.</P>
<P>If you change your control, don't forget to recompile your Visual Basic executable
to prevent errors.</P>
<P>You can find more information on using ActiveX controls in Visual Basic in the
Visual Basic help files or the Knowledge Base articles on Microsoft's Web site (<A
HREF="http://www.microsoft.com/kb/"><B>http://www.microsoft.com/kb/</B></A><B>)</B>.
<H3><A NAME="Heading5"></A>Using Microsoft Visual C++ as a Container</H3>
<P>The easiest way to use your control in a Microsoft Visual C++ application is to
use the Microsoft Foundation Classes (MFC) with a dialog. When you first create an
application that will be using ActiveX controls, be sure to check the ActiveX Cont<U>r</U>ols
option in Step 3 of the MFC AppWizard (see fig. 15.3). If you do not select this
option, you will have to add a call to <TT>AfxEnableControlContainer</TT> in the
application's <TT>InitInstance</TT> member function (see fig. 15.4). <B><BR>
<BR>
</B><A HREF="Art/15/15fig03.jpg"><B>FIG. 15.3</B></A> <I><BR>
Here is where you check the ActiveX Cont</I><CITE>r</CITE><I>ols option.</I></P>
<P><A HREF="Art/15/15fig04.jpg"><B>FIG. 15.4</B></A> <I><BR>
You add a call to <TT>AfxEnableControl Container</TT> in the application's <TT>InitInstance</TT>
member function.</I></P>
<P>To add your control to a dialog, follow these steps:

<OL>
	<LI>Select the ResourceView tab of the Project Workspace window, click the &quot;+&quot;
	next to the project's resources folder, click the &quot;+&quot; next to the Dialog
	folder, and then double-click the ID for the dialog. These steps will display the
	dialog in the Dialog Editor window.
	<P>
	<LI>From the <U>P</U>roject menu, select Add To Com_ponents and Controls to display
	the Components and Controls Gallery dialog (see fig. 15.5).
	<P><A HREF="Art/15/15fig05.jpg"><B>FIG. 15.5</B></A> <I><BR>
	Select </I><CITE>P</CITE><I>roject, </I><CITE>A</CITE><I>dd To Project, Com</I><CITE>p</CITE><I>onents
	and Controls to display the Components and Controls Gallery dialog.</I></P>
	<LI>Double-click the Registered ActiveX Controls folder to display a list of ActiveX
	controls.
	<P>
	<LI>Scroll through the list of controls to find the icon for your control. Select
	the icon and click the In<U>s</U>ert button to add the control to your dialog, which
	will bring up a message box asking &quot;Insert this component?&quot; Click the OK
	button. This will bring up the Confirm Classes dialog.
	<P>
	<LI>Click the OK button to generate the wrapper class and to add the control to the
	Controls Toolbar; the Confirm Classes dialog will close automatically. The wrapper
	class serves as an interface between your application and the control.
	<P>
	<LI>Click the <U>C</U>lose button on the Components and Controls Gallery dialog.
	<P>
	<LI>Click and drag the control from the Controls Toolbar to the dialog to place the
	control on the dialog.
</OL>

<P>To set the properties of the control at design time, click the control on the
dialog, and select <U>V</U>iew, P<U>r</U>operties from the Developer Studio menu.
The Control Properties dialog will appear (see fig. 15.6). Click the Keep Visible
Pin to keep the dialog from closing. A property tab is available for General properties,

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91天堂素人约啪| 麻豆成人免费电影| 美女国产一区二区三区| 激情亚洲综合在线| 成人国产精品免费观看视频| 欧美亚洲国产一区在线观看网站 | 国产三级精品三级在线专区| 国产精品理论片| 爽好多水快深点欧美视频| 国产裸体歌舞团一区二区| 91高清在线观看| xnxx国产精品| 一区二区三区小说| 精品一区二区三区久久久| 91免费视频大全| 2023国产精华国产精品| 亚洲国产欧美日韩另类综合| 国模少妇一区二区三区| 在线亚洲+欧美+日本专区| 2023国产精品自拍| 亚洲国产aⅴ成人精品无吗| 国产91丝袜在线播放九色| 欧美精品自拍偷拍| 亚洲色图19p| 国产一区二区免费看| 欧美性videosxxxxx| 欧美国产欧美综合| 日本在线观看不卡视频| 色哟哟一区二区在线观看| 久久久亚洲精品石原莉奈| 午夜久久久久久久久久一区二区| 大陆成人av片| 欧美成人一区二区三区在线观看| 亚洲国产一区二区三区| 福利一区在线观看| 日韩一级完整毛片| 亚洲国产日韩a在线播放| av在线不卡电影| 欧美精品一区二区三区久久久| 亚洲成人精品一区| 99国产精品一区| 国产亚洲欧洲一区高清在线观看| 免费三级欧美电影| 欧美日本一区二区三区| 伊人开心综合网| 99re66热这里只有精品3直播| 2020国产精品自拍| 美女视频黄频大全不卡视频在线播放| 91极品美女在线| 综合久久久久久| 成人avav影音| 中文字幕av在线一区二区三区| 另类成人小视频在线| 欧美浪妇xxxx高跟鞋交| 一区二区三区四区在线播放| 97久久超碰国产精品电影| 国产精品免费久久| 丁香五精品蜜臀久久久久99网站| 精品国产乱码久久久久久影片| 天天av天天翘天天综合网| 欧美伊人久久久久久久久影院 | 国产1区2区3区精品美女| 日韩欧美久久久| 日本成人在线视频网站| 91精品国产欧美日韩| 日本美女一区二区三区| 91精品国产综合久久蜜臀| 午夜久久久久久久久久一区二区| 欧美色欧美亚洲另类二区| 亚洲一级在线观看| 欧美日本乱大交xxxxx| 日韩国产欧美在线播放| 5月丁香婷婷综合| 蜜桃视频一区二区| 日韩欧美国产综合在线一区二区三区| 蜜臀av亚洲一区中文字幕| 日韩女同互慰一区二区| 国产在线播放一区三区四| 久久久久国产精品麻豆| 粉嫩一区二区三区在线看| 中文字幕永久在线不卡| 色婷婷国产精品| 亚洲成年人网站在线观看| 欧美一级午夜免费电影| 黑人巨大精品欧美黑白配亚洲| 久久精品一区二区三区不卡牛牛 | 国产日韩精品一区二区三区| 国产成都精品91一区二区三| 中文字幕亚洲区| 色综合一个色综合| 香蕉成人啪国产精品视频综合网| 91精品视频网| 激情五月播播久久久精品| 国产精品色噜噜| 欧美制服丝袜第一页| 青青草一区二区三区| 久久色.com| 色综合天天狠狠| 日韩国产精品91| 久久精品人人做| 一本到不卡精品视频在线观看| 午夜国产精品一区| 精品国产免费一区二区三区香蕉| 成人网在线播放| 亚洲gay无套男同| 久久综合色婷婷| 色欧美88888久久久久久影院| 日本成人超碰在线观看| 国产精品嫩草影院com| 欧美日韩视频专区在线播放| 国产一区二区三区高清播放| 亚洲三级小视频| 日韩视频一区二区| 成人aaaa免费全部观看| 日本vs亚洲vs韩国一区三区二区| 国产午夜亚洲精品理论片色戒| 91蜜桃视频在线| 日韩综合一区二区| 国产精品美女www爽爽爽| 欧美美女喷水视频| 国产高清无密码一区二区三区| 亚洲在线成人精品| 久久日韩精品一区二区五区| 在线观看网站黄不卡| 国产精品456露脸| 亚洲成人1区2区| 国产精品视频一二三区| 91精品久久久久久久99蜜桃| 不卡的电影网站| 琪琪一区二区三区| 亚洲黄色av一区| 久久久一区二区三区捆绑**| 欧美日韩极品在线观看一区| 国产69精品久久久久毛片| 日本欧洲一区二区| 亚洲乱码日产精品bd| 久久精品日产第一区二区三区高清版 | 亚洲综合一区在线| 日韩免费在线观看| 欧美体内she精高潮| 成人精品视频网站| 久久99国产精品久久99| 亚洲午夜久久久久久久久久久| 欧美激情一区二区三区蜜桃视频| 91精品国产91久久久久久最新毛片| 99国内精品久久| 国产精品影视网| 美女任你摸久久| 亚洲成人福利片| 亚洲免费成人av| 国产精品女上位| 久久亚洲一级片| 日韩视频一区二区三区| 欧美日韩黄视频| 在线免费不卡电影| 91日韩一区二区三区| 成人性色生活片| 韩国毛片一区二区三区| 美女一区二区久久| 日韩在线一区二区| 亚洲国产一二三| 亚洲影视在线观看| 亚洲精品高清在线| 亚洲男人天堂av| 国产精品不卡视频| 国产日产欧产精品推荐色 | 久久66热re国产| 六月丁香婷婷久久| 日本伊人色综合网| 亚洲成av人影院在线观看网| 亚洲综合图片区| 亚洲综合在线五月| 一区二区三区欧美| 有坂深雪av一区二区精品| 伊人色综合久久天天| 伊人色综合久久天天人手人婷| 亚洲免费观看高清完整版在线观看 | 亚洲国产高清不卡| 日韩欧美一区在线| 在线成人av影院| 精品视频免费在线| 欧美另类z0zxhd电影| 日韩一区二区三区在线观看| 日韩欧美在线不卡| 久久品道一品道久久精品| 国产三级精品三级| 中文字幕一区二区三区av| 亚洲欧美日韩中文播放| 亚洲午夜免费视频| 视频一区中文字幕国产| 免费观看日韩av| 激情综合亚洲精品| 国产成人免费视频精品含羞草妖精| 成人网页在线观看| 91网址在线看| 欧美日本一区二区在线观看| 欧美不卡在线视频| 日本一区二区三区视频视频| 中文字幕一区二区三区在线播放| 亚洲精品美国一|