ParentMDI and axWindowsMediaPlayer fullscreen - fullscreen

I have a parent form called Form1, and a child form called Form2.
Form2 has an embedded video, but when I try to set axWindowsMediaPlayer1.fullscreen=true I got an error.
If I do not use Form2 as a child, it works ok. So how can I set fullscreen=true whit child form?
thank you

I read that I cannot do what I wanted, because the video is in a child form that is contained by a parent form. So I think the best answer is to embed the video in the parent form, and everything works great.

Related

How to change the background color of a parent component from a child component

I am studying the LitElement technology and I have an exercise which I cannot solve completely, I have to nest two components, where the child component will have 3 buttons and depending on the button that is pressed, the background of the component must be changed father, I understand that for this exercise you must use customizable events with DispatchEvent, I leave you my code that I have been doing for this exercise and I also share some screens of how this exercise should work, I hope you can help me, thank you very much in advance
image pressing the green button
image pressing the red button
image pressing the blue button
child component image
Parent component image
Try this, it is hard to understand the problem without including the code.
static styles = css`
:host{
..your style
}
`
post a photo of the code, they are as a link, there is an image to represent what I want to do and there are the images of all the code of the parent and child components
In you child component to push and event outside shadow dom, your event should have composed set to true
e.g.
this.dispatchEvent(new CustomEvent('myEventName',{bubbles:true,
composed:true,
detail: my-details})
And at parent you need to consume the event with #
e.g.
<my-child #myEventName=${this.handleMyEvent($event)}></my-child>
useful links
https://lit.dev/docs/components/events/#shadowdom-composed
https://lit.dev/docs/components/events/#dispatching-events-after-an-element-updates

Forms: Creating one item before another

What should be the best UX for a situation where one set of record cannot exist without another.
Take a scenario in an application where a child can be connected to zero or more parents.
If a user of our application finds himself filling a form to create a child but the parent for the child does not exist yet, what is the best approach to creating the parent and then attaching that parent to the child.
Should the child be created without the parent, but updates can be done to add parent to child, note that this also has its own issues as the page where the addition will occur might also need to create the parent.
Have a link on the child page that says "create parent", and route back the user back to the child page after creating the parent.
Have a button bring up a modal that has the parent form and allow the user to create the parent before returning.
I don't like any one of these three options and I am hoping there are better approach out there.
Sorry for any typos or ambiguity, in bit of a rush, also not sure if this is the right place to ask the question.
Since the records are depending on each other I would make sure the user submits these together but make it look like 2 different elements on the same page.
You could use a tab-menu to switch between the child and parent but both should be filled in before submitting. Some inspiration even though you don't need to fill in multiple tabs here. Just make sure it's easy for the user to see that he needs to fill in both tabs.
Another option could be to have the child form collapse when finished/closed like a drop-down menu with an expand arrow button incase you want to edit it again. And the same with a parent box below it. Something that looks a little like this.
They could both be closed at the loading of the page so the user sees both boxes.

Cannot access a child window's controls ( Created with CDialog::Create )

I've been having some difficulties to understand and maybe you guys can help.
I have a project that uses CDialog and I've been trying to create a child window that retrieves some info from the main window ( the main/child windows have they're own classes), edits the content and sends the edited info back to the main window.
When I tried using CDialog::Create(), I wasn't able to use ANY of the controls on the child window. ( Example: Buttons are not responsive )
When I created the child window with DoModal() it backfired.. Buttons were responsive, and I had access to the child window's class functions, but when I tried to get the info from the main window class I was struck down with an appcrash.
I have tried passing the CWnd manually but it still crashed.. (Could not retrieve the main window handle )
Any ideas on how can I create the child window while still having access to the main app's variables and to the child window's event handlers ?
EDIT:
Ok, I finally found out what was the problem:
I was using
CDialog *eTest = new CDialog; // Pointing to .. ?? .. yeah I hate myself for this
eTest->Create(IDD_EDIT_DIALOG, NULL);
eTest->ShowWindow(SW_SHOW);
Instead, I should of created the window like this:
CDialog *eTest = new CEditDialog(); // Pointing to the dialog class
eTest->Create(IDD_EDIT_DIALOG, this);
eTest->ShowWindow(SW_SHOW);
Everything from the buttons to the data transfer seems to be working right now.
I hope it can help someone as dumb as me in the future.

visualforce rerender the parent page table from child

I want to refresh the part of (not whole page) the parent window by clicking the button on child window.
It it is like action="action name" rerender="id" on just one page.
But from child window, is it possible to rerender the parent page part(on my case it is table)?
Please, help.
Thank you!
Yes. Simply:
rerender="ioOfParentComponent"
This only pertains to the same page, however. If you're talking about IFrames then this will not work. But within the same <apex:page > </apex:page> block, this will work.
If you want to refresh a parent window from the child, and the child is a popup and both pages are custom visualforce pages - do it per javascript callback:
Parent window:
<apex:actionFunction name="callBackFunction" reRender="refreshMe" action=""/>
<apex:outputPanel id="refreshMe">
Some text here...
</apex:outputPanel>
Child window (popup):
<apex:commandButton onClick="javascript:parent.window.opener.callBackFunction(); return false;" value="Refresh parent" />

Opened new document in xpinc. How to close window or redirect to parent document?

I'm XPage-ing a form in a big classic notes application, and I'm struggling to find a way to end the interaction with the form that presents a good UI. Here's my scenario:
1) Parent document (classic notes) is opened from a view
2) Button on parent document opens child document in XPiNC using notes:/// link.
3) Cancel button on child document XPage......
I've tried the following approaches:
a) Use window.close()
I've done lots of googling on this one, and various approaches don't seem to work for me. window.close() is supposed to work if you call it from a window that was opened with window.open, so I tried window.open("closeMe.xsp", "_self") to see if this would give me a window that could be closed by an xpage with window.close() in the onClientLoad client side event. No luck there. The following questions make suggestions but don't provide a solution (apart from a third party product)
How do I close my window in Xpage?
How to close xpages in notes client? I use CSJS window.close but it's not working
b) Redirect to parent document
My next idea was to redirect to the parent document - it's already open in the Notes client. However, I found that when I redirect (using facesContext.getExternalContext().redirect("Notes:///url" ) it does indeed jump to the parent document, but it leaves a blank window open in the tab where the XPage was.
My next try was to close the parent in the original calling LotusScript, then redirect to the parent in the cancel button. This works too - you get to the parent document, but then if you press the escape key or close the tab with the parent document, it leaves you with an empty window again.
Any ideas? I like the idea of being able to return to the newly-opened parent document because I could expect an embedded view to be refreshed with my new child document, but at the moment I'll take anything that works. :)
Cheers,
Brendan
You are stuck between a rock and a hard place. XPiNC and classic Notes don't mix that easily. But there is hope. Head over to the Composite Application Wiki. There you will find that you can open a composite instead of a document which allows you to have tabs and stuff inside a composite.
It is also the way a classic application and a XPages (publish/subscribe using the property broker) can exchange data. Make sure you read the comments too. Karsten has good further links.
I don't have a working example for what you exactly want to do, but Composite feels like the best bet you have.
I found a partial solution, Java is your friend. It works in a button should work in a link too. The only problem is when called from an event like onClose the current xpage looses focus and the current pages stays open. I tried to emulate send keys and it presses the ESC key. It works fine from a button in.
Button on CLick event
<xp:button value="Label" id="button1">
<xp:eventHandler event="onclick" submit="true"
refreshMode="complete">
<xp:this.action><![CDATA[#{javascript:var robot:java.awt.Robot= new java.awt.Robot;var event:java.awt.event.KeyEvent=java.awt.event.KeyEvent;
robot.keyPress(event.VK_ESCAPE);
robot.keyRelease(event.VK_ESCAPE);
enter code here}]]>
</xp:eventHandler>
</xp:button>

Resources