毕业设计中要实现课件远程浏览,现在打开本地的powerpoitn文件显示在窗体的axWebBrowser1上,我希望能在powerpoint使用画笔画东西,可是axWebBrowser1没有鼠标等事件,所以我想拉一个panel控件覆盖在axWebBrowser1控件上,然后直接在panel上画画,但是要让panel完全透明,这样才能看到axWebBrowser1上的内容,这样一来好象就是直接画在axWebBrowser1上了,请问能实现这样的透明吗?
解决方案 »
- webBrowser 未将对象引用设置到对象的实例,问题在哪呀?
- 如何删掉字符串数组string[]指定索引的值
- sFlow协议包
- C#里面关于使用用户控件的问题
- 有什么办法可以获得当前按的是什么键?
- 玩过DataSet绑定下拉框的进
- 求助,c#不能导入大于100KB的文件到oracle的BLOB字段中
- 正则表达式问题中反义的使用问题
- 我在.NET开发时网页上传服务器后因为传的参数里包含了xml,但是我按照网上说的方法配置了config却还是报那个错
- WinForm下的TextBox有没有类似Web那样,曾经输入的文字能联想出来?
- FORM操作Excel的问题,大虾、小虾请多多帮忙
- 关于在treeView中添加节点的问题
在构造方法中,添加以下几句:
// Set control styles
this.SetStyle(ControlStyles.DoubleBuffer, true);
this.SetStyle(ControlStyles.AllPaintingInWmPaint, true);
this.SetStyle(ControlStyles.UserPaint, true);
this.SetStyle(ControlStyles.SupportsTransparentBackColor, true);
this.BackColor = Color.Transparent;
/// <summary>
/// Raises the PaintBackground event
/// </summary>
/// <param name="e">A PaintEventArgs that contains the event data</param>
protected override void OnPaintBackground(PaintEventArgs pevent)
{
// don't let windows paint our background as it will be black
// (we'll paint the background in OnPaint instead)
}/// <summary>
/// Raises the Paint event
/// </summary>
/// <param name="e">A PaintEventArgs that contains the event data</param>
protected override void OnPaint(PaintEventArgs e)
{
base.OnPaintBackground(e);// 做一些其他的绘出操作
...// 下面的事件是否需要再引发,自己看着办。
// 如果不需要,删掉它。
if (this.Paint != null)
this.Paint(this, e);
}
有没有用,自己试试吧。反正我要实现透明控件,都是这么做的。不过,楼主的实践环境我未曾做过。