WindowsForms and PickPoint
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi everyone!
I'm trying to create windows form to place unplaced rooms by picking a point in the interface.
So, I have to create an interface with generated button (for each rooms) to which I apply a function called place_room().
I want the function to:
- hide the forms
- pick a point in UI
- place the room at the point
- unhide the forms
I have one big problem: it seems that when the form is hidden, it's always on focus so I can't pick a point...
I'm aware of the external event to place a room with the help of Jeremy: https://thebuildingcoder.typepad.com/blog/2015/12/external-event-and-10-year-forum-anniversary.html
I tried the solution of Jeremy here: https://thebuildingcoder.typepad.com/blog/2015/11/pickpoint-with-wpf-and-no-threads.html But it's not working too.
My code now:
private void place_room()
{
this.Hide();
var pt = uidoc.Selection.PickPoint("Merci de sélectionner un point");
//do stuff to place the room at the selected point
this.Show();
}With this code, the form hides itself but I can't pick a point...
Sorry if this problem was solved somewhere in the forum but I didn't find it...
Have a nice day
Developer Advocacy and Support +