Results 1 to 7 of 7

Thread: [RESOLVED] WebView2

  1. #1

    Thread Starter
    Frenzied Member jdc20181's Avatar
    Join Date
    Oct 2015
    Location
    Indiana
    Posts
    1,168

    Resolved [RESOLVED] WebView2

    I am implementing a simple app to load webmail for my new start up business, in its own app, I figured Webview2 would work since it seems to be supported for windows forms. What I can't seem to figure out is even after following the tutorial (exception is its vb) it still doesn't show up in the toolbox.

    Is Webview for some reason only supported for C#? Am I missing something?

    I am using 4.6.2, which should be still supported with that package. I have everything installed correctly, just seem to have the issue of getting it into existence.

    Reference link: https://docs.microsoft.com/en-us/mic...arted/winforms
    Disclaimer: When code is given for example - it is merely a example.




    Unless said otherwise indicated - All Code snippets advice or otherwise that I post on this site, are expressly licensed under Creative Commons Attribution 4.0 International Please respect my copyrights.

  2. #2

  3. #3

    Thread Starter
    Frenzied Member jdc20181's Avatar
    Join Date
    Oct 2015
    Location
    Indiana
    Posts
    1,168

    Re: WebView2

    That links to literally the same place I link to, and serves of no use to me or the issue at hand.
    Disclaimer: When code is given for example - it is merely a example.




    Unless said otherwise indicated - All Code snippets advice or otherwise that I post on this site, are expressly licensed under Creative Commons Attribution 4.0 International Please respect my copyrights.

  4. #4
    Sinecure devotee
    Join Date
    Aug 2013
    Location
    Southern Tier NY
    Posts
    6,582

    Re: WebView2

    Since it uses a library that is part of the Microsoft Edge (Chromium) Canary Channel installation to do rendering, you did install that first (one of the prerequisites) before NuGetting the Webview2 SDK, right?

    Also, since you have C# available, even if you don't plan on using it, you could have gone through the C# procedures and see if it showed up in the toolbox when doing a C# winForm project.
    If it shows up in the C# toolbox, but not in the VB toolbox, then perhaps there is an issues, although that doesn't seem likely. If it doesn't show up in either, than probably some prerequisite wasn't met.
    Last edited by passel; Jul 8th, 2020 at 10:41 PM.
    "Anyone can do any amount of work, provided it isn't the work he is supposed to be doing at that moment" Robert Benchley, 1930

  5. #5

    Thread Starter
    Frenzied Member jdc20181's Avatar
    Join Date
    Oct 2015
    Location
    Indiana
    Posts
    1,168

    Re: WebView2

    Quote Originally Posted by passel View Post
    Since it uses a library that is part of the Microsoft Edge (Chromium) Canary Channel installation to do rendering, you did install that first (one of the prerequisites) before NuGetting the Webview2 SDK, right?

    Also, since you have C# available, even if you don't plan on using it, you could have gone through the C# procedures and see if it showed up in the toolbox when doing a C# winForm project.
    If it shows up in the C# toolbox, but not in the VB toolbox, then perhaps there is an issues, although that doesn't seem likely. If it doesn't show up in either, than probably some prerequisite wasn't met.
    Yeah I did that, turns out I kind of skipped a step, apparently NuGet skips out on preleases on default, so I finally got it taken care of, now my issue is regards to a borderless form not wanting to be draggable. I have tried a few different methods, but as long as the webview control exists, it don't work. I figure there is something in the control MS disabled, but not quite sure.
    Disclaimer: When code is given for example - it is merely a example.




    Unless said otherwise indicated - All Code snippets advice or otherwise that I post on this site, are expressly licensed under Creative Commons Attribution 4.0 International Please respect my copyrights.

  6. #6
    Sinecure devotee
    Join Date
    Aug 2013
    Location
    Southern Tier NY
    Posts
    6,582

    Re: WebView2

    Does the webview control fill the form, that is, you can't get the mouse to trigger MouseDown or MouseMove events to the form?
    If so, does the webview control provide a mouseMove event?
    I usually use code like the following, as it is all contained in the one event handler, to move a control or a borderless form.
    Code:
      Private Sub Form1_MouseMove(sender As Object, e As System.Windows.Forms.MouseEventArgs) Handles Me.MouseMove
        Static lpos As Point
        If e.Button = Windows.Forms.MouseButtons.Left Then
          Me.Location += New Size(e.X - lpos.X, e.Y - lpos.Y)
        Else
          lpos = e.Location
        End If
      End Sub
    Last edited by passel; Jul 9th, 2020 at 12:22 PM.
    "Anyone can do any amount of work, provided it isn't the work he is supposed to be doing at that moment" Robert Benchley, 1930

  7. #7

    Thread Starter
    Frenzied Member jdc20181's Avatar
    Join Date
    Oct 2015
    Location
    Indiana
    Posts
    1,168

    Re: WebView2

    Quote Originally Posted by passel View Post
    Does the webview control fill the form, that is, you can't get the mouse to trigger MouseDown or MouseMove events to the form?
    If so, does the webview control provide a mouseMove event?
    I usually use code like the following, as it is all contained in the one event handler, to move a control or a borderless form.
    I know *how* I use a similar piece of code that you have posted, it only does not work when the WebView control is filling the form. So after looking around looks like it does have its own mousedown event, so I tried to just repurpose my code, to be raised by the browser's mousedown but it doesn't seem to work once a web page is loaded.

    It *is* in pre-release so, I imagine they already know this scenario - but couldn't be certain. I am going to try V1, and see if the same results occur. While EdgeHTML is not really a standard much many apps are still using it, so I will be back with my findings. May even contribute to the codebank if I find a way around it

    Entirely different set of issues with V1 - so not even worth my efforts. but, I will figure out a way around this. ugh.
    Last edited by jdc20181; Jul 11th, 2020 at 08:27 AM.
    Disclaimer: When code is given for example - it is merely a example.




    Unless said otherwise indicated - All Code snippets advice or otherwise that I post on this site, are expressly licensed under Creative Commons Attribution 4.0 International Please respect my copyrights.

Posting Permissions

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



Click Here to Expand Forum to Full Width