I'm trying to display an image using "Photos metro application" (C++).
Below is teh code snippet using which I'm able to display images.
But I want to use only "Photos" metro app to display my images.
If I right click on each image manually & change it's default application as "Photos" in properties menu then the below code snippet is working fine for display images using "Photos application".
But I want to embed this control of choosing which appliation to use for displaying images in mu code.
How do I force my code to display an image say "color.png" using Photos metro app?
int DisplayImage(std::string image)
{
printf("\nThe image is %s", image);
std::string command = "Start " + image;
system(command.c_str());
......
......
}
I want to run this code on a mobile phone/tablet but my code generates
an EXE (not a metro Windows store app). I use TSHELL to run my EXE in
mtero mobile phone/tablet enviroment.
How do you plan to handle the scenario where the user doesn't have the Photos app installed?
You can launch the photo in the default handler (as you are doing) and it will display in the Photos app if that is what the user has chosen. This is generally the right thing to do and is user-friendly. This is the only way to programmatically launch the photo or the Photos app in a Windows Store app.
From a desktop app you can explicitly activate a Windows Runtime app with a file by calling the IActivateActivationManager::ActivateForFile method. This cannot be called from a Windows Runtime app. Like your existing code, it won't run on a production phone.
To write a Windows Runtime app (either Windows Store or Windows Phone Store) you'll need to start with one of the Windows Store templates in Visual Studio. You cannot write a console app as a Windows Runtime app. See Get started in the Windows Developer Center on MSDN for an overview of how to write Windows Runtime apps.
Related
I want to make an application that invokes the driver installation dialog through a programmatic call, allowing the user to easily install a required driver. What should I do? What API/tool should I use?
driver installation dialog
I tried to use devcon, InfDefaultInstall and pnputil in my app, they don't show this dialog.
I want to launch the Windows Photos app from C++ for a list of image files.
Problem with Photos app is that, if it is launched using ShellExecute (for a single file) it disables the next and previous buttons, even if the folder contains other images.
I have tried using IApplicationActivationManager COM interface to launch the photos app
IApplicationActivationManager->ActivateApplication is launching the app without any file, but IApplicationActivationManager->ActivateForFile is failing with error: 0x80270255 - This app has mulitple extensions registered to support the specified contract. Activation by AppUserModelId is ambiguous.
Is there a way to launch the app with list of files or launch the app first and then send the list of files to open.
We have an ionic app with an iframe which host another web app. Everything works fine but we are not able to input values in the input fields of the web app(inside iframe). The cursor focus is there on the input field, but not able to type anything.
Note : It happens only when we run the app on device but it works fine in desktop browsers.
I'm trying to use microsoft coded ui tests with firefox. This was NOT an issue until Firefox 35.0.1 came out.
Skip to the bottom if you want to know the issue more than the why am I doing it this way:
Why I'm not using Selenium:
With Selenium, when Firefox launches a web driver, it loses it's previous states/cookie settings. I could of course import a cookie. The problem is that if I have multiple users running the test, they'd either have to set up individual lines of code to import their own specific cookie from their own path. This could become a dangerous game if a user decides to use someone elses cookie.
Why I'm using Coded UI Tests:
Certain applications I am running work exclusively with IE and others work exclusively with Firefox. Since I can't record the instances in IE with selenium, I have to should utilize a coded ui test anyway. I could of course also use watin. But at some point, why run Selenium, and watin when I can instead JUST use a coded ui test. Additionally, when going to the url for login with a coded ui test, FF is setup to save my password and cookie. therefore, the user can save their own password/cookie on each machine and just change the input for username which comes via excel spreadsheet. Everyone gets their own test, and no security issues.
The issue:
Since Coded UI tests don't recognize Firefox as a browser, it recognizes Firefox as a windows application. Therefore, edits and buttons in firefox are considered WinEdit and WinButton for firefox while internet explorer uses HtmlEdit and HtmlButton.
When Firefox put out an update, the coded ui test stopped recognizing certain objects in the firefox window. When trying to manually highlight objects/words with the test builder, it puts the blue box at the head of the web page instead of over what I'm clicking selecting. When hardcoding things to select, it doesn't recognize them. Is anyone aware of a workaround for this issue?
Recording on Firefox/Chrome is not supported by Coded UI. You can record your test in IE and Play it across Firefox/Chrome using Selenium components for Coded UI Cross Browser Testing which can be found here https://visualstudiogallery.msdn.microsoft.com/11cfc881-f8c9-4f96-b303-a2780156628d
I am creating an msi using VS installer but I've run into a problem. What I need to do is take input from the user, a server name/port and username/passsword. Once I have this I need to verify that they are correct then continue with the installation r return to the input page.
I've tried using Windows Forms Project as a Custom Action but I have to use static linking for this msi so that is not possible.
I have the code written (c++) to validate all the credentials I just need a way to revert back to the input screen if they are incorrect.
Does anyone have any suggestions?
Greetings,
KB
First you need to make sure that your custom action can receive the installation handle: http://www.codeproject.com/KB/install/msicustomaction.aspx
After that, configure your custom action to set an installer property based on the validation result. This property can then be used to control the dialog. Perhaps this will help:
http://setupanddeployment.com/installation-user-interface/validate-user-input-installation/
What you need to do requires access to control events, so it's not really doable in a Visual Studio setup project. You can try using a different setup authoring tool which offers more control over the installation UI:
http://en.wikipedia.org/wiki/List_of_installation_software