Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 8 of 8
  1. #1
    Join Date
    Dec 2005
    Posts
    13

    Suppress Links in Web Browser

    My web browser is coming along nicely now.

    I have licensing going on, checks for internet etc etc.

    The only problem I have now are these....

    1) people can right click and see the url or the page (which I dont want them to)
    2) when someone does "shift + left click" on a link, a new internet explorer window open up OUTSIDE of my browser.

    ....is there a way in Autoplay 6, to stop people right clicking and doing the shift + left click thing?

    I am using asp pages as my destination pages in my mini browser, would using .net pages help me?

    I heard that in .net you can prevent people righ clicking etc.

  2. #2
    Corey is offline Indigo Rose Staff Alumni
    Join Date
    Aug 2002
    Posts
    9,746
    Javascript links can't be SHIFT + CLICKED. DHTML/Javascript in your HTML page is the best way to get rid of right clicking. Tons of those on Google. In any case there is no 100% reliable way to do it, people who are specifically seeking to get around it will still be able to do so, but you can eliminate casual clickage.

    That being said, the COM gurus here might know a more elemental way to achieve this.

  3. #3
    Join Date
    Sep 2002
    Location
    Sol 3
    Posts
    3,160
    The problem is that you cannot stop the navigation process once it has begun in the web Object. One thing you could do is have a timer that checks to see if the shift key is down and disables the web object while it is pressed.

    Maybe something like this on a timer that fires every 100-250 milliseconds.
    Code:
    if System.IsKeyDown(16) then
    	Web.SetEnabled("Web1", false);
    else
    	if not Web.IsEnabled("Web1") then
    		Web.SetEnabled("Web1", true);
    	end
    end
    TJ-Tigger
    "A common mistake that people make when trying to design something completely foolproof was to underestimate the ingenuity of complete fools."
    "Draco dormiens nunquam titillandus."
    Map of IR Forum Users - IR Project CodeViewer - Online Help - TiggTV - QuizEngine

  4. #4
    Corey is offline Indigo Rose Staff Alumni
    Join Date
    Aug 2002
    Posts
    9,746
    That's a cool idea.

  5. #5
    Join Date
    Sep 2002
    Location
    Sol 3
    Posts
    3,160
    If you are ambitious enough you can also combine this with the System.GetMousePosition to determine if the mouse is over the web object and only disable if it is.

    It would be great if there was an event for the web object that could be triggered before navition occurs. Before Navigation, On Navigation, On Loaded. There have been times in the past where I wanted to capture a navigation before it actually tries to navigate and stop the process. Not an easy thing to do.

    Tigg
    TJ-Tigger
    "A common mistake that people make when trying to design something completely foolproof was to underestimate the ingenuity of complete fools."
    "Draco dormiens nunquam titillandus."
    Map of IR Forum Users - IR Project CodeViewer - Online Help - TiggTV - QuizEngine

  6. #6
    Join Date
    Dec 2005
    Posts
    13

    On Timer Code in Right Place?

    I just trialled a piece of cool and easy to use software which seems toprevent right clicking, images etc.

    HTMLProtector from antssoft.com - works pretty good.

    I am trying the timer suggection now by TJ_Tigger which is a pretty logical solution.

    I have looked at this thread in order to understand timers etc...
    http://www.indigorose.com/forums/showthread.php?t=3384

    I have put this code into the On Timer Tab...

    01. Page.StartTimer(250)
    02. if System.IsKeyDown(16) then
    03. Web.SetEnabled("Web1", false);
    04. else
    05. if not Web.IsEnabled("Web1") then
    06. Web.SetEnabled("Web1", true);
    07. end
    08. end

    I can still shift click.

    Have I put the code in the correct place?

    Thanks for you help.

  7. #7
    Join Date
    Sep 2002
    Location
    Sol 3
    Posts
    3,160
    The Page.StartTimer should go on the page On Show event the rest goes on the On Timer event.
    TJ-Tigger
    "A common mistake that people make when trying to design something completely foolproof was to underestimate the ingenuity of complete fools."
    "Draco dormiens nunquam titillandus."
    Map of IR Forum Users - IR Project CodeViewer - Online Help - TiggTV - QuizEngine

  8. #8
    Join Date
    Dec 2005
    Posts
    13

    worked a treat

    Thanks Tigs,

    That works pretty good.

Similar Threads

  1. Web browser links
    By Ohiousa in forum AutoPlay Media Studio 6.0
    Replies: 1
    Last Post: 10-01-2005, 08:38 PM
  2. web browser object links
    By rhosk in forum AutoPlay Media Studio 4.0
    Replies: 20
    Last Post: 09-06-2003, 03:58 PM
  3. HOW TO: Return a Web Browser Object to the Original URL after a Page Jump
    By Support in forum AutoPlay Media Studio 4.0 Examples
    Replies: 0
    Last Post: 02-03-2003, 09:18 AM
  4. Problem with links within Web Browser Objects
    By CDrDup in forum AutoPlay Media Studio 4.0
    Replies: 6
    Last Post: 10-23-2002, 12:55 PM
  5. Replies: 0
    Last Post: 10-04-2002, 10:09 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts