dimcic
(Milos Dimcic)
February 16, 2018, 4:19pm
1
Hi,
correct me if I am wrong, but the old ways of setting up the Window Owner of a Form (Modal or Modeless) are obsolete, right? In this example:
using System.Windows.Forms;
using Rhino;
using Rhino.Commands;
using RhinoWindows;
namespace SampleCsWinForms.Commands
{
[System.Runtime.InteropServices.Guid("a8b8b5d1-1b26-4ef0-941f-801e0f9b3323")]
public class SampleCsModelessFormCommand : Command
{
private Forms.SampleCsModelessForm Form { get; set; }
public override string EnglishName
{
get { return "SampleCsModelessForm"; }
}
protected override Result RunCommand(RhinoDoc doc, RunMode mode)
{
if (null == Form)
This file has been truncated. show original
…we have RhinoWindows upstairs, which is unavailable now I think…RhinoApp.MainWindow is obsolete…RhinoWinApp is not there…
Am I missing something or is there a new way to define the Window Owner? (Otherwise, my modeless dialog “flies out of Rhino”)
Thanks!
dale
(Dale Fugier)
February 16, 2018, 7:08pm
2
Hi @dimcic ,
I’m confused. Does this sample not work for you?
The project referencesRhinoWindows.dll
because WinForms is Windows-only.
– Dale
dimcic
(Milos Dimcic)
February 16, 2018, 9:39pm
3
Hi Dale,
sorry…I assumed for some reason that the example has to be updated…and didn`t know I had to add the RhinoWindows.dll Reference…once I did, it was all there and it worked normally.
Thanks!