childwindow

C# WPF child window (about window)

蓝咒 提交于 2020-02-23 16:24:31
问题 I have an application on C#/WPF that I`m developing ... I have a btn named About which should open a new window that contains details about the application or whatever I will put in it. When I click the btn, a new window (about) opens, when I click again, while the new window (about) is opened another one is opened, how can I prevent this from happening, I also want the application to be disabled when the About window is opened and to be enabled when the About window is closed, Like most of

Close childwindows in silverlight with a click outside of it

巧了我就是萌 提交于 2020-01-21 08:54:25
问题 How can I close a childwindow when I click outside of it? 回答1: if you are using the default silverlight child window style, when it opens, the outside part (the transparent grey part) is actually a Grid (called Overlay) that is within the child window style. So what you need to do is to handle its MouseLeftButtonDown event, <Grid x:Name="Overlay" Background="{TemplateBinding OverlayBrush}" HorizontalAlignment="Stretch" Margin="0" Opacity="{TemplateBinding OverlayOpacity}" VerticalAlignment=

Update listBox on Main page from button click event on child window.

…衆ロ難τιáo~ 提交于 2020-01-07 08:29:28
问题 I have a Main page that contains a listBox. When a user selects a profile form the list box, this opens up a child window called pWindow . This window as the option to delete the current profile via a hyperlink button that opens up a another confirmation window called dprofile . My question being is it possible that once a user has confirmed to delete the current profile they are in, and confirmed it in the button click on dProfile , how can I update the listBox in the first Main page so that

Internet Explorer child window in VBA

回眸只為那壹抹淺笑 提交于 2020-01-05 16:41:25
问题 I have a VBA code that clicks a link on a IE page and a new window opens. How can I get the elements of that child window? I tried with Shell.application. Are there any other methods? Set objShell = CreateObject("shell.application") IEcount= objShell.Windows.Count For x = 0 To iecount On Error Resume Next Debug.Print x, objShell.Windows(x).document.Location Next x I got the window number and its URL but can't access the elements on the page. 回答1: Look at the "if-then" statement I've inserted

Internet Explorer child window in VBA

安稳与你 提交于 2020-01-05 16:36:32
问题 I have a VBA code that clicks a link on a IE page and a new window opens. How can I get the elements of that child window? I tried with Shell.application. Are there any other methods? Set objShell = CreateObject("shell.application") IEcount= objShell.Windows.Count For x = 0 To iecount On Error Resume Next Debug.Print x, objShell.Windows(x).document.Location Next x I got the window number and its URL but can't access the elements on the page. 回答1: Look at the "if-then" statement I've inserted

Internet Explorer child window in VBA

故事扮演 提交于 2020-01-05 16:36:12
问题 I have a VBA code that clicks a link on a IE page and a new window opens. How can I get the elements of that child window? I tried with Shell.application. Are there any other methods? Set objShell = CreateObject("shell.application") IEcount= objShell.Windows.Count For x = 0 To iecount On Error Resume Next Debug.Print x, objShell.Windows(x).document.Location Next x I got the window number and its URL but can't access the elements on the page. 回答1: Look at the "if-then" statement I've inserted

Show child window before InitializeComponent

眉间皱痕 提交于 2020-01-05 08:42:59
问题 I have Silverlight application i want to show login window before main page InitializeComponent(); this method does not works: public MainPage() { Login log = new Login(); log.Show(); InitializeComponent(); } Any advice? 回答1: Try this: public MainPage() { InitializeComponent(); Loaded += MainPage_Loaded; } private void MainPage_Loaded(object sender, RoutedEventArgs e) { Visibility = Visibility.Collapsed; Login log = new Login(); log.Show(); } 来源: https://stackoverflow.com/questions/8526230

How to create child layered alpha-transparent window?

落爺英雄遲暮 提交于 2020-01-02 09:13:44
问题 I am trying to create transparent child window. procedure TForm1.BtnGoClick(Sender: TObject); var bmp:TBitmap; BitmapPos: TPoint; BitmapSize: TSIZE; BlendFunction: _BLENDFUNCTION; exStyle: Cardinal; begin bmp := TBitmap.Create; bmp.LoadFromFile('my32bitbitmap.bmp'); exStyle := GetWindowLongA(Form2.Handle, GWL_EXSTYLE); if (exStyle and WS_EX_LAYERED = 0) then SetWindowLong(Form2.Handle, GWL_EXSTYLE, exStyle or WS_EX_LAYERED); BitmapPos := Point(0, 0); BitmapSize.cx := bmp.Width; BitmapSize.cy

How to get child window url from parent window using javascript

♀尐吖头ヾ 提交于 2020-01-02 07:13:50
问题 I'm launching a child window with a window reference name. I want to capture the URL of the child window when it changes each time. var winRef; var url='http://www.google.com'; if(winRef == null || winRef.closed) { winRef = window.open(url, "mywindow"); winRef.focus(); alert(winRef.location.href); } winRef.captureEvents(Event.CHANGE); winRef.onchange=function(){ alert('change event triggered'); console.log(winRef.location.href); } I have tried with events LOAD, CHANGE to capture the location

How to get child window url from parent window using javascript

天涯浪子 提交于 2020-01-02 07:13:21
问题 I'm launching a child window with a window reference name. I want to capture the URL of the child window when it changes each time. var winRef; var url='http://www.google.com'; if(winRef == null || winRef.closed) { winRef = window.open(url, "mywindow"); winRef.focus(); alert(winRef.location.href); } winRef.captureEvents(Event.CHANGE); winRef.onchange=function(){ alert('change event triggered'); console.log(winRef.location.href); } I have tried with events LOAD, CHANGE to capture the location