Subject:Custom UI in Windows Forms -- can it be done?
Posted by: MediaMasher
Date:5/16/2008 5:27:37 PM
Can a script built as a C# class library display a Windows Forms UI and be controlled via Events from various Form controls like Buttons, etc.? I have tried doing so but I am encountering problems. Just wondering if it's even "supposed to be able to do this." Thanks! |
Subject:RE: Custom UI in Windows Forms -- can it be d
Reply by: _TJ
Date:5/21/2008 2:13:51 PM
Yes. It can be done. But only Modal UI is allowed. As soon as your script exits you aren't allowed to use the any of the Sound Forge scriptable objects anymore. Also, it's pretty much impossible to use the forms designer (as far as I can tell) unless you let it write ALL of the code, I think it writes lousy top-heavy code so I don't use it myself for most scripts. It's actually pretty easy to write forms based GUI code without using the Forms Designer. See the sample script RipWholeCD.cs for some forms code written without the designer. And the source code for the Batch Converter is available - that was written with the forms designer. tj |
Subject:RE: Custom UI in Windows Forms -- can it be d
Reply by: MediaMasher
Date:5/22/2008 3:43:43 PM
Thanks for the response! Will check out those examples and try to see where I have it wrong. |
Subject:RE: Custom UI in Windows Forms -- can it be d
Reply by: _TJ
Date:5/22/2008 5:47:49 PM
Oops, RipWholeCD is not the script I'm thinking of. Try GuiChooseEffects.cs or GuiChooseRenderers.cs. or any of the Ripping scripts OTHER THAN RipWholeCD.cs. SfHelpers_Source.cs has several different forms. Message last edited on5/22/2008 5:53:08 PM by_TJ. |