Form Focus problem

 

Hi,

    I'm working on a project that involves interacting with lots of solidedge  part and assembly files.

i follow the simple following sequence on each file :

Open

Perform Operation

Save

Close

I'm using another thread for doing these bunch operation. (One thread handles UI)

Now the problem is When i start updating ,My forms focus automatically losts and comes back repeatedly.

Also other applications & desktop also starts flickering .(someting similar happens when we refresh desktop)

I want my form to retain focus.

any suggessions ?

Thanks in advance.

(I'm using VS 2008 and SolidEdge V20)

 

 

 

 

 

Posted by: Mithun **bleep**ole
Post date: 11/25/2008 10:27:22 PM

3 REPLIES

RE: Form Focus problem

 

An brute solution would be to set the TopMost property of the form to true. You can always try this. I'm doing similar things like you with SE and can confirm that my form looses focus, when attempting an SE operation.

 

Another solution could be, to poll in an infinite loop for the this.focus property of the form and if its switched to false, set it to true.

hth,

Sibi

 

Posted by: Seb Sosna
Post date: 11/26/2008 2:14:48 AM

RE: Form Focus problem

Hi,

I tried your solution - "Topmost" ,

Unfortunately its not working for me .

I will try your second suggestion and tell the result soon ..

Thanks for help

 

Posted by: Mithun **bleep**ole
Post date: 11/28/2008 1:39:08 AM

RE: Form Focus problem

 

Hi,

    Its bit of older topic but I think its better to leave it with some solution.

I resolved the issue by accessing subassembly variables through occurance objects from main assembly.

Previously i was opening each assembly independantly.

In this way effectively I opened only main assembly , so that focus lost problem gets struck only once which is quite ok for me.

 

Thanks a lot,

 

 

 

Posted by: Mithun **bleep**ole
Post date: 4/27/2009 10:53:30 PM