window

open new silverlight window when button click

我的梦境 提交于 2019-12-24 21:02:58
问题 I created a Silverlight window and I want it to appear when I press a button. How can I do that? It doesn't has a "show" method... 回答1: To open a new address in a new window use:- HtmlPage.Window.Navigate(new Uri("the address here"), "_blank"); 回答2: see: Silverlight Simplified MVVM Modal Popup http://www.codeproject.com/KB/silverlight/MVVMPopUp.aspx 回答3: If you want to browse to a new silverlight application hosted in another html page you should use the NavigationService class to accomplish

why the key pressed does not trigger any event?

醉酒当歌 提交于 2019-12-24 20:17:00
问题 Following is a program that displays a black screen with a messgage ALARM ! : import java.awt.*; import javax.swing.*; import java.awt.event.*; public class displayFullScreen extends Window { private JLabel alarmMessage = new JLabel("Alarm !"); public displayFullScreen() { super(new JFrame()); setLayout(new FlowLayout(FlowLayout.CENTER)); alarmMessage.setFont(new Font("Cambria",Font.BOLD,100)); alarmMessage.setForeground(Color.CYAN); add(alarmMessage); Dimension screenSize = Toolkit

Window.print() does not take the current url

纵饮孤独 提交于 2019-12-24 19:46:56
问题 I am using the following code. According to this code, new window will open with the source of url given. But when printing, it is showing about:blank is printing. The page loads correctly. Before loading, the page url is also about:blank. But it changes to the given url soon. var url="http://localhost:8080/hiring/docs/Keneth%20_1340800082258/Keneth%20_resume_1340800082258.pdf"; var printwindow = window.open(url, '_blank', 'fullScreen=yes'); //setTimeout('2000'); printwindow.focus();

Registering Windows Classes Win32

醉酒当歌 提交于 2019-12-24 19:12:28
问题 what's the best practise for registering window classes for a win32 program? Do you register every class in the WinMain function or as they're required? 回答1: I used to do them as they're required, no need doing it before they're needed. 回答2: No Need of registering if you using MFC because this will be doing in the backgrounds.. but if using win32 you need to register a windows class in WNDCLASS structure if you want to uise a windproc for your custom message handling see the MSDN link http:/

Java get MAXIMIZED state window size

此生再无相见时 提交于 2019-12-24 17:24:40
问题 I am developing a multi platform game and I wanted to make a full-screen non bordered window and this is where I got into a problem for LINUX operating system. For WINDOWS system I was using Toolkit.getDefaultToolkit().getScreenSize() method to get complete SCREEN SIZE and it worked fine, but for LINUX my screen was a bit wider and higher due to LINUX BARS. *SOLUTION in my answer bellow 回答1: You could have a look at Full-Screen Exclusive Mode API. This will give your program full access to

How to close the home window

断了今生、忘了曾经 提交于 2019-12-24 17:04:18
问题 I'm creating a wpf application in c#, I know to close/open a window you have to use the .Close() and .Show() methods but for some reason the home screen, the first window that appears when I launch the application, won't close. Home window1 = new Home(); window1.Close(); Name window2 = new Name(); window2.Show(); Window2 appears, but window1 won't close. What's the problem. 回答1: Where is your code for showing window1 ? If you show your home window somewhere else in your code, you need to use

How to close the home window

早过忘川 提交于 2019-12-24 17:03:09
问题 I'm creating a wpf application in c#, I know to close/open a window you have to use the .Close() and .Show() methods but for some reason the home screen, the first window that appears when I launch the application, won't close. Home window1 = new Home(); window1.Close(); Name window2 = new Name(); window2.Show(); Window2 appears, but window1 won't close. What's the problem. 回答1: Where is your code for showing window1 ? If you show your home window somewhere else in your code, you need to use

wpf navigate form to form?

会有一股神秘感。 提交于 2019-12-24 16:34:24
问题 In the entry form of my wpf application, I have a list of buttons where the user can select where he wants to do, eg. enter new customer, run report... What is the best way to show the form (e.g enter new customer) after the user selection? I don't want the form to be a pop up. Also hiding the current work and show the next form will not work, because the wpf application is hosted inside the window32 app. My guess is to build each of the functionality in user control. on the entry page, load

How to restore native browser object without creating iframe?

一曲冷凌霜 提交于 2019-12-24 14:48:34
问题 I make an embedded JS code which works on thousands of different sites. I definitely want to use some standard browser features (like window.JSON.stringify ), but sometimes it simply doesn't work, because a site has some code that ran before mine and replaced native object with something incompatible with my expectations (and standards of course). Unfortunately the way of restoring native functions by deleting them ( delete JSON.stringify ) doesn't work in this case because I need to restore

How can I programmatically determine if an application is flashing in the taskbar

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-24 14:19:37
问题 I can use "FlashWindowEx" to make a window flash in the taskbar, but what can I call to determine if that has been done to a window? Is there a flag that gets set somewhere that I can query? 回答1: It's seems that such thing is not possible. However, there may be workarounds. For example, you may keep a boolean variable "flash = false". Then set it to "true" when you call FlashWindowEx and set to "false" in the situations in which applications typically gain focus. References: http://forums