Advertisement
datatheoz

GeckoFx Alert Supression

Feb 1st, 2020
211
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VB.NET 0.52 KB | None | 0 0
  1. 'Source: https://stackoverflow.com/questions/48092059/disable-alert-boxes-when-site-not-found-gecko-fx-vb
  2.  
  3. 'Create a new class called NoPromptService with code:
  4.  
  5. Imports Gecko
  6.  
  7. Public Class NoPromptService
  8.     Inherits PromptService
  9.  
  10.     Public Overrides Sub Alert(ByVal dialogTitle As String, ByVal text As String)
  11.         Debug.WriteLine(text)'Instead of the alert dialog, it will print it out.
  12.     End Sub
  13. End Class
  14.  
  15. 'On Form_Load add code:
  16.         PromptFactory.PromptServiceCreator = Function() New NoPromptService
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement