locked
Access is denied. (Exception from HRESULT ? RRS feed

  • Question

  • Hello & Thanks ;
    When RUN-ing the code below , I get the following Error:
    "Sorry, we found some errors.„
    Access is denied. (Exception from HRESULT•. ox80070005 (E ACCESSDENIED)) "

    GraphicsWindow.MouseDown = OnMouseClick
    GraphicsWindow.Show()

    Sub OnMouseClick
      GraphicsWindow.ShowMessage("You clicked the mouse", "Hello")
    EndSub

    Pls , what is wrong ?
    Thanks for your help 


    "All things in moderation, except for love and forgiveness."...vm

    Friday, July 31, 2020 12:10 AM

Answers

  • use graphicswindow.title or backgrndclr instead of show method

    common error sources:

    • textwin or grphwin show/hide
    • turtle show/hide
    • too long event subs
    • timer sub
    • calling lddiaolgs inside event subs


    • Edited by Tryhest Friday, July 31, 2020 1:32 PM
    • Marked as answer by vmars316 Friday, July 31, 2020 4:44 PM
    Friday, July 31, 2020 1:28 PM

All replies

  • I tried your program and it works without errors.

    Which version of SB are you using?


    Jan [ WhTurner ] The Netherlands

    Friday, July 31, 2020 9:13 AM
    Answerer
  • use graphicswindow.title or backgrndclr instead of show method

    common error sources:

    • textwin or grphwin show/hide
    • turtle show/hide
    • too long event subs
    • timer sub
    • calling lddiaolgs inside event subs


    • Edited by Tryhest Friday, July 31, 2020 1:32 PM
    • Marked as answer by vmars316 Friday, July 31, 2020 4:44 PM
    Friday, July 31, 2020 1:28 PM
  • smallbasic_0.12.18.zip

    "All things in moderation, except for love and forgiveness."...vm

    Friday, July 31, 2020 2:05 PM
  • Thanks ;

    GraphicsWindow.BackgroundColor = LDColours.BlueViolet 

    worked fine :)


    "All things in moderation, except for love and forgiveness."...vm

    Friday, July 31, 2020 2:13 PM
  • Thanks ;

    [Which version of SB are you using?

    'Add or Remove' says v1.2 .

    Is there a newer version ? 

    Thanks


    "All things in moderation, except for love and forgiveness."...vm

    Friday, July 31, 2020 6:53 PM
  • Ugh ! 

    For some reason it stopped working ? 

    Stranger than fiction .


    "All things in moderation, except for love and forgiveness."...vm

    Friday, July 31, 2020 6:55 PM
  • Things are looking up !

    I downloaded SbPrime 

    and everthing runs just fine .


    "All things in moderation, except for love and forgiveness."...vm

    Saturday, August 1, 2020 12:04 AM