.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to focus Autocad when click Button in form

4 REPLIES 4
Reply
Message 1 of 5
hoathuongphuoc
849 Views, 4 Replies

How to focus Autocad when click Button in form

Hi All,

Now, I have a problem with Form. This is. When i press button in Form(i want to draw line in Autocad), If i want to draw line in autoca, I have to click twice. I want to ask everyone. How can i only click once into cad and draw this line. I have used Application.ShowModalDialog() but my form will hide. and when my form appear so i can not click continue to cad. Thanks all. i use cad 2013.

4 REPLIES 4
Message 2 of 5
ditran
in reply to: hoathuongphuoc

You can used this method:

 

frm.Hide()

'Your code

frm.dispose()

Message 3 of 5
hoathuongphuoc
in reply to: ditran

This is my question:

 

1. Before i press Button:

 

 a1.png

 

2. After i press and then draw a line

 

 a2.png

 

I use cad 2013, vb.net. Thanks everybody.

Message 4 of 5

I think its not easy.

Message 5 of 5
mzakiralam
in reply to: hoathuongphuoc

Hi,
first is to draw a line you need 2 Points. So it is usual that you need to click twice to select 2 Points. or do you have other idea in your mind. 2nd is regarding form. if you use the form as modal you can not perform other command as Long as form is open. In that case you can call the form as modeless Dialog. But if you want to use the form as modal Dialog and want to perform interactively with AutoCAD Editor there is a way . you have to use StartUserInteraction method which will automatically hide modal form. you can take a look on below link where this Kind of issue is discussed. may be interesting for you.

http://forums.autodesk.com/t5/NET/Problem-regarding-Modeless-form/m-p/3947116#M35369

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost