Hi all, I have just joined the forum and new to vb.Net after years of RhinoScripting.
I’m using SharpDevelop which seems to be similar to Visual Studio, although I’m not sure if the extensions available for VS work with SD?
I have created a form which is opened as soon as the command in entered.
Dim oForm As ResizeCupboard_Form oForm = New ResizeCupboard_Form() oForm.Show(oForm)
If someone clicks a button it allows them to pick a point in the Rhino Window. It is putting the form behind the Rhino Window while this takes place and I am not able to get it back, return to the form after the GetPoint has been recorded.
Here is the Button code…
Sub Button1Click(sender As Object, e As EventArgs) Dim pt_anchor As Rhino.Geometry.Point3d Using getPointAction As New Rhino.Input.Custom.GetPoint() getPointAction.SetCommandPrompt("Pick new Anchor point") If getPointAction.[Get]() <> Rhino.Input.GetResult.Point Then WriteLine("No point selected.") 'was RhinoApp. getPointAction.CommandResult() 'removed Return End If pt_anchor = getPointAction.Point() End Using End Sub
I have tried ResizeCupboard_Form.Show(), bring to front, focus, visible… but no success. I can create a New form easily enough, but that doesn’t help either.
I know something needs to go before the End Sub - Can anyone advise how to bring the form back to the front after the button function is completed? oForm is not declared if I reuse it and typing ResizeCupboard_Form.Show() says I have a reference to a non shared member requiring a reference.
Thanks in advance - I have googled and googled to no avail!
I’d be interested to know if there are sample plugins available for vb.net that incorporate forms so I can take a look into how others handle them generally.