Can we host a VB6.0 user control in WPF forms? - wpf

Can we host a VB6.0 user control in WPF forms?

VB6 user controls are ActiveX
Walkthrough: Hosting an ActiveX Control in Windows Presentation Foundation

Maybe, maybe not. .NET can handle COM/ActiveX controls so there should be a way to do this.
But you would include non-managed code to your project. Not only would this make your code a lot less reliable, it also would make the installation much more complex. In general, it's not worth the trouble.

Related

Infragistics SSResizer Control to Ressize Child Controls in Winforms

Hello There,
We had bought Infragistics SSResizer control back in 2003 for Vb. I was wondering if I can use it for C#.
My application changes its font size when you change the resolution which ultimately messes up the application. Any other solutions are appreciable.
The SSResizer is a COM control built for use in Visual Basic and was never tested in any .NET environment so it isn't known whether this will work or not. The recommendation is to replace the COM control with a .NET control and use that going forward.

Is that possible to develop one application in both WPF and Silverlight?

I've already worked with WPF but i don't know anything about SilverLightnow I need to develop an application which can run on both Mac and Windows,so i was thinking to write an WPF Application with MVVM for Windows and run it on Mac Using SilverLight?Is that possible to port from WPF to Silverlight and how much work needs or maybe should I write the application with SilverLight from beginning,even for my Windows users?Which one is better and faster?
a quick answer is Yes..
but lot of things to do. You could share most of XAML view across platform but not all of them.
try to put all business logic into service layer like BAL or middle tier
put presentation logic into ViewModel class library
create separate XAML View (for SL and WPF)
there are several docs about target multi-platform here..
A Cross-platform WPF, Silverlight & WP7 Application at codeproject
Sharing Code Between Silverlight and WPF

XAML, WPF and Windows 8

I'm hoping someone here can explain to me the difference between WPF and XAML exactly in this context:
I have an application (an XBAP specifically) written in VB.NET using MVVM & Repository Pattern, implementing the the usual INotifyPropertyChanged, OLEDB etc etc.
The front end of the application is written in XAML.
From what I understand there is nothing specifically "WPF" about this application. In my view its XAML + VB.NET; where does the WPF come in? Given windows 8 and the "death of Silverlight/WPF" that I keep hearing about, what should I be doing to "upgrade" my application to ensure its future?
I would greatly appreciate someone clearing up this confusion for me.
XAML + your code behind is WPF. You are using WPF. XAML is the markup used for defining the interface in WPF.
And I wouldn't worry too much at this point about "the death of Silverlight/WPF". Just because Windows 8 supports HTML5/JavaScript doesn't mean WPF has gone away. At least, not yet.
See also.
An XBAP (XAML Browser Application) is a kind of WPF XAML application, that runs in the browser. Nothing more, nothing less.
WPF isn't going away anytime soon; in fact, it received a number of enhancements in .NET 4.5. Windows 8 will continue supporting WPF whether it's run on the desktop or as an XBAP. There's no need to "upgrade" your app, but if you want to take advantage of the Windows Store and the new user interface, it's not difficult to port your WPF XAML to WinRT XAML.
See, WPF can be called as the Successor of WinForms . In WPF WE have this XAML that is simply XML but Is more powerful and has greater properties .
WPF isn't dead !
Talking about Windows Store Apps, Silverlight has lots to do with WPF and XAML
Your XBAP application uses WPF : XAML for the UI and VB.NET for the code behind.
If you want to be sure, check if the namespaces you use in the code begin with "System.Windows".
Your XBAP is just a kind of project you can create with the WPF technology. (that's an application which shows several web pages as its UI).

Can we integrate a WinForms application with a WPF application?

I want to integrate two existing applications into one. One of those apps is built on Windows Forms and the other on WPF.
Is it possible to achieve this?
WPF supplies the WindowsFormsHost class that allows you to host WinForms controls inside a WPF window; conversely, WinForms supplies ElementHost that allows you to host WPF controls inside a form.
Unfortunately how well things work out is highly dependent on exactly what you are doing, last time I checked there were more than a few rough edges. For more information, definitely start from this MSDN page.
If you want to have "independent" WPF windows and WinForms forms inside the same application, you will have to make both frameworks "share" some code in your UI thread's message loop. For a primer on how to do that, see here.
There are various classes to help you with this.
For hosting Windows Forms controls in a WPF Window, you can use the WindowsFormsHost class. For hosting WPF Controls in a Windows Forms Window, you can use the ElementHost class.
You can look here for mor information on the subject (windows forms section):
http://msdn.microsoft.com/en-us/library/ms753178.aspx

Silverlight or WPF for a little winforms/desktop type application?

I have a simple WinForms type application (main form, couple of sub-forms, minimize to system tray with notifications showing here).
I was going to move to WPF however I'm hearing some people say go silverlight (out of browser).
Question - Which way should I go for a simple desktop winforms type app? WPF or Silverlight?
Tks
It depends on what features you need. If you must minimize to the tray, it'll be easier in WPF. Silverlight, however, supports notification toast for notifications. It's not trayed, but it still works well.
Also note that Silverlight doesn't have floating child windows, so if you need them, you'll need to go WPF. You can get close analogs with the ChildWindow control, but they must stay within the bounds of the Silverlight application as they are ui elements, not real hwnd windows.
Silverlight 4 lets you do almost anything you need using COM automation. However, resist using that for major functionality. If you're targeting just Windows, do a click-once WPF application, preferably WPF4 if your timeline permits it. Reserve COM automation for OS "light-up" functionality in otherwise cross-platform applications.
Ease of application deployment is one big factor which Silverlight has going for it.
Depending upon the requirements and audience for the program, WPF or Silverlight will have advantages.
If you are able to run a setup on the target machines then WPF will be an option. If you want to launch from a webpage then Silverlight is the way to go.
if it's an internal app sounds likes WPF + ClickOnce is possibly the better choice. Unless you have (for example) sales people on the road with diff browsers, OS's etc then an installable SL app that talks to a (WCF) service might be a bet

Resources