Search Results

Search found 24202 results on 969 pages for 'window location'.

Page 41/969 | < Previous Page | 37 38 39 40 41 42 43 44 45 46 47 48  | Next Page >

  • Subclassing a window from a thread in c#

    - by user258651
    I'm creating a thread that looks for a window. When it finds the window, it overrides its windowproc, and handles WM_COMMAND and WM_CLOSE. Here's the code that looks for the window and subclasses it: public void DetectFileDialogProc() { Window fileDialog = null; // try to find the dialog twice, with a delay of 500 ms each time for (int attempts = 0; fileDialog == null && attempts < 2; attempts++) { // FindDialogs enumerates all windows of class #32770 via an EnumWindowProc foreach (Window wnd in FindDialogs(500)) { IntPtr parent = NativeMethods.User32.GetParent(wnd.Handle); if (parent != IntPtr.Zero) { // we're looking for a dialog whose parent is a dialog as well Window parentWindow = new Window(parent); if (parentWindow.ClassName == NativeMethods.SystemWindowClasses.Dialog) { fileDialog = wnd; break; } } } } // if we found the dialog if (fileDialog != null) { OldWinProc = NativeMethods.User32.GetWindowLong(fileDialog.Handle, NativeMethods.GWL_WNDPROC); NativeMethods.User32.SetWindowLong(fileDialog.Handle, NativeMethods.GWL_WNDPROC, Marshal.GetFunctionPointerForDelegate(new WindowProc(WndProc)).ToInt32()); } } And the windowproc: public IntPtr WndProc(IntPtr hWnd, uint msg, IntPtr wParam, IntPtr lParam) { lock (this) { if (!handled) { if (msg == NativeMethods.WM_COMMAND || msg == NativeMethods.WM_CLOSE) { // adding to a list. i never access the window via the hwnd from this list, i just treat it as a number _addDescriptor(hWnd); handled = true; } } } return NativeMethods.User32.CallWindowProc(OldWinProc, hWnd, msg, wParam, lParam); } This all works well under normal conditions. But I am seeing two instances of bad behavior in order of badness: If I do not close the dialog within a minute or so, the app crashes. Is this because the thread is getting garbage collected? This would kind of make sense, as far as GC can tell the thread is done? If this is the case, (and I don't know that it is), how can I make the thread stay around as long as the dialog is around? If I immediately close the dialog with the 'X' button (WM_CLOSE) the app crashes. I believe its crashing in the windowproc, but I can't get a breakpoint in there. I'm getting an AccessViolationException, The exception says "Attempted to read or write protected memory. This is often an indication that other memory is corrupt." Its a race condition, but of what I don't know. FYI, I had been reseting the old windowproc once I processed the commands, but that was crashing even more often! Any ideas on how I can solve these issues?

    Read the article

  • Responding to the onmousemove event outside of the browser window in IE

    - by Matthew Lock
    In Internet Explorer 7 body onmousemove or document.onmousemove events only seem to fire while the mouse is inside the browser window, not when it's outside. Yet in Firefox the onmousemove event is called correctly when I move outside of the browser window. How can I setup an event to be called outside of the browser window in IE? Google Maps does this in IE. If you hold the mouse button down and move the mouse outside of the browser window you can see that the map still moves.

    Read the article

  • Javascript: detect when a window is resized ?

    - by Patrick
    Is there any way with jQuery or javascript to trigger a function when the user ends to resize the browser window ? In other terms: 1) Can I detect mouse up event when user is resizing the browser window ? otherwise 2) Can I detect when a window resize operation is finished ? I'm currently only able to trigger an event when the user start to resize the window with jquery thanks

    Read the article

  • Asp.Net: Open a second browser window with new session id

    - by Daniel Brink
    Right google isn't helping me on this one. I need to open a second browser window or tab, but it must have a different session id. Opening the new browser window from my asp.net page is easy, but then it shares the same cookie and thus session ID with the original. So how can I do this? I need the original browser window to keep its cookies and session and the new browser window to have a new session.

    Read the article

  • Pop-up window in Java Swing

    - by Gabriel Parenza
    Hey, Can someone suggest me how to implement a pop-up window in Java Swing. I want the pop-up window to be a modal window (user cannot return to the main window when the pop-up is open). I tried doing it using JDialog but it allows only one widget for user input to be in it whereas I need multiple widgets. I may be wrong here but this is what I was able to do. Appreciate your help.

    Read the article

  • Access properties controls of a window from a page in WPF

    - by toni
    Hi, My problem is that I want to access from a page to the properties of a control (button, textblock, label, or a menuitem of the window....) placed in a window. The page is placed into the window. How can I do this? Is there any method to find controls by name in a specific window or page or entire application? Thanks.

    Read the article

  • Webbrowser Control accessing new window's document

    - by kesavkolla
    I am hosting the WebBrowser control in C# winforms application. After clicking on a button on main page the application opens a new window and rest all the actions happens in new window. From the C# host application how can I access the Document of new browser window? The we.bbrowser's Document property still gives me the original document not the new window's document. Any help greatly appreciated

    Read the article

  • need to refresh web page after clicking close on pop-up window

    - by Brad
    I have a pop-up window a user logs into, once they are logged in successful, I have a message that has a link to close the window. But I want it to not only close that pop up window, but I want it to refresh the webpage the pop-up window was clicked on. So the page can refresh to see that there is a valid login session for that user. Is this possible w/ jQuery?

    Read the article

  • Print a specific image from webpages without popup window or new window?

    - by jackrobert
    Hi, Is there any possible to print a specific image from webpages without popup window or new window? Suppose i have four images in my application. Just i need to print second image only. And also i want to implement large page like some textarea, some text box, more images etc... So many code available with pop up window or new window. please help me about this. Thanks in advance.

    Read the article

  • Passing window handler for the SFML

    - by Ockonal
    Hello, I'm using SFML Input system for my own application. Here is my code: size_t windowHnd = %MY_WINDOW_HANDLER%; sf::Window MyWindow(windowHnd); const sf::Input& MyInput = MyWindow.GetInput(); cannot convert ‘sf::Window’ to ‘size_t’ in assignment In official documentation I found sf::Window constructor signature: WindowHandle Handle What is the correct way to pass window handler for the SFML?

    Read the article

  • close other HTML window by javascript function

    - by lusey
    hello i need a popup window to appear to the user but without parent widow ! but this is impossible so i think that I may have to make the popup close the parent apter it appear, but how ? i tried this in the popup: <BODY align="center" valign="center" onload="javascript:window.opener='x';window.close();"> but it closed the popup window itself ! any idea to make the popup close its parent ?

    Read the article

  • how to attach window.close to cntrl+w keypress event in a xul window?

    - by Erik Vold
    I have a XUL window, and I want the cntrl+w hotkey to close the window, but when I attach: window.addEventListener("keypress", function(ev) { GM_log("onkeypress handler: \n" + "keyCode property: " + ev.keyCode + "\n" + "which property: " + ev.which + "\n" + "charCode property: " + ev.charCode + "\n" + "Character Key Pressed: " + String.fromCharCode(ev.charCode) + "\n"); }, true); to the page, it treats pressing 'w' and 'cntrl+w' the same, charCode 119.. how can I determine that cntrl+w was pressed so that I may window.close() ?

    Read the article

  • Getting a borderless window to receive mouseMoved events (Cocoa OSX)

    - by Michael Minerva
    I have a little popup window used for selecting images sorted by groups, and I would like to add a selection box around whatever image is being hovered over. I am trying to this by overriding the mouseMoved event for the window but it seems that a window that has a border-less style mask receives no mouseMoved events even if you have set setAcceptsMouseMoved events to YES. Is there anyway to make a borderless window receive this events?

    Read the article

  • set the focus of a popup window everytime

    - by hunt
    I have two pages one.html and two.html i am opening a new window using following code //here popup is a global variable popup=window.open('two.html','two'); for the first time a popup window open successfully and get the focus but if i try to open it again without closing already opened popup then two.html is not getting focus for the second time. note: i have set popup window's name as 'two'

    Read the article

  • To handle Window.open in request Scope in jsf

    - by santhana sankar
    I am using JSF 1.2 here i have a managed bean in request scope, my scenario is to open a seperate window. After action is performed oncomplete i am opening a new window since the managed bean in request scopes the values are not populated in new window. Because new object is being created while opening a new window. i can use session scope but that is restricted. kindly help me in resolving this.

    Read the article

  • Do we need seperate file path for window and linux in java

    - by Kishor Sharma
    I have a file on linux ubuntu server hosted with path name /home/kishor/project/detail/. When I made a web app in window to upload and download file from specified location i used path "c:\kishor\projects\detail\" for saving in window. For my surprise when i used window file path name in my server i am still able to get files and upload them, i.e, "c:\kishor\projects\detail\". Can anyone explain why it is working (as window and linux both use different file path pattern).

    Read the article

  • Using loopedSlider on Child window. (parent plugin on child window)

    - by MakDotGNU
    Hi, I'm using loopedSlider on my page where I'm having multiple slider. At the same page I open a child window where again i'm trying to use loopedSlider but at the child window I'm getting an error as loopSlider is not a function. This error i'm getting even though I Call loopedslider.js file on child window. is there a way I can use a use my parent jquery plugin on child window ? thank you

    Read the article

  • Taking screenshot of a specific window - C++ / Qt

    - by Switch
    In Qt, how do I take a screenshot of a specific window (i.e. suppose I had Notepad up and I wanted to take a screenshot of the window titled "Untitled - Notepad")? In their screenshot example code, they show how to take a screenshot of the entire desktop: originalPixmap = QPixmap::grabWindow(QApplication::desktop()->winId()); How would I get the winId() for a specific window (assuming I knew the window's title) in Qt? Thanks

    Read the article

  • How is this site opening a new window

    - by user217428
    Normally we can specify a target in the link or use javascript window.open to open a new window. But when I access this site www.wenxuecity.com (It is a chinese site) I could't find out how it opens each news in a new window. no target in the link. debug javascript doesn't show any call to window.open Could someone tell me how it is implemented? Thanks

    Read the article

  • background worker window controls not rendered

    - by senthil
    Is there any way to load window inside the background worker thread without using showdialog()? the background worker only terminate only after getting some input from the window. Here the issue is window shown but the button and other controls are not rendered even we don't have control over any of the window.

    Read the article

  • Make qwidget in new window in PyQt4

    - by matt
    I'm trying to make a class that extends qwidget, that pops up a new window, I must be missing something fundamental, class NewQuery(QtGui.QWidget): def __init__(self, parent): QtGui.QMainWindow.__init__(self,parent) self.setWindowTitle('Add New Query') grid = QtGui.QGridLayout() label = QtGui.QLabel('blah') grid.addWidget(label,0,0) self.setLayout(grid) self.resize(300,200) when a new instance of this is made in main window's class, and show() called, the content is overlaid on the main window, how can I make it display in a new window?

    Read the article

  • Scheduled Task to show console window when logged on but still run when not logged on

    - by HeartWare
    Is it possible (and if so, how) to set up a task (console application) in Server 2008 so that it'll run both when a user is logged in and when no user is logged in, AND - if the user is logged in (either local or via RDP) - have the console appear on the screen while the program is running? Ie. the program should run under the defined user context and it writes status messages to stdout, which goes to a standard console window. This console window is either shown (if the defined user is currently logged in locally or via RDP), or not shown (but the application is still run). I have access to the source of the console application, so if it needs some additional code (like specifically opening up a new console window or what have you), then that's not a problem. At the moment, I can set up the task as "Run only when user is logged on" which will run the application when the user is logged on (local or RDP) and I can then see the status messages, or I can set it up as "Run whether user is logged or not" and no status output is visible - not even if the user is logged on.

    Read the article

  • Recover OffScreen Window in Windows 8

    - by Jason McD
    Someone asked a very similar question in regards to window recovery for windows xp: Similar Recovery I'm using windows 8 (or 8.1 now). I run Dual Monitors. On Monitor 2 I sometimes have the input switched to something else other than the windows display (Mac or PS3). If there was a program that was displaying on Window #2 that does not have 'move' where I could potentially alt-space-m arrow keys. Is there another way to get that program to display on Window #1? I tried right click on the program and doesn't seem to be anything there. I tried Windows Key and Arrows. I Tried right click toolbar and cascade. I'm hoping this is a DUP or Softball question because this annoys the crap out of me. Thanks!!

    Read the article

  • Making TMUX use Alt+Num to select window

    - by Oxinabox
    I have been messing with TMUX, and I am liking the configuration abilities. The window list at the bottom makes me think that the same shortcut for changing windows in Irssi, should work in TMUX, but it doesn't. So at the moment, I have to press C-b then a number to get that window open. I am happy having C-b for my normal prefix, (eg for C-b ? for help, C-b : command entry) But it would be cool if I could use both C-b+Numkey and Alt+NumKey for changing tabs. It would be even cooler if it could detect if a window is showing Irssi, and then ignore the Alt+NumKey, so that I can still change between Irssi windows.

    Read the article

< Previous Page | 37 38 39 40 41 42 43 44 45 46 47 48  | Next Page >