When i enter the enter key,a new winform appears,but i didn't write these codes.
My code :
Private WithEvents ButtonLogin As ButtonDefinition
ButtonLogin = controlDefs.AddButtonDefinition("Login",
"ButtonLogin",
CommandTypesEnum.kShapeEditCmdType,
AddInClientID,
"Login",
"Login",
smallIcon,
largeIcon)
Private Sub ButtonLogin_OnExecute(Context As NameValueMap) Handles ButtonLogin.OnExecute
Dim f1 As New FormLogin
f1.Show()
End Sub
When enter the enter key in FormLogin windows,a new FormLogin appears,just like the screenshot below.
Why is this happening?
Solved! Go to Solution.
When i enter the enter key,a new winform appears,but i didn't write these codes.
My code :
Private WithEvents ButtonLogin As ButtonDefinition
ButtonLogin = controlDefs.AddButtonDefinition("Login",
"ButtonLogin",
CommandTypesEnum.kShapeEditCmdType,
AddInClientID,
"Login",
"Login",
smallIcon,
largeIcon)
Private Sub ButtonLogin_OnExecute(Context As NameValueMap) Handles ButtonLogin.OnExecute
Dim f1 As New FormLogin
f1.Show()
End Sub
When enter the enter key in FormLogin windows,a new FormLogin appears,just like the screenshot below.
Why is this happening?
Solved! Go to Solution.
Solved by Michael.Navara. Go to Solution.
In my opinion when you use f1.Show(), the code continues (exit the method). And when you press enter, Inventor repeats the last command -> show new form.
Try to change the call to f1.ShowDialog(). This wait until the form is closed.
In my opinion when you use f1.Show(), the code continues (exit the method). And when you press enter, Inventor repeats the last command -> show new form.
Try to change the call to f1.ShowDialog(). This wait until the form is closed.
Can't find what you're looking for? Ask the community or share your knowledge.