I wrote vbscript to open word doc and print some text and close the word. Can
I do that using active x control so that I can hide the vbscript codes I
wrote?

Thanks
Daniel

Re: active x control by Richard

Richard
Fri May 27 21:42:23 CDT 2005

Daniel wrote:

> I wrote vbscript to open word doc and print some text and close the word.
Can
> I do that using active x control so that I can hide the vbscript codes I
> wrote?

Hi,

Yes, you can create an ActiveX control with Visual Basic, which compiles to
an *.ocx. You can also compile an *.exe. In the past I've used VB Control
Creation Edition (VB5CCE) to create ActiveX Controls, but I don't know if it
is still available.

In most cases you can copy your VBScript program exactly, except the Wscript
object is not available, so you can't use things like Wscript.Echo and
Wscript.Sleep. Also, all of your code must be in Subroutines or Functions.
If you code an ActiveX control, it must be registered on the computer. You
can use a VBScript program to bind to your control and execute a subroutine
in the control. An exe does need to be registered.

--
Richard
Microsoft MVP Scripting and ADSI
Hilltop Lab web site - http://www.rlmueller.net
--



Re: active x control by Daniel

Daniel
Sat May 28 08:25:16 CDT 2005

Is there a detailed example on some website?

Thanks
Daniel

"Richard Mueller [MVP]" wrote:

> Daniel wrote:
>
> > I wrote vbscript to open word doc and print some text and close the word.
> Can
> > I do that using active x control so that I can hide the vbscript codes I
> > wrote?
>
> Hi,
>
> Yes, you can create an ActiveX control with Visual Basic, which compiles to
> an *.ocx. You can also compile an *.exe. In the past I've used VB Control
> Creation Edition (VB5CCE) to create ActiveX Controls, but I don't know if it
> is still available.
>
> In most cases you can copy your VBScript program exactly, except the Wscript
> object is not available, so you can't use things like Wscript.Echo and
> Wscript.Sleep. Also, all of your code must be in Subroutines or Functions.
> If you code an ActiveX control, it must be registered on the computer. You
> can use a VBScript program to bind to your control and execute a subroutine
> in the control. An exe does need to be registered.
>
> --
> Richard
> Microsoft MVP Scripting and ADSI
> Hilltop Lab web site - http://www.rlmueller.net
> --
>
>
>

Re: active x control by Joe

Joe
Sat May 28 08:31:21 CDT 2005

Hi Richard,

[snipped]

"Richard Mueller [MVP]" <rlmueller-NOSPAM@ameritech.NOSPAM.net> wrote in
message news:undh08yYFHA.3364@TK2MSFTNGP12.phx.gbl...
...
> Yes, you can create an ActiveX control with Visual Basic, which compiles
> to
> an *.ocx. You can also compile an *.exe. In the past I've used VB Control
> Creation Edition (VB5CCE) to create ActiveX Controls, but I don't know if
> it
> is still available.
...

Last time I looked MS had removed VB5CCE from its download menu, but it
seems to still maintain it on its website for download (no online
documentation, but the full download). I believe that this works for right
now:

http://download.microsoft.com/msdownload/sbn/vbcce/vb5ccein.exe

I hope that MS keeps the download available, even if its orientation is to
phase out COM objects in the future.

Regards,
Joe Earnest



Re: active x control by Joe

Joe
Sat May 28 08:43:17 CDT 2005

Hi,

[snipped]

"Daniel" <Daniel@discussions.microsoft.com> wrote in message
news:DE8699CB-E3D7-4D8B-A6F3-ACE072B4E625@microsoft.com...
> Is there a detailed example on some website?
>
> Thanks
> Daniel
...

Guenter Born (a script author) has a page on VB5CCE on his website. Click
on ActiveX Controls in the main page's left column, and then on VB5CCE.

http://people.freenet.de/gborn/WSHBazaar/WSHBazaar.htm

Get the MS download here (at least for now):

http://download.microsoft.com/msdownload/sbn/vbcce/vb5ccein.exe

Joe Earnest



Re: active x control by Daniel

Daniel
Sat May 28 11:12:13 CDT 2005

Thanks for the reply. I am new to this area. Do you know why microsoft wants
to phase com object out? Do they have any alternatives?

Thanks
Daniel

"Joe Earnest" wrote:

> Hi Richard,
>
> [snipped]
>
> "Richard Mueller [MVP]" <rlmueller-NOSPAM@ameritech.NOSPAM.net> wrote in
> message news:undh08yYFHA.3364@TK2MSFTNGP12.phx.gbl...
> ....
> > Yes, you can create an ActiveX control with Visual Basic, which compiles
> > to
> > an *.ocx. You can also compile an *.exe. In the past I've used VB Control
> > Creation Edition (VB5CCE) to create ActiveX Controls, but I don't know if
> > it
> > is still available.
> ....
>
> Last time I looked MS had removed VB5CCE from its download menu, but it
> seems to still maintain it on its website for download (no online
> documentation, but the full download). I believe that this works for right
> now:
>
> http://download.microsoft.com/msdownload/sbn/vbcce/vb5ccein.exe
>
> I hope that MS keeps the download available, even if its orientation is to
> phase out COM objects in the future.
>
> Regards,
> Joe Earnest
>
>
>

Re: active x control by Daniel

Daniel
Sat May 28 11:16:01 CDT 2005

I have ms visual studio 6.0 and in it is visual basic 6.0. Does this include
the tools you mentioned? If so, I may not need to download the tools you
mentioned. Or is it only available in VB 5?

Thanks
Daniel

"Joe Earnest" wrote:

> Hi,
>
> [snipped]
>
> "Daniel" <Daniel@discussions.microsoft.com> wrote in message
> news:DE8699CB-E3D7-4D8B-A6F3-ACE072B4E625@microsoft.com...
> > Is there a detailed example on some website?
> >
> > Thanks
> > Daniel
> ....
>
> Guenter Born (a script author) has a page on VB5CCE on his website. Click
> on ActiveX Controls in the main page's left column, and then on VB5CCE.
>
> http://people.freenet.de/gborn/WSHBazaar/WSHBazaar.htm
>
> Get the MS download here (at least for now):
>
> http://download.microsoft.com/msdownload/sbn/vbcce/vb5ccein.exe
>
> Joe Earnest
>
>
>

Re: active x control by Richard

Richard
Sat May 28 11:22:31 CDT 2005

Hi,

Yes. In VB6, on the New tab, select "ActiveX Control" to create an ocx.
There is also info in the help - Check ActiveX in the help index.

--
Richard
Microsoft MVP Scripting and ADSI
Hilltop Lab web site - http://www.rlmueller.net
--
"Daniel" <Daniel@discussions.microsoft.com> wrote in message
news:D746DB18-6282-4845-A975-8A81826A43C6@microsoft.com...
> I have ms visual studio 6.0 and in it is visual basic 6.0. Does this
include
> the tools you mentioned? If so, I may not need to download the tools you
> mentioned. Or is it only available in VB 5?
>
> Thanks
> Daniel
>
> "Joe Earnest" wrote:
>
> > Hi,
> >
> > [snipped]
> >
> > "Daniel" <Daniel@discussions.microsoft.com> wrote in message
> > news:DE8699CB-E3D7-4D8B-A6F3-ACE072B4E625@microsoft.com...
> > > Is there a detailed example on some website?
> > >
> > > Thanks
> > > Daniel
> > ....
> >
> > Guenter Born (a script author) has a page on VB5CCE on his website.
Click
> > on ActiveX Controls in the main page's left column, and then on VB5CCE.
> >
> > http://people.freenet.de/gborn/WSHBazaar/WSHBazaar.htm
> >
> > Get the MS download here (at least for now):
> >
> > http://download.microsoft.com/msdownload/sbn/vbcce/vb5ccein.exe
> >
> > Joe Earnest
> >
> >
> >



Re: active x control by Daniel

Daniel
Sat May 28 14:05:24 CDT 2005

That site was really helpful. I was amazed how easy it was to create ocx
control for the project I was working on. Thanks a lot again. Now I want to
pass some parameters I will get from html input area. I am not familiar with
how to pass parameters to the ocx control from vbscript. Can you help me in
this?

Thanks
Daniel

"Joe Earnest" wrote:

> Hi,
>
> [snipped]
>
> "Daniel" <Daniel@discussions.microsoft.com> wrote in message
> news:DE8699CB-E3D7-4D8B-A6F3-ACE072B4E625@microsoft.com...
> > Is there a detailed example on some website?
> >
> > Thanks
> > Daniel
> ....
>
> Guenter Born (a script author) has a page on VB5CCE on his website. Click
> on ActiveX Controls in the main page's left column, and then on VB5CCE.
>
> http://people.freenet.de/gborn/WSHBazaar/WSHBazaar.htm
>
> Get the MS download here (at least for now):
>
> http://download.microsoft.com/msdownload/sbn/vbcce/vb5ccein.exe
>
> Joe Earnest
>
>
>

Re: active x control by Joe

Joe
Sat May 28 14:17:58 CDT 2005

Hi,

"Daniel" <Daniel@discussions.microsoft.com> wrote in message
news:BBB11FF4-0223-4536-977B-CD9F05101EDF@microsoft.com...
> Thanks for the reply. I am new to this area. Do you know why microsoft
> wants
> to phase com object out? Do they have any alternatives?
>
> Thanks
> Daniel
>

You really need to ask someone more up to date. My understanding is that
support for both VB and VBS, as well as COM-based programming, are being
abandoned with the release of Longhorn. I read that, in reality, both VB
and VBS, and COM programming, will likely be useful at least as "legacy"
alternatives for some years to come. Not something that I'm competent to
call. These may get you started, but just Google "longhorn" and you can get
an infinite number of posts, discussions, blogs, etc.

http://www.microsoft.com/windows/longhorn/default.mspx

http://msdn.microsoft.com/longhorn/community/newsgroups/default.aspx




Re: active x control by Joe

Joe
Sat May 28 15:23:15 CDT 2005

Hi,

"Daniel" <Daniel@discussions.microsoft.com> wrote in message
news:8950707C-6300-428E-B763-A245D763DC77@microsoft.com...
> That site was really helpful. I was amazed how easy it was to create ocx
> control for the project I was working on. Thanks a lot again. Now I want
> to
> pass some parameters I will get from html input area. I am not familiar
> with
> how to pass parameters to the ocx control from vbscript. Can you help me
> in
> this?
>
> Thanks
> Daniel
>
> "Joe Earnest" wrote:
>
>> Hi,
>>
>> [snipped]
>>
>> "Daniel" <Daniel@discussions.microsoft.com> wrote in message
>> news:DE8699CB-E3D7-4D8B-A6F3-ACE072B4E625@microsoft.com...
>> > Is there a detailed example on some website?
>> >
>> > Thanks
>> > Daniel
>> ....
>>
>> Guenter Born (a script author) has a page on VB5CCE on his website.
>> Click
>> on ActiveX Controls in the main page's left column, and then on VB5CCE.
>>
>> http://people.freenet.de/gborn/WSHBazaar/WSHBazaar.htm
>>
>> Get the MS download here (at least for now):
>>
>> http://download.microsoft.com/msdownload/sbn/vbcce/vb5ccein.exe
>>
>> Joe Earnest
>>

I generally compile and use WSCs instead of COMs, so I'm not going to be too
good at details. But basically, you'll use the new OCX just like FSO or any
of the common scripting objects, and the function names become your exposed
method names. So let's say that you have created a "WSHTest" project and
"TestMe" user control. You've saved and registered your OCX (I believe that
VB5CCE automatically registers it on the host computer), so it has a ProgId
of "WSHTest.TestMe" on the host computer. Then you instantiate it in the
calling script with ...

set o= createobject("WSHTest.TestMe")

Let's say you have a programmed into the OCX a function like ...

function MyMsgBox (Arg1, Arg2, Arg3)

In your calling script, you call the "method" just like you would the
function, but as a method of the OCX object instance ...

return= o.MyMsgBox(arg1, arg2, arg3)

or if no return is needed ...

o.MyMsgBox arg1, arg2 arg3

Hope this helps.

Joe Earnest



Re: active x control by Joe


Re: active x control by Michael

Michael
Sat May 28 16:19:10 CDT 2005

Daniel wrote:
> That site was really helpful. I was amazed how easy it was to create
> ocx control for the project I was working on. Thanks a lot again. Now
> I want to pass some parameters I will get from html input area. I am
> not familiar with how to pass parameters to the ocx control from
> vbscript. Can you help me in this?

Building COM Components That Take Full Advantage of Visual Basic and
Scripting
http://msdn.microsoft.com/library/techart/msdn_vbscriptcom.htm

Creating an ActiveX DLL (Visual Basic 6)
http://msdn.microsoft.com/library/en-us/vbcon98/html/vbconcreatinganinprocesscomponent.asp?frame=true

Creating Properties and Methods for the Thing Class (Visual Basic 6)
http://msdn.microsoft.com/library/en-us/vbcon98/html/vbconcreatingpropertiesmethods03.asp?frame=true


--
Michael Harris
Microsoft MVP Scripting
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Please ask follow-up questions via the original newsgroup thread.




Re: active x control by Michael

Michael
Sat May 28 16:51:47 CDT 2005

Daniel wrote:
> Thanks for the reply. I am new to this area. Do you know why
> microsoft wants to phase com object out? Do they have any
> alternatives?


My own (strictly personal) take - I don't claim to be an expert...

As COM based technology has evolved over many years, its deficiencies have
been more difficult, if not impossible, to resolve without effectively
starting over. One might consider .Net to be that 'starting over'.

While many may consider .Net to represent the future, COM still represents
the current reality and more importantly, from a future perspective, an
enormous legacy past. There are plenty of places you can go to participate
in the ongoing .Net vs. COM debate, with plenty of participants on both
sides.

Over time, more and more of the COM based technologies will become
deprecated in favor of .Net alternatives. Like WSH et.al. already have, COM
based technologies will go into what Microsoft refers to as 'sustained
engineering' -- meaning (my characterization) where only security holes and
really bad bugs will get fixed. That does mean existing COM based
technologies will not be enhanced, but that does not mean that the existing
COM runtime libraries will disappear any time soon...


--
Michael Harris
Microsoft MVP Scripting
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Please ask follow-up questions via the original newsgroup thread.




Re: active x control by Steven

Steven
Sat May 28 17:14:27 CDT 2005

[runs in]
I know which side I'm on....... and it ain't .Net... ;o)
[runs out]

--=20
Regards

Steven Burn
Ur I.T. Mate Group
www.it-mate.co.uk

Keeping it FREE!

"Michael Harris (MVP)" <mikhar at mvps dot org> wrote in message =
news:#wMjy98YFHA.3920@TK2MSFTNGP10.phx.gbl...
> Daniel wrote:
> > Thanks for the reply. I am new to this area. Do you know why
> > microsoft wants to phase com object out? Do they have any
> > alternatives?
>=20
>=20
> My own (strictly personal) take - I don't claim to be an expert...
>=20
> As COM based technology has evolved over many years, its deficiencies =
have=20
> been more difficult, if not impossible, to resolve without effectively =

> starting over. One might consider .Net to be that 'starting over'.
>=20
> While many may consider .Net to represent the future, COM still =
represents=20
> the current reality and more importantly, from a future perspective, =
an=20
> enormous legacy past. There are plenty of places you can go to =
participate=20
> in the ongoing .Net vs. COM debate, with plenty of participants on =
both=20
> sides.
>=20
> Over time, more and more of the COM based technologies will become=20
> deprecated in favor of .Net alternatives. Like WSH et.al. already =
have, COM=20
> based technologies will go into what Microsoft refers to as 'sustained =

> engineering' -- meaning (my characterization) where only security =
holes and=20
> really bad bugs will get fixed. That does mean existing COM based=20
> technologies will not be enhanced, but that does not mean that the =
existing=20
> COM runtime libraries will disappear any time soon...
>=20
>=20
> --=20
> Michael Harris
> Microsoft MVP Scripting
> -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-
> Please ask follow-up questions via the original newsgroup thread.
>=20
>=20
>=20


Re: active x control by mayayana

mayayana
Sat May 28 21:45:03 CDT 2005

Since you have VB6 you have three options:

An ActiveX DLL is a COM DLL that can easily
be created to be scriptable.

An ActiveX EXE is similar to a DLL but it runs
asynchronously, so it can be used in situations
where you want to provide events.

Neither a DLL nor an EXE needs any kind of GUI,
but both can use VB forms if you want that.

The third option is an OCX, which would usually
be made to be embedded in some kind of GUI -
IE or a VB form.

All three have COM interfaces and all three offer
the ability to "expose" public properties and methods to
script.

For a sample project of an ActiveX DLL that shows
how to build public object and non-creatable
public object interfaces:

http://www.jsware.net/jsware/vbcode.html#axdll

On the same page are several UserControl
projects. (An email component, an HTTP file
download component, and a customized Listbox.)
A UserControl is the code of an OCX before it's
compiled. It can be compiled directly into a VB
EXE or compiled separately as an OCX.


--
--
Daniel <Daniel@discussions.microsoft.com> wrote in message
news:8950707C-6300-428E-B763-A245D763DC77@microsoft.com...
> That site was really helpful. I was amazed how easy it was to create ocx
> control for the project I was working on. Thanks a lot again. Now I want
to
> pass some parameters I will get from html input area. I am not familiar
with
> how to pass parameters to the ocx control from vbscript. Can you help me
in
> this?
>
> Thanks
> Daniel
>
> "Joe Earnest" wrote:
>
> > Hi,
> >
> > [snipped]
> >
> > "Daniel" <Daniel@discussions.microsoft.com> wrote in message
> > news:DE8699CB-E3D7-4D8B-A6F3-ACE072B4E625@microsoft.com...
> > > Is there a detailed example on some website?
> > >
> > > Thanks
> > > Daniel
> > ....
> >
> > Guenter Born (a script author) has a page on VB5CCE on his website.
Click
> > on ActiveX Controls in the main page's left column, and then on VB5CCE.
> >
> > http://people.freenet.de/gborn/WSHBazaar/WSHBazaar.htm
> >
> > Get the MS download here (at least for now):
> >
> > http://download.microsoft.com/msdownload/sbn/vbcce/vb5ccein.exe
> >
> > Joe Earnest
> >
> >
> >



Re: active x control by Daniel

Daniel
Sun May 29 16:24:22 CDT 2005

Thanks for all the replies including Joe's and Michael's.

I was able to pass parameters. My visual studio 6 and vb 6 did not have
visual sourcesafe installed. So I had to use vb5cce. Now I want to make some
modification and enhance some portion. But I cannot make ocx again under same
name - message is saying that I do not have permission. Is there a way to
resolve this issue without make new project and new ocx name but using the
same name I used previously?

Also, if I want to distribute ocx to be used by vbscript in a htm file, do I
used

Start Regsvr32 Test.ocx

in bat file? Do I need just ocx file? The htm file will run from the server.
But it looks that ocx needs to be distributed to all the pc's that will use
this ocx. Am I right?

Thanks for all the help

Daniel


"mayayana" wrote:

> Since you have VB6 you have three options:
>
> An ActiveX DLL is a COM DLL that can easily
> be created to be scriptable.
>
> An ActiveX EXE is similar to a DLL but it runs
> asynchronously, so it can be used in situations
> where you want to provide events.
>
> Neither a DLL nor an EXE needs any kind of GUI,
> but both can use VB forms if you want that.
>
> The third option is an OCX, which would usually
> be made to be embedded in some kind of GUI -
> IE or a VB form.
>
> All three have COM interfaces and all three offer
> the ability to "expose" public properties and methods to
> script.
>
> For a sample project of an ActiveX DLL that shows
> how to build public object and non-creatable
> public object interfaces:
>
> http://www.jsware.net/jsware/vbcode.html#axdll
>
> On the same page are several UserControl
> projects. (An email component, an HTTP file
> download component, and a customized Listbox.)
> A UserControl is the code of an OCX before it's
> compiled. It can be compiled directly into a VB
> EXE or compiled separately as an OCX.
>
>
> --
> --
> Daniel <Daniel@discussions.microsoft.com> wrote in message
> news:8950707C-6300-428E-B763-A245D763DC77@microsoft.com...
> > That site was really helpful. I was amazed how easy it was to create ocx
> > control for the project I was working on. Thanks a lot again. Now I want
> to
> > pass some parameters I will get from html input area. I am not familiar
> with
> > how to pass parameters to the ocx control from vbscript. Can you help me
> in
> > this?
> >
> > Thanks
> > Daniel
> >
> > "Joe Earnest" wrote:
> >
> > > Hi,
> > >
> > > [snipped]
> > >
> > > "Daniel" <Daniel@discussions.microsoft.com> wrote in message
> > > news:DE8699CB-E3D7-4D8B-A6F3-ACE072B4E625@microsoft.com...
> > > > Is there a detailed example on some website?
> > > >
> > > > Thanks
> > > > Daniel
> > > ....
> > >
> > > Guenter Born (a script author) has a page on VB5CCE on his website.
> Click
> > > on ActiveX Controls in the main page's left column, and then on VB5CCE.
> > >
> > > http://people.freenet.de/gborn/WSHBazaar/WSHBazaar.htm
> > >
> > > Get the MS download here (at least for now):
> > >
> > > http://download.microsoft.com/msdownload/sbn/vbcce/vb5ccein.exe
> > >
> > > Joe Earnest
> > >
> > >
> > >
>
>
>

Re: active x control by mayayana

mayayana
Sun May 29 17:54:23 CDT 2005

>
> I was able to pass parameters. My visual studio 6 and vb 6 did not have
> visual sourcesafe installed. So I had to use vb5cce.

???? Visual SourceSafe has nothing to do with anything.
It's for keeping code and versioning organized in group
development environments.

It sounds like you should really familiarize yourself more
with VB, with compiled COM objects, and with ActiveX
usage in webpages before compiling and distributing an OCX.
I don't mean to be unkind, but you
started 2 days ago trying to hide a simple VBScript so that
others would not see your code. Now, 36 hours later, you're
distributing OCXs, clearly with very little understanding of the
tools that you're using.

> The htm file will run from the server.
> But it looks that ocx needs to be distributed to all the pc's that will
use
> this ocx. Am I right?
>
Yes. It needs to be installed locally in order to show up
in a webpage. Also, your OCX presumably has
no digital signature, and is not "safe" for use on a
webpage, so IE won't load it anyway
unless you're on a closed network with extremely
low security settings on all client copies of IE. There are
several security settings in IE that involve ActiveX.
In order for your OCX to work (and not present alarming
warnings to the client) the client must be using IE and the
settings such as "Download unsigned ActiveX controls" and
"Initialize and script ActiveX controls not marked
as safe" must be set to Enabled.
Even then, what you're trying to do - access files and
printing on a remote machine through a browser - is
something you have no business trying to do unless
you're acting on behalf of the owner(s) of the machines that
you're trying to access.


> Thanks for all the help
>
> Daniel
>
>
> "mayayana" wrote:
>
> > Since you have VB6 you have three options:
> >
> > An ActiveX DLL is a COM DLL that can easily
> > be created to be scriptable.
> >
> > An ActiveX EXE is similar to a DLL but it runs
> > asynchronously, so it can be used in situations
> > where you want to provide events.
> >
> > Neither a DLL nor an EXE needs any kind of GUI,
> > but both can use VB forms if you want that.
> >
> > The third option is an OCX, which would usually
> > be made to be embedded in some kind of GUI -
> > IE or a VB form.
> >
> > All three have COM interfaces and all three offer
> > the ability to "expose" public properties and methods to
> > script.
> >
> > For a sample project of an ActiveX DLL that shows
> > how to build public object and non-creatable
> > public object interfaces:
> >
> > http://www.jsware.net/jsware/vbcode.html#axdll
> >
> > On the same page are several UserControl
> > projects. (An email component, an HTTP file
> > download component, and a customized Listbox.)
> > A UserControl is the code of an OCX before it's
> > compiled. It can be compiled directly into a VB
> > EXE or compiled separately as an OCX.
> >
> >
> > --
> > --
> > Daniel <Daniel@discussions.microsoft.com> wrote in message
> > news:8950707C-6300-428E-B763-A245D763DC77@microsoft.com...
> > > That site was really helpful. I was amazed how easy it was to create
ocx
> > > control for the project I was working on. Thanks a lot again. Now I
want
> > to
> > > pass some parameters I will get from html input area. I am not
familiar
> > with
> > > how to pass parameters to the ocx control from vbscript. Can you help
me
> > in
> > > this?
> > >
> > > Thanks
> > > Daniel
> > >
> > > "Joe Earnest" wrote:
> > >
> > > > Hi,
> > > >
> > > > [snipped]
> > > >
> > > > "Daniel" <Daniel@discussions.microsoft.com> wrote in message
> > > > news:DE8699CB-E3D7-4D8B-A6F3-ACE072B4E625@microsoft.com...
> > > > > Is there a detailed example on some website?
> > > > >
> > > > > Thanks
> > > > > Daniel
> > > > ....
> > > >
> > > > Guenter Born (a script author) has a page on VB5CCE on his website.
> > Click
> > > > on ActiveX Controls in the main page's left column, and then on
VB5CCE.
> > > >
> > > > http://people.freenet.de/gborn/WSHBazaar/WSHBazaar.htm
> > > >
> > > > Get the MS download here (at least for now):
> > > >
> > > > http://download.microsoft.com/msdownload/sbn/vbcce/vb5ccein.exe
> > > >
> > > > Joe Earnest
> > > >
> > > >
> > > >
> >
> >
> >



Re: active x control by Daniel

Daniel
Mon May 30 15:31:02 CDT 2005

I posted simple version because I didn't want to show full version of what I
am working on. As long as I could find the functionality working, that was
what I was looking for.

I admit that I am not an expert in vb or vbscript and you may be right to
feel that it is a little odd to talk about deploying when I just found how to
create ocx.

But I hope I can get some answer for what I ask without explaining all the
details of what I am working on.

I would appreciate if I can find a way to get around this problem I am
having. Do I need to change the project and ocx name each time I make
revision to ocx? It looks a little inconvenient.

Thanks
Daniel

"mayayana" wrote:

> >
> > I was able to pass parameters. My visual studio 6 and vb 6 did not have
> > visual sourcesafe installed. So I had to use vb5cce.
>
> ???? Visual SourceSafe has nothing to do with anything.
> It's for keeping code and versioning organized in group
> development environments.
>
> It sounds like you should really familiarize yourself more
> with VB, with compiled COM objects, and with ActiveX
> usage in webpages before compiling and distributing an OCX.
> I don't mean to be unkind, but you
> started 2 days ago trying to hide a simple VBScript so that
> others would not see your code. Now, 36 hours later, you're
> distributing OCXs, clearly with very little understanding of the
> tools that you're using.
>
> > The htm file will run from the server.
> > But it looks that ocx needs to be distributed to all the pc's that will
> use
> > this ocx. Am I right?
> >
> Yes. It needs to be installed locally in order to show up
> in a webpage. Also, your OCX presumably has
> no digital signature, and is not "safe" for use on a
> webpage, so IE won't load it anyway
> unless you're on a closed network with extremely
> low security settings on all client copies of IE. There are
> several security settings in IE that involve ActiveX.
> In order for your OCX to work (and not present alarming
> warnings to the client) the client must be using IE and the
> settings such as "Download unsigned ActiveX controls" and
> "Initialize and script ActiveX controls not marked
> as safe" must be set to Enabled.
> Even then, what you're trying to do - access files and
> printing on a remote machine through a browser - is
> something you have no business trying to do unless
> you're acting on behalf of the owner(s) of the machines that
> you're trying to access.
>
>
> > Thanks for all the help
> >
> > Daniel
> >
> >
> > "mayayana" wrote:
> >
> > > Since you have VB6 you have three options:
> > >
> > > An ActiveX DLL is a COM DLL that can easily
> > > be created to be scriptable.
> > >
> > > An ActiveX EXE is similar to a DLL but it runs
> > > asynchronously, so it can be used in situations
> > > where you want to provide events.
> > >
> > > Neither a DLL nor an EXE needs any kind of GUI,
> > > but both can use VB forms if you want that.
> > >
> > > The third option is an OCX, which would usually
> > > be made to be embedded in some kind of GUI -
> > > IE or a VB form.
> > >
> > > All three have COM interfaces and all three offer
> > > the ability to "expose" public properties and methods to
> > > script.
> > >
> > > For a sample project of an ActiveX DLL that shows
> > > how to build public object and non-creatable
> > > public object interfaces:
> > >
> > > http://www.jsware.net/jsware/vbcode.html#axdll
> > >
> > > On the same page are several UserControl
> > > projects. (An email component, an HTTP file
> > > download component, and a customized Listbox.)
> > > A UserControl is the code of an OCX before it's
> > > compiled. It can be compiled directly into a VB
> > > EXE or compiled separately as an OCX.
> > >
> > >
> > > --
> > > --
> > > Daniel <Daniel@discussions.microsoft.com> wrote in message
> > > news:8950707C-6300-428E-B763-A245D763DC77@microsoft.com...
> > > > That site was really helpful. I was amazed how easy it was to create
> ocx
> > > > control for the project I was working on. Thanks a lot again. Now I
> want
> > > to
> > > > pass some parameters I will get from html input area. I am not
> familiar
> > > with
> > > > how to pass parameters to the ocx control from vbscript. Can you help
> me
> > > in
> > > > this?
> > > >
> > > > Thanks
> > > > Daniel
> > > >
> > > > "Joe Earnest" wrote:
> > > >
> > > > > Hi,
> > > > >
> > > > > [snipped]
> > > > >
> > > > > "Daniel" <Daniel@discussions.microsoft.com> wrote in message
> > > > > news:DE8699CB-E3D7-4D8B-A6F3-ACE072B4E625@microsoft.com...
> > > > > > Is there a detailed example on some website?
> > > > > >
> > > > > > Thanks
> > > > > > Daniel
> > > > > ....
> > > > >
> > > > > Guenter Born (a script author) has a page on VB5CCE on his website.
> > > Click
> > > > > on ActiveX Controls in the main page's left column, and then on
> VB5CCE.
> > > > >
> > > > > http://people.freenet.de/gborn/WSHBazaar/WSHBazaar.htm
> > > > >
> > > > > Get the MS download here (at least for now):
> > > > >
> > > > > http://download.microsoft.com/msdownload/sbn/vbcce/vb5ccein.exe
> > > > >
> > > > > Joe Earnest
> > > > >
> > > > >
> > > > >
> > >
> > >
> > >
>
>
>

Re: active x control by mayayana

mayayana
Mon May 30 18:23:57 CDT 2005

Maybe someone else can answer for vb5cce. I have
never used that. In VB, in case this info. might be
of any use to you, you can control the behavior in the
project properties dialogue. Set version compatibility setting
(on the Component tab) to project compatibility to maintain the
same typelib through successive compiles. But if you change
the interface then it will, still, write a new typelib and require
re-registration.
That's part of how COM works: Each interface is unique.
In order to have the same object, registered with the same
CLSID, across different machines, the interface needs to
be dependable - or the whole system wouldn't work. So if you
alter the interface then VB will recompile it as a new version
with a new CLSID.

You shouldn't need to change the actual project and OCX name
between compiles, as far as I know, but I don't know the details
of how the "control creation edition" works.

--
--
Daniel <Daniel@discussions.microsoft.com> wrote in message
news:0D277ABE-B3D9-4F34-A9CA-8A1A6746BD2B@microsoft.com...
> I posted simple version because I didn't want to show full version of what
I
> am working on. As long as I could find the functionality working, that was
> what I was looking for.
>
> I admit that I am not an expert in vb or vbscript and you may be right to
> feel that it is a little odd to talk about deploying when I just found how
to
> create ocx.
>
> But I hope I can get some answer for what I ask without explaining all the
> details of what I am working on.
>
> I would appreciate if I can find a way to get around this problem I am
> having. Do I need to change the project and ocx name each time I make
> revision to ocx? It looks a little inconvenient.
>
> Thanks
> Daniel
>
> "mayayana" wrote:
>
> > >
> > > I was able to pass parameters. My visual studio 6 and vb 6 did not
have
> > > visual sourcesafe installed. So I had to use vb5cce.
> >
> > ???? Visual SourceSafe has nothing to do with anything.
> > It's for keeping code and versioning organized in group
> > development environments.
> >
> > It sounds like you should really familiarize yourself more
> > with VB, with compiled COM objects, and with ActiveX
> > usage in webpages before compiling and distributing an OCX.
> > I don't mean to be unkind, but you
> > started 2 days ago trying to hide a simple VBScript so that
> > others would not see your code. Now, 36 hours later, you're
> > distributing OCXs, clearly with very little understanding of the
> > tools that you're using.
> >
> > > The htm file will run from the server.
> > > But it looks that ocx needs to be distributed to all the pc's that
will
> > use
> > > this ocx. Am I right?
> > >
> > Yes. It needs to be installed locally in order to show up
> > in a webpage. Also, your OCX presumably has
> > no digital signature, and is not "safe" for use on a
> > webpage, so IE won't load it anyway
> > unless you're on a closed network with extremely
> > low security settings on all client copies of IE. There are
> > several security settings in IE that involve ActiveX.
> > In order for your OCX to work (and not present alarming
> > warnings to the client) the client must be using IE and the
> > settings such as "Download unsigned ActiveX controls" and
> > "Initialize and script ActiveX controls not marked
> > as safe" must be set to Enabled.
> > Even then, what you're trying to do - access files and
> > printing on a remote machine through a browser - is
> > something you have no business trying to do unless
> > you're acting on behalf of the owner(s) of the machines that
> > you're trying to access.
> >
> >
> > > Thanks for all the help
> > >
> > > Daniel
> > >
> > >
> > > "mayayana" wrote:
> > >
> > > > Since you have VB6 you have three options:
> > > >
> > > > An ActiveX DLL is a COM DLL that can easily
> > > > be created to be scriptable.
> > > >
> > > > An ActiveX EXE is similar to a DLL but it runs
> > > > asynchronously, so it can be used in situations
> > > > where you want to provide events.
> > > >
> > > > Neither a DLL nor an EXE needs any kind of GUI,
> > > > but both can use VB forms if you want that.
> > > >
> > > > The third option is an OCX, which would usually
> > > > be made to be embedded in some kind of GUI -
> > > > IE or a VB form.
> > > >
> > > > All three have COM interfaces and all three offer
> > > > the ability to "expose" public properties and methods to
> > > > script.
> > > >
> > > > For a sample project of an ActiveX DLL that shows
> > > > how to build public object and non-creatable
> > > > public object interfaces:
> > > >
> > > > http://www.jsware.net/jsware/vbcode.html#axdll
> > > >
> > > > On the same page are several UserControl
> > > > projects. (An email component, an HTTP file
> > > > download component, and a customized Listbox.)
> > > > A UserControl is the code of an OCX before it's
> > > > compiled. It can be compiled directly into a VB
> > > > EXE or compiled separately as an OCX.
> > > >
> > > >
> > > > --
> > > > --
> > > > Daniel <Daniel@discussions.microsoft.com> wrote in message
> > > > news:8950707C-6300-428E-B763-A245D763DC77@microsoft.com...
> > > > > That site was really helpful. I was amazed how easy it was to
create
> > ocx
> > > > > control for the project I was working on. Thanks a lot again. Now
I
> > want
> > > > to
> > > > > pass some parameters I will get from html input area. I am not
> > familiar
> > > > with
> > > > > how to pass parameters to the ocx control from vbscript. Can you
help
> > me
> > > > in
> > > > > this?
> > > > >
> > > > > Thanks
> > > > > Daniel
> > > > >
> > > > > "Joe Earnest" wrote:
> > > > >
> > > > > > Hi,
> > > > > >
> > > > > > [snipped]
> > > > > >
> > > > > > "Daniel" <Daniel@discussions.microsoft.com> wrote in message
> > > > > > news:DE8699CB-E3D7-4D8B-A6F3-ACE072B4E625@microsoft.com...
> > > > > > > Is there a detailed example on some website?
> > > > > > >
> > > > > > > Thanks
> > > > > > > Daniel
> > > > > > ....
> > > > > >
> > > > > > Guenter Born (a script author) has a page on VB5CCE on his
website.
> > > > Click
> > > > > > on ActiveX Controls in the main page's left column, and then on
> > VB5CCE.
> > > > > >
> > > > > > http://people.freenet.de/gborn/WSHBazaar/WSHBazaar.htm
> > > > > >
> > > > > > Get the MS download here (at least for now):
> > > > > >
> > > > > > http://download.microsoft.com/msdownload/sbn/vbcce/vb5ccein.exe
> > > > > >
> > > > > > Joe Earnest
> > > > > >
> > > > > >
> > > > > >
> > > >
> > > >
> > > >
> >
> >
> >



Re: active x control by Daniel

Daniel
Tue May 31 08:43:05 CDT 2005

Thanks for the reply. Today I opened vb5cce and make ocx and it didn't give
the error message I got yesterday. I changed the interface but used the same
project and ocx name.

If I create active x exe file, does it still register to the windows registry?

Is active x dll same as ocx?

Thanks
Daniel

"mayayana" wrote:

> Maybe someone else can answer for vb5cce. I have
> never used that. In VB, in case this info. might be
> of any use to you, you can control the behavior in the
> project properties dialogue. Set version compatibility setting
> (on the Component tab) to project compatibility to maintain the
> same typelib through successive compiles. But if you change
> the interface then it will, still, write a new typelib and require
> re-registration.
> That's part of how COM works: Each interface is unique.
> In order to have the same object, registered with the same
> CLSID, across different machines, the interface needs to
> be dependable - or the whole system wouldn't work. So if you
> alter the interface then VB will recompile it as a new version
> with a new CLSID.
>
> You shouldn't need to change the actual project and OCX name
> between compiles, as far as I know, but I don't know the details
> of how the "control creation edition" works.
>
> --
> --
> Daniel <Daniel@discussions.microsoft.com> wrote in message
> news:0D277ABE-B3D9-4F34-A9CA-8A1A6746BD2B@microsoft.com...
> > I posted simple version because I didn't want to show full version of what
> I
> > am working on. As long as I could find the functionality working, that was
> > what I was looking for.
> >
> > I admit that I am not an expert in vb or vbscript and you may be right to
> > feel that it is a little odd to talk about deploying when I just found how
> to
> > create ocx.
> >
> > But I hope I can get some answer for what I ask without explaining all the
> > details of what I am working on.
> >
> > I would appreciate if I can find a way to get around this problem I am
> > having. Do I need to change the project and ocx name each time I make
> > revision to ocx? It looks a little inconvenient.
> >
> > Thanks
> > Daniel
> >
> > "mayayana" wrote:
> >
> > > >
> > > > I was able to pass parameters. My visual studio 6 and vb 6 did not
> have
> > > > visual sourcesafe installed. So I had to use vb5cce.
> > >
> > > ???? Visual SourceSafe has nothing to do with anything.
> > > It's for keeping code and versioning organized in group
> > > development environments.
> > >