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

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
 
K

Kuba Florczyk

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top