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#

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

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

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

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#

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

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

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

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

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#

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#

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

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

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

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

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

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

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

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

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

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

Targetting main window from iframe in HTML
and if you include it instead framing it ? <!-- #Include virtual="C:UsersguruprasadrDownloadspirobox_extendeddemo.html" --> If you do so, just include what's in between <body> tags and Js/CSS <link> have you tried to use parent.window to have interaction in between iframe and main document ? see among others : Access elements of parent window from iframe

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#

Stretching UserControl content to main window size WPF
I believe the default behaviour will be for the WebBrowser to fill the UserControl; depending on how you then use your UserControl, it should expand to fill your window, if required. Adding the Source property to the WebBrowser will give you a better idea of the space it's currently occupying. This control: <UserControl x:Class="WpfApplication1.UserControl1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" mc:Ignorable="d" Background="Aqua" Margin="0"> <Grid Name="parentGrid"> <WebBrowser Name="browser" Source="http://stackoverflow.c

Categories : C#

Making Qt Widgets Stretch and Scale w/ Main Window
I like this video tutorial on youtube. I'll help you create a layout using QLayout classes. If you use QtCreator/Designer, you can also take a look at the auto-generated ui_MainWindow.XXX file that will clue you in on how it uses some of the UI classes. As always, QtCreator/Designer has a bunch of hints and tips so you should be able to dig up from the documentation that's embedded in the application.

Categories : C++

How to display the main window of a process in another Windows session?
I believe that once created, a window cannot be transferred to another window station. Also, I doubt it is possible to open windows in another session. For character-based applications you are better off writing the output to some file and examining that file. For graphical applications you are out of luck with task scheduler. You may want to write a simple VBS script that wakes up at a certain time and runs your graphical task(s) and run it upon user logon, e.g. along the lines of a script from this page: http://social.technet.microsoft.com/Forums/scriptcenter/en-US/d9465815-87e2-43df-a0fe-4a23c16dca99/need-a-time-schedule-in-vbs-script-to-execute-something

Categories : Windows

SDL 2.0: Create window in main thread, but do all rendering in separate one
I have an app which runs on Mac/iOS/Windows that is structured this way (all GL in a rendering thread), but I don't use SDL. I just took a look at SDL's Cocoa_GL_CreateContext (called by SDL_GL_CreateContext on OS X) and it makes calls that I make from my main thread to set up the context. So, if you hit any problems, try creating the GL context in the main thread and then pass that off to the rendering thread (instead of creating the GL context in the rendering thread).

Categories : Windows

iPad modal view's rect within the main window
[splitView convertRect:modallyPresentedVC.view.bounds fromView:modallyPresentedVC.view] should do the trick. Make sure to call it in the completion block of the presentation (after all animation has finished).

Categories : IOS

Main window doesnt closes after caling new script from it
subprocess.call() wait subprocess to exit. -> button callback will never return until subprogram exit. This keep main window to close. Use subprocess.Popen() which does not wait subprocess. self.Destroy() subprocess.Popen('python newframe.py', shell=True)

Categories : Python

Passing information from a widget module to the main window
The question is a little bit nebulous, if only because you will have to make some design decisions about how the user will interact with the GUI. A first attempt might involve some of these things: 1) Add a signal to your widget, have it set its own name. When it changes its name, also emit a signal of the new name. class testWidget(QtGui.QLabel): textChanged = QtCore.pyqtSignal(object) def open(self): fileName = QtGui.QFileDialog.getOpenFileName(self, "Open File", QtCore.QDir.currentPath()) if fileName.isNull(): QtGui.QMessageBox.information(self, "test project", "Cannot load %s." % fileName) self.setText(fileName) self.textChanged.emit(fileName

Categories : Python

Upgraded a C# Window Form to VS2010, now Main is not called
Got it! Just needed a good cleaning :p VS was holding up the file, so clean wasn't doing it's job. I had to shut everything down in Task Manager, manually delete the bin folder, then rebuild! But it works now.

Categories : C#

Does the main window only update after a slot subroutine returns?
Yes. Qt performs painting only when the control flow is back in the event loop. You should create a QTimer, connect its timeout signal to a slot and start the timer with desired interval in milliseconds. In the slot you should display the next image, e.g. DisplayImg(i); i++;. Current image number (i) should be stored in a class member variable. When the last image is displayed, stop the timer.

Categories : Qt

dock widget loaded from separate ui file to main window
You should not call QDockWidget::show. This forces it to act like an usual QWidget. Use QMainWindow::addDockWidget instead. def load_ui(ui_file, parent=None): loader = QUiLoader() file = QFile(ui_file) file.open(QFile.ReadOnly) myWidget = loader.load(file, None) file.close() return myWidget main_window = load_ui("ui/main_window.ui") dock_widget = load_ui("ui/console.ui", main_window) main_window.show() main_window.addDockWidget(Qt.LeftDockWidgetArea, dock_widget)

Categories : Python



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