i tried to use it like this but dosen't work if i drag a page from a browser to the app window it loads the url and i don't want that
Code: Select all
Global Window_Main
Global Gadget_Web
Global appdir$
a$=Space(999) : GetModuleFileName_(0,@a$,999) : appdir$=GetPathPart(a$) 
Procedure NavigationCallback(Gadget, Url$)
    ;
    ; Return #True to allow this navigation or #False to deny it.
    ;
    Debug "called"
    ProcedureReturn #False
  EndProcedure
Procedure OpenWindow_Window_Main()
  ExamineDesktops()
  Window_Main = OpenWindow(#PB_Any, 0, 0, 780,560, "", #PB_Window_SystemMenu|#PB_Window_SizeGadget|#PB_Window_MinimizeGadget|#PB_Window_TitleBar|#PB_Window_MaximizeGadget|#PB_Window_ScreenCentered|#PB_Window_Maximize)
  If Window_Main
    If CreateGadgetList(WindowID(Window_Main))
      Gadget_Web = WebGadget(#PB_Any, 0, 0, WindowWidth(Window_Main),WindowHeight(Window_Main),appdir$+"library\index.html",#PB_Web_NavigationCallback)
      PureRESIZE_SetGadgetResize(Gadget_Web, 1, 1, 1, 1)
      SetGadgetAttribute(Gadget_Web, #PB_Web_BlockPopupMenu ,1)
      PureRESIZE_SetWindowMinimumSize(Window_Main, 780, 560)
    EndIf
  EndIf
EndProcedure
OpenWindow_Window_Main()
Repeat
  Select WaitWindowEvent()
    Case #PB_Event_Gadget
      Select EventGadget()
        Case Gadget_Web
          NavigationCallback(Gadget_Web,"")
      EndSelect
    Case #PB_Event_CloseWindow
     Select EventWindow()
      Case Window_Main
        CloseWindow(Window_Main)
        Window_Main = 0
        Break
     EndSelect
  EndSelect
ForEver