vb.net programmers here using cefsharp?

38 views
Skip to first unread message

SwissToughGuys

unread,
Nov 8, 2015, 9:03:47 AM11/8/15
to CefSharp
i have some general VB problem i think (so i'm not sure if this post is ok here).

I got a form containing a chromiumwebbrowser. I inject some javascript and have a class containing methods which are called from javascript inside the browser-control. Everything works fine. Now, i try to call some sub or function within the form and that issues an error. If i would declare them as "shared" it would work, but as i also access the form it self, i cannot do so.

my structure:

class form1
    public class callback1
        method1()
            call dosomething
        method2()
    end class
    webcontrol1 chromiumwebbrowser
        javascript
             ....
             call callback1.method1()
             ....

    public sub dosomething
             form1.windowstate = maximized
    end sub
end form1

as work around i declared a timer in form1 in which i check a property of callback1 set by the called methods (sort of "commands") and in the timer i call the form handling.

that works, but i'm not so happy with that :-D

Anyone has any idea?

Alex Maitland

unread,
Nov 8, 2015, 4:19:57 PM11/8/15
to CefSharp
If you don't get an answer in a couple of days it might be worth asking on stackoverflow.
Reply all
Reply to author
Forward
0 new messages