How do I create custom Widget for my c# app - c#

How do I create custom widget for my c# application.
Example :
I wrote an app that shows in Windows 10 menu just like other apps (example firefox) -
screen
How can I create custom "widget"? To show on my app with some from current state of application.
This application is running on user PC all the time, each hour it refresh some informations and I want them to display on this "widget".
How can I achieve this?

The icons on the Windows start screen are known as "Tiles". The tiles that are dynamic are known as "Live Tiles". I share your frustration about not knowing what to search for in the search engines when you don't know what the correct terminology is.
Although I have never created a Live Tile, I did find this site:
https://msdn.microsoft.com/en-us/magazine/dn857365.aspx
which discusses Live Tiles and has some sample code, which might point you in the right direction.
It doesn't look like a complete solution for what you are looking for, but it should give you enough background to know what to search for.

Related

Run local web application but restrict access to resources

I'll try to keep this coherent and to the point, been coding all day and a little fried right now. I know doing this is also entirely possible, I'm just not entirely how to do it directly.
The idea is I'm working on a program I'd like to make commercial and sell in the future. Currently it's been holding up to testing processes and everything looks good, but now that I'm starting the improve the program's GUI, I'm hitting limitations using Windows Forms (EI, tab control tops not being easily recolor-able, etc, etc), and had a thought... That I could make the GUI look infinitly better if I could import the program into a web page. Using a dot net project makes that relatively easy since I can copy the C# code over and after a bit of tweaking, it should be fairly straight forward to get everything running and then I just need to rewire everything to the web page GUI.
To handle launching the web page, I was contemplating making a program that creates a "harness" (Small graphic program that just runs a command prompt line to initialize the web service and provides a link to the web page being hosted on the local service. This approach works, but the big issue I'm hitting while probing this route is that the "Release" folder generated on the web application isn't fully self contained and in addition to this all resources are visible. (Hard to sell a product if the first person you sell it to can just distribute the source code around)
So ideally at this point, I'm looking to see if anyone can guide me in the right direct. I'm not sure how to go about creating a program that runs an app inside a local browser AND hides/otherwise makes all the code / resources (images, etc) unviewable/inaccessible to anything outside the program.
Sorry if this is a bit rambly, not entirely sure how to actually ask/find what I'm looking for. (There maybe a name for the thing I'm looking for and I've just never heard of it before.)
I would recommend you to use WPF windows presentation foundation, you can make much more user friendly and intuitive interfaces in WPF comparing to windows form.
Developing and trying to sell a desktop program as a website is never recommended, the website is meant to be hosted on a server and let the clients access all of its functionalities within the browser. So I would suggest you to go and search for WPF.
You also mentioned that you are struggling to improve the windows form User interface design and are struggling to design attractive GUI. Well this is not true you can make amazing GUIs with windows form. take a look at this link https://www.youtube.com/watch?v=K9Ps66GoD-k this will greatly help you to improve the existing windows form application design you already have developed.

Windows IoT Raspberry Pi 3 c# writing app with Pivot or Pages

I am fairly new to this. I am still figuring out and to understand what type of XAML UI I should adopt or best suited for my application.
my requirements are:
have a few tabs to contain separate operation functions respectively
all the functions are working concurrently
tabs are HOME (home screen displaying time & date etc), MESSAGE (to play selected message from AppButton or GPIO), RECORDING (to record and playback audio from Appbutton or GPIO) , LOG(to access & display log details)
I have tried working on multi Page but I keep running into issue when i switch between pages (Audio playback in different Pages.
So I tried pivot referring to UWP Pivot example from GitHub. I kept getting Invalid Markup when I try to insert an image (icon) for each of the pivot. Is there any other example that I could refer to because I have been searching on the web but couldn't find any more detailed example. The icon I need was simple which uses the standard windows icon similar to those available for AppBarButton.
Please advise.
UPDATED
Below are the 'invalid markup' i encounter and error with System namespace

How to dock a WinForms App to another running application

Can someone help out with this one. I have had a good Google search but cannot find anything - possibility I'm using the wrong terminology.
Basically I want to write a WinForms app that on starting docks to a specified running app by default, but can also be moved and snapped in any location on that or other running apps (the latter is a nice to have, no biggie if too hard).
Cheers!
EXAMPLE OF 3RD PARTY APP SNAPPING TO SKYPE FOR BUSINESS:

Change Keyboard Layout (Direction) in Windows Store apps

So after thorough research over MSDN forums, I have decided to put up my question here for the experts around.
My goal is very simple but unusual. Before I post a question, here's the scenario where I want to implement the requirement;
There is a huge table (large tablet like Microsoft PixelSense or old Surface machine) of nearly 41" which runs my app on Windows 8.1 smoothly
This table (tablet) will be placed between two chairs, one for customer while the other one will be for the agent.
The app opens from the customer's side and customer enters his required details in a usual way like everyone enters some information in a form.
The unsual part is, the agent sitting on the other side is not able to access the keyboard on his side because Windows (OS) opens up the keyboard only in one direction (unlike Microsoft PixelSense).
I have managed to invert the layout of all the app for the agent but unable to change the keyboard's layout (invert to 180 degrees)
My question is, can I change it anyway? Is it possible?
I don't want to go for custom keyboard as of now.

Screen scraping an application window and interacting with the mouse and keyboard

The other day I found myself addicted to a Flash game and frustrated by the thing at the same time. In a moment of frustration with the game I thought I would make a 'bot' to beat it for me. Well, I really wouldn't, but it made me realize: I don't know how to interact with another application in a way to do this. Which brings me to the question, how would one take screenshots of another running application and interact with it with the keyboard and mouse. Ideally the solution would be in a managed language like c#.
When doing the background reading the net was drowning with articles on scraping HTML. There were not many articles on actually screen scraping an application.
I'm looking for a way to interface with another application rather than script/macro another application.
Could something like Xming be used to redirect the interface? http://www.straightrunning.com/XmingNotes/
Perhaps a Terminal Services client?
http://www.codeproject.com/KB/cs/RemoteDesktop_CSharpNET.aspx
Check out Sikuli, it is basically what you are looking for. It is written in Java however.
http://groups.csail.mit.edu/uid/sikuli/
I ended up making the bot which did all this and documented it in a post
http://www.charlesrcook.com/archive/2010/09/05/creating-a-bejeweled-blitz-bot-in-c.aspx
I have used AutoHotKey for application automation.

Categories

Resources