Joachim Posted September 23, 2006 Report Share Posted September 23, 2006 Hi together. I am currently developing a main application standard for testmachines. It would be nice to have a XControl with a main menu, logo and some general functions implemented. I have planned to use this XControl as a standard for each application. So if i want to develop a new test bench, i would drop the XControl into a blank VI and I will have the main menu (which can be modified by properties) at the right side, the logo at the top and some properties and methods to save or read parameters from file or network or something like this. 1. Problem: Implementing .NET Components into XControls. The .NET Framework has great components, which I want to use for the main menu. I think about the menu in the Windows Setting Folder. (see atached jpg-file) Ok, so in a single VI, this all is working fine (VI_works.vi - as an example with a simple progressbar) but if I want to implement the functionality into a XControl I will get an error "Cannot pass a GCHandle across a AppDomain" (VI_doesntworks.vi). Any other .NET Component (also non-Microsoft Components) doesn Quote Link to comment
Aristos Queue Posted September 23, 2006 Report Share Posted September 23, 2006 Ok, so in a single VI, this all is working fine (VI_works.vi - as an example with a simple progressbar) but if I want to implement the functionality into a XControl I will get an error "Cannot pass a GCHandle across a AppDomain" (VI_doesntworks.vi). Any other .NET Component (also non-Microsoft Components) doesn Quote Link to comment
Chris Davis Posted September 24, 2006 Report Share Posted September 24, 2006 Hi together.I am currently developing a main application standard for testmachines. It would be nice to have a XControl with a main menu, logo and some general functions implemented. I have planned to use this XControl as a standard for each application. So if i want to develop a new test bench, i would drop the XControl into a blank VI and I will have the main menu (which can be modified by properties) at the right side, the logo at the top and some properties and methods to save or read parameters from file or network or something like this. 1. Problem: Implementing .NET Components into XControls. The .NET Framework has great components, which I want to use for the main menu. I think about the menu in the Windows Setting Folder. (see atached jpg-file) Ok, so in a single VI, this all is working fine (VI_works.vi - as an example with a simple progressbar) but if I want to implement the functionality into a XControl I will get an error "Cannot pass a GCHandle across a AppDomain" (VI_doesntworks.vi). Any other .NET Component (also non-Microsoft Components) doesn Quote Link to comment
Joachim Posted September 24, 2006 Author Report Share Posted September 24, 2006 It sounds like you want a VI template rather than a XControl. These are easy to create. Simply create a VI that has all the generic functionality you want, then rename or save the file with a .vit extension. It also lets you get around your ".net control inside a xcontrol" issue. I use a VIT to provide myself and my group with a standard place to start off an application. We include our state machine layout and standard set of states, prepopulated with our own particular setup.I know that professional applications have been built in LabView, mostly because I consider what I create to be professional applications (note: professional does not have to mean perfect). But if you want to move beyond "my" work, you can look at LabView itself, which has several major pieces written in G. You could also check out VIPM which is IMO a professional application written entierly in LabView (8.0.1 if I'm not mistaken). Hi! First, thanks for your answers! Yes i thougt about the option to do this with a VI template. But i want to outsource the code into a xcontrol. If i do that with a VI template, the user of my visualization standard will see the wireing and coding. This could be hidden with an XControl. I know the VIPM and it Quote Link to comment
Chris Davis Posted September 24, 2006 Report Share Posted September 24, 2006 I didn't understand what you were trying to do, thanks for the picture. It sounds like you can't use a .net component in an XControl in LV8. IF you don't want to upgrade and have access to OpenG Tools you might take a look at some of the buttons there, specifically the "Load" button, its similar to the "New" and "Open" buttons in the LV 7 and 7.1 start up screen. These buttons have a menu associated with them. In LV 8 you also (finally) have access to the right click menu on controls, you might consider using that. If all else fails, you can always do what you want with the most underutilized LV control, the picture control. Your choice of programming languages is just that, your choice. In this case you will have to weigh the options, since you haven't told us all that you are trying to accomplish. Good Luck. Quote Link to comment
Aristos Queue Posted September 24, 2006 Report Share Posted September 24, 2006 It sounds like you can't use a .net component in an XControl in LV8. You can't use a .Net refnum as the data type of the XControl, nor pass such refnums to/from the host VI through Properties of the XControl. Using .Net functionality purely internal to the implementation of the XControl should work fine. If you can't get that to work, I suggest posting to ni.com to get feedback from some of the .Net folks -- neither XControls nor .Net are my typical domain. Quote Link to comment
Joachim Posted September 24, 2006 Author Report Share Posted September 24, 2006 Hi! I also had the picture control in my mind. But the implementation of the control would get out of hand and this means a lot of work and time. So next week I Quote Link to comment
Jacemdom Posted September 24, 2006 Report Share Posted September 24, 2006 :question: How do you build large applications with a userfriendly and ergonomic interface which can be used as a template? :question: Am I on the wrong track or what do you think? Thanks, and have a nice day! Joachim Template at run or edit time? At runtime you can use .vit and at edit time just a simple VI that you save somewhere and copy/rename when you start a new app Quote Link to comment
Joachim Posted September 24, 2006 Author Report Share Posted September 24, 2006 Template at run or edit time? At runtime you can use .vit and at edit time just a simple VI that you save somewhere and copy/rename when you start a new app Template at edit time. It would be a posible way to copy/rename a VI when I start a new app. I want to build a complex template, which includes many functions and layout settings. Thats the reason that I want to outsource the code into a XControl. All the wireing and coding would be hidden, and other programmers will have a easy template for building apps. Quote Link to comment
Ton Plomp Posted September 24, 2006 Report Share Posted September 24, 2006 Template at edit time. It would be a posible way to copy/rename a VI when I start a new app.I want to build a complex template, which includes many functions and layout settings. Thats the reason that I want to outsource the code into a XControl. All the wireing and coding would be hidden, and other programmers will have a easy template for building apps. Maybe some sub-panels with VI's where the BD is removed? Or use a good framework with sub-vis where the more advanced stuff is done. Ton Quote Link to comment
Jacemdom Posted September 24, 2006 Report Share Posted September 24, 2006 Template at edit time. It would be a posible way to copy/rename a VI when I start a new app.I want to build a complex template, which includes many functions and layout settings. Thats the reason that I want to outsource the code into a XControl. All the wireing and coding would be hidden, and other programmers will have a easy template for building apps. I have built a template "copier" in the past. My template was a hierarchy of VIs with type defs and ... It renamed everything to what i wanted using tags... I beleive there is something similar built in know in 8.0 called source distribution... Quote Link to comment
PJM_labview Posted September 24, 2006 Report Share Posted September 24, 2006 Hi!I also had the picture control in my mind. But the implementation of the control would get out of hand and this means a lot of work and time. So next week I Quote Link to comment
Jacemdom Posted September 25, 2006 Report Share Posted September 25, 2006 Here is a demo implementation using the picture control (and this is not that hard). It does not have all the bell and whistle, but this is a good starting point. Enjoy PJM Could you make a development distribution? I don't have the OGTK VIs. 1 Quote Link to comment
PJM_labview Posted September 25, 2006 Report Share Posted September 25, 2006 Could you make a development distribution? I don't have the OGTK VIs.Here you go. Note: I also down convert it to LV8.01, since this appear to be the LV version of the original poster. PJM Download File:post-121-1159163183.zip 1 Quote Link to comment
Joachim Posted September 25, 2006 Author Report Share Posted September 25, 2006 Hi PJM_Labview Wow, your example is realy fancy, compliment! Very very nice work. For my luck you have down convertet to LV 8.01. Thank you for the example. As soon as I have time, I will try to enhance the picture control. Is any one intrested in building a little framework? I think this navigation control would give every application a very professional and userfriendly style. Greets Joachim Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.