Search In Site

29 June, 2013

Adding ActiveX Controls To DHTML Pages In Visual Basic

Adding ActiveX Controls To DHTML Pages
You can add ActiveX controls to DHTML pages just as you can to standard Visual Basic projects just use the Project Components menu item to open the Components dialog box and select the ActiveX control you want to add. Then just add that control to the Web page as you would in any standard Visual Basic project.
For example, we add a standard HTML button and a progress bar ActiveX control to the Web page, Here’s the HTML code that the Page Designer adds to our Web page when we add those two new controls, the progress bar and the HTML button:
<P>Here’s an ActiveX control:</P>
<OBJECT classid=CLSID:35053A22-8589-11D1-B16A-00C0F0283628 height=24
id=ProgressBar1
style="HEIGHT: 24px; LEFT: 127px; POSITION: absolute; TOP: 248px; WIDTH:100px; Z-INDEX: 101"width=100>
<PARAM NAME="_ExtentX" VALUE=2646>
<PARAM NAME="_ExtentY" VALUE="635">
<PARAM NAME="_Version" VALUE="393216">
<PARAM NAME="BorderStyle" VALUE="0">
<PARAM NAME="Appearance" VALUE="1">
<PARAM NAME="MousePointer" VALUE="0">
<PARAM NAME="Enabled" VALUE="1">
<PARAM NAME="OLEDropMode" VALUE="0">
<PARAM NAME="Min" VALUE="0">
<PARAM NAME="Max" VALUE="100">
<PARAM NAME="Orientation" VALUE="0">
<PARAM NAME="Scrolling" VALUE="0">
</OBJECT>
<INPUT id=Button1 name=Button1 style="LEFT: 26px; POSITION: absolute; TOP:
248px; Z-INDEX: 102" type=button value="Click Me!">
Now we’re free to use the HTML button to set the progress bar’s value like this, just as you would in a standard Visual Basic project:
Private Function Button1_onclick() As Boolean
ProgressBar1.Value = 20
End Function

0 comments:

Post a Comment

Dear Visitors All The Tricks And Hacks Posted Here Are Only For Knowledge Purpose.Don't Use These for Illegal Operations.

 
Twitter Bird Gadget