w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
How to change position of window controls relative to the window size
Not necessarily the best way, but what I'd probably do is handle WM_SIZE and/or WM_SIZING and then in there use : m_Button.SetWindowPos(x, y, 0, 0, SWP_NOSIZE | SWP_NOZORDER); where x and y are the new co-ordinates of the top-left of where you want your button.

Categories : Visual Studio 2010

WPF - Do controls in a window automatically set the window's focus to themselves when clicked on?
If you use standard controls like Button or TextBox the Focus is set automatically. If you're inventing your own controls (and don't do so by building them with the standard controls) you might have to implement the focus yourself.

Categories : Wpf

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#

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

How to keep controls from stretching when window resize
I'm not sure how you've got 6 controls into 4 grid cells, but either way use fixed width columns and rows, e.g: <ColumnDefinition Width="200" />

Categories : Wpf

Create UI like Window 8 in vb.net using devexpress controls
I believe the desktop application is equals to WinForms/WPF application in the context of this question. So, with DevExpress WinForms you can start from here: DocumentManager Windows UI View Overview. Please also check the Windows UI View Examples. With DevExpress WPF Controls you can start from here: Windows UI controls for WPF Overview. Please also check the Windows UI controls for WPF Examples. If you mean the Windows Store(WinRT) application please use the DevExpress Windows 8 XAML Controls. Check the Windows 8 XAML Controls Getting Started. Updated WinForms TileControl WPF TileControl

Categories : Vb.Net

Seeing Events in Properties window for controls in EditItemTemplate
To view the events for a control click the lightning bolt in the properties window after selecting the control in either source view (click the control's markup) or design view. To enable the events drop-down in code-behind for page events select ToolsOptions then All Languages and check/re-check Navigation Bar.

Categories : Asp Net

XAML editor won't render the controls in my WPF window
Removing Opacity="0" from the window root tag makes the controls show in my Visual Studio. I tried to switch the opacity on back in case if code is running in the designer like this: public NfyWindow() { InitializeComponent(); if (System.ComponentModel.DesignerProperties.GetIsInDesignMode(this)) this.Opacity = 1; } —but this seems to be ignored by Visual Studio 2010. However the reverse trick helps: you can remove the opacity setting from the XAML and put it into the constructor. This worked for me, but your Visual Studio version/SP may be different. You may also try a cleaner way: public NfyWindow() { InitializeComponent(); if (!System.ComponentModel.DesignerProperties.GetIsInDesignMode(this)) this.Opacity = 0; }

Categories : Wpf

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

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 can i make resize to controls(Panel ,Grid) itself when window is maximize in .net
Why you can't wrap your controls inside Grid? When you set columns width and rows height using *, it will change columns and rows size whenever window be resized. Also controls should have HorizontalAlignment and VerticalAlignment set to Stretch.

Categories : C#

Windows Narrator reads the names of all the controls in the window (even hidden ones)
If your controls are already in the visual tree, this behavior is the normal one, because UI Automation tree based on the Visual tree. So if you want to prevent of reading unnecessary elements using screen readers, you have to load them on demand. You can also override the OnCreateAutomationPeer method in controls that contain visible and hidden elements to return your own AutomationPeer. Then you can override the GetChildrenCore method and return modified children collection. To update automation children tree, you need to call the AutomationPeer.ResetChildrenCache() method and the AutomationPeer.RaiseAutomationEvent(AutomationEvents.StructureChanged) one.

Categories : Wpf

How Can I Move The Window Like I Want With WinApi
This should do what you want: protected override void WndProc(ref Message message) { const Int32 WM_SYSCOMMAND = 0x0112; const Int32 SC_MOVE = 0xF010; switch (message.Msg) { case WM_SYSCOMMAND: Int32 command = message.WParam.ToInt32() & 0xfff0; if (command == SC_MOVE) { Left = 0; Top = 0; return; } break; } base.WndProc(ref message); } Hans Passant suggested the LocationChanged event, and it can work quite nicely. In this example, the window is frozen at 0, 0 until the mouse pointer gets outside of a 500, 500 box: private void Form1_LocationChanged(Object sender, EventArgs e) { if (MousePosition.X > 500 || MousePosition.Y > 500)

Categories : C#

Move a window Manager?
You can set Gravity for you view. i.e. myWindowManager = (WindowManager) getSystemService(WINDOW_SERVICE); final WindowManager.LayoutParams params = new WindowManager.LayoutParams( WindowManager.LayoutParams.FILL_PARENT, WindowManager.LayoutParams.WRAP_CONTENT, WindowManager.LayoutParams.TYPE_SYSTEM_ALERT, WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE, PixelFormat.TRANSLUCENT); //edited params.gravity=Gravity.TOP|Gravity.CENTER_HORIZONTA; myWindowManager.addView(view, params); You can also check this for more details.

Categories : Android

Allow a user to move a borderless window
Introduce a Boolean variable which holds the state if the form is currently dragged and variables which hold the starting point of the drag. Then OnMove move the form accordingly. As this has already been answered elsewhere, I just copy&paste it here. Class Form1 Private IsFormBeingDragged As Boolean = False Private MouseDownX As Integer Private MouseDownY As Integer Private Sub Form1_MouseDown(ByVal sender As Object, ByVal e As MouseEventArgs) Handles MyBase.MouseDown If e.Button = MouseButtons.Left Then IsFormBeingDragged = True MouseDownX = e.X MouseDownY = e.Y End If End Sub Private Sub Form1_MouseUp(ByVal sender As Object, ByVal e As MouseEventArgs) Handles MyBase.MouseUp If e.Button = MouseBu

Categories : Vb.Net

Move Waveform across ScrollViewer Window
If I understand correctly, then you can programmatically scrolls the contents of Canvas depending on the time. Below I will show a sample algorithm. You can scroll the programmatically like this: scrollViewer.ScrollToHorizontalOffset(scrollViewer.HorizontalOffset + 5); // Horizontal scroll through 5 units Work with the timer might look like: int InitInterval = Interval; // init interval System.Timers.Timer myTimer = new System.Timers.Timer(); myTimer.Elapsed += new ElapsedEventHandler(ScrollCanvas); // set the interval if (InitInterval > 0) { myTimer.Interval = InitInterval; } // turn on timer myTimer.Enabled = true; Listing of ScrollCanvas(): private void ScrollCanvas(object source, ElapsedEventArgs e) { // some code // ... // implementing scrolling

Categories : Wpf

Move a popup window in JavaScript using setInterval
The opened url has to be on the same domain as stated in this answer (DEMO). For example on jsfiddle, this works: var printOut = window.open("http://fiddle.jshell.net","_blank", 'height=200, width=200'); And that one doesn't: var printOut = window.open("http://www.google.com","_blank", 'height=200, width=200'); You should also remove the alert, although it works in chrome it seams to break it in for example opera.

Categories : Javascript

How to move objects with Window's C++ Graphics (GDI+) library?
The OnPaint() method will only run when Windows thinks that your window needs to be repainted. Which, typically, happens just once when your window is first created. Or when you minimize and restore the window. To force it to run more than once and animate something, you'll have to tell it that a repaint is required. Best way to do so is by using a timer, it will give you an animation clock. Set the interval to a number that's a bit less than a multiple of 15.625 millseconds. 45 msec is a decent value, it gets you 21 updates per second. Assuming that you can paint fast enough. Call InvalidateRect() in the WM_TIMER message handler. Or Invalidate() if you use Winforms.

Categories : C++

How to move wpf application into minimize tray at Window Start-up C#?
In your application, add an event handler for the FrameworkElement.Loaded event. In that handler, add the following code: WindowState = WindowState.Minimized; This will minimise the application when it starts. To start the application when the computer starts, you'll need to add your program into Windows Scheduler and set it to run at startup. You can find out more on the Schedule a task page at MSDN.

Categories : C#

Components start out overlapping then move when window is resized
In your top code segment, add this line: height: 400px, into the container that will be holding the chart. It should end up looking something like this: { xtype: 'container', itemId: 'rightView', flex: 1, layout: 'vbox', items: [ { xtype: 'container', itemId: 'topRightView', height: 400px, flex: 1 }, { xtype: 'container', itemId: 'bottomRightView', flex: 1 } ] }

Categories : Javascript

Move elements to list when window to small to show them
Ok found it. There are two problems. You have to consider the size 26 of your extra barMoreButton. That will fix the problem of button 9 not moving to the blue menu. By using remove() you break the loop. if( widthOfResizeMenuItems + 26 >= div.offsetWidth ) { button.remove(); i = i-1; ... } By reducing the i variable you don't break the loop of your child elements. //Now that I look at it again, the order gets messed up when I reach button 4 or something. Let me look at it a little more and come back with a solution.

Categories : Javascript

How can I move the tabs bar to the bottom of the window with a Firefox extension?
You might give the following a shot: Insert a hbox (lets say with id bottom-tabs-container) before vbox with id "browser-bottombox" In javascript, use something like var tabsToolbar = document.getElementById("TabsToolbar"); document.getElementById("bottom-tabs-container").appendChild(tabsToolbar); This should retain any event handlers that were bound already. However note that you might break a lot of appearance related stuff.

Categories : Firefox

WPF Why does design view fail if I move my window and app into a subfolder of visual studio
Your XAML is wrong. That's why it's not working Put back these into App.xaml in the following manner: <Application ...> <Application.Resources> <ResourceDictionary> <ResourceDictionary.MergedDictionaries> <ResourceDictionary Source="ResourceDictionaries/GraphViewerBrushes.xaml" /> <ResourceDictionary Source="ResourceDictionaries/GraphViewerTreeViewResources.xaml" /> <ResourceDictionary Source="ResourceDictionaries/SignalScrollViewerResources.xaml" /> <ResourceDictionary Source="ResourceDictionaries/ValidationErrorResources.xaml" /> <ResourceDictionary Source="ResourceDictionaries/GraphViewerToolbarResources.xaml" /> <Res

Categories : Wpf

Issue to move file from one folder to another using window service, running as NetworkService
Your problem here is the user permissions in the machine. Try changing the permissions to the file and the folder and set them less restricted. I'm sure that if you set all permissions to all users, your service will work. But it's risky too. In this page, "File Access" section, you can read how to configure this permissions.

Categories : C#

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

Categories : Javascript

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

Categories : C#

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

Categories : Misc

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

Categories : Python

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

Categories : Javascript

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

Categories : Asp Net

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

Categories : Javascript

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

Categories : Javascript

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

Categories : Jquery

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

Categories : Javascript

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

Categories : Javascript

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

Categories : Jquery

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

Categories : Emacs

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

Categories : C#

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

Categories : Javascript

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

Categories : Android



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