Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I have a large wxWidgets (Win32) LOB application. In future I want to get rid of wxWidgets and want to go for WPF (Prism). I want to develop any new component in WPF only and expecting to embed into wxWidgets Application, so that I can reuse the same whenever I will go for full fledge WPF application.
I came across 3 approaches to host WPF component into Win32 application.
Muliprocess architecture
Create WPF component as exe, and use the SetParent() and MoveWindow() calls to embed it into existing Win32 application. I created POC, and is working as expected.
Wrap WPF component with COM interface
Both .NET and C++ supports COM. This is achievable but I did not created any POC.
Use the Guidelines given by Microsoft
compile C++ application as a C++/CLI application. Once it's a C++/CLI application, you can mix managed and native code easily.
If anybody already came across with situation like this, Please advise me what are consequences I have to face with these above approaches.
I have heard issues with focus, keyboard events and mouse events.
Related
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 4 years ago.
Improve this question
The project is directed to provide finance based solutions (specially concerning stocks).
for back end the technologies i am planning to learn and use are web C# based web API and SQL server for database. which is best to use as a webAPI asp.net or core or mvc for my api?
bonus questions: since i am learning these technologies, is it better to learn a cross platform based frameworks like react-native and xamarin. and which do you think is best platform that generates mobile apps in addition to windows application, if performance is a key factor?
To answer your first question, WinForm is much simpler than WPF to learn, but WPF is way more powerful and flexible (in my opinion). So I suggest to start directly by learning WPF.
CrossPlatform frameworks like xamarin are good way to rapidly deploy solutions in all platforms. But, if you're creating custom views, you'll have to create a custom view for each platform anyway.
Xamarin.Forms (cross-platform) is much slower than using the native language of each platform.
Last thing, if you want to deploy your app for Windows + Android + iOS, you should use Xamarin.Forms, it's pretty similar to WPF and it gives you some UI elements to share with each platform (Labels, Switchs, StackLayout, ...) and all the libraries that C# can give you, while it stays outside of native code.
Hope this helps,
All the best.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I'm having a program created in wpf (using MVVM pattern) and I want this to work in linux too. I read about xamarin but couldn't find any tutorial how to implement such thing. Can anyone explain if it is even possible to somehow use my existing program with xamarin (in visual studio) and run it on Linux? And if so, how should I do this?
Thanks :)
You don't need Xamarin to develop a Linux desktop application using C#. With MonoDevelop (Xamarin Studio was originally forked from this project) you can develop GTK# applications that could be suited for your needs.
The problem with WPF is that Mono (the open source implementation of .NET) is only a subset of .NET and doesn't have any implementation for WPF, nor does it have any plans to implement it.
So the takeaway from this is that you can still reuse almost all of the core code from your existing application but to make it run on Linux you'll have to rework the UI layer.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I would like to create a application walkthrough for users to reveal functionality and give a short introduction to the software like this: http://www.dtelepathy.com/blog/design/ux-flows-how-when-to-design-app-walkthrough
This is often used for smartphone apps or browser applications. I've never seen this for Windows applications before, but this should be possible or not?
The application is implemented in C# and WinForms and uses a lot of controls from Infragistics.
It isn't possible to find anything about that on google or SO because "walkthrough" could be anything... :/ Maybe I'm looking for the wrong keywords?
Yes, this is definitely possible in a Windows App. We've done something like this before. I see your frustration regarding lack of documentation on the web. There isn't a lot out there specifically for windows desktop. Take what you can learn from the tutorial that you linked and translate that over. What we did a lot of was used semi-transparent panels containing the necessary content and then just lay those over everything. This way, you can get the 'greyed out' look for the main content of the app but control user's access.
Good luck!
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
Can you please point me into the right direction?
I want to edit other application textbox or click, programmatically. For example, in a web sites, I can edit elements and invoke button clicks.
I have no idea how to do this, but I can move mouse and use keyboard run time is it possible to edit other application's textbox ?
I have C++, VB.NET, and C# knowledge - any suggestions or sample code?
Thanks.
There is no easy way to do this, but it is possible. You will dig through the Win32 Api to get what you need. There will be a lot code needed for this, too much to put in sample here.
You will need to start with finding the window you want. This could be accomplished with FindWindowEx. When you have the window, you can enumerate the child controls using EnumChildWindows.
When you finally get the handle to the control you need, you can hook up to the windows message subsystem and send a WM_SETTEXT message using the SendMessage function. There is a wrapper function available: SetWindowText but the documentation clearly states that it will NOT work for windows of other applications.
Be prepared for a lot of digging around in the Win Api. You will probably run into issues regarding security in newer windows OS's. When you get it to run the functionality will be highly depending on the OS, UAC settings etc.
I remember doing this once, 15 years ago in Windows 98, even then it was problematic! So good luck!
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
Let's say that someone decides to create a game without a game engine or library of any sort.
C# (or any popular language) is used
They have 2D sprites and 3D models with animations
They aren't sure of what IDE to use
Based on this information how would they get images displayed onto the screen?
I imagine that a console window would be out of the picture. (Pun intended)
Yes, a console window would be out of the question :)
You need to access the built-in Graphics API. On Windows computers, this is DirectX. On other operating systems, it is typically OpenGL.
Both APIs are very cumbersome, and are completely different. Without a library you typically have to be in C/C++ to use them.
As far as IDEs it depends on what you are developing for. Visual Studio is fine for windows, others you need to find something that compiles for it (probably using gcc). Anything will work, its just standard native code.
Good luck!