w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
My inputcommand keybinding to main window does not work when child window is focussed(same wpf window)?
The key bindings will only work if the Form is focused. You could redirect every Command in your new Window to the Main Window Change your Constructor to of the new Window to accept a Main Window and save this window: MainWindow mainWindow; public Window(MainWindow w) { mainWindow = w; } Whenever a Keybinding executes just do something like this: mainWindow.TabPress(); And show the Window with Window childwindow = new Window(this) { Title = "ChildWindow", Width = 200, Height = 300 }; childwindow.Show();

Categories : C#

Window instances - how to get my main window canvas inside other class?
Since you do not want to pass your Canvas around as a parameter, you could try creating an Extension Method which would act on your Canvas Object. namespace CustomExtensions { public static class Shapes { public static Ellipse SomeCircle(this Canvas dest) { Ellipse e = new Ellipse(); double size = 10; e.Height = size; e.Width = size; e.Fill = new SolidColorBrush(Colors.Orange); e.Fill.Opacity = 0.8; e.Stroke = new SolidColorBrush(Colors.Black); dest.Children.Add(e); return e; } } } Usage remember to add the CustomExtensions Namespace to your usings. canvas1.SomeCircle();

Categories : C#

window.focus to bring main window in front of popup
According to that post, window.focus() won't work on Chrome because it is disabled. It might be the same for Safari.

Categories : Javascript

How to execute main window key binding when child window is focussed in wpf?
WPF Behavior: Global Application Shortcut Keys Seems to be what you're looking for. I made a couple small modifications to the author's code to get your required functionality(rather than passing in an InputBindings collection, made the Behavior pick it from the AssociatedObject directly. Also took out the restriction for requiring modifier keys, Although I suggest you do read through the author's notes in the article and incorporate it to your requirements) Sample download for your requirements ^^ I could get your required behavior, however do go through the Behavior<T> to see if you can optimise it better for yourself(only bit's I actually looked into was just stuff relating to your specific requirement.)

Categories : C#

Opening a child dialog window from a main window with Pyside
If your MainWindow have a Menu action named actionAbout, and a slot called openAbout, all you need to do is connect the triggered signal from the actionAbout to the slot openAbout. self.actionAbout.triggered.connect(self.openAbout) The process is similar to what have you done with the pushbutton. Just change the names used in this example with the ones in your application.

Categories : Python

How to write a popup window to pass the password to main window?
Here is a Demo of how you could proceed for a custom popup & get the password: HTML: <div id="popup"> <div>Enter Password:</div> <input id="pass" type="password"/> <button onclick="done()">Done</button> </div> <button onclick="showPopup()">Show Popup</button> STYLE: #popup { width:160px; height:80px; padding:20px; background-color:gray; position:absolute; top:100px; left:100px; display:none; } SCRIPT: function done() { document.getElementById("popup").style.display = "none"; var password = document.getElementById("pass").value; //DO STUFF WITH PASSWORD HERE }; function showPopup() { document.getElementById("popup").style.display = "block"; }

Categories : Javascript

Hide the icon of main window when navigate to another window
WPF Windows have a ShowInTaskbar property. Set this to false. You may also be interested in this post: C# WPF - Application Icon + ShowInTaskbar = False

Categories : C#

Is it possible to receive messages from a parent window which is NOT the main window?
If a control is a child of a tab (or any other control) then it's the tab that will get notification messages like WM_COMMAND. It's easiest to make your controls all children of your main window and just fix the z-order to make them appear in front of the tab (you already have WS_CLIPSIBLINGS set on the tab control, which you would also need). If you leave the controls as children of the tab then the only way to get notification messages is to sub-class the tab. Or, you can do this the way property sheets do it, and use child dialogs (a dialog with the DS_CONTROL style set) to host the tab content. Then you can have a separate dialog procedure that handles messages from the child controls, and it makes it easy to show/hide a whole page of controls rather than handling them all individual

Categories : C++

show Login window before main window
You should set Application.ShutdownMode to OnExplicitShutdown (msdn). Example: <Application xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" StartupUri="MainWindow.xaml" ShutdownMode="OnExplicitShutdown" > </Application>

Categories : C#

How to add Branch window to Main window in android?
Main Window(activity) package com.myproject.testprojectonintent; import android.app.Activity; import android.content.Intent; import android.os.Bundle; import android.util.Log; import android.view.View; import android.view.View.OnClickListener; import android.widget.Button; public class MainActivity extends Activity implements OnClickListener{ /** the button that I've added in the xml*/ Button startBtn; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main_screen); /** Get the id of the button from the xml*/ startBtn = (Button) findViewById(R.id.startBtn); startBtn.setOnClickListener( this); } @Override public void onClick(View view) { // TODO Auto-generated method stub /** make

Categories : Android

When opening a 'child window' from the main site do i have to create an HTML page for each child window or is there a way to make it generate its own?
Using "popup" windows can be troublesome.. some browsers will not open them properly due to their internal "popup blockers" but to answer your question. if you set the URL of the window to the image itself it should load in the window without the need for a page. i.e. http://www.example.com/img/myimage.jpg A better way to do this would be using a javascript library such as jQuery and jQuery-UI to open modal overlays.

Categories : Javascript

How can I link a new window to the main window?
Maybe through one of your button clicks or constructor you can pass: new BorrowSlipServer().setVisible(true); while also adding some parameters to BorrowSlipServer(String s1,String s2) to pass whatever you want to pass from your main to it. It's still not clear what you mean by "link",do you want to pass things from your MainMenu to BorrowSlipServer or do the opposite? On a side note you may wanna add: setLocationRelativeTo(null); This will center your window on run but make sure you add it after you set the frame size.

Categories : Java

WPF close all window from the main window
Try Application.Current.Shutdown(); From MSDN Calling Shutdown explicitly causes an application to shut down, regardless of the ShutdownMode setting. However, if ShutdownMode is set to OnExplicitShutdown, you must call Shutdown to shut down an application. Important note When Shutdown is called, the application will shut down irrespective of whether the Closing event of any open windows is canceled. This method can be called only from the thread that created the Application object.

Categories : C#

new window appears under main window
As I see it, you have two possible options for making the child Window appear on top of the parent Window. The first was mentioned by @Viv in a comment and that is to set the TopMost property on the child Window to true: omww.Topmost = true; The second option would be to set the Owner property of the child Window to the parent Window (if there is a direct relationship between them): omww.Owner = this; // if called from the parent Window code behind

Categories : C#

javascript/jquery : Window.open opens child window but after few seconds child window get automatically closed for some urls(for IE and chrome)
It's because this code is executed on init on https://wpc.gcsip.com/wpc/wpc page // check that this page is not in a subwindow (e.g. after a session time out) if ( window.opener ) { window.opener.location = "wpc"; window.opener.focus(); window.close(); }

Categories : Javascript

Get Application's main window
The UIApplicationDelegate usually has a reference to the "main window": [[[UIApplication sharedApplication] delegate] window]; Furthermore, UIApplication has an array of windows [[UIApplication sharedApplication] windows]. See the UIApplication Class Reference.

Categories : IOS

window.close closes the postbacked child window and a copy of child window still appears
The showModalDialog method will freeze JavaScript execution on the parent window until the dialog that it opens has closed, so we can rule out that as the reason why your second window opens. When FileUpload.aspx posts back from the server, it should work the same way as modeless aspx postbacks. I think you should be able to get rid of the window.open() method and you should be fine. Parent window: window.showModalDialog("FileUpload.aspx", "FileUpload", "center:yes;resizeable=yes;dialogHeight:300px;dialogWidth:600px;"); The Child window will call this when it's done. window.close();

Categories : Javascript

open the link from the popup window in an external window and then close the original popup window
Try <input name="Apply Online" type="button" id="Apply Online" value="Apply Online" ONCLICK="window.location.href='some_url';$.colorbox.close();"> or <input name="Apply Online" type="button" id="Apply Online" value="Apply Online" ONCLICK="window.location.href='some_url';parent.$.colorbox.close();">

Categories : Javascript

Get handle to previouly active window where my application may be a tray app or not in focus
Suppose you use ContextMenuStrip for your tray menu: IntPtr lastHandle; public IntPtr GetForegroundWin(){ IntPtr hwnd = GetForegroundWindow(); if(hwnd != contextMenuStrip1.Handle) lastHandle = hwnd; return lastHandle; } //Add a timer Timer t = new Timer(); t.Interval = 1; t.Tick += (s,e) => { GetForegroundWin(); };//Then you can get the foreground Handle by lastHandle t.Start();//this timer will run as long as your application runs. OK, without using timer, we still have another choice using SetWinEventHook. This function can help you hook some callback to catch some events including active window change event. Here is the link for you to learn more: Detect active window changed using C# without polling Here is the code for the solution without using timer (polli

Categories : C#

Adding View to main Window on firs launch in the ipad application
First Add Your LoginViewController as self.window.rootViewController such like (Here i also added UINavigationController too) - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleBlackOpaque]; LoginViewController *loginViewController = [[LoginViewController alloc] init]; UINavigationController *loginNVController = [[UINavigationController alloc] initWithRootViewController:loginViewController]; loginNVController.navigationBarHidden = YES; self.window.rootViewController = loginNVController; self.window.backgroundColor = [UIColor whiteColor]; [self.windo

Categories : IOS

Detecting the WM_CLOSE event on main application window when a modal dialog is active?
When selecting "close" by right-clicking an application's icon in the task bar no WM_CLOSE is sent. What happens is that the application's main window is sent a WM_SYSCOMMAND with wParam set to SC_CLOSE. For an example on how to exploit this "feature" please see my other answer on this here.

Categories : C++

In Windows 7, is it possible to grab the title of the main window of a GUI application without a user being logged in? I know, immediate answer is no
Creating this so that the solution is exposed. It turns out System.Diagnostic.Process.MainWindowTitle doesn't always behave as expected. In the end, all I had to do is to enumerate top windows with EnumWindows and use GetWindowText to fetch the title of the GUI application. I wrote a console application that does exactly this and the console application is able to start the GUI application and fetch its main window title. It works through a remote PowerShell session as well as when launched through Task Scheduler. Not certain why System.Diagnostic.Process.MainWindowTitle is not the same as enumerating top windows and using GetWindowText but that's for another time, I guess. Thanks to everyone that lent a hand.

Categories : Windows

Splash page or Pop-up window on tumblr
One possible solution: You could use a combination of theme blocks and post tags. Below are references: {block:IndexPage} {/block:IndexPage} - http://www.tumblr.com/docs/en/custom_themes#basic_variables {block:PermalinkPage} {/block:PermalinkPage} - http://www.tumblr.com/docs/en/custom_themes#basic_variables {block:TagPage} {/block:TagPage} - http://www.tumblr.com/docs/en/custom_themes#tag-pages Post Tags - http://www.tumblr.com/docs/en/using_tags You would have to tag each post with a specific word. For the example lets use blog(#blog). Example HTML: <!DOCTYPE html> <html> <head> </head> <body> {block:Posts} {block:IndexPage} <a href="http://username.tumblr.com/tagged/blog"> <img src="someimage.j

Categories : Javascript

Add application window on WPF window .NET
This sort of thing is often called "swallowing a window" and is possible on some window managers like XTerm. However, I don't believe it's possible on Windows without crafting an entirely new window manager, which is a gargantuan task. Of course, some applications expose their GUIs through embedding technologies like ActiveX or OLE -- that's how Excel documents can be embedded in Word documents, for example. However, the application must be specifically designed to support this, and the vast majority do not.

Categories : Dotnet

pyGTK how to redisplay a top level window (with child widgets) after window destroy signal is sent
Have you tried making another copy of the window class and showing that one instead? Note: This will reset anything that was set in the window. i.e. if a person did something to make label1 say 'Hi!' instead of 'Hello!', it is going to be reset again to 'Hello!', since you are recreating the window.

Categories : Misc

Closing a process child window (e.g. a Word window) accessing a specific file
I found this very detail post about the subject, maybe it can help you http://forum.sysinternals.com/howto-enumerate-handles_topic18892.html That post hase some disucussions and related questions here http://forum.sysinternals.com/topic19403.html

Categories : C#

Locking the size of a resizable window to the original aspect ratio of the window in Pyglet
Although this looks a little hackish for me, but at the moment I don't think of any other possibilities to solve you problem. Anyway, this is working: import pyglet window = pyglet.window.Window( resizable=True ) @window.event def on_resize( width, height ): ratio = 9/16 window.set_size( width, width*ratio ) @window.event def on_draw(): window.clear() pyglet.app.run()

Categories : Python

Why does Internet Explorer fire the window "storage" event on the window that stored the data?
Microsoft seems to be aware of the issue, but it doesn't look like they're going to fix it any time soon: https://connect.microsoft.com/IE/feedback/details/774798/localstorage-event-fired-in-source-window One option is that you can design your listeners and setters so that they don't react or store when they get information from a storage event that's already consistent with their state. However, this design pattern can be more difficult than relying on the storage event only firing on other windows. Another option is to make local storage work the same way in IE that it works in other browsers. I came up with an admittedly hacky but functional solution that I tested in IE10 and expect to work in IE8 and IE9. My javascript components don't listen to the window "storage" event directly bu

Categories : Javascript

How can I show alert in parent window from child popup window in javascript?
try this code <!DOCTYPE html> <html> <head> <script> function openWin() { myWindow=window.open('','','width=200,height=100'); myWindow.document.write("<p>This is 'myWindow'</p>"); refreshParent(); } function refreshParent() { window.parent.focus(); window.parent.alert("message"); window.parent.location.reload(); } </script> </head> <body> <input type="button" value="Open 'myWindow'" onclick="openWin()" /> </body> </html>

Categories : Javascript

Javascript Window.Open how to obtain the opened child window from a different page
First its seen little bit tricky.. you declare some ajax function to send information to server whether child window opened or not.. if child window opened then refresh page. for E.g . -> assume that user opened 2 same page In different tabs1 and tab2. -> user opened opened popup window on tab2 and add/change some information.. -> tab2 content refresh as per ur event. you should also send a one flag to server with session id and tab1 continuous check is that any changes happed to server it will be refresh..

Categories : Javascript

Can I interact with the current debugging session variables using C# Interactive window or Immediate window?
You could use linq to do anything you can do in a loop because it is evaluated as an expression for example R.Where(item => item != R[0]); Will show you all items not equal to the first item. Here is why you can do anything with a linq expression: Enumerable.Range(1,1).Select(one => { // any function code you want here //return any type of variable. });

Categories : C#

Keeping slide-out div flush with left side of window upon window resize
Simply add: $(window).resize(function(e) { if ($("#slideout").css('left') != '0px') $("#slideout").css('left', -($("#slideout").width() - 15)); }); http://codepen.io/anon/full/rjaHD

Categories : Jquery

How to call enlarge-window function depends on current window in Emacs
Taking advantage of windmove being part of emacs, this is what you can do: (require 'windmove) (defun move-separator-up (arg) (interactive "p") (if (< (cdr (windmove-other-window-loc 'up)) 0) (shrink-window arg) (enlarge-window arg))) (defun move-separator-down (arg) (interactive "p") (if (< (cdr (windmove-other-window-loc 'up)) 0) (enlarge-window arg) (shrink-window arg))) When you have 3 windows, enlarge-window and shrink-window rules might not do always what you want, so some further customization might be needed.

Categories : Emacs

how we can restrict user to click or go on the browser window until they close the opened pop up window?
You basically need a modal pop-up. This link should help you: http://www.codeproject.com/Tips/589445/JavaScript-Modal-Popup-Window

Categories : Javascript

For Chat window.whether i go for dynamic user control or client side div tag pop up window?
I helped write and maintain a simple chat window in ASP.Net WebForms a while back, the way we did it was to use some simple JavaScript making some HTTP requests to a page which had WebMethods on it. The C# page contained a WebMethod for getting new messages from the server which was called from JavaScript running on a setTimeout loop. It also contained a WebMethod for adding new messages to the session. If I recall correctly, some kind of queue was used per user involved in the chat session and all the method for getting new messages did was to map the user to the correct queue and take all the messages that were present at the time. Hopefully this helps.

Categories : Asp Net

How do I detect if a new window has been opened? The window opens via a submit with target="_blank"
My recommendation would be to check beforehand if the user is using the app and then modify the behavior based on that, rather than checking if a new window opened. I have in the past accomplished this by checking the screen.width property (can be similarly accomplished in CSS), but you can do it more cleanly (courtesy of this post's answer): if( /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ) { // some code.. } This is cleaner, as you can determine at load time whether you'll need to open in the current window or a new window, rather than reacting later to something that happens for the user.

Categories : Javascript

How I can see the width & height of my window on the "body" when I am modifying the size of the window with jquery?
Like that? DEMO http://jsfiddle.net/yeyene/5ANZz/1/ $('#width').val($(window).width()); $('#height').val($(window).height()); $(window).resize(function(){ $('#width').val($(window).width()); $('#height').val($(window).height()); });

Categories : Jquery

window.URL || window.webkitURL not working with Safari browser version prior 5
The window.URL APIs are not supported on Safari 5. Take a look at the table here: http://caniuse.com/#search=createObjectURL Only the most recent versions of current browsers support the API.

Categories : Javascript

Jquery .scroll() not working in IE with both $(window) and $(document). (issue with window.pageYOffset?)
From the MDN docs: For cross-browser compatibility, use window.pageYOffset instead of window.scrollY. Additionally, older versions of Internet Explorer (< 9) do not support either property and must be worked around by checking other non-standard properties. You could always use jQuery's implementation of scrollTop(), it should work for all browsers: $(window).scroll(function() { var y_scroll_pos = $(this).scrollTop(); var scroll_pos_test = 200; if(y_scroll_pos > scroll_pos_test) { $('.extratext').slideDown('slow'); } });

Categories : Javascript

Android Crash, java.lang.IllegalArgumentException: Window type can not be changed after the window is added
check Androidmanifest.xml <uses-sdk //************ android:targetSdkVersion="X"/> X must be less than 14 Or remove this attribute. good luck guy.

Categories : Android



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.