w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
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 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

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#

How to pop up a window on the windows login screen
In case any one run into this problem , I put my solution here. I think I have made it possisble by injecting a dll to the winlogon.exe proccess.The dll can start a thread and pop up a window. Maybe there is a better solution ...

Categories : Windows

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

when I show a sfl window help, the main screen disappear, in power7 v7r1m0 rpg ile program
In the second display file, add a record format with the ASSUME keyword. You don't need to do anything with it in your RPG program, just define it. A R DUMMY A ASSUME A 1 2' ' As for ERRMSG not working, it's because of RMVWDW. See the DDS Reference for ERRMSG - Restrictions and notes. When the RMVWDW keyword is active, error messages are not displayed.

Categories : Misc

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#

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

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#

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++

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#

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

How to get Windowed Window's Screen coordinate of each Corner in X-window?
You're storing your window into GLWin.win, but are querying the root window for its size and location. The "root window" is the full screen background window (desktop), so it makes sense that it's returning your screen resolution. Just pass your actual window (GLWin.win) to XGetAttributes() if you want those dimensions.

Categories : C++

print the data on window screen and then clear the window screen before printing other data.in python
In that case, all you have to do is remove the previous content of the widget just before printing the new one. If you have an Entry widget, use the delete method: entry.delete(0, 'end') # print new serial data Or if you have a Text widget: text.delete(1.0, 'end') # print new serial data

Categories : Python

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 to show main stage after splash screen
Are you familiar with JavaFX preloaders? They might be a better approach for at least what you are doing in that sample: http://docs.oracle.com/javafx/2/deployment/preloaders.htm As for 'switching stages' when your task is done (i may be missing the point here): Why not add the following before the return statement: Platform.runLater(new Runnable(){ public void run() { initStage.close(); showMainStage(foundFriends); } } Arguably, passing the tasks result directly in this fashion would be simpler that having your main view's UI bound to the thread's value property, wouldn't it?

Categories : Java

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#

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#

Fragment splash screen not showing in main activity
This is just a layout problem. Your ViewPager is layout_height="match_parent", so when it gets measured, it gets the full screen height. Then, when the FrameLayout gets measured, there's no space left for it, so it gets 0px height. Either hide the ViewPager while you're showing the splash screen (GONE, not INVISIBLE) or make it layout_height="wrap_content" and use weights to figure out how big they should be (or don't use a LinearLayout).

Categories : Android

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

How to let Org-mode open a link like [[file://file.org]] in current window instead of default in other window?
You need to change the value of org-link-frame-setup. Default value contains the cons (file . find-file-other-window). You may replace it by (file . find-file).

Categories : Emacs

How to manage resources in a console app that creates main window in main()?
Thanks to slugster's posting Access ResourceDictionary items programmatically I was able to load the resources programmatically in my app's loaded event. Example: ResourceDictionary dict = new ResourceDictionary(); dict.Source = new Uri("../Resources/PageDictionary.xaml", UriKind.Relative); Application.Current.Resources.MergedDictionaries.Add(dict); I'm not sure if this is the best solution but it does what I wanted.

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

jQuery login button is opening a login window, but if javascript is off
Put the actual link in the href="" and add onclick="return false;" to the a tag. Ie: <li id="last-child"><a href="/login.php" onclick="return false;"><div id="login"></div></a></li> The "return false" tells the browser not to follow the link if JavaScript is enabled. If JavaScript isn't enabled, the "onclick" event won't fire and the "return false" has no effect.

Categories : Jquery

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

How to add buttons to a main window in Qt?
In main window you should use central widget . You have two choices : Set the button for central widget ( Not so good choice ) : QPushButton *train_button = new QPushButton(this); train_button->setText(tr("something")); setCentralWidget(train_button); Add a widget and add the button to that widget and set the widget for centralWidget : QWidget * wdg = new QWidget(this); QPushButton *train_button = new QPushButton(wdg); train_button->setText(tr("something")); setCentralWidget(wdg); And surely you can use Layouts for your centralWidget: QWidget * wdg = new QWidget(this); QVBoxLayout *vlay = new QVBoxLayout(wdg); QPushButton *btn1 = new QPushButton("btn1"); vlay->addWidget(btn1); QPushButton *btn2 = new QPushButton("btn2"); vlay->addWidget(btn2); QPushButton *btn3 = new Q

Categories : Qt

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

Redirect from iframe to main window
If I understand your question. You like to redirect to your mainpage and remove the iframe. In your iframe You have to use a button to initiate a redirect and some javascript: <input value="ReDirect" id="button" onclick="parent.parent.location.href ='... url ....';"> See also this question : How to dynamically close an iframe after form submit in JavaScript

Categories : Google App Engine

How do I set min and max resize sizes for my main window?
You can use the minsize and maxsize functions: from Tkinter import * root = Tk() root.minsize(width=200, height=200) root.maxsize(width=650, height=500) root.mainloop()

Categories : Python

JDialog and disable main window
When I click button in main frame JDialog frame appears and main window becomes inactive. Is there any possibility to remain main window active? The solution: Make the JDialog non-modal either directly, myDialog.setModalityType(ModalityType.MODELESS); or by passing the correct ModalityType into your JDialog's constructor. JDialog myDialog = new JDialog(myFrame, "My Dialog", ModalityType.MODELESS);

Categories : Java

Preventing Vim preview window from moving main
There is no such autocmd event. But you can use WinEnter and BufDelete associated with previewwindow option to achieve something similar. Using WinEnter you can check previewwindow; if you are on preview window, you can set a buffer variable to differ this event from subsequent events that can be generated by moving to another window and back to preview window. You can also set au BufDelete <buffer> call MyRestoreMainWindow() to call your function when preview window is closed.

Categories : Vim

MFC Send message to MAIN thread (rather than a window)?
You can get your main thread's thread id by using something like threadId = GetCurrentThreadId(); in the main thread, and then send a message to it by calling PostThreadMessage(threadId, ...) from your worker thread. However, as Hans Passant said -> here <-, you should avoid using PostThreadMessage to send messages to UI threads, and should better send messages to its window.

Categories : C++

Qt: How to access an element dragged on the main window by its id?
You can access and set the properties of tableview from the mainwindow.cpp(not from the main.cpp ). Use ui.tableView.(properties or function) to edit the properties you need. May my answer can help you.

Categories : C++

Change title font for QT Main window
You can't. It's enforced by the system and is only changeable by the user through the desktop preferences. And it's a good thing too, otherwise applications like that would get on people's nerves by not obeying the desktop settings.

Categories : Qt

Change chrome app window location, but not from main.js
You are not supposed to be able to directly change a window's location in a Chrome App. The only part of the location object you can change is the href to reference a fragment in a document. This was an explicit design decision of the Chrome Apps team to stop apps from having the flash of white whilst it navigates between pages. If you look at the window api the only method is create and that takes the URL of what that window should display. That being said, you can load an iframe in the main window and change that. You would just need to set the iframe to be 100% of the width and height of the window.

Categories : Javascript

Access to main window control in UserControl
What you really need is to use MVVM pattern. Use a ContentControl instead. And pass the usercontrol reference to its Content property. you can get idea from it, like : yourContentControl.Content = new UserControl1();

Categories : C#

Dynamically resize canvas in main window?
You're using the wrong containers, that's why your UI does not auto-size. Remove the Grid (because it's redundant) and the StackPanel (because it's not an appropiate layout container for what you need here.) <Window> <DockPanel Margin="2"> <StackPanel Orientation="Horizontal" DockPanel.Dock="Left" Width="100"> <!-- Various controls here for the "left pane" --> </StackPanel> <Border> <Canvas/> </Border> </DockPanel> </Window> You never handle the SizeChanged event for anything in WPF. Actually, most of the event-handling that you might be used to in other frameworks is rendered useless and unneeded in WPF due to it's advanced DataBinding capabilities and native support for resol

Categories : Wpf

How to change the template from Widget to Main Window?
It took me three line edits in two files to change a QWidget template to a QMainWindow. Just now in Qt 4.8.4, I did the following: I opened the ui file outside of Qt Creator (after it was closed in Qt Creator) and I edited a line in the file: EDIT: Make a backup of what you are working on, because this editing the ui file is a little un-kosher, and could have strange, undefined repercussions. widget.ui <?xml version="1.0" encoding="UTF-8"?> <ui version="4.0"> <class>Widget</class> <widget class="QMainWindow" name="Widget"> <!-- This is the line I edited... "QMainWindow" was "QWidget".--> <property name="geometry"> <rect> <x>0</x> <y>0</y> <width>400</width> <height>300<

Categories : Qt



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