activex

WebBrowser (MSIE) - Capture JS Errors using Exec of IOleCommandTarget

感情迁移 提交于 2019-12-18 17:11:24
问题 I need to capture script errors in MS IE activex control (dubbed as WebBrowser). As I see it, this is done by implementing the IOleCommandTarget interface in my application and listening for OLECMDID_SHOWSCRIPTERROR. I did the above and I know it works since my Exec method is called, but here's the problem; it is only called once with nCmdID being set to $00000037 ( OLECMDID_PAGEACTIONBLOCKED ), but never $00000028 ( OLECMDID_SHOWSCRIPTERROR ). In order to trigger that error, I've been using

Crop MS Word Images using Matlab Activex control

风流意气都作罢 提交于 2019-12-18 09:37:59
问题 I am using MATLAB to paste and caption plots into Microsoft Word. I would like to also crop these images using the ActiveX control. something like: word = actxserver('Word.Application') word.Visible = 1 op = invoke(word.Documents,'Add') invoke(word.Selection,'Paste') invoke(word.Selection,'CropBottom',CropAmount) <----- Except there is no function that will allow me to crop. I am modifying the MATLAB File Exchange "save2word.m" Thanks 回答1: Consider this example: %# create plot and copy to

Python and Excel: Overwriting an existing file always prompts, despite XlSaveConflictResolution value

只谈情不闲聊 提交于 2019-12-18 08:20:46
问题 I'm using the Excel.Application COM object from a Python program to open a CSV file and save it as an Excel workbook. If the target file already exists, then I am prompted with this message: "A file named '...' already exists in this location. Do you want to replace it?" That message comes up despite the fact that I have set the XlSaveConflictResolution value to xlLocalSessionChanges, which is supposed to automatically overwrite the changes without prompting -- or so I thought. I'm using

ActiveXObject in IE8

别说谁变了你拦得住时间么 提交于 2019-12-18 05:14:14
问题 I want to use javascript to create a textfile, so I used : This Line of code: var fso = new ActiveXObject("Scripting.FileSystemObject"); It's working properly in IE6 but not in IE8. Any suggested solution? 回答1: IE8 internet setting is more secure, to it doesn't allow activex objects. If you have to run this, goto Tools->Internet Options-> Security->Custom Level->choose enable or prompt activex.. 回答2: Try this, this may help you. Close the IE. Right click on IE and Run as Administrator.

Loading a Flash movie from a memory stream or a byte array

南笙酒味 提交于 2019-12-18 05:14:06
问题 I want to load an SWF object from a Memory Stream or a byte array instead of a file on disk. AxShockwaveFlash class provides methods and properties to load an SWF providing its path to disk as a string but I haven't seen another way of doing it. There is an InlineData property but generally the class is undocumented and I don't know what this property does. Can it be done at all? Thanks F 回答1: I assume what you are wanting to do is initialize this in C# rather than in Flash itself. It can be

SaveAs vs SaveAs2 in the Microsoft Office Word object model

坚强是说给别人听的谎言 提交于 2019-12-18 04:34:10
问题 It looks like SaveAs has gone away in Office 2010 in favor of SaveAs2. What is going on here? Are there any important differences between the two? My fix has been to check for SaveAs2 first, and then fall back to SaveAs. Is this reasonable? 回答1: It hasn't gone away, you've just got another way to save the document. Save2() takes an extra argument, CompatibilityMode. If you don't care about the compatibility mode then just keep using Save(). If you do then check Application.Version to verify

swt java 内嵌ActiveX控件

怎甘沉沦 提交于 2019-12-18 03:01:21
这里用的是SWT/JFace开发application中SWT自带的org.eclipse.swt.ole.win32 包可以支持内嵌OLE和ActiveX。 具体用法如下: //创建一个OleFrame做为OLE(或ActiveX)的框架 OleFrame oleFrame = new OleFrame(this, SWT.NONE); //创建ActiveX的容器,其中的classID是ActiveX的classid,在注册表中可以找到 OleControlSite oleControl = new OleControlSite(oleFrame, SWT.NONE, “classID”); //OleAutomation类用来执行ActiveX中的方法 OleAutomation oleAutomation = new OleAutomation(oleControl); //将ActiveX显示在application中 oleControl.doVerb(OLE.OLEIVERB_SHOW); 调用AcitveX中方法的具体过程: 1、不带参数的方法调用 //获取Method Name的ID,Method Name为ActiveX中具体的方法名 int[] regspid = oleAutomation.getIDsOfNames(new String[] {

Calling BHO method from Javascript?

久未见 提交于 2019-12-18 02:47:44
问题 I am trying to call my BHO method from the javascript. The problem is same as stated in the the following posts: Call BHO from Javascript function http://social.msdn.microsoft.com/Forums/en-US/ieextensiondevelopment/thread/91d4076e-4795-4d9e-9b07-5b9c9eca62fb/ Calling C++ function from JavaScript script running in a web browser control Third link is another SO post talking about it, but I did not understand the need and code. Also the shared working sample keeps crashing on windows 7 with ie

enabling ActiveX control in chrome and firefox

跟風遠走 提交于 2019-12-17 20:31:23
问题 We are using WebTwainX in our application where WebTwainX needs ActiveX to be enabled it supports only in Internet Explorer. How can I enable ActiveX in Chrome and Firefox so that WebTwainX works fine? 回答1: By default, Google Chrome and Firefox web browsers do not support ActiveX controls. However, there are workarounds to enable ActiveX controls and get the required functionality based on ActiveX controls. Google Chrome users can download IE Tab extension that acts as Internet Explorer

Alternative to Webbrowser control

删除回忆录丶 提交于 2019-12-17 19:31:50
问题 Has anyone found and used an alternative to the Microsoft Webbroswer ActiveX control with any success? The open source Firefox ActiveX version seems to be a dead project development wise and based on an old Firefox version. 回答1: Give a look to the GeckoFX Project, an open-source component for embedding Mozilla Gecko (Firefox) in .NET applications. Written in clean, fully commented C#, GeckoFX is the perfect replacement for the default Internet Explorer-based WebBrowser control. (source: