How to close the form selence after click a button to select something?

How to close the form selence after click a button to select something?

swaywood
Collaborator Collaborator
428 Views
1 Reply
Message 1 of 2

How to close the form selence after click a button to select something?

swaywood
Collaborator
Collaborator

Hi all:

I have a Form and a button on the Form.

Now i want to click the button and select something is the drawing and do something. and close the form auto.

Now the step is:

1.click button

2.autohide form

3.select something and do something

4.form show again(about 0.1 second) and form close.

 

But i want realize:

1.click button

2.close form

3.select something and do something

4.do not reshow the form again

 

can any one help me?

 

the following is my key code

 

		private void btnTranslate_Click(object sender, EventArgs e)
		{
			Editor ed = Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.Editor;
			using (EditorUserInteraction UI = ed.StartUserInteraction(this))
			{
				//select something and do something
				translate.SelectText();
			}
			this.Close();
		}
0 Likes
429 Views
1 Reply
Reply (1)
Message 2 of 2

swaywood
Collaborator
Collaborator

Hi all:

I have solve this question.

Thanks

0 Likes