TomIsBigInTheGame
New member
- Joined
- Mar 17, 2010
- Messages
- 2
- Programming Experience
- 1-3
Hi,
This is my first post - I'll keep it nice and easy...
Basically... I've got the following forms: SearchItemForm and ViewItemForm. SearchItemForm allows users to search for items within the system and displays the results in a list. Item information is shown via ViewItemForm, which is modeless (shown via .Show()) - it's important for users to be able to view multiple items simultaneously...
The ViewItemForm has an edit button. When clicked, I want to enforce focus so no user sits mid-edit for ages while performing other tasks, as per a modal form. So, when clicked, I set the form .Visible property to false, and then re-show it via .ShowDialog(). This works. However, when some save button is clicked, I wish to leave the form open, but cease to enforce focus, as per a modeless form (because there's no reason to maintain it once editing is complete). I tried setting .Visible to false and calling .Show(), but this doesn't work. I also tried .Close() and calling .Show() under the premise that .Close() doesn't call .Dispose() for a modal form, but this didn't work either. I'd look into using .Focus next, but I'm calling it a day (hometime!).
It's worth adding that I'm trying to control the forms from within a control, via Me.ParentForm, e.g. Me.ParentForm.Show().
Any ideas? Cheers!
This is my first post - I'll keep it nice and easy...
Basically... I've got the following forms: SearchItemForm and ViewItemForm. SearchItemForm allows users to search for items within the system and displays the results in a list. Item information is shown via ViewItemForm, which is modeless (shown via .Show()) - it's important for users to be able to view multiple items simultaneously...
The ViewItemForm has an edit button. When clicked, I want to enforce focus so no user sits mid-edit for ages while performing other tasks, as per a modal form. So, when clicked, I set the form .Visible property to false, and then re-show it via .ShowDialog(). This works. However, when some save button is clicked, I wish to leave the form open, but cease to enforce focus, as per a modeless form (because there's no reason to maintain it once editing is complete). I tried setting .Visible to false and calling .Show(), but this doesn't work. I also tried .Close() and calling .Show() under the premise that .Close() doesn't call .Dispose() for a modal form, but this didn't work either. I'd look into using .Focus next, but I'm calling it a day (hometime!).
It's worth adding that I'm trying to control the forms from within a control, via Me.ParentForm, e.g. Me.ParentForm.Show().
Any ideas? Cheers!