Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Possible to disable mouse clicks on an ActiveX object? 1

Status
Not open for further replies.

Tama

MIS
Jun 6, 2001
121
NZ
Hi there

I work for a large Library. We have two ways of accessing the Library Catalogue - one uses a web-browser - the other telnet.

I've been trying to work out ways of making the Catalogue easier to access from our public machines and have come across an excellent ActiveX Telnet client I could embed in a web-page.

This client can be found at (direct link )

The only problem I've run into (and it's a biggy) is that there is a Toolbar in Mochasoft's ActiveX Telnet client - this would let Library users disconnect from the catalogue, connect to other systems, attempt to print etc. etc. - all of which are pretty undesirable.

I've sent some e-mails to Mochasoft and they're got no plans to make it possible to disable the toolbar. I had a bit of a brainwave and wondered if it's possible to disable mouse clicks on an ActiveX component using external parameters (or anything else) - if people can't click the "Connect" "Disconnect" etc. buttons, they can't do any harm - hopefully.

Any ideas, suggestions etc. welcome

Thanks in advance.

Tama
 
I took a look at it and it is very well protected. It would take a bit of work to mount it on a form and then use the API to locate the tool bar. After which it could be set to non visible, if the ocx should watch out for this and correct the situation, (which seldomly happens), then no.
Blocking mouse events would also be a bit of work.

What did work well was to create a form or OCX and put a WebBrowser on it, after which I put a second object,( a simple frame or such), which covered the tool bar and prevented it from being used. In my form or OCX I used WebBrowser.Navigate htm in the load or activation event.

Workd well with no side effects.
 
Update : I tried setting WebBrowser.Top = -780, even though this worked, it caused scroll bars and looked....

The above works well and if you set a frame to 2D with no border and the wished background color, it looks and works perfect.

Have fun
 
Thanks Merlin

I will have a play with this today - you haven't got an example of the code you used by any chance? (Not that I'm being lazy or anything :p )

Cheers
Tama
 
Make a new Form with :
1 Label
1 Frame
1 web browser (Include Reference :Microsoft Internet Controls = SHDOCVW.DLL)

then put this code in the form :

Private Sub Form_Load()
'Form1.StartUpPosition = 2 at design time
Form1.Height = 8370
Form1.Width = 10320

Frame1.Top = 100
Frame1.Height = 735
Frame1.Left = 300
Frame1.Width = 9600
Frame1.Caption = ""
Frame1.Appearance = 0
Frame1.BorderStyle = 0
Frame1.BackColor = &HFFFFFF

Label1.Top = 255
Label1.Height = 315
Label1.Left = 825
Label1.Width = 4830
Label1.Caption = "Include Reference :Microsoft Internet Controls = SHDOCVW.DLL"
Label1.BackColor = &HFFFFFF

WebBrowser1.Top = 0
WebBrowser1.Height = 7935
WebBrowser1.Left = 0
WebBrowser1.Width = 10185

WebBrowser1.ZOrder 0
Frame1.ZOrder 0
Label1.ZOrder 0

WebBrowser1.Navigate "D:\vbdown\OCX TELNET\TN5250.HTM"
End Sub


In this case the navigation location is the default where I down loaded the ocx.

 
You might also use a second frame to cover the copyright, If any one copy of the info...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top