WPF cefsharp内嵌浏览器 iframe.print() 打印样式问题

WPF cefsharp内嵌浏览器。chrome访问打印正常,在WPF程序中访问打印样式有问题

1个回答

gx18643165
gx18643165 嵌入的html页面 浏览器访问纵向和横向打印都是正常的,桌面WPF程序纵向打印 打印出来的页面宽度变小了 字体好像也变大了
11 个月之前 回复
gx18643165
gx18643165 .....我的是打印的问题啊
11 个月之前 回复
Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
WPF内嵌CEFSharp控件与JS交互
1)安装cefsharp.winform包 打开VS2017,新建WPF项目,打开nuget,找到cefsharp.winform,安装 1.为什么wpf程序不使用cefsharp.wpf? 因为cefwpf 49版本的bug很多,而winform_cef就比较靠谱,比如在不同的输入法切换后无法输入中文 2.那为什么不使用更高版本的cefwpf? 因为要支持XP,而49版本是cef...
WPF CefSharp浏览器
WPF CefSharp浏览器,chrome内核浏览器,WPF开发制作。
WPF运用CefSharp开发浏览器Demo
1、WPF工程 2、.NET4.0 版本 3、CefSharp 43.0.0.0 4、简单运用,二次开发可加入自己的想要的功能
WPF中使用CefSharp嵌入浏览器
日常开发中,我们需要将一些Web页面嵌入到桌面客户端软件中。下面我们使用CefSharp嵌入浏览器来实现。 首先先介绍一下CefSharp嵌入式浏览器,它是基于Google浏览器的一个组件,我们可以在WPF/WinForm客户端软件中使用它。CefSharp的代码托管在GitHub上,.NET (WPF and Windows Forms) bindings for the Chromium Embedded Framework。 看到好的源码,一起交给大家分享,5分不多,也不少,哈哈,环境是vs2013,可以学习的精品资料.
wpf打印界面设计样式
wpf打印界面设计样式,有图片截图。是项目中间的,比较好看。我没有想到这样的方法。
WPF使用CefSharp
请问WPF使用CefSharp(谷歌浏览器内核)如何解决分平台(分32位和64位操作系统)问题?这样的话程序只能打包两份吗?
wpf 写的cefsharp Demo
wpf 写的cefsharp 63版本编写的demo 支持flash,vedio标签,可播放MP4格式视频。里面有x86和x64版本,默认x86版本,改为x64的时候记得更换里面添加的引用路径。支持缓存,支持屏蔽右键菜单,支持开启电脑摄像头和录音,支持下载,支持文件对话框过滤等。
wpf CefSharp加载ChromiumWebBrowser63.0DLL
wpf 内嵌浏览器CefSharp 加载ChromiumWebBrowser,用63.0dll,支持播放mp4,mp3等
C#WinForm使用CefSharp内嵌实例
CefSharp的Browser怎么说也是嵌入了Chromium的浏览器,所以碰到<a >标签“_blank”这样的时候,都是弹出新窗体打开新页面。 但是怎奈我使用了DevExpress控件中的TabForm这个东西来作为主窗体,所以我不希望弹出新的窗体来,那么就需要捕获打开新窗体这样一个事件来重写了。
WPF内嵌exe问题
先上代码 rnrnrnusing System;rnusing System.Collections.Generic;rnusing System.Linq;rnusing System.Text;rnusing System.Windows;rnusing System.Runtime.InteropServices;rnusing System.Windows.Interop;rnusing System.Windows.Controls;rnusing System.Threading;rnrnrn [DllImport("user32.dll")]rn private static extern int SetParent(IntPtr hWndChild, IntPtr hWndParent);rn [DllImport("user32.dll", SetLastError = true, CharSet = CharSet.Auto)]rn private static extern uint SetWindowLong(IntPtr hwnd, int nIndex, uint newLong);rn [DllImport("user32.dll", SetLastError = true, CharSet = CharSet.Auto)]rn private static extern uint GetWindowLong(IntPtr hwnd, int nIndex);rn [DllImport("user32.dll")]rn private static extern int EnumWindows(CallBackPtr callPtr, ref WindowInfo WndInfoRef);rn [DllImport("User32.dll")]rn static extern int GetWindowText(IntPtr handle, StringBuilder text, int MaxLen);rn [DllImport("user32.dll")]rn public static extern int GetWindowRect(IntPtr hwnd, ref RECT rc);rn [DllImport("user32.dll")]rn public static extern bool MoveWindow(IntPtr hWnd, int X, int Y, int nWidth, int nHeight, bool bRepaint);rn [DllImport("user32.dll", EntryPoint = "FindWindowEx",rnrn CharSet = CharSet.Auto)]rnrn public static extern IntPtr FindWindowEx(IntPtr hwndParent, IntPtr hwndChildAfter, string lpszClass, string lpazWindow);rn [DllImport("user32.dll")]rn public static extern bool SetWindowPos(rn IntPtr hWnd, // handle to windowrn IntPtr hWndInsertAfter, // placement-order handle 安置顺序处理rn int X, // horizontal positionrn int Y, // vertical positionrn int cx, // widthrn int cy, // heightrn uint uFlags // window-positioning optionsrn );rn [DllImport("user32.dll")]rn public static extern IntPtr FindWindow(rn string lpClassName, // class namern string lpWindowName // window namern );rn [DllImport("user32.dll")]rn public static extern long SetWindowPosition(rn long Left,rn long Top,rn long Width,rn long Heightrn );rn internal const intrn GWL_WNDPROC = (-4),rn GWL_HINSTANCE = (-6),rn GWL_HWNDPARENT = (-8),rn GWL_STYLE = (-16),rn GWL_EXSTYLE = (-20),rn GWL_USERDATA = (-21),rn GWL_ID = (-12);rn internal const uintrn WS_CHILD = 0x40000000,rn WS_VISIBLE = 0x10000000,rn LBS_NOTIFY = 0x00000001,rn HOST_ID = 0x00000002,rn LISTBOX_ID = 0x00000001,rn WS_VSCROLL = 0x00200000,rn WS_BORDER = 0x00800000,rn WS_POPUP = 0x80000000;rn internal IntPtrrn BOTTOM = (IntPtr)1,rn Top = (IntPtr)0;rn private const int HWND_TOP = 0x0;rn private const int WM_COMMAND = 0x0112;rn private const int WM_QT_PAINT = 0xC2DC;rn private const int WM_PAINT = 0x000F;rn private const int WM_SIZE = 0x0005;rn private const int SWP_FRAMECHANGED = 0x0020;rn private Border WndHoster;rn private double screenW, screenH;rn private System.Diagnostics.Process appProc;rn private uint oldStyle;rn public IntPtr hwndHost;rn private String appPath;rn public EmbeddedApp(Border b, double sW, double sH, String p, String f)rn rn WndHoster = b;rn screenH = sH;rn screenW = sW;rn appPath = p;rn WinInfo = new WindowInfo();rn WinInfo.winTitle = f;rn rn protected override HandleRef BuildWindowCore(HandleRef hwndParent)rn rn appProc = new System.Diagnostics.Process();rn appProc.StartInfo.FileName = appPath;rn appProc.Start();rn Thread.Sleep(2000);rn hwndHost = FindWindow(null, "Island Demo");rn //hwndHost = appProc.MainWindowHandle;rn // 嵌入在HwnHost中的窗口必须要 设置为WS_CHILD风格rnrn oldStyle = GetWindowLong(hwndHost, GWL_STYLE);rn uint newStyle = oldStyle;rn newStyle |= WS_CHILD;rn newStyle &= ~WS_POPUP;rn SetWindowLong(hwndHost, GWL_STYLE, oldStyle | newStyle);rnrn //将netterm的父窗口设置为HwndHostrn SetParent(hwndHost, hwndParent.Handle);rn GetWindowRect(hwndHost, ref (WinInfo.r));rn SetWindowPos(hwndHost, BOTTOM, 0, 0, 200, 200, 0x0040);rn return new HandleRef(this, hwndHost);rn rn protected override void DestroyWindowCore(System.Runtime.InteropServices.HandleRef hwnd)rn rn SetWindowLong(hwndHost, GWL_STYLE, oldStyle);rn SetParent(hwndHost, (IntPtr)0);rn rn [StructLayout(LayoutKind.Sequential)]rn public struct RECTrn rn public int left;rn public int top;rn public int right;rn public int bottom;rn rn [StructLayout(LayoutKind.Sequential)]rn public struct WindowInforn rn public String winTitle;rn public RECT r;rn public IntPtr hwnd;rn rn public delegate bool CallBackPtr(IntPtr hwnd, ref WindowInfo WndInfoRef);rn private static CallBackPtr callBackPtr;rn public WindowInfo WinInfo;rn public static bool CallBackProc(IntPtr hwnd, ref WindowInfo WndInfoRef)rn rn StringBuilder str = new StringBuilder(512);rn GetWindowText(hwnd, str, str.Capacity);rn if (str.ToString().IndexOf(WndInfoRef.winTitle, 0) >= 0)rn rn WndInfoRef.hwnd = hwnd;rn GetWindowRect(hwnd, ref (WndInfoRef.r));rn rn return true;rn rn public IntPtr FindTheWindow()rn rn callBackPtr = new CallBackPtr(CallBackProc);rn EnumWindows(callBackPtr, ref WinInfo);rn return WinInfo.hwnd;rn rn public void RePosWindow(Border b, double screenW, double screenH)rn rn double width = WinInfo.r.right - WinInfo.r.left;rn double height = WinInfo.r.bottom - WinInfo.r.top;rn double left, right, top, bottom;rn if (screenW < width)rn rn left = 0;rn right = 100;rn rn elsern rn left = (screenW - width) / 2;rn right = (screenW - width) / 2;rn rn if (screenH < height)rn rn top = 0;rn bottom = 100;rn rn elsern rn top = (screenH - height) / 2;rn bottom = (screenH - height) / 2;rn rn //double width = 300;rn //double height = 300;rn //double left = 50;rn //double right = 50;rn //double top = 50;rn //double bottom = 50;rn b.Margin = new Thickness(left, top, right, bottom);rn rnrn上面是EmbeddedApp.cs内容rnrn下面是窗体.cs代码。rn string formName;rn String path;rnrn formName = "Island Demo";rn path = Environment.CurrentDirectory + "\\" + "3D Demo\\app.exe";rnrn EmbeddedApp ea = new EmbeddedApp(WndHost, this.Width, this.Height, path, formName);rn WndHost.Child = ea;rn可以运行出rnrn[img=http://img.my.csdn.net/uploads/201212/14/1355480089_6058.jpg][/img]rn但是鼠标和键盘全部失效。根本操作不了这个窗体。rn谁有好办法吗?rnhttp://www.itpub.net/forum.php?mod=viewthread&tid=980820rn这个人说有办法。可是他的说【Win32Native .cs是我们写的一个对Win32API的调用声明,都是简单的PInvoke声明,由于尺寸比较大这里就不贴出来了,大家可以查MSDN自己来声明。】
CefSharp封装浏览器
运行环境.net framework 4.5.2,vc++2013 内嵌cefsharp57,支持mp3 mp4播放。
CefSharp浏览器源代码
CefSharp浏览器源代码,CefSharp浏览器源代码,CefSharp浏览器源代码,CefSharp浏览器源代码,
CefSharp嵌入式浏览器
日常开发中,我们需要将一些Web页面嵌入到桌面客户端软件中。下面我们使用CefSharp嵌入浏览器来实现。  首先先介绍一下CefSharp嵌入式浏览器,它是基于Google浏览器的一个组件,我们可以在WPF/WinForm客户端软件中使用它。CefSharp的代码托管在GitHub上,.NET (WPF and Windows Forms) bindings for the Chromium...
内嵌样式
我用sharepoint,发现跟FP2003不一样,设置属性时,sharepoint会在头部自动生成.style 1等内嵌样式。rnrn我想问的是:如何才能遍历这些样式并添加或者删除一个新样式?rnrn我是菜鸟,问题有点白,原谅则个。呵呵。
Swing内嵌浏览器问题
DJNativeSwing 这个东西谁用过!能给我讲讲用法吗?真心不会用!求大神给我讲讲,最好带图解!
webkit的问题,内嵌浏览器?
如何在应用中内嵌一个浏览器,不显示地址栏什么的,只有网页内容。rn
CefSharp内嵌chrome浏览器 支持mp4 h264编码
https://download.csdn.net/download/qq_20757489/10868821 CefSharp 63版本(X86)编译好的文件支持mp3 mp4 1.创建winform程序,使用.NET 4.5.2或以上。 2.在解决方案上右键-&amp;gt;&quot;属性&quot;-&amp;gt;&quot;生成&quot;-&amp;gt;&quot;目标平台&quot;,选择x86,Cef暂不支持&quot;Any CPU&quot;。 3.将下载下来的文件解...
wpf combobox内嵌treeview的问题
此功能是参考此链接做的. http://www.silverlightchina.net/html/study/WPF/2013/0219/21920.htmlrnxaml代码如下 rn[code=csharp]rnrn rn rn rn rn rn rn rn rn rn rnrn rnrn rn rn rn rn rn rn rn rn rn[/code]rnrn后台代码:rn[code=csharp]rnrnpublic CommonTypeListOp()rn InitializeComponent();rn this.FParentId.DataContext = bllCt.GetTrees(tList);rnrn private void lftTree_SelectedItemChanged(object sender, RoutedPropertyChangedEventArgs e)rn rn var a = e.NewValue as Model.YCommonTypeList;rn if (a.ID > 0)rn rn this.FParentId.Items[0] = a;rn this.FParentId.SelectedIndex = 0;rn rn rn rn[/code]rnrnrn大概运行效果:rn第一次点击combobox:rn[img=https://img-bbs.csdn.net/upload/201403/23/1395586544_146404.png][/img]rnrn点击treeview上的节点后:rn[img=https://img-bbs.csdn.net/upload/201403/23/1395586597_24500.png][/img]rnrn最后在点击combobox:rn[img=https://img-bbs.csdn.net/upload/201403/23/1395586623_268414.png][/img]rnrn从结果可以看到点击treeview上的节点已经去到第一个comboxitem,但就是不明白为什么会显示在在combobox上,,rn还有一个问题就是。。我的第一个comboxitem高度已经设置为0,但他还是显示出来。不知道如何把他隐藏起来!rnrn
CSharp开发的浏览器,基于CefSharp
老外使用CefSharp做的简单浏览器,大家可以从https://github.com/sharpbrowser/SharpBrowser直接下载,这里只是方便自己和需要的朋友下载更快。
WPF样式继承问题
我在程序中定义了很多样式,如一些TextBlock、Button的默认样式。但当WPF的控件构成中存在这些基本控件的时候,也会使用这些自定义的样式,这样控件程序出来的效果不好看(如我定义了Button的统一宽度是70,这样导致到DatePicker控件的日期选择的按钮宽度也变成了70),请问如何让控件不自动使用设置自定义的样式呢?
wpf 按钮样式的问题
[code=XML]rnrn rn rn rn rn rn rn rn rn rn [/code]rn请高手解答一下:1》ImageBrush 的ImageSource怎么绑定到调用他的Button的某个属性下rn 2>这段,怎么修改ImageBrush下的Viewbox的值rn这是我写的一个Button的样式,现在就这两个问题没有解决了。rn
wpf样式问题
请教大神, 为什么在下面红色代码设置样式时,点击按钮可以获取样式中的combobox,在蓝色代码设置时,获取的是null。rn如果需要在蓝色代码设置时可以获取到样式中的combobox,要怎么写代码rnrnxaml代码rnrn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn btnrn rnrnrn.cs代码rnusing System;rnusing System.Collections.Generic;rnusing System.Collections.ObjectModel;rnusing System.ComponentModel;rnusing System.Linq;rnusing System.Text;rnusing System.Threading.Tasks;rnusing System.Windows;rnusing System.Windows.Controls;rnusing System.Windows.Data;rnusing System.Windows.Documents;rnusing System.Windows.Input;rnusing System.Windows.Media;rnusing System.Windows.Media.Imaging;rnusing System.Windows.Navigation;rnusing System.Windows.Shapes;rnrnnamespace WpfApplication3rnrn /// rn /// MainWindow.xaml 的交互逻辑rn /// rn public partial class MainWindow : Windowrn rn ObservableCollection collection = new ObservableCollection();rnrn public MainWindow()rn rn InitializeComponent();rn rn for(int i = 0 ;i < 6 ;i++)rn rn Person ps = new Person();rn ps.name = "name : " + i ;rn ps.id = "id : " + i;rn ps.age = "age : " + i;rn ps.sex = "sex : " + i;rn collection.Add(ps);rn rnrn DataGridTextColumn dgt = new DataGridTextColumn();rn dgt.Header = "dg1";rn Binding bi = new Binding("name");rn dgt.Binding = bi;rn dg.Columns.Add(dgt);rnrn dg.ItemsSource = collection;rnrn [color=#FF0000]dg.Columns[0].HeaderStyle = Resources["style1"] as Style;[/color]rn rnrn private void btn_Click(object sender, RoutedEventArgs e)rn rn [color=#0000FF]//dg.Columns[0].HeaderStyle = Resources["style1"] as Style;[/color]rnrn var child = FindChild(dg);rnrn if (null == child)rn rnrn rn rnrn public T FindChild(DependencyObject parent) where T : DependencyObjectrn rn for (int i = 0; i < VisualTreeHelper.GetChildrenCount(parent) ;i++ )rn rn DependencyObject child = VisualTreeHelper.GetChild(parent, i);rnrn if (child != null && child is T)rn rn return child as T ;rn rn elsern rn T childofchild = FindChild(child);rn if (null != childofchild )rn rn return childofchild;rn rn rn rnrn return null;rn rn rnrn public class Person : INotifyPropertyChangedrn rn private string _name = string.Empty;rn public string namern rn get return _name; rn setrn rn _name = value;rn OnPropertyChanged("name");rn rn rnrn private string _id = string.Empty;rn public string idrn rn get return _id; rn setrn rn _id = value;rn OnPropertyChanged("id");rn rn rnrn private string _age = string.Empty;rn public string agern rn get return _age; rn setrn rn _age = value;rn OnPropertyChanged("age");rn rn rnrn private string _sex = string.Empty;rn public string sexrn rn get return _sex; rn setrn rn _sex = value;rn OnPropertyChanged("sex");rn rn rnrn public event PropertyChangedEventHandler PropertyChanged;rn public void OnPropertyChanged(string propertyName)rn rn if (null != PropertyChanged)rn rn PropertyChanged(this, new PropertyChangedEventArgs(propertyName));rn rn rn rn
WPF Listview 样式问题 ?
[code=C#]rn rn rn rn rnrnrn rn rn[/code]rn为什么 Image 和 TextBlock 重合在一起了? 求解啊。 我想弄成左右或上下分开的样式。rn
WPF样式资源的问题
我在我电脑上用Blend打开VS的项目,然后创建了一个Style.xaml,所有样式都设计完之后,在我电脑上测试没问题了rnrn然后我把这个Style.xaml发给别人rnrn他在项目里添加现有项目之后用不了呢?rnrnThemes="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Aero"rnrn所有问题都出在这里,他映射不到这个命名空间rn两边都是4.0的,为什么我电脑没我问题,到别人电脑上就不行呢?
WPF应用程序内嵌网页
WPF内嵌网页,可以将网页本地化,经查找相关资料后,决定采用CefSharp 1、首先新建WPF工程,打开工具进入NUGET,搜索CefSharp,然后安装CefSharp.Wpf\     本文转移到 https://shaynerain.com/wpf应用程序内嵌网页/     闻道有先后,术业有专攻   欢迎吐槽 作者: Shaynerain  ...
WPF内嵌exe代码
先上代码 rnrnrnusing System;rnusing System.Collections.Generic;rnusing System.Linq;rnusing System.Text;rnusing System.Windows;rnusing System.Runtime.InteropServices;rnusing System.Windows.Interop;rnusing System.Windows.Controls;rnusing System.Threading;rnrnrn [DllImport("user32.dll")]rn private static extern int SetParent(IntPtr hWndChild, IntPtr hWndParent);rn [DllImport("user32.dll", SetLastError = true, CharSet = CharSet.Auto)]rn private static extern uint SetWindowLong(IntPtr hwnd, int nIndex, uint newLong);rn [DllImport("user32.dll", SetLastError = true, CharSet = CharSet.Auto)]rn private static extern uint GetWindowLong(IntPtr hwnd, int nIndex);rn [DllImport("user32.dll")]rn private static extern int EnumWindows(CallBackPtr callPtr, ref WindowInfo WndInfoRef);rn [DllImport("User32.dll")]rn static extern int GetWindowText(IntPtr handle, StringBuilder text, int MaxLen);rn [DllImport("user32.dll")]rn public static extern int GetWindowRect(IntPtr hwnd, ref RECT rc);rn [DllImport("user32.dll")]rn public static extern bool MoveWindow(IntPtr hWnd, int X, int Y, int nWidth, int nHeight, bool bRepaint);rn [DllImport("user32.dll", EntryPoint = "FindWindowEx",rnrn CharSet = CharSet.Auto)]rnrn public static extern IntPtr FindWindowEx(IntPtr hwndParent, IntPtr hwndChildAfter, string lpszClass, string lpazWindow);rn [DllImport("user32.dll")]rn public static extern bool SetWindowPos(rn IntPtr hWnd, // handle to windowrn IntPtr hWndInsertAfter, // placement-order handle 安置顺序处理rn int X, // horizontal positionrn int Y, // vertical positionrn int cx, // widthrn int cy, // heightrn uint uFlags // window-positioning optionsrn );rn [DllImport("user32.dll")]rn public static extern IntPtr FindWindow(rn string lpClassName, // class namern string lpWindowName // window namern );rn [DllImport("user32.dll")]rn public static extern long SetWindowPosition(rn long Left,rn long Top,rn long Width,rn long Heightrn );rn internal const intrn GWL_WNDPROC = (-4),rn GWL_HINSTANCE = (-6),rn GWL_HWNDPARENT = (-8),rn GWL_STYLE = (-16),rn GWL_EXSTYLE = (-20),rn GWL_USERDATA = (-21),rn GWL_ID = (-12);rn internal const uintrn WS_CHILD = 0x40000000,rn WS_VISIBLE = 0x10000000,rn LBS_NOTIFY = 0x00000001,rn HOST_ID = 0x00000002,rn LISTBOX_ID = 0x00000001,rn WS_VSCROLL = 0x00200000,rn WS_BORDER = 0x00800000,rn WS_POPUP = 0x80000000;rn internal IntPtrrn BOTTOM = (IntPtr)1,rn Top = (IntPtr)0;rn private const int HWND_TOP = 0x0;rn private const int WM_COMMAND = 0x0112;rn private const int WM_QT_PAINT = 0xC2DC;rn private const int WM_PAINT = 0x000F;rn private const int WM_SIZE = 0x0005;rn private const int SWP_FRAMECHANGED = 0x0020;rn private Border WndHoster;rn private double screenW, screenH;rn private System.Diagnostics.Process appProc;rn private uint oldStyle;rn public IntPtr hwndHost;rn private String appPath;rn public EmbeddedApp(Border b, double sW, double sH, String p, String f)rn rn WndHoster = b;rn screenH = sH;rn screenW = sW;rn appPath = p;rn WinInfo = new WindowInfo();rn WinInfo.winTitle = f;rn rn protected override HandleRef BuildWindowCore(HandleRef hwndParent)rn rn appProc = new System.Diagnostics.Process();rn appProc.StartInfo.FileName = appPath;rn appProc.Start();rn Thread.Sleep(2000);rn hwndHost = FindWindow(null, "Island Demo");rn //hwndHost = appProc.MainWindowHandle;rn // 嵌入在HwnHost中的窗口必须要 设置为WS_CHILD风格rnrn oldStyle = GetWindowLong(hwndHost, GWL_STYLE);rn uint newStyle = oldStyle;rn newStyle |= WS_CHILD;rn newStyle &= ~WS_POPUP;rn SetWindowLong(hwndHost, GWL_STYLE, oldStyle | newStyle);rnrn //将netterm的父窗口设置为HwndHostrn SetParent(hwndHost, hwndParent.Handle);rn GetWindowRect(hwndHost, ref (WinInfo.r));rn SetWindowPos(hwndHost, BOTTOM, 0, 0, 200, 200, 0x0040);rn return new HandleRef(this, hwndHost);rn rn protected override void DestroyWindowCore(System.Runtime.InteropServices.HandleRef hwnd)rn rn SetWindowLong(hwndHost, GWL_STYLE, oldStyle);rn SetParent(hwndHost, (IntPtr)0);rn rn [StructLayout(LayoutKind.Sequential)]rn public struct RECTrn rn public int left;rn public int top;rn public int right;rn public int bottom;rn rn [StructLayout(LayoutKind.Sequential)]rn public struct WindowInforn rn public String winTitle;rn public RECT r;rn public IntPtr hwnd;rn rn public delegate bool CallBackPtr(IntPtr hwnd, ref WindowInfo WndInfoRef);rn private static CallBackPtr callBackPtr;rn public WindowInfo WinInfo;rn public static bool CallBackProc(IntPtr hwnd, ref WindowInfo WndInfoRef)rn rn StringBuilder str = new StringBuilder(512);rn GetWindowText(hwnd, str, str.Capacity);rn if (str.ToString().IndexOf(WndInfoRef.winTitle, 0) >= 0)rn rn WndInfoRef.hwnd = hwnd;rn GetWindowRect(hwnd, ref (WndInfoRef.r));rn rn return true;rn rn public IntPtr FindTheWindow()rn rn callBackPtr = new CallBackPtr(CallBackProc);rn EnumWindows(callBackPtr, ref WinInfo);rn return WinInfo.hwnd;rn rn public void RePosWindow(Border b, double screenW, double screenH)rn rn double width = WinInfo.r.right - WinInfo.r.left;rn double height = WinInfo.r.bottom - WinInfo.r.top;rn double left, right, top, bottom;rn if (screenW < width)rn rn left = 0;rn right = 100;rn rn elsern rn left = (screenW - width) / 2;rn right = (screenW - width) / 2;rn rn if (screenH < height)rn rn top = 0;rn bottom = 100;rn rn elsern rn top = (screenH - height) / 2;rn bottom = (screenH - height) / 2;rn rn //double width = 300;rn //double height = 300;rn //double left = 50;rn //double right = 50;rn //double top = 50;rn //double bottom = 50;rn b.Margin = new Thickness(left, top, right, bottom);rn rnrn上面是EmbeddedApp.cs内容rnrn下面是窗体.cs代码。rn string formName;rn String path;rnrn formName = "Island Demo";rn path = Environment.CurrentDirectory + "\\" + "3D Demo\\app.exe";rnrn EmbeddedApp ea = new EmbeddedApp(WndHost, this.Width, this.Height, path, formName);rn WndHost.Child = ea;rn可以运行出rn[img=http://img.my.csdn.net/uploads/201212/14/1355477943_2274.jpg][/img]rnrn但是鼠标和键盘全部失效。根本操作不了这个窗体。rn谁有好办法吗?rnhttp://www.itpub.net/forum.php?mod=viewthread&tid=980820rn这个人说有办法。可是他的说【Win32Native .cs是我们写的一个对Win32API的调用声明,都是简单的PInvoke声明,由于尺寸比较大这里就不贴出来了,大家可以查MSDN自己来声明。】rn
word内嵌于浏览器的问题
word内嵌于浏览器得一段代码:rn<%@ page contentType="application/msword;charset=gb2312" %>rn<%@ page import="java.sql.*" %>rn<%rn response.addHeader("content-disposition", "inline; filename=report.doc");rn%>rnrnrn 报表rnrnrn 报表rn rn rn 用户名rn 真实姓名rn 性别rnrnrn问题:怎么没有显示word的工具条?我想利用word自身的排版打印功能。
关于Java内嵌浏览器的问题
现在要做一个java应用程序。这个程序中要用到内嵌的浏览器,并且希望在用户点击浏览器中的页面元素时,java程序中能够获取到对应事件,并在从该事件中得到是网页上的(也就是DOM树上的)哪个元素。rnrn请大家推荐哪些内嵌浏览器可以满足这样的需求?rn并告知使用的难易程度,以及是否要收费等服务信息?
浏览器内嵌暴风影音播放问题
想在浏览器中使用暴风影音播放MP4文件, 在网上查了下源码:rnrnrn```rn rn rn rn rn rn rn rn rn rn rnrn```rnrnrnrn但是显示是一片空白, 有大虾能帮忙指点下吗? 万分感谢
swt内嵌浏览器浏览问题
我swt内嵌ie浏览器出现的问题:rn 我有html页面,里面有用InetSoft生成的报表,用ie打开能正常显示,我的程序是swt内嵌ie浏览器去打开这个html页面,却不能正常显示。rn症状:那个报表(图表)只能显示一部分,他充满整个浏览器的窗口。这是为什么。是分辨率的问题吗?rn除了这以外,我用我的这个程序访问其他网页(比如百度,新浪等等)很正常。
利用CWebBrowser2 内嵌浏览器的问题
[img=https://img-bbs.csdn.net/upload/201410/13/1413192285_937230.png][/img]几乎每次打开都会出现这个提示,怎么去掉这个提示呢。除了手动或者用代码修改IE的属性,还有别的办法吗?rnrn还有,有没人能提供一下CWebBrowser2 这个类的使用说明文档
调用IE内嵌浏览器问题
ATL方式调用IE内嵌浏览器,调出来了,但是却打不开网页,传入的地址是没用问题。rn[code=C/C++]rnif (!m_WinContainer)rn rn m_WinContainer.Create(m_FatherHWND ,rn m_Rect,rn TEXT("Microsoft.PIEDocView") ,rn WS_CHILD | WS_VISIBLE | WS_BORDER, 0,1) ;rn if (m_WinContainer)rn hr = m_WinContainer.QueryControl(&m_spIWebBrowser2) ;rn elsern return bRet ;rn if(SUCCEEDED(hr)) bRet =1 ;rn rn m_WinContainer.MoveWindow(&m_Rect) ;rn if (!m_spIWebBrowser2)rn m_WinContainer.QueryControl(&m_spIWebBrowser2) ;rn[/code]rn起初m_WinContainer.Create失败,结果原因是ATL没用初始化,于是工程属性改为静态链接到ATL,再加上下面一行代码:rn[code=C/C++]rnCComModule _Module;rn_Module.Init(NULL, GetModuleHandle(NULL), &LIBID_ATLLib);rn[/code]rn创建成功了,可显示不出来网页,郁闷了,不知道哪里的问题,请问各位有遇到这种情况么?谢谢了。
内嵌样式标记style
&amp;lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.01 Transitional//EN&quot; &quot;http://www.w3.org/TR/html4/loose.dtd&quot;&amp;gt; &amp;lt;html lang=&quot;en&quot;&amp;gt; &amp;lt;head&amp;gt; &amp;lt;meta http-equiv=&quot;Content-Type&quot; conten
网页制作之内嵌样式实例
1.内嵌样式表简介 2.HTML,ID,CLASS,伪类选择器运用 3.外部样式表使用 4.行类,内嵌,外部样式表优先级 5.border,margin,padding属性介绍(选择)     1.内嵌样式表简介   1.1 为什么需要内嵌样式表 当网页中某些标签想共享一些样式的时候,可以使用内嵌样式表。   1.2 内嵌样式
WPF 样式
Button: http://blog.csdn.net/zxlstudio/article/details/9428951 http://blog.csdn.net/fighter_yy/article/details/8694066 groupbox  http://blog.sina.com.cn/s/blog_7f83849b0101549z.html htt
WPF样式
1.样式style的定义与使用 1.1定义某种控件的style 自定义按钮 普通按钮 1.2定义适用与大部分控件的style
WPF编程学习——样式
转载地址:http://www.cnblogs.com/libaoheng/archive/2011/11/20/2255963.html 本文目录   1.引言   2.怎样使用样式?   3.内联样式   4.已命名样式   5.元素类型样式   6.编程控制样式   7.触发器 1.引言   样式(Style),主要是用来让元素或内容呈现一定外观的属性。WPF中的
wpf 样式
[img=https://img-bbs.csdn.net/upload/201608/25/1472109218_10457.png][/img]rn如上图火狐浏览器,点击打开按钮弹窗一个弹框,按钮下有个三角指向该按钮表示从此处拓展出来的菜单。这个用wpf怎么实现呢?
浏览器样式问题
[code=csharp]rn<% foreach (Article article in AllKindArticles[3 * i])rn %>rn rn rn rn <%=ToStr(article.Title, TitleLength)%>rn rn rn rn <%=ToDateStr(article.Updated, DateFormat)%>rn rn rn <% %>rn[/code]rn样式:rn[code=html]rn.NewsTab_Default .datern color:#999;rn padding-left:5px;rn float:left;rnrn.NewsTab_Default .datetimecolor:#999; padding-right:5px; float:rightrn[/code]rn这样式在360是正常的,在IE上就不正常,会2个文章标题在同一行中,如果把date样式去除,那IE就正常了,360浏览器的标题和日期没有对称,日期会空一行。
不同浏览器样式问题。
开发个项目,用了很多机子很多版本浏览器测这个项目,唯独有台机子(而且就这一台) IE 8.0.7601.17514这个版本下浏览页面时,本该横着的s:submit按钮 变竖着排列了。。。rn同时也会产生个别页面的左右2个div上下移位。有大神知道怎么个情况不?rn
相关热词 c#检测非法字符 c#双屏截图 c#中怎么关闭线程 c# 显示服务器上的图片 api嵌入窗口 c# c# 控制网页 c# encrypt c#微信网页版登录 c# login 居中 c# 考试软件