Search Results

Search found 1599 results on 64 pages for 'pressed'.

Page 9/64 | < Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >

  • Enable Media Volume Slider in Android application.

    - by user300972
    Some Android programs trigger the "media volume" slider when the hardware volume up/down buttons are pressed. My application seems to set the ringer volume when the hardware buttons are pressed. How would I enable the media volume slider? I would hate for users to have to go into their settings to change the media volume when they use my application.

    Read the article

  • c# ProcessCmdKey overload, match generic combination

    - by leo
    Hi all, On some control, I want ProcessCmdKey to return true if the keys pressed by the user were ALT and any letter of the alphabet. I'm able to return true if the user presses Alt with the following code, but how can I add the condition of a letter also pressed ? protected override bool ProcessCmdKey(ref Message msg, Keys keyData) { if ((keyData & Keys.Alt) != 0) { return true; } } Thanks.

    Read the article

  • Exiting full screen mode in Flash

    - by OleK
    I am working on a flash game, that will be distributed as and EXE file. I would very much like the game to run full screen, which is not a problem, but I am struggling with replacing flash default behavior when escape is pressed. When escape is pressed I would like to display a custom menu asking the user if they want to exit the game or continue playing, not just exit full screen more. Is this possible in Flash?

    Read the article

  • NEED PROGRAM in visualc++ opengl [closed]

    - by HAREEFML
    I AM NEW IN OPENGL VISUALC++ PROGRAMMING.I NEEDED A PROGRAM THAT, THE ROTATING OBJECTS.WHERE THE CUBE,CYLINDER,TRIANGLE & CONE AND THESE OBJECTS ROTATE AS THE KEYBOARD ARROW KEYS ARE PRESSED AND EACH OBJECTS START ROTATION WHEN THE KEYBOARD NUMBERS 1,2,3,4 ARE PRESSED. CAN I GET PROGRAM LIKE THIS? THANKS IN ADVANCE.

    Read the article

  • listView dynamic add item

    - by pengwang
    hello,I used ListView to dynamic add item,but there is a problem about not Smooth add. there are textView and button in my listActivity,Iwant to Press button ,then textView"s text can auto add to listView,but i Pressed button ,it donot work,unless after i enter content , press "OK"Key ,then Pressed button ,textView"s text can auto add to listView. I donot know why. if I continuous Pressed button ,as3 times, then press "Ok"Key ,the content auto add list View but 3 times. public class DynamicListItems extends ListActivity { private static final String ITEM_KEY = "key"; ArrayList<HashMap<String, String>> list= new ArrayList<HashMap<String, String>>(); private SimpleAdapter adapter; private EditText newValue;@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.dynamic_list); newValue = (EditText) findViewById(R.id.new_value_field); setListAdapter(new SimpleAdapter(this, list, R.layout.row, new String[] { ITEM_KEY }, new int[] { R.id.list_value })); ((ImageButton) findViewById(R.id.button)).setOnClickListener(getBtnClickListener()); } private OnClickListener getBtnClickListener() { return new OnClickListener() { public void onClick(View view) { try { HashMap<String, String> item = new HashMap<String, String>(); item.put(ITEM_KEY, newValue.getText().toString()); list.add(item); adapter.notifyDataSetChanged(); } catch (NullPointerException e) { Log.i("[Dynamic Items]", "Tried to add null value"); } } }; }} my another question is how to dynamic delete the item,which event i need to used,could you give me some directions or Code snippets? dynamic_list.xml only contains listView ,button,textView row.xml contains TextView . i amm sorry i donot edit code together.

    Read the article

  • Blackberry: How to properly handle focus traversal in custom field?

    - by DaveJohnston
    I am writing an app for Blackberry and I have the following problem: I have implemented a custom field by extending the Manager class. The field is quite simple, it consists of a label and two check boxes, yes and no. The fields are laid out so that the label is on the left and uses as much space as it can while still allowing room for the check boxes which are positioned next to each other at the right and vertically centred compared to the label (if it spans more than one line). So it looks like this: This is a question? O Yes O No Everything is fine so far in terms of laying out the fields. But now I am trying to handle focus traversal. First of all the default behaviour when the user scrolls up or down is to move between the yes and no options. I want to move to the next field above or below when up or down is pressed, so I did this: protected int moveFocus(int amount, int status, int time) { if (status == 537001984 || status == -1610481664) { // Up or down was pressed // Don't move focus between yes and no when up or down is pressed. return amount; } return super.moveFocus(amount, status, time); } And that seems to work. The next thing I would like to do is to remember which option last had the focus when the field loses focus, then on gaining focus again (regardless of which direction the focus comes from) set this field to have the focus. I tried overriding onUnfocus and onFocus so that onUnfocus I note which field was focussed then onFocus setFocus to that field. But I get a StackOverflowError, I guess because the call to setFocus on a field within the manager actually calls onFocus for the manager itself again?? So does anyone know how I should be doing this? I checked the DateField and it has the exact behaviour I am looking for, i.e. it remembers if you were last on the day, month or year field and sets this field to focus when the field itself gets the focus.

    Read the article

  • Write Null/Nothing value with Databinding

    - by clawson
    I have extended a MaskedTextBox component to add some functionality. The text property of the extended MaskedTextBox is bound to a DateTime? property and the format of binding is set to a time format of "HH:mm:ss" (i.e. 24hr time). So that this masked text box will capture the display a time. The extra functionality I have added is to make the component readonly unless the component is double clicked or the enter button is pressed (the back color of the control helps to inform the users if the component is locked/readonly or not). When the enter button is pressed I also suspend the bindings so that bound data is updated the users input won't be lost. The information is then written back to the value and databindings resumed when the user presses the enter key again. This all works fine up to here, with values written and displayed as would be expected. However, I also want to write the null or nothing value to the DateTime? property if the user hasn't entered any text (or invalid text but let's just stick with no text) when enter key is pressed to submit the new value. Unlike with other valid entries in the MaskedTextBox, with no text entered when i execute: Me.DataBindings("Text").WriteValue() (when 'locking' the MaskedTextBox) it then branches to the bound properties Get method as I step into each line of code in the debugger (as opposed to the Set method with other valid entries) How can I write this null/nothing/"" value to the DateTime? property when no text "" is entered into the MaskedTextBox? Thanks for the help!

    Read the article

  • OnClickListener cannot be resolved to a type

    - by Webnet
    I'm diving into Java (this is day 1) and I'm trying to create a button that will trigger a notification when I click it... This code is based off of the notification documentation here, and UI events documentation here package com.example.contactwidget; import android.app.Activity; import android.app.Notification; import android.app.NotificationManager; import android.app.PendingIntent; import android.content.Context; import android.content.Intent; import android.os.Bundle; import android.widget.Button; public class ContactWidget extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); Button calc1 = (Button) findViewById(R.id.calc_button_1); calc1.setOnClickListener(buttonListener); setContentView(R.layout.main); } private static final int HELLO_ID = 1; //Error: OnClickListener cannot be resolved to a type private OnClickListener buttonListener = new OnClickListener() { public void onClick (View v) { String ns = Context.NOTIFICATION_SERVICE; NotificationManager mNotificationManager = (NotificationManager) getSystemService(ns); int icon = R.drawable.icon; CharSequence ticketBrief = "Button Pressed Brief"; CharSequence ticketTitle = "Button pressed"; CharSequence ticketText = "You pressed button 1"; long when = System.currentTimeMillis(); Notification notification = new Notification(icon, ticketBrief, when); Intent notificationIntent = new Intent(this, ContactWidget.class); PendingIntent contentIntent = PendingIntent.getActivity(this, 0, notificationIntent, 0); notification.setLatestEventInfo(getApplicationContext(), ticketTitle, ticketText, contentIntent); mNotificationManager.notify(HELLO_ID, notification); } } } I'm running into a problem: OnClickListener cannot be resolved to a type. The problem here is that I don't see any problems with my code in relation to the example I'm using

    Read the article

  • In Xlib, How can I animate until an event occurs?

    - by Animateur
    Hi, I've been trying to animate in a C program using Xlib and I wanna do something when an event occurs, otherwise I wanna keep animating. Here's an example code snippet of what I am doing currently: while( 1 ) { // If an event occurs, stop and do whatever is needed. // If no event occurs, skip this if statement. if ( XEventsQueued( display, QueuedAlready ) > 0 ) { XNextEvent( display, &event ) switch ( event.type ) { // Don't do anything case Expose: while ( event.xexpose.count != 0 ) break; // Do something, when a button is pressed case ButtonPress: ... break; // Do something, when a key is pressed case KeyPress: ... break; } } animate(); // Do animation step i.e. change any drawings... repaint(); // Paint again with the new changes from animation... } So basically, I wanna keep looping if the user hasn't clicked the mouse OR pressed a key in the keyboard yet. When the user presses a key OR clicks the mouse, I wanna stop and do a specific action. The problem in my above code is that, it doesnt stop whenever I do an action. If I remove the if statement, the animation blocks until an event occurs, however I do not want this. It's a simple problem, but I'm kinda new to Xlib/animations so any help would be highly appreciated. Thanks.

    Read the article

  • how do i call methods from another class in android?

    - by Phani Gargey
    I have two classes in question. Both extend Activity. Class A public void displayinfo() { setContentView(R.layout.dynamicinfo); //Add some buttons dynamically here //do some processing // move on to Class B } In Class B: I want to go back to Class A state in UI if BACK button is pressed. Class B //Register a listener for this button Backbutton.setOnClickListener(new OnClickListener() { public void onClick(View arg0) { Log.i("setOnClickListener", "Pressed Back Button "); Toast.makeText(mycontext, "Pressed Back Button", Toast.LENGTH_SHORT).show(); //HERE I want to go back class's function in UI as well as restoring the sttae for that screen. } how do I do that? I looked around some questions. they did not answer clearly what I am looking for.hence the posting. thanks.I think I was adding my own Back button on the Layout I created in the Class B's UI Screen --not using the regular "Back" button on the key board. May be that was the problem.

    Read the article

  • reading keyboard input without "consuming" it in x86 assembly

    - by Bob
    Ok so here the deal: I have an assignment regarding DOS and interrupts: I need to write a sort of key-logger function that can be called from C code. what it means is a c program would call an assembly function called startlog that would indicate to start logging the keys pressed until a function called endlog is called. the logging should work like this: write the ascii value of any key pressed without disturbing the C code between startlog and endlog, meaning that if the C code also needs to read the input (let's say by scanf, it would work ok). I managed to write the logger by changing the interrupt vector 9th entry (interrupt for keyboard press) to a function I wrote that writes the values to a file, and it works fine. however the C code does not get the input. Basically what i did is read the key pressed using int 21h, however after reading the ascii value it is "consumed" so I need a way to either simulate the key press again or read the value without "consuming" it so next time a key is read it reads the same key. (I described the code in english because it is long and clumsy assembly code)

    Read the article

  • NX Client running on OS X 10.6.3 => NX Server Ubuntu 10.04: weird keymapping issue

    - by Mike D
    I have been using Ubuntu 9.10 at work after switching from vista. After being (expectedly) disappointed with performance over VNC (via VPN) when logging in from home, I came across the NOMACHINE suite. Last week, I upgraded from OS X 10.6.2 = 10.6.3 at home. After that, I also updated my NX Client at home to the latest version, as there were issues with recent changes in the OSX X11 setup that rendered the NX connection useless. At that point, everything worked fine. Fast forward, I upgraded from 9.10 = 10.04 on my work machine the next day, and after coming home and trying to log-in remotely, I noticed that the "s" and "m" keys, when pressed locally, acted as if the meta key was being pressed on the remote machine. That is, the "s" key opens in the Ubuntu login menu (the power icon), and the "m" key opens the messaging menu. I found some info on using xmodmap to remap keys, however, I can't even begin to fathom what keys I could remap to solve this issue. Any ideas?

    Read the article

  • Shut Down took way too long because of "Background Programs"

    - by Christopher Chipps
    I tried shutting my desktop PC (with Windows7) down but after several attempts (like 4 or 5) at Start -- Shut Down, the GUI was still there and it was not shutting down. I didn't think there were any programs running when I pressed Shut Down, so I went into the taskbar (Ctrl + Alt + Del) to check out the processes. Once I did that, a screen appeared with a message stating that there are "background programs" still running and it gave me an option to "Force Shut Down" which I pressed and it shut down normally. Does anyone know why this would happen?

    Read the article

  • Bind shift-tab to complete-backward in fish

    - by Sebastian
    I found myself using the auto-complete functionality of the fish-shell, where pressing tab twice or more cycles through the suggestions. But then I accidentaly pressed tab once to many, and I wanted to go back to the previous suggestion, so I pressed shift-tab, which only appended [z to the command. For example, when I type cd D<tab><tab>: ~> cd Desktop/ I press <tab>, result: ~> cd Documents/ Now when I press <shift+tab>, the prompt changes to ~> cd Documents/[Z instead of returning to the desired: ~> cd Desktop/ How do I do this (preferably using the fish_user_key_bindings.fish file)? The documentation only provides the special function complete.

    Read the article

  • Context menu on Intellj IDEA

    - by Otavio Macedo
    I have installed Intellij IDEA 10 on Linux (Ubuntu 8.04) and the way the context menu works is annoying me. The context menu is visible as long as I keep the right button pressed (if I release the button, the menu disappears). To click on a menu item, I have to position the cursor upon the item with the right button pressed and then release it. I've also figured out two alternative ways to keep the menu visible with the right button released: To right-click, drag, and release the button outside the context menu. Ctrl + Right-click or Shift + Right-click But I would expect the "normal" behavior: that when I right-click and release, the menu keeps visible until the next click (on an item or outside the menu). Is there a way to change this behavior? Thanks in advance.

    Read the article

  • In what way does non-"full n-key rollover" hinder fast typists?

    - by Michael Kjörling
    Wikipedia claims (although the latter claim does not cite a source) that: High-end keyboards that provide full n-key rollover typically do so via a PS/2 interface as the USB mode most often used by operating systems has a maximum of only six keys plus modifiers that can be pressed at the same time.[4] This hinders fast typists, ... In what way would the system being able to recognize only six non-modifier keys at once hinder a fast typist? I consider myself a relatively fast typist and I usually press one key, plus modifiers, at once; I can't imagine any real-life situation in which the system only recognizing six non-modifier keys being pressed at once has been a limiting factor in my keyboard usage. (Multi-stroke keyboard shortcuts as used by high-end software like Visual Studio, Emacs and the like are a different matter.) Note that I am not really interested in answers centered around multiplayer computer games; I'm looking for answers that give reasons that would be relevant to typists, somehow supporting the statement made on Wikipedia.

    Read the article

  • Getting spurious undo (ctrl-z) sent randomly on a Dell Laptop

    - by squelart
    For the past couple of weeks, my laptop has had a strange problem where it looks like ctrl-z is pressed, so I usually lose bits of text I just typed. If I press ctrl-shit-z (redo), the text comes back, proving it's really as if ctrl-z was pressed. It's difficult to see a pattern, I can be undo-free for hours, then get a few within minutes, sometimes 2-3 undoes at a time. Very frustrating! Running WinXP+SP3 on Dell Latitude D820, Clamwin antivirus. I've tried another keyboard, no difference. Any clue on what this could be, or how I could trace this problem? 2009-09-25: Tried a few things that were listed or linked to on this page: http://www.selfishman.net/2008/06/24/problem-with-dell-inspiron-1501-keypress-every-second/ but nothing helped. Though it seems to point at a Dell laptop issue. I upgraded the BIOS and other drivers, but still got the problem.

    Read the article

  • How do I reattach to Ubuntu Server's 'do-release-upgrade' process?

    - by Alex Leach
    I accidentally pressed Ctrl+C during Ubuntu Server's do-release-upgrade process. I'd dropped to a shell to compare a .conf file in /etc/. When I pressed Ctrl-C, it asked whether I wanted to try to reattach to the upgrade process, but it failed to do so. So I quit, and now there's a hanging dpkg process which is holding onto the apt lock. This is a virtualised server with no GUI frontend... Is it possible to recover the upgrade process, or do I have to kill the dpkg process and start again? UPDATE:- AFAICT, there was no way to reattach to the upgrade process. However, it wasn't a disaster at all. I killed the hanging dpkg process, and then ran dpkg --configure -a. This walks you through reconfiguring all packages already installed on the system, tidying up any problems whilst it does so. After that, I used aptitude to upgrade the remaining packages, which had already been downloaded, but hadn't been installed or configured.

    Read the article

  • Why does my PC sometimes think I am constantly pressing the control key?

    - by David Faux
    I was browsing the web with Chrome and pressed f. A search box appeared. I then pressed s, after which Chrome asked if I wanted to save the web page. I soon realized that my PC was thinking that I was constantly pressing the Ctrl key regardless of what program I was using. In response, I tried clicking both of my Ctrl keys a few times to no avail. This problem arises sporadically as I work. I am not sure what is triggering it. Why could this problem be occurring? Is it the keyboard or software? How should I respond?

    Read the article

  • International Dvorak keyboard doesn't trigger hot-keys

    - by akurtser
    I'm using the Engilsh-Dvorak keyboard-layout; My second keyboard language is Hebrew, which has nothing to do with Dvorak but the hot keys (e.g if I'm writing a document in Hebrew and want to make some bold text using Ctrl+b). The default Hebrew keyboard that comes with Windows (7 and below) has a shift mode which matches each Hebrew character with its matching English QWERTY character ). Obviously I'd want to use the Dvorak corresponding key rather than the QWERTY one, so I created a Hebrew-Dvorak keyboard with a software called Keyboard Layout Manager (KLM) which creates new keyboard layouts DLLs. It works just fine for the shift key, however, Ctrl-key triggered hot-keys (e.g Ctrl+l in FF) are being matched to the corresponding QWERTY key. I've examined the properly working English-Dvorak layout using KLM and in it's "Ctrl+ pressed" view, there isn't any character that's matched to any key but still I tried to encode the Hebrew Ctrl+ pressed keys to work with their matching Dvorak keys, yet it had no effect.

    Read the article

  • Shut down by pressing the power button twice

    - by iHarry
    I have set my laptop's power button to shut down the computer when it is pressed (Windows 7 x86). But I often hit the button accidentally, and it's a rare case that I'm able to actually prevent it from shutting down. I don't want to disable it though. Is there a way so that I get a confirmation whether I really want to shut down the computer (just like in Mac OS X Lion, where a confirmation appears when the power button is pressed)?. Is there some way to bring the same to Windows 7 (and 8)?

    Read the article

  • Windows 7 startup problem

    - by elaine
    I purchased a computer a few weeks ago which runs on Windows 7. I was just watching a show on Hulu when it shut off. I don't know if I accidently pushed the power button with the keyboard or what. When I turned it back on my first screen says F5 key for HDD recovery. I pressed the F5 button and the screen goes to a Windows setup (EMS enabled) screen which then goes to my regular Starting Windows. After that one I get the box with x:/windows/system32/cmd.exe-startnent.cmd. If I don't press the F5 button I go to a screen which tells me Windows failed to start, a recent hardware or software change might be the cause. It gives me two options- Launch Setup REpair(recommended) or start Windows normally. I've pressed enter to choose the first choice but it does nothing but brings me to the same screen. Anyone have any ideas?

    Read the article

  • How to get Windows XP to play a sound on mouse clicks

    - by Re0sless
    Is it possible to play a sound each time the mouse button is pressed in Windows? We have some touch screens PC's that run Windows XP, and would like them to beep when pressed so the users know they have registered the click. (the touch screen acts a the left mouse button) I have looked in Sounds and Accessibility options but can not see anything that would work. If there is nothing in windows that would do this is there any third party applications to do the same job. We don't need anything lavish just a simple click or beep would suffice.

    Read the article

  • How to disable multiple form submit (POST) in IIS

    - by user1209640
    We had a major SharePoint outage a few months back because a user wedged their keyboard in such a way as to cause the Enter button to be pressed indefinitely. The user was on a customized people search page and hundreds of POSTs by the same user were submitted asynchronously, which overloaded the server. Because I work in a large organization, I am looking for a more global way to prevent this from happening. Is there a way to prevent multiple web form submissions by a common user within a short period of time within IIS? I am aware we can write javascript to disable the button after it is clicked, but we are hoping to prevent this issue from occurring on other pages where a similar possibility may exist. Update: It appears looking at the source code, the javascript is performing a document.location = url, whenever keycode 13 (Enter) is pressed. Again, we can write JS to prevent this in this location, but we also want to be able to guard against this kind of issue more generally... preferably at the IIS level.

    Read the article

  • Can't get to the login screen

    - by Rod
    I upgraded my wife's Windows 7 machine, to Windows 8 Pro, about 10 days ago. She's been using it fine ever since. We typically leave our desktops running 24/7, and just turn off the monitor. This morning she turned the monitor on, and saw the screen with the Seattle Space Needle, and then she pressed the enter key to get to the login screen. Nothing happened. Next she pressed the mouse key. Nothing happened. The mouse moves around fine. But we can't get it past the Seattle Space Needle screen. She replaced the batteries in both her keyboard and mouse recently. So, what's going on? How do we fix it?

    Read the article

< Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >