开发者

Silverlight/VB 6 Integration

VB 6 can host web pages, which means it can also host Silverlight apps.

Communication from VB 6 to Silverlight can easily be done via URLs.开发者_运维知识库 But is there a way for the Silverlight app to send messages back to VB 6?


Ok how about this then.. Within the SilverLight app use the HtmlPage class to update the title of the page this can be monitored from the WebBrowser_TitleChange event in vb.

Silverlight code :-

var document = HtmlPage.Document;
document.SetProperty("title","whatever you need");

VB6 code :-

Private Sub WebBrowser_TitleChange(ByVal Text As String)        
    Debug.Print "Title changed to : " & Text        
End Sub

You'd have to ignore the initial TitleChange event when the page loads.


You could add a Winsock control to the vb app and get silverlight to talk back to it using WebClient?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜