Search Results

Search found 15302 results on 613 pages for 'window managers'.

Page 17/613 | < Previous Page | 13 14 15 16 17 18 19 20 21 22 23 24  | Next Page >

  • XChat window start with bottom edge covered

    - by jasmines
    When I start Xchat, I note the issue: As you can see, the bottom edge of the window is covered by some other thing (in this case, it's firefox status bar, but if I have no other window opened, I see my desktop background in that position), so I reduce it with the maximize button on top left: Finally I maximize it again and obtain the wanted behaviour: Is this a bug or can I adjust it in any way?

    Read the article

  • Window Focus in Scale (Compiz)

    - by Göran
    This is a follow-up question to Expose (OSX Style) Functionality in Unity. I'm having issues with focus. With the help of Compiz Config I have succesfully activated a window picker similar to the one named exposé in Mac OS X (but with more options!). However when I use this function the window I click on/choose is not automatically focused. How can I fix this or is this a bug within Compiz/Scale?

    Read the article

  • Window Functions in SQL Server

    When SQL Server introduced Window Functions in SQL Server 2005, it was done in a rather tentative way, with only a handful of functions being introduced. This was frustrating, as they remove the last excuse for cursor-based operations by providing aggregations over a partition of the result set, and imposing an ordered sequence over a partition. Now, with SQL Server 2012, we are soon to enjoy a full range of Window Functions. They are going to make for some much simpler SQL queries.

    Read the article

  • Transmission window freezes

    - by eyeinthebrick
    I'm using Xubuntu 13.10, although this problem was in 13.04 too. The thing is that Transmission window freezes sometimes and makes computer not response. This problem appears, when Transmission creates another window, e.g. for preferences, or for choosing files to be downloaded. What might be the reason for the problem? After reading similar questions, I think the reason might be that I download files to ntfs partition.

    Read the article

  • FreeBSD slow transfers - RFC 1323 scaling issue?

    - by Trey
    I think I may be having an issue with window scaling (RFC 1323) and am hoping that someone can enlighten me on what's going on. Server: FreeBSD 9, apache22, serving a static 100MB zip file. 192.168.18.30 Client: Mac OS X 10.6, Firefox 192.168.17.47 Network: Only a switch between them - the subnet is 192.168.16/22 (In this test, I also have dummynet filtering simulating an 80ms ping time on all IP traffic. I've seen nearly identical traces with a "real" setup, with real internet traffic/latency also) Questions: Does this look normal? Is packet #2 specifying a window size of 65535 and a scale of 512? Is packet #5 then shrinking the window size so it can use the 512 scale and still keep the overall calculated window size near 64K? Why is the window scale so high? Here are the first 6 packets from wireshark. For packets 5 and 6 I've included the details showing the window size and scaling factor being used for the data transfer. Code: No. Time Source Destination Protocol Length Info 108 6.699922 192.168.17.47 192.168.18.30 TCP 78 49190 http [SYN] Seq=0 Win=65535 Len=0 MSS=1460 WS=8 TSval=945617489 TSecr=0 SACK_PERM=1 115 6.781971 192.168.18.30 192.168.17.47 TCP 74 http 49190 [SYN, ACK] Seq=0 Ack=1 Win=65535 Len=0 MSS=1460 WS=512 SACK_PERM=1 TSval=2617517338 TSecr=945617489 116 6.782218 192.168.17.47 192.168.18.30 TCP 66 49190 http [ACK] Seq=1 Ack=1 Win=524280 Len=0 TSval=945617490 TSecr=2617517338 117 6.782220 192.168.17.47 192.168.18.30 HTTP 490 GET /utils/speedtest/large.file.zip HTTP/1.1 118 6.867070 192.168.18.30 192.168.17.47 TCP 375 [TCP segment of a reassembled PDU] Details: Transmission Control Protocol, Src Port: http (80), Dst Port: 49190 (49190), Seq: 1, Ack: 425, Len: 309 Source port: http (80) Destination port: 49190 (49190) [Stream index: 4] Sequence number: 1 (relative sequence number) [Next sequence number: 310 (relative sequence number)] Acknowledgement number: 425 (relative ack number) Header length: 32 bytes Flags: 0x018 (PSH, ACK) Window size value: 130 [Calculated window size: 66560] [Window size scaling factor: 512] Checksum: 0xd182 [validation disabled] Options: (12 bytes) No-Operation (NOP) No-Operation (NOP) Timestamps: TSval 2617517423, TSecr 945617490 [SEQ/ACK analysis] TCP segment data (309 bytes) Note: originally posted http://forums.freebsd.org/showthread.php?t=32552

    Read the article

  • Always maximize almost maximized window utility

    - by AbstractDissonance
    It drives me nuts when a window is nearly maximized but not quite and when I go to close/move/scroll it I end up bringing up the window behind it. This happens all the time with acrobat. It seems that it's default non-minimized state is usually an "almost" maximized windowed. Is there any utility that will maximize a window when it is open or size changed when it is near the size of the monitor. I'll never have any need to have a window 99% the size of the window with it centered. Why? Because it behaves just as a maximized window by obscuring all(well, almost all) the windows behind it. (It should be only the main window of an application that is affected) The issue seems to be a few programs like acrobat that, I guess, try to fit it's contents which, sometimes, happens to be almost the full screen but not quite making it look maximized when it is not. I do not want all windows to open maximized but have no need for the window state almost centered and almost the same size as the desktop. (I imagine most people don't)

    Read the article

  • window.focus() not working in Google Chrome

    - by nickyt
    Hey folks, Just wondering if Google Chrome is going to support window.focus() at some point. When I mean support, I mean have it work. The call to it doesn't fail, it just doesn't do anything. All other major browsers do not have this problem: FireFox, IE6-IE8 and Safari. I have a client-side class for managing browser windows. When I first create a window the window comes into focus, but subsequent attempts to bring focus to the window do not work. From what I can tell, this appears to be a security feature to avoid annoying pop-ups and it does not appear to be a WebKit issue as it works in Safari. I know one idea someone brought forward was to close the window then reopen it, but this is a horrible solution. Googling shows that I do not appear to be the only person frustrated with this. And just to be 100% clear, I mean new windows, not tabs (tabs cannot be focused from what I've read) and all the windows being opened are in the same domain. Any ideas? MyCompany = { UI: {} }; // Put this here if you want to test the code. I create these namespaces elsewhere in code. MyCompany.UI.Window = new function() { // Private fields var that = this; var windowHandles = {}; // Public Members this.windowExists = function(windowTarget) { return windowTarget && windowHandles[windowTarget] && !windowHandles[windowTarget].closed; } this.open = function(url, windowTarget, windowProperties) { // See if we have a window handle and if it's closed or not. if (that.windowExists(windowTarget)) { // We still have our window object so let's check if the URLs is the same as the one we're trying to load. var currentLocation = windowHandles[windowTarget].location; if ( ( /^http(?:s?):/.test(url) && currentLocation.href !== url ) || ( // This check is required because the URL might be the same, but absolute, // e.g. /Default.aspx ... instead of http://localhost/Default.aspx ... !/^http(?:s?):/.test(url) && (currentLocation.pathname + currentLocation.search + currentLocation.hash) !== url ) ) { // Not the same URL, so load the new one. windowHandles[windowTarget].location = url; } // Give focus to the window. This works in IE 6/7/8, FireFox, Safari but not Chrome. // Well in Chrome it works the first time, but subsequent focus attempts fail,. I believe this is a security feature in Chrome to avoid annoying popups. windowHandles[windowTarget].focus(); } else { // Need to do this so that tabbed browsers (pretty much all browsers except IE6) actually open a new window // as opposed to a tab. By specifying at least one window property, we're guaranteed to have a new window created instead // of a tab. windowProperties = windowProperties || 'menubar=yes,location=yes,width=700, height=400, scrollbars=yes, resizable= yes'; windowTarget = windowTarget || "_blank"; // Create a new window. var windowHandle = windowProperties ? window.open(url, windowTarget, windowProperties) : window.open(url, windowTarget); if (null === windowHandle) { alert("You have a popup blocker enabled. Please allow popups for " + location.protocol + "//" + location.host); } else { if ("_blank" !== windowTarget) { // Store the window handle for reuse if a handle was specified. windowHandles[windowTarget] = windowHandle; windowHandles[windowTarget].focus(); } } } } }

    Read the article

  • Using Xlib via JNA to move a window

    - by rob
    I'm using JNA to manipulate application windows on Linux by sending Xlib messages but can't seem to move a window. My original implementation executed wmctrl on the shell to move the windows and that successfully moved the windows. Unfortunately, there's a noticeable amount of overhead associated with calling shell programs from Java, so now I'm trying to make direct API calls using JNA. I'm using the X11 example available from the JNA website and can successfully do a few tricks, such as enumerating the window IDs and reading window properties, so I know JNA+Xlib is at least partially working. First I tried moving the windows directly using XMoveWindow() but the window manager was apparently blocking those calls. I ran across a thread that suggested I needed to send a client message using XSendMessage(), so I've done that below, but apparently XSendMessage() is failing because the window doesn't move and I get a return value of 0. I'm guessing I omitted something obvious, but can't quite figure it out. Any suggestions? Note that, for the purposes of this example, the main method has a window ID hard-coded. This is the window ID of the window I'm trying to move (obtained using wmctrl -l on the console). import com.sun.jna.NativeLong; import com.sun.jna.Pointer; import com.sun.jna.examples.unix.X11; import com.sun.jna.examples.unix.X11.Atom; import com.sun.jna.examples.unix.X11.AtomByReference; import com.sun.jna.examples.unix.X11.Display; import com.sun.jna.examples.unix.X11.Window; import com.sun.jna.examples.unix.X11.WindowByReference; import com.sun.jna.examples.unix.X11.XEvent; import com.sun.jna.examples.unix.X11.XTextProperty; import com.sun.jna.examples.unix.X11.XWindowAttributes; import com.sun.jna.ptr.IntByReference; import com.sun.jna.ptr.NativeLongByReference; import com.sun.jna.ptr.PointerByReference; private static final int FALSE = 0; /** C-style boolean "false" */ private static final int TRUE = 1; /** C-style boolean "true" */ public static void main(String[] args) { setWindowPos(new Window(0x01300007), 100, 100, 600, 400); // update the Window constructor with the appropriate ID given by wmctrl -l } public static boolean setWindowPos(Window window, int x, int y, int w, int h) { final X11 x11 = X11.INSTANCE; Display display = x11.XOpenDisplay(null); NativeLong mask = new NativeLong(X11.SubstructureRedirectMask | X11.SubstructureNotifyMask | X11.ResizeRedirectMask); XEvent event = new XEvent(); String msg = "_NET_MOVERESIZE_WINDOW"; //$NON-NLS-1$ long grflags = 0l; // use the default gravity of the window if (x != -1) grflags |= (1 << 8); if (y != -1) grflags |= (1 << 9); if (w != -1) grflags |= (1 << 10); if (h != -1) grflags |= (1 << 11); event.xclient.type = X11.ClientMessage; event.xclient.serial = new NativeLong(0l); event.xclient.send_event = TRUE; event.xclient.message_type = x11.XInternAtom(display, msg, false); event.xclient.window = window; event.xclient.format = 32; event.xclient.data.l[0] = new NativeLong(grflags); // gravity flags event.xclient.data.l[1] = new NativeLong(x); event.xclient.data.l[2] = new NativeLong(y); event.xclient.data.l[3] = new NativeLong(w); event.xclient.data.l[4] = new NativeLong(h); int status = x11.XSendEvent(display, x11.XDefaultRootWindow(display), FALSE, mask, event); x11.XFlush(display); // need to XFlush if we're not reading X events if (status == 0) { // 0 indicates XSendEvent failed logger.error("setWindowPos: XSendEvent failed (" + msg + ")"); //$NON-NLS-1$ return false; } return true; }

    Read the article

  • Saving a screenshot of a window using C#, WPF, and DWM

    - by Evan
    This is a follow up question to this question The solution to the above uses DWM to display a thumbnail of an active window. If I understand correctly, it works by letting you specify the window handle of the application you want to view and then having you provide a window handle and a location on that window where windows should draw the contents of the target Window. Is there a way to render the window screen shot directly to BitmapImage or Image instead of directly drawing it somewhere in your window? (Basically to just grab a screen shot of the window - even if it's covered by another window - with out using an updating thumbnail.) Thanks for you help!

    Read the article

  • When I try to click and launch some of the links set to open in new window, it is being treated as a pop-up window [migrated]

    - by Test Developer
    For the past few days, we are facing issue with the chrome browser behavior. This is related to opening links set to open in new tab/window. The details are as follow: I have a collection of links and each link points to different resource to be opened in a new tab/window. The code is as follow: <a class="cssClass" rid="1114931" href="http://www.domain.com/resources/abc.html" title="Link1" tabindex="4">Link 1</a> And there are few checks/filters over accessing the resources which have been implemented as onClick handler over the links. In case any of the validations fails, the onClick handler returns false and the default behavior of the link does not happens i.e. links does not get open. One of such (last) checks includes AJAX call in sync mode. The code is as follow: var link_clickHandler = function(evt/* Event */) { var objTarget = jQuery(evt.target); if(check1) { return false; } else if(check2) { return false; } else if(check3) { var blnRetVal = false; jQuery.ajax( { "async" : false, "type" : "GET", "contentType" : "application/json; charset=utf-8", "url" : "index.php", "data" : 'resourceid=' + intResourceId, "dataType" : "json", "forceData" : true, "success" : function(data) { if(check1) { blnRetVal = true; } } "error" : function(error) { } } ); return blnRetVal; } }; jQuery("a.cssClass").live("click", link_clickHandler); ISSUE: The issue is that Chrome is behaving very weirdly manner. In case all of the checks are passed and onClick handler returns true, sometimes the resource get opened in a new tab/window and sometimes it get opened as a pop-up (which should never). Tried to capture any pattern but could not succeed. Any solution or even helping in understanding behavior would be really appreciated.

    Read the article

  • Unity install removed window borders, and display drivers.

    - by Vivek Sharma
    I installed unity, used for a while. Then i installed gnome-shell, used it for a while. Now decided to switch back to standard. Gnome is not working the way it use to be. I am using T61 with nvidia-latest drivers. Following issues... Window borders are not showing. Installed compiz settings, and re-check window decorations option. I had to re-install nvidia driver, as when I tried to apply normal visual effects, it said no display driver found. Gnome panel is not coming, and mouse pointer is a "cross" than a "arrow". I then opened a terminal and enter gnome-panel. Panel came and window borders came back. Nothing is showing on desktop, and the right click is also not populating the menu. When i loging, an error message saying, docky did not start and it requires compiz to work. After starting gnome-panel from terminal, i went to systempreferencesAppearance. And selected normal visual effects. It activated, i selected keep the settings. Now when i restart or re-login, everything is gone. I have to run gnome-panel manually, and then re-enable visual setting. Ofcourse i can add gnome-panel in startup applications, but i want to know what has installing unity/gnome-shell has done, that these setting are messed up. I manually removed mutter, as Appearance application was showing mutter installed, cant enable effects. What shall i do to get back a standard gnome-desktop back.

    Read the article

  • Are highly capable programmers paid more than their managers?

    - by Fun Mun Pieng
    I know a lot of programmers are paid less than their managers by significant amounts, as highlighted there. How often is it that a programmer gets paid more than his manager? Or phrased different how many programmers are paid more than their managers? Personally, I know of one case. I'm asking to see how common is the case. When I say "manager", I mean anyone further up their organization hierarchy.

    Read the article

  • Metacity malfunction preventing custom Gnome session from launching?

    - by QuietThud
    When I try to run Metacity in Ubuntu2D(12.04), I get the following message: alisa@ubuntu:~$ metacity Window manager warning: Screen 0 on display ":2.0" already has a window manager; try using the --replace option to replace the current window manager. I get the same message when running Compiz from the command line in 3D (it opens fine through the GUI (same thing for AWN)). I understand that these should be the default managers for the respective sessions. I'm trying to create a custom Gnome session using the following instructions: unity launcher-free session. Here is what I've put into my .session file: [GNOME Session] Name=Custom Unity2D Session RequiredComponents=gnome-settings-daemon; RequiredProviders=windowmanager;panel; DefaultProvider-windowmanager=metacity DefaultProvider-panel=unity-2d-panel FallbackSession=ubuntu-2d DesktopName=GNOME Since I'm having problems identifying my default, and the code refers to Metacity, I figured this may be relevant to my inability to load the custom session (it shows up on my login screen, but won't launch). I tried specifying Metacity as my default manager by adding exec metacity to the .xinitrc file, and I tried running metacity --replace, but neither worked. How do I determine my current default window manager, what should the default be, and how do I re-assign it? Also, please let me know if you think there may be other issues affecting my custom session. I am new to Linux, so list anything you think might be helpful. Thank you!

    Read the article

  • How To Change Window Transparency in Windows 7 with a Hotkey

    - by YatriTrivedi
    Linux has a lot of eye-candy because of Compiz, my favorite of which is the window opacity plugin. Using a short AutoHotKey script, you can add that same functionality to Windows 7. I used this AHK script as a basis for changing opacity. It uses a single hotkey to change the active window’s transparency by 25% each time until it resets to 0. I wanted functionality similar to Compiz, so I modified the script to use the mouse wheel and shortened the increments to get more variety. Just hold down the Windows key and scroll down to see through the window. This decreases opacity and makes windows more transparent. Latest Features How-To Geek ETC Learn To Adjust Contrast Like a Pro in Photoshop, GIMP, and Paint.NET Have You Ever Wondered How Your Operating System Got Its Name? Should You Delete Windows 7 Service Pack Backup Files to Save Space? What Can Super Mario Teach Us About Graphics Technology? Windows 7 Service Pack 1 is Released: But Should You Install It? How To Make Hundreds of Complex Photo Edits in Seconds With Photoshop Actions Hack Apart a Highlighter to Create UV-Reactive Flowers [Science] Add a “Textmate Style” Lightweight Text Editor with Dropbox Syncing to Chrome and Iron Is the Forcefield Really On or Not? [Star Wars Parody Video] Google Updates Picasa Web Albums; Emphasis on Sharing and Showcasing Uwall.tv Turns YouTube into a Video Jukebox Early Morning Sunrise at the Beach Wallpaper

    Read the article

  • Input/Output console window in XNA

    - by Will Bagley
    I am currently making a simple game in XNA but am at a point where testing various aspect gets a bit tricky, especially when you have to wait till you have 1000 score to see if your animation is playing correctly etc. Of course i could just edit the starting variable in the code before I launched but I have recently been interested in trying to implement a console style window which can print out values and take input to alter public variables during run-time. I am aware that VS has the immediate window which achieves a similar thing but i would prefer mine is an actual part of the game with the intention that the user may have limited access to it in the future. Some of the key things i have yet to find an answer to after looking around for a while are: how i would support free text entry how i would access variables during runtime how i would edit these variable I have also read about using a property grid from windows form aps (and partially reflection) which looked like it could simplify a lot of things but i am not sure how I would get that running inside my XNA game window or how i would get it to not look out of place (as the visual aspect of is seems to be aimed just for development time viewing). All in all I'm quite open to any suggestions on how to approach this task as currently I'm not sure where to start. Thanks in advance.

    Read the article

  • How can I define custom keyboard mappings to resize, move, and manage windows?

    - by fumon
    I just returned to ubuntu (13.04) after a year using OS X exclusively. I love the improvements that have come to ubuntu and unity, and I'm glad to be back. There's just one thing, though... Slate is a simple OS X tool that allows users to quickly create powerful keyboard macros and really take advantage of their screen space. I have to say I was spoiled by it. Even on a tiny laptop, my workflow was never interrupted by changing workspaces or leaving the keyboard to adjust a window, because perfect adjustment was a keystroke or two away. For example: bind h:ctrl;alt;cmd resize -10% +0 # this increases the window's left width by 10% bind h:shift;alt nudge -10% +0 # this moves the window left by 10% You make a big config file, and like vim, tmux, and everything else, it just becomes muscle memory. I can't seem to find a way to achieve anything close to this in linux or ubuntu. I've tried to make do with compiz window settings and the built-in stuff Ubuntu offers, but it's not even in the same realm. Although to be fair, this level of tuning isn't something most people care about. Thanks, guys. :) Any feedback would be appreciated.

    Read the article

  • Bash window title not restored after exit

    - by forthrin
    I have a problem with the window title in the Terminal window on OS X: Start Terminal. Window title is "bash" Type "ssh external" to connect to an external server. Window title is "user@external:~" Type "exit". I am now back at my local machine, but the window title still says "user@external:~". How do I make the window title return to "bash", which I assume would be correct since I have logged out of the external server and returned to my local machine? My ~/.bash_profile has the same PS1 value: export PS1='\w$ '

    Read the article

  • Firefox on Windows 7 became an "always top" window

    - by Firebear
    I am using Mozilla Firefox 7.0.1 on a Windows 7 computer (home basic). I usually keep the browser window opened for a long periods of time, like three to four weeks, and I have many tabs opened in the window, like 300 to 900. Recently all of the sudden the Firefox window became "always top" window. I can minimize it, but when it is maximized, no other window can be displayed in front of it, only behind it. This is very inconvenient for me. Is there any fix that I can apply without restarting the Firefox window? Thank you.

    Read the article

  • Using Window Handle to disable Mouse clicks using c#

    - by srk
    I need to disable the Mouse Clicks, Mouse movement for a specific windows for a Kiosk application. Is it Feasible in C# ? I have removed the menu bar and title bar of a specific window, will that be a starting point to achieve the above requirement ? How can i achieve this requirement. The code for removing the menu bar and title bar using window handle : #region Constants //Finds a window by class name [DllImport("USER32.DLL")] public static extern IntPtr FindWindow(string lpClassName, string lpWindowName); //Sets a window to be a child window of another window [DllImport("USER32.DLL")] public static extern IntPtr SetParent(IntPtr hWndChild, IntPtr hWndNewParent); //Sets window attributes [DllImport("USER32.DLL")] public static extern int SetWindowLong(IntPtr hWnd, int nIndex, int dwNewLong); //Gets window attributes [DllImport("USER32.DLL")] public static extern int GetWindowLong(IntPtr hWnd, int nIndex); [DllImport("user32.dll", EntryPoint = "FindWindow", SetLastError = true)] static extern IntPtr FindWindowByCaption(IntPtr ZeroOnly, string lpWindowName); [DllImport("user32.dll")] static extern IntPtr GetMenu(IntPtr hWnd); [DllImport("user32.dll")] static extern int GetMenuItemCount(IntPtr hMenu); [DllImport("user32.dll")] static extern bool DrawMenuBar(IntPtr hWnd); [DllImport("user32.dll")] static extern bool RemoveMenu(IntPtr hMenu, uint uPosition, uint uFlags); //assorted constants needed public static uint MF_BYPOSITION = 0x400; public static uint MF_REMOVE = 0x1000; public static int GWL_STYLE = -16; public static int WS_CHILD = 0x40000000; //child window public static int WS_BORDER = 0x00800000; //window with border public static int WS_DLGFRAME = 0x00400000; //window with double border but no title public static int WS_CAPTION = WS_BORDER | WS_DLGFRAME; //window with a title bar public static int WS_SYSMENU = 0x00080000; //window menu #endregion public static void WindowsReStyle() { Process[] Procs = Process.GetProcesses(); foreach (Process proc in Procs) { if (proc.ProcessName.StartsWith("notepad")) { IntPtr pFoundWindow = proc.MainWindowHandle; int style = GetWindowLong(pFoundWindow, GWL_STYLE); //get menu IntPtr HMENU = GetMenu(proc.MainWindowHandle); //get item count int count = GetMenuItemCount(HMENU); //loop & remove for (int i = 0; i < count; i++) RemoveMenu(HMENU, 0, (MF_BYPOSITION | MF_REMOVE)); //force a redraw DrawMenuBar(proc.MainWindowHandle); SetWindowLong(pFoundWindow, GWL_STYLE, (style & ~WS_SYSMENU)); SetWindowLong(pFoundWindow, GWL_STYLE, (style & ~WS_CAPTION)); } } }

    Read the article

  • Title: Using Window Handle to disable Mouse clicks and Keyboard Inputs using Pinvoke c#

    - by srk
    I need to disable the Mouse Clicks, Mouse movement and Keyboard Inputs for a specific windows for a Kiosk application. Is it Feasible in C# ? I have removed the menu bar and title bar of a specific window, will that be a starting point to achieve the above requirement ? The code for removing the menu bar and title bar using window handle : #region Constants //Finds a window by class name [DllImport("USER32.DLL")] public static extern IntPtr FindWindow(string lpClassName, string lpWindowName); //Sets a window to be a child window of another window [DllImport("USER32.DLL")] public static extern IntPtr SetParent(IntPtr hWndChild, IntPtr hWndNewParent); //Sets window attributes [DllImport("USER32.DLL")] public static extern int SetWindowLong(IntPtr hWnd, int nIndex, int dwNewLong); //Gets window attributes [DllImport("USER32.DLL")] public static extern int GetWindowLong(IntPtr hWnd, int nIndex); [DllImport("user32.dll", EntryPoint = "FindWindow", SetLastError = true)] static extern IntPtr FindWindowByCaption(IntPtr ZeroOnly, string lpWindowName); [DllImport("user32.dll")] static extern IntPtr GetMenu(IntPtr hWnd); [DllImport("user32.dll")] static extern int GetMenuItemCount(IntPtr hMenu); [DllImport("user32.dll")] static extern bool DrawMenuBar(IntPtr hWnd); [DllImport("user32.dll")] static extern bool RemoveMenu(IntPtr hMenu, uint uPosition, uint uFlags); //assorted constants needed public static uint MF_BYPOSITION = 0x400; public static uint MF_REMOVE = 0x1000; public static int GWL_STYLE = -16; public static int WS_CHILD = 0x40000000; //child window public static int WS_BORDER = 0x00800000; //window with border public static int WS_DLGFRAME = 0x00400000; //window with double border but no title public static int WS_CAPTION = WS_BORDER | WS_DLGFRAME; //window with a title bar public static int WS_SYSMENU = 0x00080000; //window menu #endregion public static void WindowsReStyle() { Process[] Procs = Process.GetProcesses(); foreach (Process proc in Procs) { if (proc.ProcessName.StartsWith("notepad")) { IntPtr pFoundWindow = proc.MainWindowHandle; int style = GetWindowLong(pFoundWindow, GWL_STYLE); //get menu IntPtr HMENU = GetMenu(proc.MainWindowHandle); //get item count int count = GetMenuItemCount(HMENU); //loop & remove for (int i = 0; i < count; i++) RemoveMenu(HMENU, 0, (MF_BYPOSITION | MF_REMOVE)); //force a redraw DrawMenuBar(proc.MainWindowHandle); SetWindowLong(pFoundWindow, GWL_STYLE, (style & ~WS_SYSMENU)); SetWindowLong(pFoundWindow, GWL_STYLE, (style & ~WS_CAPTION)); } } }

    Read the article

  • Using Window Handle to disable Mouse clicks and Keyboard Inputs using c#

    - by srk
    I need to disable the Mouse Clicks, Mouse movement and Keyboard Inputs for a specific windows for a Kiosk application. Is it Feasible in C# ? I have removed the menu bar and title bar of a specific window, will that be a starting point to achieve the above requirement ? The code for removing the menu bar and title bar using window handle : #region Constants //Finds a window by class name [DllImport("USER32.DLL")] public static extern IntPtr FindWindow(string lpClassName, string lpWindowName); //Sets a window to be a child window of another window [DllImport("USER32.DLL")] public static extern IntPtr SetParent(IntPtr hWndChild, IntPtr hWndNewParent); //Sets window attributes [DllImport("USER32.DLL")] public static extern int SetWindowLong(IntPtr hWnd, int nIndex, int dwNewLong); //Gets window attributes [DllImport("USER32.DLL")] public static extern int GetWindowLong(IntPtr hWnd, int nIndex); [DllImport("user32.dll", EntryPoint = "FindWindow", SetLastError = true)] static extern IntPtr FindWindowByCaption(IntPtr ZeroOnly, string lpWindowName); [DllImport("user32.dll")] static extern IntPtr GetMenu(IntPtr hWnd); [DllImport("user32.dll")] static extern int GetMenuItemCount(IntPtr hMenu); [DllImport("user32.dll")] static extern bool DrawMenuBar(IntPtr hWnd); [DllImport("user32.dll")] static extern bool RemoveMenu(IntPtr hMenu, uint uPosition, uint uFlags); //assorted constants needed public static uint MF_BYPOSITION = 0x400; public static uint MF_REMOVE = 0x1000; public static int GWL_STYLE = -16; public static int WS_CHILD = 0x40000000; //child window public static int WS_BORDER = 0x00800000; //window with border public static int WS_DLGFRAME = 0x00400000; //window with double border but no title public static int WS_CAPTION = WS_BORDER | WS_DLGFRAME; //window with a title bar public static int WS_SYSMENU = 0x00080000; //window menu #endregion public static void WindowsReStyle() { Process[] Procs = Process.GetProcesses(); foreach (Process proc in Procs) { if (proc.ProcessName.StartsWith("notepad")) { IntPtr pFoundWindow = proc.MainWindowHandle; int style = GetWindowLong(pFoundWindow, GWL_STYLE); //get menu IntPtr HMENU = GetMenu(proc.MainWindowHandle); //get item count int count = GetMenuItemCount(HMENU); //loop & remove for (int i = 0; i < count; i++) RemoveMenu(HMENU, 0, (MF_BYPOSITION | MF_REMOVE)); //force a redraw DrawMenuBar(proc.MainWindowHandle); SetWindowLong(pFoundWindow, GWL_STYLE, (style & ~WS_SYSMENU)); SetWindowLong(pFoundWindow, GWL_STYLE, (style & ~WS_CAPTION)); } } }

    Read the article

  • Can output from OutputDebugString be viewed in VisualStudio's output window

    - by wageoghe
    I am using C# and VS2010. When I use OutputDebugString to write debug information, should it show up in the output window? I can see the output from OutputDebugString in DebugView, but I thought I would see it in Visual Studio's Output window. I have looked under Tools-Options-Debugging-General and the output is NOT being redirected to the Immediate window. I have also looked under Tools-Options-Debugging-Output Window and all General Output Settings are set to "On". Finally, I have used the drop-down list in the Output window to specify that Debug messages should appear. If I change Tools-Options-Debugging-General to redirect the output to the Immediate window, the OutputDebugString messages do not appear in the immediate window. Here is my entire test program: using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Runtime.InteropServices; using System.Diagnostics; namespace OutputDebugString { class Program { [DllImport("kernel32.dll", CharSet = CharSet.Auto)] public static extern void OutputDebugString(string message); static void Main(string[] args) { Console.WriteLine("Main - Enter - Console.WriteLine"); Debug.WriteLine("Main - Enter - Debug.WriteLine"); OutputDebugString("Main - Enter - OutputDebugString"); OutputDebugString("Main - Exit - OutputDebugString"); Debug.WriteLine("Main - Exit - Debug.WriteLine"); Console.WriteLine("Main - Exit - Console.WriteLine"); } } } If I run within the debugger, the Debug.WriteLine output does show up in the output window, but the OutputDebugString output does not. If I run from a console window, both Debug.WriteLine and OutputDebugString show up in DebugView. Why doesn't the OutputDebugString output ever show up in the output window? Ultimately, my intent is not to write a lot of debug output with OutputDebugString, rather I will use System.Diagnostics or NLog or something similar. I am just trying to find out, if I configure a logging platform to write to OutputDebugString, will the output be visible from within the debugger. Edit: I went back to my original program (not the simple test above) which uses TraceSources and TraceListeners configured via the app.config file. If I configure the trace sources to write to the System.Diagnostics.DefaultTraceListener (which is documented as writing to OutputDebugString), then the trace source output DOES go to the debug window. However, lines that write directly with OutputDebugString (such as in my simple example) DO NOT go to the debug window. Also, if I use a different TraceListener that writes to OutputDebugString (I got one from Ukadc.Diagnostics at codeplex), that output DOES NOT go to the debug window. Note that I have seen these questions but they did not provide a working solution: here and here

    Read the article

  • Using Window Handle to disable Mouse clicks and Keyboard Inputs using P/Invoke

    - by srk
    I need to disable the Mouse Clicks, Mouse movement and Keyboard Inputs for a specific windows for a Kiosk application. Is it feasible using .NET ? I have removed the menu bar and title bar of a specific window, will that be a starting point to achieve the above requirement ? The code for removing the menu bar and title bar using window handle : #region Constants //Finds a window by class name [DllImport("USER32.DLL")] public static extern IntPtr FindWindow(string lpClassName, string lpWindowName); //Sets a window to be a child window of another window [DllImport("USER32.DLL")] public static extern IntPtr SetParent(IntPtr hWndChild, IntPtr hWndNewParent); //Sets window attributes [DllImport("USER32.DLL")] public static extern int SetWindowLong(IntPtr hWnd, int nIndex, int dwNewLong); //Gets window attributes [DllImport("USER32.DLL")] public static extern int GetWindowLong(IntPtr hWnd, int nIndex); [DllImport("user32.dll", EntryPoint = "FindWindow", SetLastError = true)] static extern IntPtr FindWindowByCaption(IntPtr ZeroOnly, string lpWindowName); [DllImport("user32.dll")] static extern IntPtr GetMenu(IntPtr hWnd); [DllImport("user32.dll")] static extern int GetMenuItemCount(IntPtr hMenu); [DllImport("user32.dll")] static extern bool DrawMenuBar(IntPtr hWnd); [DllImport("user32.dll")] static extern bool RemoveMenu(IntPtr hMenu, uint uPosition, uint uFlags); //assorted constants needed public static uint MF_BYPOSITION = 0x400; public static uint MF_REMOVE = 0x1000; public static int GWL_STYLE = -16; public static int WS_CHILD = 0x40000000; //child window public static int WS_BORDER = 0x00800000; //window with border public static int WS_DLGFRAME = 0x00400000; //window with double border but no title public static int WS_CAPTION = WS_BORDER | WS_DLGFRAME; //window with a title bar public static int WS_SYSMENU = 0x00080000; //window menu #endregion public static void WindowsReStyle() { Process[] Procs = Process.GetProcesses(); foreach (Process proc in Procs) { if (proc.ProcessName.StartsWith("notepad")) { IntPtr pFoundWindow = proc.MainWindowHandle; int style = GetWindowLong(pFoundWindow, GWL_STYLE); //get menu IntPtr HMENU = GetMenu(proc.MainWindowHandle); //get item count int count = GetMenuItemCount(HMENU); //loop & remove for (int i = 0; i < count; i++) RemoveMenu(HMENU, 0, (MF_BYPOSITION | MF_REMOVE)); //force a redraw DrawMenuBar(proc.MainWindowHandle); SetWindowLong(pFoundWindow, GWL_STYLE, (style & ~WS_SYSMENU)); SetWindowLong(pFoundWindow, GWL_STYLE, (style & ~WS_CAPTION)); } } }

    Read the article

< Previous Page | 13 14 15 16 17 18 19 20 21 22 23 24  | Next Page >