Click here to Skip to main content
15,892,965 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hello everybody
I'm having some trouble in coding with the mdi form and a child form.
loading mdi form

VB
SSTransition1.Visible = False
frmChngPass.Show
frmChngPass.Top = 0
frmChngPass.Left = 0



Unloading the form Change Password
VB
Unload Me
MDIForm1.Show
SSTransition1.Visible = True


and the error is (Run-time error 424 object required)

What i'm doing wrong?
Posted
Comments
Sergey Alexandrovich Kryukov 1-Jun-14 15:14pm    
Never use MDI and be happy. Don't try to torture yourself and scare off your users with MDI.
—SA
[no name] 1-Jun-14 15:52pm    
Well the first thing you are doing wrong is assuming that we would have any idea at all what SSTransition1 and MDIForm1 refer to and what object your error message is referring to.
Ardi Durres 2-Jun-14 7:32am    
SSTransition1 is Sheridan or Infragistics components.
Because i can't attach command buttons to mdi form i use sstransition to attach the command buttons on mdi form.

1 solution

Firstly I would avoid the use of Sheridan components - I'm not convinced they work under Windows 7.

Most people used PictureBoxes to contain buttons on MDI forms. Note I say "used" as this language is no longer supported and most developers are migrating programs to .NET (where they are able). Also MDI was/is a horrible user experience at the best of times.

Having said that, I presume the error is being produced by the line
SSTransition1.Visible = True
Based on your statement
Quote:
Unloading the form Change Password
and the lines
VB
Unload Me
MDIForm1.Show
immediately above it, I also presume that this offending line is in the child form "Change Password". But from your comment
Quote:
i use sstransition to attach the command buttons on mdi form
SSTransition1 is a control on the MDI Parent Form.

So either
A) Put SSTransition1.Visible = True in an appropriate event on the MDI form, or
B) Use MDIForm1.SSTransition1.Visible = True

Better yet, do not use an MDI child form and don't bother hiding the buttons. Just display the "Change Password" form as Modal. The user will not be able to click the underlying buttons until the modal form is closed.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900