MeepoSose
October 9th, 2009, 20:23
Has anyone built windowclass objects to represent these two common programming objects from the VB and .NET world?
I think the windowclass would be easy to implement and open the window to collect the data, but I can't think of a way to cleanly simulate the modal property.
One thought would be to do something like this:
1. Split the calling function into two separate functions fnStep1 and fnStep2
2. Process everything up to the point where you need the input within fnStep1
3. open the InputBox windowclass
4. assign fnStep2 as the handler for the InputBox.enterButton.onClick event
5. Have fnStep2 inspect the value of the InputBox.TextBox and store the value locally
6. fnStep2 then closes the InputBox window and resumes processing
MsgBox could be basically done the same way. It's all theory and I'm not sure how practical it is... but there could be a use for it I imagine.
I think the windowclass would be easy to implement and open the window to collect the data, but I can't think of a way to cleanly simulate the modal property.
One thought would be to do something like this:
1. Split the calling function into two separate functions fnStep1 and fnStep2
2. Process everything up to the point where you need the input within fnStep1
3. open the InputBox windowclass
4. assign fnStep2 as the handler for the InputBox.enterButton.onClick event
5. Have fnStep2 inspect the value of the InputBox.TextBox and store the value locally
6. fnStep2 then closes the InputBox window and resumes processing
MsgBox could be basically done the same way. It's all theory and I'm not sure how practical it is... but there could be a use for it I imagine.