File association and thumbnail preview in Windows 10 - windows-10

I have created an application and associated on registry a file extension on Windows 10, so when you double click a file associated with my extension, it opens my app with the file as parameter.
Now, I want the files associated to my application to behave in Windows 10 just like images - I mean, having a thumbnail preview, so when the user selects "large icons", he would be able to see a preview of the file.
I wonder how can I do it. What kind of metadata my file should have so Windows would recognize it and show a preview. Of course, I don't want just large icons, I want a file preview just like image files.
It isn't hard for me to generate a preview bitmap and integrate it to the file format I created (or even to change the file format completely, since I didn't publish anything yet), but how would windows recognize it? Is this even possible?
Thanks in advance

After some research, I found a sample code that does exactly what I need. It creates a thumbnail provider, which have access to the file's contents (binary), and then I can use it to generate the thumbnail of the file.
The sample that creates a IThumbnailProvider can be found here:
https://code.msdn.microsoft.com/windowsapps/CppShellExtThumbnailHandler-32399b35/view/SourceCode#content
The project should generate a dll, that we should register on Windows. It might be done using the following lines:
system32/regsvr32 ThumbnailProviderx64.dll
syswow64/regsvr32 ThumbnailProviderx86.dll
unregistering is like this:
system32/regsvr32 /u ThumbnailProviderx64.dll
syswow64/regsvr32 /u ThumbnailProviderx86.dll
Another nice sample could be found at:
http://www.codemonkeycodes.com/2010/01/11/ithumbnailprovider-re-visited/

Related

Azure Media Services: Provide custom file names for the asset files

I'm encoding a video file using the built-in adaptive streaming transform. Once the file is successfully processed, an asset container is created with the below files:
Is it possible to provide custom file names at the time a job is created? It seems that the default behavior is to take a certain number of characters from the original file name and prepend them in the above file names. If possible, I'd like to configure this behavior.
P.S. I'm using the .NET SDK.
You can create a custom transform to output file names differently. On https://learn.microsoft.com/en-us/rest/api/media/transforms/createorupdate#definitions search for the Mp4Format section. In that you can specify the filenamePattern with certain macros like {Bitrate} and {Codec}.
See https://learn.microsoft.com/en-us/azure/media-services/latest/custom-preset-cli-howto for an example custom transform and the process by which to create it in Media Services.
I use the macros on my jobs, they work ok. I have a process that takes 3 videos (an intro section, the actual content, and the outro section) and encodes them as one single video. The issue I have with the macros is that it uses the file name of the first video in the inputs. So it ends up using the file name of the intro video which is a generic name. They need to have a way where we can have a little more control.
I suppose I could copy/rename the intro video to a desired name before I encode and it would pick it up, but that seems to be a little bit of overkill.
The Macros are good, but they could use some enhancements I think.

Is there any way to convert ..PNG image to .DWG file & how to get manifest file along with converted .DWG for drawing_package in azure maps indoor?

Prerequisites
To create indoor maps:
=>Make an Azure Maps account
=>Obtain a primary subscription key, also known as the primary key or the subscription key.
=>Create a Creator resource
=>Download the Sample Drawing package.(https://learn.microsoft.com/en-us/azure/azure-maps/tutorial-creator-indoor-maps)
Requirement: 1). I have sample .PNG image. I wanna convert this to .DWG and After conversion , I should be able to edit data in .DWG Is it possible ??
2). As you see above azure maps team provided some sample "Sample Drawing Package" for indoor map. This package you can download from the above link. If you download and open, there you can see 3 .dwg files (Basement.dwg,Ground.dwg, Level_2.dwg) along with manifest.json file.
So, How can I generate my own manifest.json file relates to converted
(.PNG to .DWG) file?
NOTE:
I have used https://www.reaconverter.com/convert/png_to_dwg.html and https://www.3ds.com/products-services/draftsight-cad-software/download-draftsight/?wockw=Draftsight for converting .png to .dwg
Sample png file : Floor03 Vertical.png,
After conversion dwg file : ConvertedFile.dwg
So, I request anyone suggest how can I get my own (conversion .png to .dwg) drawing_package along with manifest.json data ?
You will need to manually define your own manifest.json file. CAD tools are what architects use to design buildings. Another way to create a map is to use MS Graph. A script would have to be written to output the manifest.json, so that is something you would have to write.
If you would like to make a feature request please do it in https://feedback.azure.com/forums/909172-azure-maps and share here so others can vote.
The manifest.json is used to describe the DWG file for conversion to an indoor map. This file isn't automatically generated. Please see Drawing Requirements for additional details.

Installshield Basic MSI project : Display logo dynamically from a folder which is not part of the installation

I am new to Installshield and I want to display the banners displayed in the dialogs during installation to be fetched dynamically from an external folder which resides in the path of the setup.exe (not part of the installation) using Installshield Basic MSI project.
I tried specifying the “File Name” for the banner bitmaps in the dialog as <SETUPEXEDIR>\MyLogo\Test.bmp. But this gives an error as “File not found. Error streaming file to binary table.” when the project is built.
Is there a way possible to achieve this?
Windows Installer requires that the images are baked into the .msi file in order to display them (it saves the bits, not the name, in the Binary table), so it's very reasonable to summarize this as not supported.
As a possible workaround (one I'm uncertain whether it can work), it's feasible that a custom action could write temporary records to the Binary table or Control table that containing the image found at run time. Note that this sort of custom action is somewhere between admitting failure and a semi-custom action. Furthermore finding the image, dealing with incorrect image sizes, determining which dialog boxes need the added image Binary or Control record, and possibly deleting an existing Binary or Control record, are left as exercises for an eager reader.

APEX: Read uploaded excel file with as_read_xlsx

As far as I understand, APEX 5.1 does not support Excel files to be loaded into tables.
I found this package that seems to make it possible to SELECT from Excel files, but it does not show how to use it with, for example, files loaded via the "File Browse" Item.
Now, I am very new to this environment, so please explain it from the beginning.
What I did is I upload the package script to the SQL workshop and executed it, without errors. But now?
APEX 5.1 doesn't support it out of the box, but you can use the EXCEL2COLLECTION plugin (available here).
It is very straightforward, just create a file browse page item with an upload button which calls an onsubmit process (e.g. CreateCollection) of type Excel2Collection[Plug In] - specify the file browse item, a collection name and the CSV separator, then you can do as you please with the data (e.g. you may want to run some validations on the data then insert it into a table where you can access it as normal).

Possible to create thumbnails of MS Office files?

Have anybody ever tried to create thumbnails/previews of MS Office files? I do not mean extract saved preview images inside the file, but actually create them. Would this even be doable?
Could one print to an image/pdf directly in code?
In a general VB/C# application, add the MSword/MSexcel component and call the component to open the file you want. Then call one of the print functions with the parameters corresponding to first page etc.
This link shows how to open a .xls from C#

Resources