Author Topic: Second Form opened next to First Form matching Size too  (Read 1565 times)

0 Members and 1 Guest are viewing this topic.

dugk

  • Guest
Second Form opened next to First Form matching Size too
« on: February 01, 2010, 03:03:13 PM »
code:
            layerTools.mergeLayerDialog mergeDialog = new layerTools.mergeLayerDialog();
            string lyrSelected = lstBxLayers.Text;
            string layerName = null;
            if (lyrSelected.Contains("("))
                layerName = lyrSelected.Substring(0, lyrSelected.IndexOf("(") - 2);
            else
                layerName = lyrSelected;
            mergeDialog.lyrToBeMerged = lyrSelected;
            mergeDialog.xrefYesNo = xrefYesNo;
            mergeDialog.Size = this.Size;
            mergeDialog.Location = this.Location;
            mergeDialog.Activate();
            mergeDialog.Refresh();
            Autodesk.AutoCAD.ApplicationServices.Application.ShowModalDialog(mergeDialog);

I can't get the above code to work.  I want to have my second form open next to the first form.

I've tried passing the size and location to the new form and I've tried mergeDialog.Update() method but no success.

Any suggestions?

Thanks!
Doug