Welcome to the SRP Forum! Please refer to the SRP Forum FAQ post if you have any questions regarding how the forum works.

Form Flashes when Loaded

I have a main form, with 3 panel controls
I start these with the following code.

What happens is that the form loads, and the three screens flash in the position they are located in Form Designer.
Each of these forms is made invisible (as all my forms are) and they are made centered and visible once the form is fully loaded on create.

I have added code to not make them visible, when run from this screen with panel controls, but they still flash.

What is the expected methodology of loading screens to avoid this with this control?


Colin

---

Processes
Call Start_Window("PARTS",@WINDOW,"Manage":@FM:1) Handle=Get_Property("PARTS","HANDLE") Call Send_Message(@Window:".OLE_PANEL1","OLE.SetForm",Handle,1,1) Call Set_Property(@Window:".OLE_PANEL1","OLE.Height",0) Call Set_Property("PARTS","MISC","Manage":@FM:1) Call Set_Property("PARTS.PART_CODE","ENABLED",0) Call Set_Property("PARTS.PART_CODE","LIST","") Call Set_Property(@Window:".OLE_PANEL1","VISIBLE",0) Cost Plan
Call Start_Window("COST_PLAN_ELEM_DETAILS") Handle=Get_Property("COST_PLAN_ELEM_DETAILS","HANDLE") Call Send_Message(@Window:".OLE_PANEL2","OLE.SetForm",Handle,1,1) Call Set_Property(@Window:".OLE_PANEL2","VISIBLE",0) AQ
IF PROJECT_ITEM<45> THEN Call Start_Window("AQ_MEAS") Handle=Get_Property("AQ_MEAS","HANDLE") Call Send_Message(@Window:".OLE_PANEL3","OLE.SetForm",Handle,1,1) END Call Set_Property(@Window:".OLE_PANEL3","VISIBLE",0)

Comments

  • Colin,

    I am not as well versed with the SRP Panel control so I suspect another member on my team will respond. However, I am curious, do you have the parent window (i.e., the ones with the SRP Panel controls) invisible at design time? If not, what happens if you also make it invisible and then visible at the end of the CREATE event?
  • Don,
    I have 3 panel controls, all the same size, and overlaying each other.
    When the user selects a row on the tree on the left, the appropriate panel is made visible, and the others invisible.
    This works fine, no flashing or anything.
    It is just at launch time when the flashing occurs, as a result of the control being made visible when the form is set in the panel, even though it is invisible.
    Then it gets put in the proper place in the panel, and all is OK.

    It might be me doing something I am not supposed to, hence I was asking for expected methodology, as opposed to saying a bug exists, as I cant be sure.

    Colin


  • Colin,

    Am I correct that all three panel controls are on the same window and you put the form in the panel during the CREATE event of this window?

    If so, is this window visible or invisible when the CREATE event is firing?
  • Yes, all three panels on the same window (and same page)
    The main window is invisible whenthe [panels are created, and the last thing it does on CREATE is make the windows visible.

    Come to think of it, I think the problem may lie with OI.
    If I recall, the SIZE property of a form causes the window to be visible.
    So, I expect the panel control is making the window sized to fit, and hence visible.
    I am using OI8.

    Colin
  • Colin,

    Setting the SIZE property will cause a window to become visible. However, I do not know if loading the form in the panel control is causing this this happen as you suggested.

    This might be a fruitless pursuit, but I am still curious about the order of actions that occur in your CREATE event. Can you give me the code, or give me summarized pseudo code, of your CREATE event?
  • Code supplied via Email
    Sections include:
    • Displaying my toolbar
    • Setting up the Tree
    • Setting up Panel 1
    • Setting up Panel 2
    • Setting up Panel 3
    • Displaying the tree
    • Setting the expand level on the tree
    • Showing the window, centered
  • I have also moved a line of code since the Email sent

    Call Set_Property(@Window:".OLE_PANEL2","VISIBLE",0)
    Call Start_Window("COST_PLAN_ELEM_DETAILS")
    Handle=Get_Property("COST_PLAN_ELEM_DETAILS","HANDLE")
    Call Send_Message(@Window:".OLE_PANEL2","OLE.SetForm",Handle,1,1)

    This line of code was at the end, now at the top, making the panel invisible, before the panel form is set.
    This reduces the flashing a little bit, but it is still present, although more acceptable now.
  • Colin,

    I really appreciate the time you have taken to post your code. I am surprised that making the panel controls invisible is actually helping. However, if you wanted to make them invisible in the first place, why not make them invisible in the Form Designer rather than using code to make them invisible. I do not see where you make the panel controls visible. Is that happening in one of the gosubs or the SET_WINDOW stored procedure?

    Also, just to be absolutely sure, are each of the windows (e.g., PARTS) invisible at design time? If so, when do you make them visible?
  • Each the windows is invisible at design time, as all my windows are.
    They are set to Visible at create time, after they are centered.
    This is done in my SET_WINDOW procedure.

    For this instance however, I also have added code, which, if the management screen is open, then the screens do NOT run the Set Window program. The reason being is that I was then going to make them visible once the panels are in place, to stop the flashing. But, when I tried this, bypassing my SET_WINDOW program, with the forms invisible, they still came up in the panel as visible.
    I suspect still that the Size event is triggering the visibility of the form, hence the flashing, even though no code I have sets the visible property in this case.

    Colin
  • Unfortunately I can't assist too much with this at the moment except to say I've had a similar experience with the panels.
    I can't assist because I hadn't discovered the reason for it as yet and as it was something I was experimenting with rather than an urgent requirement I put it aside for a while.
    My scenario was a window with two panels both of which I use the setform method to embed another window. All windows are invisible at design time including the parent window. I create the window, start the two other windows and as I set them into the panel, they flash visible, then move to their appropriate panel. Then I make the parent window visible.

    What confused me the most with it, is I have three panels on my mdi, each of which embed separate windows upon the create yet I don't have the same issue. Nothing becomes visible until the entire mdi is ready. So I had two processes seemingly coded the same way yet displaying different symptoms. One working, one not. The only thing I could think of was perhaps it was the mdi - child relationship.

    I'm tempted to revisit now to see if fresh eyes can make a difference but would be keen to hear of any suggestions anyone might come up with.
  • Thanks Mark

    My guess is that there is a difference between the MDI - child relationship and the normal form, when the SIZE event is triggering the sub-form to become visible. I think that the SIZE event when applied changes the visibility to true, but with an MDI child this might not be the case, and this is OI side, so I cannot tell.

    It is a nuisance, but it is not such a huge problem that it causes an issue.
    But, then this is in my new version which no users have received yet, and they may comment.

    Colin
  • Guys,

    Your ongoing comments, and patience, is appreciated. Please know that we are going to look into this carefully ASAP. As you both know the conference is this week and our team has had to focus on getting ready for it. I have already discussed the need to make this issue our priority when the conference is over. So please look forward to a response sometime next week.
  • No problemo, no rush at all.
    It will be a couple of months yet before we release the next version that uses this.

    Colin
  • Same here, just felt like throwing my 2 cents in.
Sign In or Register to comment.