form with the same characteristic of the "SEARCH" one.How to do it ?

  • Thread starter Thread starter Sandro
  • Start date Start date
S

Sandro

Hi !
I am working to a Word Xp add-in in VB.NET and I would like to create a
form with the same characteristic of the "SEARCH" one, that is:
- TopMost= TRUE (always on top)
- Me.SHOW (not modal !)

The problem is that I need to stop the code execution in the calling code to
wait for the results of the form
(therefore I cannot use ShowDialog).

How can I do it ?

Somebody suggested me to set a property Ready in the form and
in the calling code something like:

Form2.Show
While not Ready
Application.doevents()
end while

This work, but the CPU is kept busy (100%) util the user close the form!!
This is not very elegant!!

Thanks in advance for any suggestion.

Alexander
 
TopMost= TRUE (always on top)
Me.SHOW (not modal !)

bool _someFlag = true;

while(_someFlag)
{
Thread.Sleep(1000);
}

_someFlag you must set fo false after some event.

If think this will work :)


kuba florczyk
 
Back
Top