screen

nodewebkit - documentation said screen will work, but its getting impossible to make it work

孤人 提交于 2019-12-11 14:37:53
问题 I am using latest nodewebkit and running the following code as per documentation ( https://github.com/rogerwang/node-webkit/wiki/Screen ) but its always failing. Can anyone please tell me why i have this error please and how do you fix it? <!DOCTYPE html> <html> <body> <script> function ScreenToString(screen) { var string = ""; string += "screen: "+ screen.id; return string; } var gui = require('nw.gui'); gui.Screen.Init(); var string = "" ; var screens = gui.Screen.screens; for(var i=0;i

How to get the screen size in millimeters using C#

三世轮回 提交于 2019-12-11 13:17:39
问题 Now I'm developing the program which could draw ECG waveform, the speed of ECG waveform is 25 mm/second. So I needs to convert pixels to millimeters. Now, I wants to get the screen size in millimeters using C#. Now I have 2 monitors, and I hope to know the screen sizes of all monitors, I know how to get the sizes in pixels, but I don't know how to get millimeters value. I search the google,found that using WMI could get the screen size, I tried, but failed. Could anyone give me some

Galaxy S6 screen dimensions - android

空扰寡人 提交于 2019-12-11 12:41:31
问题 I use the below code to get the width of a Galaxy S6 screen in pixels DisplayMetrics metrics = new DisplayMetrics(); getWindowManager().getDefaultDisplay().getMetrics(metrics); Log.i("INFO", "width pixels "+metrics.widthPixels); On one app this returns 1440 which is correct as per Samsung. On another app the same code returns 1080 ?? density also changes from 4 to 3 as well as xdpi 580 to 435 Any ideas why I'm getting two different results? Both apps target the same SDK: 23 and min SDK: 10

setting text color to transparent for hiding accessibility content?

放肆的年华 提交于 2019-12-11 11:56:25
问题 I have a bunch of tags with background-images properties that I would like to give some content for screenreaders but I obviously can't give it an alt attribute since they are not <img> tags. Would screenreaders be able to read the content as long as I set the text color to transparent? I would not like to use display:none or visibility:hidden as I've read that screenreaders will not read those content and can also be penalized by google for hiding content. What are my options to accomplish

Disable screen during call

回眸只為那壹抹淺笑 提交于 2019-12-11 11:44:45
问题 I'm working on a BB10 app that needs to disable the screen in the same way that holding it close to your face does during a call. I implemented a proximity sensor to detect when the screen should be disabled or enabled, but BB10's APIs don't seem to provide a way to turn the screen on or off. What can I use to disable and re-enable the screen? 回答1: You can solve this by adding a Container around the outermost Container in the QML file, and setting its background to Color.Black . Then added an

Convert X and Y px base on Screen size

走远了吗. 提交于 2019-12-11 11:38:50
问题 im using this command input tap x y ( input tap 600 500 ) in a phone with a screen resolution of 720 x 1280 how do I convert the x y so it will be same point in a phone with a resolution of 1080 x 1920 . Thanks 回答1: This pseudo code should get you the values you're looking for: resolution_width = 720; resolution_height = 1280; input_x = 600; input_y = 500; target_width = 1080; target_height = 1920; percent_width = input_x / resolution_width; percent_height = input_y / resolution_height;

how to handle android screens fragmentations?

こ雲淡風輕ζ 提交于 2019-12-11 11:22:01
问题 i wish to write the layout and code just once so that it would look good on all devices . i've tried many ways (yes, including what google suggests, to use DP and also add multiple layout files) , but none really solves the problem of having to deal with a new situation each time there is a new device with a random resolution and density. the DP usage is just an XML trick that lets the dimensions stay the same on all screens like a ruler (for example , 1cm stays 1cm on all screens) ,so it's

Windows: How to simulate connected screen via VGA

落爺英雄遲暮 提交于 2019-12-11 11:00:02
问题 I am trying to make a screen capturing service. I have a physical PC and I would like to run a program that displays a document (ex. MSWord) and then take a screenshot. Problem is that if I use using (var bitmap = new Bitmap(p.EndX - p.StartX, p.EndY - p.StartY)) { using (Graphics g = Graphics.FromImage(bitmap)) { g.CopyFromScreen(p.StartX, p.StartY, 0, 0, p.EndX,p.EndY,new Size(p.EndX - p.StartX, p.EndY - p.StartY)); } bitmap.Save("result.png", ImageFormat.Png); } it works only if I have a

How to code floating boxes for mobile screens

情到浓时终转凉″ 提交于 2019-12-11 10:27:40
问题 I´m trying to do the following on a website. I guess it´s quite simple for thoose who have programmed alot but for me it´s new. Can someone show me how to code this? Thanks! Layout on computer screen and mobile screen 回答1: You need to use media queries to make your HTML and CSS code produce different results in user's browser on different devices. Media queries usually based on max-width of the browser viewport. So, if browser viewport will be less than 800px wide, additional styles will be

Draw a fill rectangle dynamically on screen in C#

我的未来我决定 提交于 2019-12-11 09:27:18
问题 I would like to draw a fill rectangle dynamically on my screen, with an opacity at 0.1. The problem is that when i move the mouse, the previous rectangles aren't clear. This is the drawing methods. private void OnMouseDown(object sender, MouseEventArgs e) { isMouseDown = true; x = e.X; y = e.Y; g = this.selectorForm.CreateGraphics(); } private void OnMouseMove(object sender, MouseEventArgs e) { if (!isMouseDown) return; this.selectorForm.Invalidate(); g.FillRectangle(brush, this.getRectangle