VB6 -> VB.NET ... Cannot find the Canvas control in .NET - vb.net

I am trying to convert some old VB6 code to VB.NET. The VB6 uses a Canvas control, simply
Dim cv as Canvas
I cannot for the life of me figure out how to use the Canvas control in VB.NET (using VS2005). MSDN says it is in the System.Windows.Controls namespace, which doesn't seem to exist? All I see is System.Windows.Forms, which doesn't include the Canvas control. Any tips?
Thanks

You need to find out what the Canvas was in VB6, then you will be able to see what the nearest equivalent is in VB.Net.
I think it must have been an obscure third-party control or possibly some custom code. I've not come across Canvas before in VB6

In recent history things have changed a bit here. There are now two sets of windows frameworks.
Forms are the old one. The new ones are controls, and they come in the WPF and Silverlight variety. WPF is to replace windows forms, silverlight is meant for the web, etc etc.
Since you are using the older VS2005, I believe you will need to install the WPF extensions to get access to them.
Unfortunately the WPF Extensions for VS2005 are no longer supported by Microsoft:
http://blogs.msdn.com/b/acangialosi/archive/2008/06/27/vs-2005-extensions-for-net-framework-3-0-wpf-wcf-ctp-is-coming-off-the-ms-download-center.aspx
You can still get them from various places, but for your own ease you should probably consider upgrading to at least VS2008 if you want to use WPF/Silverlight.

Related

UI library for VB.net Desktop Applications

Are there any libraries available that can help to change the look-and-feel of Desktop Applications made using VB.net 2008? Here is a snapshot of an application that runs on Windows 7:
I think its made using the .net framework, but how can it be styled like this?
PS - Even if its not built using .net framework, then please let me know which language supports the UI customization on windows platform.
NOTE - As everyone is suggesting me to go with WPF or SWING using JAVA, I still want to know if its possible in VB.net WinForms or not.
Theme handlers (Use standard controls and the handler takes care of the visual UI):
Open source
http://www.codeproject.com/KB/miscctrl/FancyNetForms.aspx
Closed source
http://www.appface.com/ ($ 149 USD) (Skin your app with 2 lines of code)
Special controls that has built in theaming:
ComponentOne:
http://www.componentone.com/SuperProducts/StudioWinForms/
Infragistics:
http://www.infragistics.com/
I don't know how this specific window was styled, but there are many posibilities:
Maybe was made in WPF. Microsoft WPF are available since VS2008 and Framework 3.0 and it allow to make a complete look and feel customization for every control that you use.
Maybe It was made in winforms using a custom control set. For example, DevExpress has a set of 60 free controls that comes with some predefined look and allow creating your own skin. (60 Free Controls)
Maybe It just was made in Java with Swing (look this Question)

What is a good Silverlight resource for finding out what controls are available and what they're for?

I'm used to winforms development, haven't done any WPF and I'm starting a Silverlight project. I understand xaml and all (and I've got some resources for learning it) but I'm wondering if there's any resources available that shows what controls are used in what kinds of situations.
For instance, if you look at the BusinessApplication template in vs2010, they use a border or a grid in cases where I would think of a panel. Things like that.
I'm looking for more of a 'tips' kind of thing than a tutorial or reference. References normally just say what a control is; not when, where or why you would use a particular control.
These two should help you out...
http://samples.msdn.microsoft.com/Silverlight/SampleBrowser/#/?sref=HomePage
http://www.silverlight.net/content/samples/sl4/toolkitcontrolsamples/run/default.html

Active X Development: VC++ or VB or Other technologies

We are in the process of creating active-x controls used within our application.
Since Microsoft stopped supporting classic Visual Basic, is it wise to use Visual Basic to develop the Active X control or the latest VC++/ATL/MFC libraries provide more feature where we can create controls faster by leaving Visual Basic flexibility?
We will not be able to use .NET/VB.NET/C# since the application is supposed to work inside containers and containers may not support latest .NET runtime.
Any other language is best fit for Active X control development other than VB and VC++?
I, personally, would recommend using Delphi for this. It is still actively developed, and has the control you get with C++, but a rapid development environment more like VB.NET.
#nobugz: If you are really interested what is ActiveX in Delphi, look at docwiki. Normally it is 100% source code (yours + VCL, VCL is also available as sources) with autogenerated COM wrappers. So all potential security problems are also in source code. If you find a security problem in VCL, please send a bug report to Quality Central.
Here is a good example on how to create ActiveX Controls with C# .NET
http://www.codeproject.com/KB/cs/CreateActiveXDotNet.aspx
By all means VB6 is the best language. After reading your question I feel that you are a VB6 developer. If you know VB6 and use it then why hesitate using it for producing ActiveX controls.
I program in Delphi as well as VB6 along with VB.NET and C# but creating ActiveX controls is the easiest in VB6 compares to all other development tools.
If you are hell bent on not using VB and if you are looking for an alternative then try out PowerBasic (commercial - very costly) or PureBasic (commercial but affordable) Get it from here or better still MinGW (a GNU C++ compiler).
I have to say that VB6 with a good book like Developing COM/ActiveX Components with VB6: A Guide to the Perplexed you will be up and running faster.

Free schedule/timetable GUI library for .NET

Does anyone know of any good free libraries providing Windows Forms controls for displaying schedules/timetables in .NET? I'm really looking for something similar to what the guy who asked this question was seeking, with a couple of differences:
I don't need any help organizing the underlying data or generating the schedule (that's all set) -- I just want a clean way of displaying it.
I'm actually looking for a custom control in Windows Forms, not an ASP.NET control.
One thing I've considered doing is just using a TableLayoutPanel control, but ideally I'm looking for something that will be more straightforward code-wise (as in, something actually designed for displaying a timetable) and sharper-looking visually.
How about this control? It is very similar to the calendar in Outlook. It does come with source code, so if it's not quite what you need you could maybe use this as a base for your own implementation.
Download the source code for http://www.monocalendar.com
He built a control (CalWidget) that you can easily recompile in your own project that's pretty nice. I recompiled it in .net 4.0 with little problems.

Xaml not WPF

I am interested in using Xaml with expression blend for creating user interfaces in an application. However, because of the limitations of the target architecture, I cannot use WPF or C#.
So, what I am interested in is in any examples / existing projects or advice from anyone who has experiance of this technology on the use of Xaml in it's "Pure" form as a specification language not tied to WPF.
Specific questions:
1) Is it possible to use Blend + Xaml without the WPF elements, or without C# backing classes?
2) Are there any other implementations of Xaml parsers etc. which use different architectures, and can they work with blend or similar tools.
3) Are there alternative editor / designer tools which can help in this situation?
I am aware of the MyXaml and MycroXaml projects, and have found a lot of resources on the web about Xaml, but 99% of it relates directly to WPF. This is fine for understanding the concepts of Xaml, but doesn't help with the implimentation I need.
Many thanks!
Have you checked out the XAML spec.
http://download.microsoft.com/download/0/A/6/0A6F7755-9AF5-448B-907D-13985ACCF53E/[MS-XAML].pdf
XAML 2009 and the system.xaml.dll in clr 4.0 is probably going to be a god send for you if you can wait for it.
here is the PDC presentation on it.
http://channel9.msdn.com/pdc2008/TL36/
Now since you said you can't use C#, I am guessing you are not able to use the .net framework?? or using Mono. as far as I know there are no plans to implement XAML support in Mono. So either you would have to write your own XAML parser, and Object graph.
Of course if you are willing to do that you may want to wait for XAML 2009 spec as it adds significant improvements to the xaml language.
Douglas
Does Silverlight help you in anyway?. Now there is an Eclipse plug-in available for you to use Silverlight with eclispe. So you will be able to use Expression blend to design your UI and use Java for the backend coding(Future plan I think). Check out this link for more details. http://www.eclipse4sl.org/
I am using a XAML-based XML document as the core of the new AppMaker v3. I'm currently parsing it in Ruby to generate various output including pure XAML/C# WPF apps.
XAML is very easy to parse especially if you take an XPath approach:
windows = []
REXML::XPath.each(doc, "//Window") do |xml|
windows << Window.new(xml)
end
#... invoking ...
#items = []
xml.each_element("Canvas/*") do |itemXML|
#items << WindowItem.makeItem(itemXML)
end
The real issue, about which we need more information, is what kind of GUI you are trying to generate. The Canvas explicit positional layout in XAML is easy to parse and generate some simple Win32 controls and drawing. If you get into the constraint-based layout like StackPanel then you will have to recreate much WPF behaviour.
If your not using WPF then Xaml as its core is no better than XML really. Xaml has a few flavours but they are essentially addition functionality in the form of libraries. You could use Vanilla Xaml as a base but then you would essentially have to build a parser that reads it and then a framework of code that it essentially maps to. Xaml does not know what a StackPanel is it essentially sends the Textual data off to be compiled by whatever does know what it is, this is the part you would be missing, and its a pretty big part.