|
It can be one of three applications;
A windows service; in that case, it would have an event that is raised. Should not show a UI.
A console application; would not show a tray icon
A windows GUI application; regardless of whether you show a form, it still is a GUI application. Keep a form open (something I'd expect from the Application.Run(formName) call) and make it invisible.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Hello, I am writing a very simple app that is trying to launch a pdf viewer when a button is pressed or a selection is changed in a list.
I have the structure to generate an event when the selection is changed and I have the path to the pdf file; e.g. 'Assets/pdf/filetoopen.pdf'
I have been trying all kinds of methods without success;
StorageFolder local = Windows.Storage.ApplicationData.Current.LocalFolder;
StorageFile pdfFile = await local.GetFileAsync((DetailsLongListSelector.SelectedItem as ContentViewModel).pdfLocation);
success = await Windows.System.Launcher.LaunchFileAsync(pdfFile);
That fails when using GetFileAsync.
I had thoughts about its due to access permissions and may need to copy to temporary storage before using, but I cant seem to make that work.
Is there any preferred method to open an pdf ?
Thanks
EDIT
OK I have managed to get it to launch by using:
StorageFolder appFolder = Windows.ApplicationModel.Package.Current.InstalledLocation;
StorageFile pdfFile = await appFolder.GetFileAsync((DetailsLongListSelector.SelectedItem as ContentViewModel).pdfLocation);
if (pdfFile != null)
{
bool success = await Windows.System.Launcher.LaunchFileAsync(pdfFile);
The main problem was I needed to use the ApplicationModel instead of Storage.ApplicationData.
Now I have an issue with Adobe stating that the file already exists "do you want to replace ?"
Is there any way to force Adobe to overwrite ?
Thanks
|
|
|
|
|
Please do not post the same question in multiple forums.
|
|
|
|
|
I understand that the Windows Runtime is a native runtime based on COM, and it manages memory automatically by ref counting.
One thing I'm not clear on is what happens when you run a C# program on the Windows Runtime? Is the process "half managed/half native?"
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
I looking so hard how to make my simple window form application to like Task manager (include start screen).
Some reference :
- Form Stackoverflow
- Form Blogs microsoft
As of these reference i try but it not work,anyone have any idea?
Please help me !
Thank you in advance !
|
|
|
|
|
What is 'not working'?
In Word you can only store 2 bytes. That is why I use Writer.
|
|
|
|
|
my name is balu.i need wi-fi detector windows phone APP source code creating academic projects .Please help me...my mail id is balumalayilgroups@gmail.com
|
|
|
|
|
I'm sorry Balu. You'll generally find that most people won't just hand over source code here on CodeProject. Obviously, if you're lucky enough to find an article that has the source then your luck is in. The forums, however, are not the place to seek source code.
|
|
|
|
|
I'm currently attempting to wire up to a MVC Web API that utilizes RSA encryption as part of it's authentication process. The RSA provider isn't available on a windows phone tech stack, and I'm wondering if anyone might be able to point me to some code/nugget package that handles RSA on the phone.
Thanks everyone,
Ryan
|
|
|
|
|
My windows installation do not moving from 24 %
My os windows 8. 32 bit...
|
|
|
|
|
This is a code site not a technical support site so I believe you will get a faster result if you contact someone for technical support.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
When I was using Windows 7, I execute these commands for some folders:
attrib "F:\The World" +h +s
cacls "F:\The World" /p user:n
Now I have installed Windows 8 and when I want to execute this command:
cacls "F:\The World" /p user:f
to access the folder "The access is denied" error occurs.
How to fix the error?
|
|
|
|
|
|
There is a horrible bug in Windows 8.1. Hibernation causes a desktop PC to crash. Now if you google you can find a solution, and that is to disable "allow this device to wake up the computer" in device manager for keyboard and mouse. However, this is only a temporary solution, because once you unplug either keyboard or mouse, the setting will be enabled again.
I tried looking to see if you can log a bug for Windows: no, you cannot. It seems like Microsoft know about this bug, but have no intention ever fixing it.
|
|
|
|
|
I'm not sure if you are just ranting or actually looking for help. But as this is not a code question you'll likely get better results in a technical support type forum.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
I'm not quite sure this is the appropiate place to start a discussion on this topic, since most posts seem to be related to programming.
I personally find the metro interface to be quite ugly even for a touch based interface.
If I compare it with my android's phone UI I find it lacks some rather basic features :
1. The ability to sort icons alphabetically , by frequency of use or according to an order I designate.
2. A quick way to switch / launch the apps I recently launched since I turned on my phone.
3. A Status bar
4. The ubiquitous navigation buttons at the bottom of the phone.
Do you find the metro UI appealing?
|
|
|
|
|
To me it feels like Microsoft is attempting to change my PC into a toy (with Metro). Which I despise, I typically embrace change in software as I'm a developer myself. But in the case of Windows 8 & Metro, I feel Microsoft was trying to hard to stay "with it", falling behind in the world of touch to Apple and Google. But guess what Microsoft basically defined what a PC is today, and you don't mess with a definition! I liked Windows for what it was, they should improve on the things that matter like performance, stability and compatibility with other systems.
I do not use ANY of the Metro apps, not even on tablets, they always seem half-baked and feature-lacking.
|
|
|
|
|
I find the recent changes in the Windows interface annoying and unpleasant. The biggest problem is changing both function and look in what has been defined and become commonly understood and accepted for years. This is not a new problem but keeps getting worse. I will not detail all the changes and their negative impacts but you know what I mean.
New is fine for those who are new and those who choose to change when they are ready. Forcing change on others is not good customer relations. Sometimes backward compatibility is provided to a certain extent but instead of being normal for previous users you have to search for it. This is NOT good customer relations!
I do not find the interface appealing as a new interface either! Treating a 4 inch display the same as a 30 inch display is STUPID! Forcing a desktop to work like a handheld is STUPID!
So many details! (heavy sigh) So much confusion...
|
|
|
|
|
It was awful. I used StarDock, fiddled a bit with it and never saw that dreadful childish interface again. Back on W7 now. Vista was better than W8.
|
|
|
|
|
I finally decided to use inheritance in my WinRT C++ library, by exposing interface, such as
public interface class IA
{
property int ID { int get(); }
};
ref class A : IA
{
public:
virtual property int ID { int get() { return 0; } }
};
public interface class IB : IA {};
ref class B : A, IB {};
public ref class Create sealed {
public:
static IB^ CreateB() { return ref new B(); }
};
However when I try to compile that code I got the following error messages:
Quote: 1>c:\dev\tests\windowsruntimecomponent1\windowsruntimecomponent1\class1.h(16): error C3766: 'WindowsRuntimeComponent1::B' must provide an implementation for the interface method 'int WindowsRuntimeComponent1::IA::ID::get(void)'
1> c:\dev\tests\windowsruntimecomponent1\windowsruntimecomponent1\class1.h(7) : see declaration of 'WindowsRuntimeComponent1::IA::ID::get'
1>c:\dev\tests\windowsruntimecomponent1\windowsruntimecomponent1\class1.h(16): warning C4570: 'WindowsRuntimeComponent1::B' : is not explicitly declared as abstract but has abstract functions
1>c:\dev\tests\windowsruntimecomponent1\windowsruntimecomponent1\class1.h(20): error C2259: 'WindowsRuntimeComponent1::B' : cannot instantiate abstract class
Now I can fix it by rewriting B as follows
ref class B : A, public IB
{
public:
virtual property int ID { int get() override { return A::ID; } }
};
But that's quickly becoming cumbersome with a big hierarchy. Isn't there a way to avoid repeating all parent interface members?
|
|
|
|
|
No, that is the rule. When you inherit an interface you must provide implementations for all of its methods.
Veni, vidi, abiit domum
|
|
|
|
|
But.. the B also inherits A which already implement IA, doesn't that make the implementation redundant?
Indeed, I have to specify 'override' for my must implement method to compile!
|
|
|
|
|
|
Is windows defender truly the best antivirus for windows 8?
|
|
|
|
|
How do you measure "best"?
Veni, vidi, abiit domum
|
|
|
|