Archive for 9 11 月, 2007

TURN ON OR TURN OFF PRINT BACKGROUND COLORS AND IMAGES

星期五, 9 11 月, 2007

INFORMATION

To configure Internet Explorer to print web pages which have background colors and images, you need to enable the setting Print Background Colors and Images. This allows background colors and images to print when you print a web page.

TURN ON OR TURN OFF PRINT BACKGROUND COLORS AND IMAGES

If you are a user you should follow the manual steps in the section below.

If you are a system administrator and wish to set this option directly in the Windows registry, follow the steps below:

Warning If you use Registry Editor incorrectly, you may cause serious problems that may require you to reinstall your operating system. Symprex cannot guarantee that you can solve problems that result from using Registry Editor incorrectly. You use it at your own risk.

Open the following registry key:

HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main

Set the string value Print_Background to yes(on) or no(off).

MANUALLY TURN ON OR TURN OFF PRINT BACKGROUND COLORS AND IMAGES

Follow these steps to turn on or turn off Print Background Colors and Images:

Step Mouse actions Keyboard actions
1 On the Internet Explorer menu bar:

  • Select Tools.
  • Click Internet Options.
On the Internet Explorer menu bar:

  • Open the Tools menu by pressing ALT+T.
  • Select Internet Options by pressing O.
2 In the Internet Options dialog box:

  • Select the Advanced tab.
In the Internet Options dialog box:

  • Move to the Advanced tab by pressing the CTRL+TAB.
3 On the Advanced tab, under Settings:  Printing:

  • Turn the Print background colors and images setting on or off by selecting or clearing its check box.
On the Advanced tab, under Settings:  Printing:

  • Move to the Print background colors and images setting by pressing the DOWN ARROW key.
  • Turn the setting on or off (select or clear) the check box by pressing SPACEBAR.
4 To save your settings and close the dialog box:

  • Click OK.
To save your settings and close the dialog box:

  • Press ENTER.

Internet Options: Advanced tab: Print background colors and images:

 

Original link: Symprex

打开Internet选项和发送到邮件实现

星期五, 9 11 月, 2007

近段有个任务需要使用C#的WebBrowser控件实现页面的浏览,都比较简单。麻烦的是想在自定义的菜单上实现打开“Internet 选项”对话框和实现“发送页面到电子邮件”功能,在网上搜罗了大半天,试了好多办法,总算实现了。

打开Internet选项使用inetcpl.cpl的LaunchInternetControlPanel API函数,在C#中的声明方法是:
        [DllImport("inetcpl.cpl")]
        private static extern long LaunchInternetControlPanel(IntPtr hWnd);

调用的方法是:
LaunchInternetControlPanel(this.Handle);

要实现象在资源管理器中右击一个文件发送到邮件接收者的方法是使用MAPI32.DLL的MAPISendMail API函数,使用这个方法可以把当前显示的页面以附件方式发送给邮件接收者,但象IE中“Send Page By E-Mail”的功能直接把当前页面以HTML内容方式发送还有没有实现。

关于MAPISendMail API函数的使用在The Code Project有两个链接:MFC/C++ C#/.NET,本站提供从这两个链接下载到的源码:MFC/C++ C#/.NET,仅供参考,版权归原作者所有。