The type or namespace name 'OLEWEBBROWSER' could not be found (are you missing a using directive or an assembly reference?)
Not sure what is missing? I think about everything is included in the references.
A better alternative would be WebView2 (an Edge based component). I use it in a WPF window, see below.
Can it be used in a VOform in X#? If so, how?
Dick
Code: Select all
<Window x:Class="WebView2Browser.WebWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:WebView2Browser"
xmlns:wv2="clr-namespace:Microsoft.Web.WebView2.Wpf;assembly=Microsoft.Web.WebView2.Wpf"
mc:Ignorable="d"
Title="WebWindow" Height="800" Width="1000">
<DockPanel>
<DockPanel DockPanel.Dock="Top">
<Button x:Name="PrintPage" Width="25" FontWeight="Bold" FontSize="14" Click="ButtonPrint_Click" Height="25" ToolTip="Print" HorizontalAlignment="Right">
<Image Source="Printer.jpg" Width="25 "></Image>
</Button>
</DockPanel>
<wv2:WebView2 Name = "webView"
Source = "https://xsharp.eu"
/>
</DockPanel>
</Window>