com

How do I convert a stdole.StdPicture to a different Type?

有些话、适合烂在心里 提交于 2021-02-19 05:02:48
问题 To receive the bounty, please provide an answer with working code. Thanks. I have a stdole.StdPicture Object of the Type vbPicTypeIcon. I need to convert it to Type vbPicTypeBitmap. Due to project contraints, I need to be able to do this using Win32 or VBA. I am trying to load a file's icon to a command bar button. Here is what I have so far. It produces a lovely black square:) I am really new to graphics land so pardon me if it's a basic question. Option Explicit Private Const

How to access full Adobe Acrobat AcroExch COM API from Internet Explorer embedded object?

做~自己de王妃 提交于 2021-02-19 04:24:34
问题 I have the following situation: Internet Explorer 9 on Windows 7 SP1 32-bit Adobe Acrobat Professional version 10 A webpage with code like this: <object data="foo.pdf" src="foo.pdf"> Given that: The default PDF reader on the system is Adobe Acrobat Adobe Reader's browser plugin is suppressed in favor of Acrobat's plugin Acrobat.exe is running when the plugin loads I'm using Internet Explorer's COM automation (from Ruby, but that doesn't really matter) to obtain a reference to the object 's

How to access full Adobe Acrobat AcroExch COM API from Internet Explorer embedded object?

僤鯓⒐⒋嵵緔 提交于 2021-02-19 04:23:40
问题 I have the following situation: Internet Explorer 9 on Windows 7 SP1 32-bit Adobe Acrobat Professional version 10 A webpage with code like this: <object data="foo.pdf" src="foo.pdf"> Given that: The default PDF reader on the system is Adobe Acrobat Adobe Reader's browser plugin is suppressed in favor of Acrobat's plugin Acrobat.exe is running when the plugin loads I'm using Internet Explorer's COM automation (from Ruby, but that doesn't really matter) to obtain a reference to the object 's

python, COM and multithreading issue

拈花ヽ惹草 提交于 2021-02-19 01:01:07
问题 I'm trying to take a look at IE's DOM from a separate thread that dispatched IE, and for some properties I'm getting a "no such interface supported" error. I managed to reduce the problem to this script: import threading, time import pythoncom from win32com.client import Dispatch, gencache gencache.EnsureModule('{3050F1C5-98B5-11CF-BB82-00AA00BDCE0B}', 0, 4, 0) # MSHTML def main(): pythoncom.CoInitializeEx(0) ie = Dispatch('InternetExplorer.Application') ie.Visible = True ie.Navigate('http:/

Extracting InDesign CS4 Graphics using C# and COM

巧了我就是萌 提交于 2021-02-16 09:30:22
问题 I'm trying to get details of the graphics in an InDesign file. For technical reasons I'm using COM. Not my favourite, as (discussed elsewhere in StackOverflow) you have to spend half your life casting. In Theory (!), the code snippet belwo should work. Intellisense shows doc.AllGraphics as returning objects . The CS3 scripting reference at http://www.indesignscriptingreference.com/CS3/JavaScript/Document.htm shows it as Array of Graphic for (int g = 1; g <= doc.AllGraphics.Count; g++) {

Saving AutoCAD files (.dwg) using Python

假如想象 提交于 2021-02-15 06:28:12
问题 I am using win32com to automate some simple tasks in AutoCAD. It's mostly been working quite well except for being able to save files. My goal is to open a (template) file, adjust it depending on what is needed then save the file as a .dwg in another folder while leaving the template empty and ready to be used next time. The following in an example of my code: import win32com.client acad = win32com.client.dynamic.Dispatch("AutoCAD.Application") acad.Visible=True doc = acad.Documents.Open("C:\

How to make directShow to Create graph automatically with available filters

让人想犯罪 __ 提交于 2021-02-11 13:30:57
问题 I want to use the Medialooks multisource filter in my application, This has entry in HKEY_CURRENT_USER\SOFTWARE\Classes\CLSID\ But still i have to Add this filter manually using CLS_ID and AddFilter Function. Is there any way so that Renderfile function of Dshow will automatically creates a graph by enumerating the filters from registry Checked in Grphedt tool but if i manually insert and connect Filters I can play the videos properly.Otherwise it wont render automatically by building the

Project and build structure for Microsoft DirectShow based virtual webcam application on Window 10

橙三吉。 提交于 2021-02-10 18:23:03
问题 I am trying to create simplest virtual webcam application which can display image file on my local filesystem. After initial research on stackoverflow links and seeing OBS Studio source code I got some idea how can I achieve this. I would need to use Microsoft DirectShow. I would need to develop one source filter that would work as capture filter using IBaseFilter I would need to develop another source filter that would work as output filter or virtual webcam filter. I would need to compile

Get Currently Opened Word Document from Process

限于喜欢 提交于 2021-02-10 18:22:58
问题 The goal is to get the full path to the document opened in an instance of Microsoft Word that I have a process reference for. Pseudocode Example: Process myWordProcess = something; // This is my process reference DocumentInformation docInfo = SomeNamespace.GetDocumentInformation(myWordProcess); string documentPath = docInfo.FullName; // "C:\User\Foo\Documents\Test.docx" The starting point is a Process object which is executed by WINWORD.exe . I am not looking for a way that includes parsing

Get Currently Opened Word Document from Process

喜夏-厌秋 提交于 2021-02-10 18:21:52
问题 The goal is to get the full path to the document opened in an instance of Microsoft Word that I have a process reference for. Pseudocode Example: Process myWordProcess = something; // This is my process reference DocumentInformation docInfo = SomeNamespace.GetDocumentInformation(myWordProcess); string documentPath = docInfo.FullName; // "C:\User\Foo\Documents\Test.docx" The starting point is a Process object which is executed by WINWORD.exe . I am not looking for a way that includes parsing