How do you test touch-enabled apps on a non-touch Windows? - windows

There is no canonical answer to this question (links below.)
I have a desktop Windows app developed using a non-Visual Studio environment (Delphi) and run Windows 7 in a VM, but otherwise standard desktop. I'd like to test some touch features, and so would like to mimic touch on desktop Windows. How do you do this?
Answers gives in other links:
Use the Surface 2 SDK. Installs only if you have VS2010. (I have VS2013 installed currently.)
Inject touch events via a touch injection API. Writing your own touch simulator seems a little surprising, and in addition this reportedly only works on Windows 8.
Use the Windows Simulator. With my Visual Studio 2013 installation, there are DLL files present but no simulator. Googling shows no results for how to install it, or what it is a prerequisite for or installed with, in order to install it by installing something else. It may (?) also work only with Windows Store apps, it's hard to tell.
There are a number of other replies which rely on using Visual Studio.
So, for a Windows 7 desktop machine, using a non-Visual-Studio-developed app, how do you simulate touch?

One simple solution consist to use a TActionList and link it with a TGestureManager. In the Form Property "Gestures" choose a gesture and Create an new action linked with the combobox.
In the TActionList choose the new created Action and put your code in it.
Now, you can simulate the gesture with a call to the action.

Related

How to develop Windows app on Visual Studio for Mac

I recently bought an iMac in order to develop my App on Visual Studio for Mac in a better environment (lots of issues on Windows), but on the Visual Studio for mac, there is no UWP projects.
It is understood that I have to create a new .NET project, but what are exactly the steps to follow in order to achieve that correctly for the app to work on Windows with a peace of mind? Should I have gone with Visual Studio code, which support the .NET core framework completely?
I saw on other answers that I need the .NET SDK tool, and so forth, but further details are needed if you don't mind on the why (not the installation stuffs, only the tech savvy explanations for the app to build correctly at the end!
You will need to run a Windows installation (eg, via Parallels or Boot Camp) and then run the Windows version of Visual Studio to create UWP apps.
You can do a lot of the business-logic coding inside Visual Studio on MacOS, but you will need Visual Studio and the Windows SDK to use WinRT types (which are required to build a UWP app) and to correctly build / package the app for deployment.
.NET is a big ecosystem. As you cannot develop all kinds of .NET projects using Visual Studio on Windows (Xamarin.Mac for example), you cannot do the same using Visual Studio for Mac (like you found, WinForms/WPF/UWP and so on). Such limitation comes from vendor SDK availability or other underlying systems.
In your case, you can easily develop web apps, Mac apps, and iOS apps. If you do want to develop Windows specific apps, like the other answer shows, please use Windows.
You mentioned ".NET SDK", but I believe that should be ".NET Core SDK". .NET Core apps are cross platform. Thus, you can develop such apps in Visual Studio for Mac, and then deploy to Windows. However, so far only console apps and web apps can be developed. What might happen in the future is still to be determined.
Visual Studio Code, however, is just a code editor. It won't give you extra flexibility.
For those whom imperatively needs to develop their app on all platforms, here is what I did, and the pros and cons:
Buying an Imac, thinking that I could also develop UWP projects within it
After realizing that I couldn't, I bought a cheap Windows 7 pro License on ebay (around 5$), and installed it on VirtualBox.
From there, I upgraded to Windows 10 for free and installed everything. It worked like a charm.
Cons: Buying a brand new IMac while a Macbook pro would have been better. An old one even since YOU CAN'T upgrade the ram.
Working on 8go of ram computer when you must give 4go of RAM to your VM isn't quite great. 4go gets you a laggy environment! Really frustrating.
So, prefer something older, but up-gradable (a cheap Macbook pro with 16go of RAM would do).
Not to mention that you will have to install Ubuntu as another VM in order to setup a .Net core Server for the majority of you.
What environment to favor while developing, most importantly when you are a C# and Xamarin noob like me?
The best being to develop from Mac as you will have FAR LESS ERRORS AND BUGS than in VS for Windows.
Correcting mistakes is really daunting and the best is really to develop from Mac to mitigate the damages, but it won't be hurdles free as well!
It took me more time debugging than coding within VS Windows.
After developing chunk of your app within Visual Studio MAC, the best is to get the code on the windows machine and arrange it to work in UWP.
UWP apps compile fastly and like a charm, so better is to get rid of errors within macOS, IOS, Android, and then go and adapt to UWP. This is easier IF YOU THINK ABOUT CHOOSING THE CORRECT LIBRARIES (working on all platforms, hence check my last advice).
From VS Mac, compile using macOS as a host! It's the easiest way to develop fastly, and correct your bugs.
Here is an article on how to get started from Mac:
https://blog.xamarin.com/preview-bringing-macos-to-xamarin-forms/
Cons: Always having to commit the code for it's use within UWP. But that's also a good way to save your project as well, so that if you screw up (like it happened to me numerous time) you roll back.
Hope that helps others whom didn't know what to do and where to start.
ALSO:
Don't follow tutorials dating from before 2017. Use the .Netstandard/.NET Core framework to develop your App so that libraries are more portable (following the blog article above should do).
Otherwise, headaches ahead!

How can i run software created for windows ce into window tab?

Hi I have developed on software using visual basic for windows CE, now i want to run the same software on windows TAB. how can i do that....pls help
I tried directly running software into my windows based tab. it shows some error.
If TAB means tablet and it runs any version of Windows (8,10 etc.) that is not CE then your application will not run as it is.
Posting the error message you get would help.
But if the app has been designed for the .NET Compact Framework, at least you need to take the source code and rebuild it for the full .NET Framework. Some things may not compatible and you may need to fix or change parts of your code. Estimating this is not simple and depends on the features used by your application.
Well you may not like this solution, but you could run a windows mobile or windows CE emulator inside of full blown windows (windows 7, 8.1 or 10). Then install and run your application on the emulator.
https://www.microsoft.com/en-us/download/details.aspx?id=16182

How to show a demo of a WP app on another PC?

I have a small WP app and I need to show a (interactive) demo of it and show its features, to another person who doesn't have any WP-related software installed on his PC.
Is there a super lite version of the WP emulator that the other person can download?
Also, how can I create an installation file of the WP app so that it would be easy for him to install & run ?
Surely he won't need to install the whole SDK, including Visual Studio, right?
To run the emulator you'll need to install the full SDK (http://dev.windowsphone.com/en-us/downloadsdk) but note that this doesn't require an existing version of Visual Studio.
There is no stand alone installer for just the emulator.
Apps are compiled into XAP files (similar to APK) and the Application Deployment application (installed as part of the SDK) will allow this to be loaded into the emulator. This tool can also be used to load the app into attached, developer unlocked, devices.
In terms of demonstrating an app to someone not familiar with Windows Phone, I've found that getting them to experience it on an emulator is often a sub-par experience and doesn't create the best experience. It's far better to get people to experience applications on actual devices. Alternatively, if it's very early in the application's development it's often better just to capture a video of the application running (from the emulator if fine and normally easier).
He would need to install VS Express with all the requirements that needs (Win8, CPU support for Client Hyper-V).
Emulator works pretty well over Remote Desktop and other remote viewing tech such as Skype, so that's another option.
Ok, i think i've found the needed steps:
send the XAP file from "Documents\Visual Studio 2010\Projects\AppName\Bin\Release\" where "AppName" is the name of the app.
download and install the sdk . not sure if Visual studio is needed.
run "XapDeploy.exe" tool which will allow to run the emulator and install the XAP file into it.
The file is somewhere similar to :
C:\Program Files (x86)\Microsoft SDKs\Windows Phone\v8.0\Tools\XAP Deployment
run the app from within the emulator.

Use existing Win7 code base in Windows 8 App

In my company we have an existing product that runs on Windows 7 and communicates with our web services.
We wish to make a Windows 8 tablet version of our product, and my first thought was:
"Hey, its just a new Windows version, so we can probably use our existing model, data access and business layer logic projects, and just focus on making a new UI layer"
But I fear that this is not the case, or am I wrong?
I tried opening our VS2010 solution file in VS2012 Express, but received an error "This edition of Visual Studio only supports Windows Store apps".
So, my naive hope now is: Can anyone tell me the easiest way to make our existing code work in a Windows 8 App?
EDIT:
The code is .NET C#, and my thought was that I just wanted to make a Windows 8 app so that the product had a tablet/touch friendly interface.
In general, you'll make a new UI using XAML, reuse a lot of your existing code, and change the data access to use SQLite.
VS2012 Express Edition is for making Windows Store apps. By "Windows Store" app, I mean an app which uses the WinRT APIs. Depending on your code, making a Windows Store version of your app can be straightforward.
If you need other features, you might need a different version of Visual Studio 2012. You definitely need to be on 2012 though. You can't build a Windows Store application with Visual Studio 2010. I think you know this already though.
If your existing .NET app uses WPF for the UI, you can reuse a lot of your XAML knowledge for the Windows 8 port. It's not as simple as recompiling, but it should be straightforward.
SQL CE is currently not an option for Windows Store applications. Instead, consider using SQLite.
Take a look at a post on MSDN called .NET for Windows Store apps - supported APIs. Some APIs you may be familiar with have been moved to WinRT. Sometimes porting is as simple as changing namespaces.
You mention that you also write to the C: drive. There's a sample on MSDN on how to read and write files.
So You need to build a new Metro Style Interface.
Wen You built interface just copy the Logic of your old application.
You can open old application in old VS 2010 and copy code line by line.
You can't convert old Windows app to Metro Style App.

Windows Mobile Debugging

I am working on creating a windows mobile application and I have a quick question. I have looked around for the answer and cant find anything. Is it possible to run a windows mobile application on a physical hardware device from visual studio? I don't need to be able to debug really, I just would like to be able to select my device and have it build, copy to the device, and run. Is there anyway to set this up?
There is a "Device" toolbar that should let you choose your target device. Check for it under the View -> Toolbars menu (for VS 2008... not sure if you are on a different VS version).
If you are only showing emulators, you might need to install the windows mobile 6 sdk (I don't know for sure, but I do know I also have that installed... could be that this only includes the emulators as well).
Update:
It might also be worthing right clicking on your project in the solution explorer and selecting properties. From the properties page, go into the Device tab. It might be that some devices are listed there that are not listed in the target device drop down list on the toolbar. Worth a shot, but no promises.
It's simple believe me.
I'm currently working on Visual Studio 2008 and I have already installed Windows Mobile 6.0 SDK. It's simple just two steps.
Plug your device to your computer via usb cable then you should see the ActiveSync connected your device.
Open VS and choose from target device menu that "Windows Mobile Professional Device", then push the VS Debug button (it's slower that simulator but it's working perfectly). (look at the picture)
alt text http://img38.imageshack.us/img38/3638/screenhy.jpg
I hope this will be able help to you.
Yes. If it's like mine (Verizon Motorola Q) Visual Studio will copy several files to the device and the device will prompt you to allow them. You only have to do that part once. Then when you debug on your device you may get a prompt to allow the program you're debugging to run. It seems to copy your program over to a folder in the devices "Program Files" folder and runs it from there. And it leaves it there even after you stop debugging.
And one more thing. With Visual Studio 2005, you'll need at least the standard edition to do mobile development. With Visual Studio 2008, you'll need at least the professional edition.
Thanks for the help everyone. My solution was a mix of a couple answers. I had to switch the project to the Windows Mobile 6 Professional SDK first and then I was able to select "Windows Mobile Professional Device"

Resources