Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Controls
  New Posts New Posts RSS Feed - BUG: FormExtender problem with modal form
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

BUG: FormExtender problem with modal form

 Post Reply Post Reply
Author
Message
MNovaro View Drop Down
Groupie
Groupie
Avatar

Joined: 20 June 2006
Status: Offline
Points: 71
Post Options Post Options   Thanks (0) Thanks(0)   Quote MNovaro Quote  Post ReplyReply Direct Link To This Post Topic: BUG: FormExtender problem with modal form
    Posted: 10 March 2009 at 3:57am
Hello, all

I'm using form extender to save / restore placement of my forms. But, I have a problem with modal forms: I get the error

"Form is already displayed, can't show modally"

To test, simply add two forms (Form1, Form2), and add FormExtender (frmExt) to Form2, using:

Private Sub Form_Load()
    frmExt.RestorePlacement "TMP", "tmp", "tmp"
End Sub

Private Sub Form_Unload(Cancel As Integer)
    frmExt.SavePlacement "TMP", "tmp", "tmp"
End Sub

Now, from Form1 call Form2 modally:

Private Sub Command1_Click()
    Form2.Show vbModal, Me
End Sub



This works the first time (i.e. when RestorePlacement has no saved position in it), but it fails on the second click (i.e. after saving the placement).

Any help would be grealtly appreciated.

Thanks
Marco

Back to Top
Aaron View Drop Down
Senior Member
Senior Member
Avatar

Joined: 29 January 2008
Status: Offline
Points: 2192
Post Options Post Options   Thanks (0) Thanks(0)   Quote Aaron Quote  Post ReplyReply Direct Link To This Post Posted: 10 March 2009 at 8:33am
Hi Marco,
 
Yes you are right about this, I can confirm that this a bug.
 
Seems that RestorePlacement creates instance of the form and show the form in the last saved position...
 
Just call RestorePlacement in Command1_Click:
 

Private Sub Command1_Click()
    Form2.frmExt.RestorePlacement "TMP", "tmp", "tmp"
End Sub

 
 
and you will see that form is showing. Now to set it to vbModal is going to be a problem...
 
 
 
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2
Language: Visual Basic 6.0

Zero replies is not an option....
Back to Top
MNovaro View Drop Down
Groupie
Groupie
Avatar

Joined: 20 June 2006
Status: Offline
Points: 71
Post Options Post Options   Thanks (0) Thanks(0)   Quote MNovaro Quote  Post ReplyReply Direct Link To This Post Posted: 10 March 2009 at 9:20am
Hi Aaron,

thanks for the reply.
Actually, I found out that placing the RestorePlacement in the Form2 Form_Activate event works, but I can see the form "flicker", since it is shown for one instant in the "old" position, then restored to the correct one...

I hopw CJ will come out with a fix for this (should I point out this to the support team, opening a new ticket?)

Thanks again
Marco
Back to Top
Aaron View Drop Down
Senior Member
Senior Member
Avatar

Joined: 29 January 2008
Status: Offline
Points: 2192
Post Options Post Options   Thanks (0) Thanks(0)   Quote Aaron Quote  Post ReplyReply Direct Link To This Post Posted: 10 March 2009 at 9:35am
Hi Marco,
 
You don't need to create new post for this just change Topic Description into: BUG: FormExtender problem with modal form
 
and Oleg will respond
 
 
 
 
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2
Language: Visual Basic 6.0

Zero replies is not an option....
Back to Top
MNovaro View Drop Down
Groupie
Groupie
Avatar

Joined: 20 June 2006
Status: Offline
Points: 71
Post Options Post Options   Thanks (0) Thanks(0)   Quote MNovaro Quote  Post ReplyReply Direct Link To This Post Posted: 10 March 2009 at 10:01am



Back to Top
MNovaro View Drop Down
Groupie
Groupie
Avatar

Joined: 20 June 2006
Status: Offline
Points: 71
Post Options Post Options   Thanks (0) Thanks(0)   Quote MNovaro Quote  Post ReplyReply Direct Link To This Post Posted: 25 March 2009 at 4:11am
Edit: Any news in here??
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 26 March 2009 at 2:55am
Hi,
 
We can try hide it again with
 
Private Sub Form_Load()
    FormExtender1.RestorePlacement "TMP", "tmp", "tmp"
    Me.Visible = False
End Sub
 
 
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
MNovaro View Drop Down
Groupie
Groupie
Avatar

Joined: 20 June 2006
Status: Offline
Points: 71
Post Options Post Options   Thanks (0) Thanks(0)   Quote MNovaro Quote  Post ReplyReply Direct Link To This Post Posted: 26 March 2009 at 3:52am
Yes, this works: thanks.
Anyhow, I was wondering if you are going to fix this in the next release...
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 26 March 2009 at 5:30am
Hello,
 
Yes, we will change it. thanks.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.188 seconds.