Search Results

Search found 5756 results on 231 pages for 'mouse listeners'.

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

  • BOX2D and AS3: Mouse Event not working

    - by Gabriel Meono
    Background: Trying to make a simple "drop the ball" game. The code is located inside the first frame of the timeline. Nothing more is on the stage. Issue: Using QuickBox2D I made a simple If statement that drops and object acording the Mouse-x position: if (MouseEvent.CLICK) { sim.addCircle({x:mouseX, y:1, radius:0.25, density:5}); I imported the MouseEvent library: import flash.events.MouseEvent; Nothing happens if I click, no output errors either. See it in action: http://gabrielmeono.com/download/Lucky_Hit_Alpha.swf http://gabrielmeono.com/download/Lucky_Hit_Alpha.fla Full Code: [SWF(width = 350, height = 600, frameRate = 60)] import com.actionsnippet.qbox.*; import flash.events.MouseEvent; var sim:QuickBox2D = new QuickBox2D(this); sim.createStageWalls(); //var ball:sim.addCircle({x:mouseX, y:1, radius:0.25, density:5}); // // make a heavy circle sim.addCircle({x:3, y:1, radius:0.25, density:5}); sim.addCircle({x:2, y:1, radius:0.25, density:5}); sim.addCircle({x:4, y:1, radius:0.25, density:5}); sim.addCircle({x:5, y:1, radius:0.25, density:5}); sim.addCircle({x:6, y:1, radius:0.25, density:5}); // create a few platforms sim.addBox({x:3, y:2, width:4, height:0.2, density:0, angle:0.1}); // make 26 dominoes for (var i:int = 0; i<7; i++){ //End sim.addCircle({x:1 + i * 1.5, y:16, radius:0.1, density:0}); sim.addCircle({x:2 + i * 1.5, y:15, radius:0.1, density:0}); //Mid end sim.addCircle({x:0 + i * 2, y:14, radius:0.1, density:0}); sim.addCircle({x:0 + i * 2, y:13, radius:0.1, density:0}); sim.addCircle({x:0 + i * 2, y:12, radius:0.1, density:0}); sim.addCircle({x:0 + i * 2, y:11, radius:0.1, density:0}); sim.addCircle({x:0 + i * 2, y:10, radius:0.1, density:0}); //Middle Start sim.addCircle({x:0 + i * 1.5, y:09, radius:0.1, density:0}); sim.addCircle({x:1 + i * 1.5, y:08, radius:0.1, density:0}); sim.addCircle({x:0 + i * 1.5, y:07, radius:0.1, density:0}); sim.addCircle({x:1 + i * 1.5, y:06, radius:0.1, density:0}); } if (MouseEvent.CLICK) { sim.addCircle({x:mouseX, y:1, radius:0.25, density:5}); sim.start(); /*sim.mouseDrag();*/ }

    Read the article

  • Does Apple Magic Mouse fully work on Windows 7 x86/x64?

    - by Sorin Sbarnea
    I would like to know if Apple Magic Mouse works on Windows 7 (x86/x64) on non-Apple computers. Here are some checklists: x64 compatibility left click right click middle button? vertical scroll horizontal scroll bind additional gestures to keystrokes? are any usage problems? In case it works please advise on how to get the drivers.

    Read the article

  • Why is my mouse randomly deselecting and unclicking?

    - by Coldblackice
    (Windows 7 x64, Logitech MX1100 mouse) If I click/hold/ the mouse, like on the title bar of a folder to move it, or to select text, the mouse will randomly "unselect" it and then randomly reselect at another point in the movement. For example, if I were to start mouse-selecting the above paragraph, starting with "movement." and then moving backwards, it might select as far as "reselect", but then the selection would disappear, only to start selecting again from "will randomly". I realize this would sound like a clear-cut case for a hardware issue in the mouse button, but I've narrowed out that that's not the case. The problem doesn't happen if I drag-move/drag-select slowly. But I can make the problem very apparent if I click and drag something fast. For example, if I click and hold the title bar of a window, and then start quickly dragging it around in circles across my monitor, the window will get "dropped", and a new window will get picked up in the process. Additionally, if I right-click anywhere to get a context menu (in Windows, programs, anywhere/everywhere), and then relatively quickly press the left mouse button to select something on the context menu, the context menu will disappear as if I had clicked "through" it. I haven't had any driver changes, system updates, or significant software changes/updates/installations recently, that might be a precursor to this issue. Again, the oddity seems to be the "speed" of action. Another note -- it seems that "lag" has a bit to do with it. If I click and drag a window around quickly, it might start to "lag" a tad bit, like it's perhaps moving too fast for Windows to keep up with the refresh/redraw rate, and that's usually synonymous with this odd deselect bug happening. (Batteries fully charged, no damage or recent changes to mouse, no changes that might affect/block wireless communication)

    Read the article

  • Is it worth replacing mouse by standalone trackpad for heavy code-editing? [on hold]

    - by heltonbiker
    I recently got more interested in improving my tools, workspace and worflow. The first sting came with a sore finger due to a crappy keyboard, and then after some research I fell in love with the "mechanical keyboard is what you need" doctrine, bought one (cherry MX Brown if you're curious), and am very happy with the results. Currently I am replacing my previous text editor (Geany) with Sublime Text 3, and am also very happy and feeling much more powerful and professional :) Well, but while I re-read all the ancient debates about VIM vs whatever-else, the following excerpt from a blog post got me thinking again about the mouse vs keyboard, and the "moving around from the very home row" (in VIM) versus gesturing away with the tiny and unstable mouse cursor: Reaching for a mouse may indeed slow you down, but developers are commonly on machines where the trackpad is a micro-hand movement away. Most novice programmers can click on a character on screen faster than an expert Vimmer can type 20jFp; or LkEEE or /word or any other nasty way Vimmers have to use. The point of a mouse is to make arbitrary on screen jumps efficient, and it’s very good at doing that. Don’t you ever think you can beat a mouse. Well, although there is some bitterness in this statement, it makes a lot of sense, and EVEN MORE if you consider your direct input to be a TRACKPAD conveniently placed in front of your spacebar (which oddly is where I like to put my mouse, rotated 90° ccw, due to a serious tendonitis in my right shoulder, already healed, but you knod...). So, the question is: Has anyone replaced mouse by a standalone trackpad, to work in code editing in a desktop machine (that is, with a sandalone keyboard)? Was it worth the change?

    Read the article

  • Mouse wheel scrolling in less and vim using urxvt

    - by Adam Batkin
    I have started working with rxvt-unicode (aka urxvt) but found an issue with mouse-wheel scrolling, as compared to gnome-terminal and konsole. The mouse wheel works fine for going through the scrollback buffer, but it doesn't work for automatic scrolling in less/most or vim (though in vim, setting mouse=a makes it work, but in a very different way, which I don't have to do with gnome-terminal/konsole). Is there a way to make urxvt behave like gnome-terminal and konsole when in less and vim where the mouse wheel Just Works?

    Read the article

  • USB mouse disconnecting and reconnecting randomly and often

    - by Marc
    Specs: Q6600, evga 780I sli mobo, 4gig RAM, logitech MX518, windows 7 64bit, evga gtx 260, 650W power supply (single rail) The problem I am having is my mouse will reconnect/disconnect (will even hear the sounds from windows) and the light on the bottom of the mouse will turn off/turn on as it starts working again. It really sucks to be playing a game (and happens on desktop as well) for the mouse to just die out for a few seconds and come back. Sometimes it will not happen for days and other times it will do it 2 or more times within 15 seconds. I have tried two different wired mice, have tried multiple USB ports (on front of computer, back of computer, have also used a USB hub and have also plugged in a card that connects to the USB connectors on the motherboard and adds a few usb ports to the back of the computer, and I also bought a USB 2.0 PCI card and that did not help). Nothing else seems to reconnect like this, my usb keyboard has never once cut out like the mouse does and neither have any of the other devices I have connected (webcam, usb hub, various devices sometimes connected through usb cables, and IR reciever for windows media center remote). I have disconnected all usb devices except for my keyboard and mouse and the problem still occurs. I guess it could be something wrong with my motherboard but since no other devices behave similarly I'm just hoping that it is some kind of driver conflict. Installing logitech's drivers has had no effect. It seemed at first that if I go to device manager and uninstall HID-compliant mouse (that and logitech mx518 are listed) that would fix it but it doesn't seem to work anymore or at least not every time (it keeps reinstalling). I have googled "usb mouse disconnects and reconnects" and it seems to be fairly common but none of those were resolved. To stick some easy steps: It happens with or without the drivers installed It has happened with multiple mice on the same computer Bios is the latest version (P08) Motherboard drivers are the latest version Device manager is listing no problems on any USB devices Happens with every usb port, even addon usb cards Happens when all usb devices aside from mouse and keyboard are unplugged I read that maybe it is an IRQ conflict and I tried to look into that but did not really know what was going on, but didn't see anything obviously wrong. Thanks for any help guys, its driving me crazy!

    Read the article

  • Mouse and touchpad move at different speeds

    - by Juan Manuel
    I have a compaq 610 running windows 7, and I use a USB mouse on it. The pointer speed is different for the mouse and the touchpad, so when I go to a meeting and take the notebook but not the mouse, the pointer moves too slow using the touchpad and I have to manually adjust it (of course when I return, I have to slow it down because the mouse would move the pointer too fast). Is there any way to fix this, or to have this setting separate for both devices?

    Read the article

  • Use mouse wheel with numpad using ahk?

    - by MrSnipyCat
    I'm on a laptop without a mouse. This means I don't have the middle mouse button/wheel. I tried to use ahk to make my numpad act like a mouse wheel with the middle mouse button. Numpad8::WheelUp Numpad2::WheelDown Numpad5::MButton The problem is that it scrolls up/down 2 times (when I click and release the button). How do I make the wheel scroll only once when I hit the button and not again after releasing it?

    Read the article

  • Perfect solution to enable both two finger scrolling and edge scrolling in Ubuntu 13.10 permanantly

    - by Habi
    Recently, I have upgraded from 13.04 to 13.10. First, I found problem in edge scrolling. After surfing in net about the problem I came to know that Ubuntu 13.10 has default two-finger scroll option enabled in Mouse and Touchpad setting. After unchecking two-finger scroll edge scrolling was enabled. In windows, I have used both feature. How can I use both two finger scrolling and edge scrolling in Ubuntu 13.10 permanently so that the setting won't reset even after I restart, shutdown or suspend my laptop.

    Read the article

  • Replacement mouse "feet"?

    - by Jeff Atwood
    The plastic skid pad "feet" on the bottom of my Logitech G9 mouse (which I love!) are getting rather worn down -- to the point that the outer shell of the mouse scrapes on the mousepad a bit. I've had the mouse for about ~2 years now so it does get a lot (I mean lot of use). But, I hate to buy a new mouse when I only need replacement "feet". Where can I obtain replacement mouse feet? Is this even possible?

    Read the article

  • Disabling horizontal scrolling using mouse wheel

    - by Carlos
    Hello, I am using Windows 7 x64 on an iMac (via BootCamp) with the button-less Magic Mouse that comes with the iMac. I would like to disable the horizontal scrolling that happens when you move slightly the finger horizontally while doing a vertical scrolling. In the Control Panel, Mouse section, Wheel tab, Horizontal Scrolling section, the minimum value that you can enter is 1, not 0. Is there a way (in the Registry) to disable horizontal scrolling using the mouse wheel? Or to set that value to 0 to see if it does the trick? Notice that this is a Windows specific question, not Mac OSX or Apple or Magic Mouse question, it can apply to any mouse in Windows whose wheel supports horizontal scrolling apart from vertical scrolling.

    Read the article

  • Back / Forward mouse buttons do not work in VMWare Workstation 6.5 Guest OS

    - by Tim Lara
    I am using a Logitech G9 mouse and running VMWare Workstation 6.5.3 on Vista x64. The guest OS is Win XP, and has the most current version of VMWare Tools installed. Left / right buttons and mouse wheel scrolling work fine in the guest OS, but the back / forward buttons are apparently not recognized. I have tried installing the Logitech software inside the guest OS as well, but it still did not recognize the back / forward buttons. (I didn't really expect this to work since the guest OS doesn't actually see the mouse hardware as a Logitech G9 directly anyway.) I vaguely remember seeing something a while back about editing the virtual machine config file to specify a 5-button mouse rather than the default 3-button setup, but I can't seem to find any specifics on how to do so in the VMWare documentation. Does anyone know if such a workaround exists, or is 5-button mouse functionality just not supported?

    Read the article

  • Mouse clicks stop working sometimes

    - by AlbertoPL
    I am having a serious issue with my mouse in which it will randomly not be able to click or cause other problems. Here is the breakdown: Sometimes, I can no longer left-click on many of my windows/taskbar (in order to focus them). Even though I can still left click on my desktop icons or the currently active window, I cannot focus any of the others. Other times, when I have a browser open, I will hit to go back one page and it will automatically go forward one page. I know it's a mouse issue because this behavior stops when I unplug the mouse. Things will be fine when I plug the mouse back in, but eventually the behavior starts up again. My mouse is a Razer Diamondback 3G and I am running Windows 7 Professional 32 bit. Any ideas?

    Read the article

  • Gateway NE56R & mouse swipe gesture...how to disable?

    - by Anders
    Can anyone tell me how to shut off the swipe gesture mechanism on my computer? It's driving me crazy. I cannot use a single application without having my computer screen minimize every time I move my hand over the mouse following a mouse-click, pointer movement, etc. Having to maximize my spreadsheets, documents, and applications so much is undercutting my productivity. How some software engineer/inventor imagined that this mouse/gesture swipe gimmick would be helpful to computer users is inconceivable to me. It is a massive annoyance. I've found instructions online for disabling this obnoxious feature, but all the instructions involve messing with my registry, which I don't want to do. I will be SO GRATEFUL to any techie who can tell me how to disable this horrible mouse swipe mechanism without having to alter my registry! I'm using a Gateway NE56R Notebook, Windows 7 operating system, and an Inland USB Mouse (model no. 37535). Thank you in advance!

    Read the article

  • Microsoft Wireless Mouse 5000 Scroll Not Working

    - by Nathan Totten
    I have a Microsoft Wireless Mouse 5000 with Intellipiont 7.1 installed on Windows 7 x64. The scroll has stopped working before, but a restart or two always seemed to resolve it. I tested the mouse on another computer and it worked. I also tested an Microsoft Arc mouse on this computer and the scroll worked. I have checked everything I could find on google and nothing helps. I have reinstalled intellipoint two times. Tried to change my mouse to another model in the intellipoint settings as suggested in many forums. Nothing. If anyone has any suggestions that would be great. Otherwise, I think my next step is to pitch this mouse and get a logitech at Best Buy tomorrow.

    Read the article

  • Dedicated Mouse and Keyboard on VirtualBox VM

    - by Myersguy
    Currently I am trying to run VirtualBox on my second monitor, with a dedicated mouse and keyboard. However, doing so has not proven easy. There has been times where the mouse works, but not the keyboard, vice versa, or nothing works at all. The biggest problem I am running into is this: When enabling the USB mouse and keyboard from the VM, I get an error: 'USB Device is busy with a previous request.' The only thing that is using second mouse and keyboard, however, is Windows. The other error I have received stated that the VM was unable to create a proxy for the device. Additionally, the VM occasionally will disable the secondary keyboard entirely, requiring me to unplug and replug it into my PC to re-enable it again. Keyboard auto-capture is disabled, and while a solution I was reading online stated to turn off mouse integration, that option is grayed out on my machine.

    Read the article

  • Mouse and keyboard focus problem

    - by heffaklump
    I have two Chrome windows side by side. I click a link in window#1, ok. Now I want to switch to window#2 and click anywhere in the window. Noting happens. Sometimes the cursor switch to make-bigger-window style. If I click in the top part of current window. And then in the top part of next window I can switch focus so the other window works. Another problem is that the keyboard focus can get stuck in one window. I can click on things in one window but when using the keyboard it will change the first window. Only by closing the window that has the focus, it will release keyboard. What is this madness? Another problem not related is that sometimes I get logged out. Just like that.

    Read the article

  • Disabling mouse acceleration in Mac OS X

    - by aib
    I've been looking for a solution to the unusable mouse problem in Mac OS X for ages. I've tried a gazillion programs and fiddled with every setting there is or there can be added. So far, I haven't found a way to get linear mouse response in Mac OS X. At this point I'm seriously considering installing another operating system. But before I do that, or go hacking around OS binaries, maybe someone here has a solution? I want linear mouse response. I want high sensitivity. I like my touchpad acceleration and would like to keep it if possible. Any ideas? P.S. I've been at this for a long time, I'll probably have already tried the most popular answers. I'm running Mac OS X 10.6.5 on a MacBook Pro. I don't use a particular brand of mouse. I'm not looking for any commercial solutions. I've tried: Mouse Acceleration Preferences Pane, the Snow Leopard version of which can get me close to a linear response, but at the cost of tracking speed (sensitivity). Answers on this question: Make Mac OS X mouse acceleration more Windows-like About every code snippet I found via Google.

    Read the article

  • Closing laptop lid and using external display causes mouse to move on it's own

    - by PolishHurricane
    I plugged my ASUS Taichi Laptop into an external monitor via the VGA Adapter that it comes with. It was working fine, but then I configured a power option so I could shut the lid without it going to sleep (so I could use just the external monitor with an external keyboard/mouse). Problem is though, now, when the lid is closed and I move the mouse, the mouse is moving around on it's own, but when I open the laptop lid back up, the mouse is fine. I looked under the lid when it was closed and the display properly shuts off on the laptop. It's not the external mouse/keyboard because I completely unplugged them and it was still happening. Nobody is hacking me or anything, I totally went into airplane mode/pulled the wire. I have a touchscreen, but I put a piece of paper over it and it wasn't doing it. I was thinking it might be the trackpad being touched somehow by the screen when the lid is closed? But I went into windows 8 control panel options and I couldn't find anywhere to disable it (it sees the USB mouse I think).

    Read the article

  • Is it possible to configure Apple's Magic Mouse to be recognised on start up?

    - by Dave
    This question may apply more roundly to all bluetooth mice but in my case I am dealing with an Apple Magic Mouse. I have followed the set up instructions here; https://wiki.ubuntu.com/Multitouch/AppleMagicMouse closely. I have even removed the mouse and started from scratch more than once repeating each step described carefully. Every time the computer is started it does not see the Magic Mouse by default. I need to keep a wired mouse connected to the computer at all times which I use to log in with then connect the Magic Mouse, in a somewhat counter-intuitive exercise! Any help would be greatly appreciated.

    Read the article

  • usb mouse connecting and disconnecting randomly and often

    - by Kalec
    Yes, I know this question has been asked here before but I can't add to the discussion over there and it did not help me, so here goes nothing. I've bought an acer aspire 5742G about 2 months ago or so and it's been running great, but sometimes I used to hear the windows error beep but I had no idea what was causing it since the "bug" was automatically fixed so fast I couldn't even see an error message (also it kinda always happened when I was busy also, either in a game or while doing my homework). Later on my mouse would simply not work for 3-5 seconds then work again, I thought nothing of it at the time. I also had a problem where it only worked in one usb and one only ... to move it I had to remove the battery, unplug the laptop and hold the power button for 2 minutes to reset the bios settings. Since today though it went nuts ... sometimes it disconnects / reconnects 12 times in 10 seconds and windows just keeps beeping till I unplug it, then it runs smooth for 5-6 minutes then it goes nuts again. Other times it seems like it skips (disconnects for a fraction of a second) other times just for 2-3 seconds. But this is incredibly frustrating. Sometimes the power just goes down (the laser turns off) and well that at least I would understand but this is a rare occurance. Now I know the usb ports work since I have a lot of other devices connected and I tried the mouse on a room m8's laptop so the mouse also works. My only conclusion is that it's an operating system / settings bug and / or problem (I have tried the mouse in all ports by the way). All drivers and bios are up to date (maybe except mouse but i can't seem to update that and the mouse has no name, just a serial number which helps with nothing. Still it worked till today and nothing should have changed any way). I have made sure windows can't shut it down to save power (in device management). Also I tried to delete the drivers and re-install them, rebooting and the power button trick but nothing ... most I have done is get rid of the 12 discconnects / reconnects every 10 seconds :) but that's all :( I would buy a new one but I'm afraid it might do the same thing :| ****EDIT****** Tried the mouse again at a friend but now it didn't even install it's software nor did the update work ... think I'll just buy a new one but I'd still like a suggestion at least so I'll leave this open

    Read the article

  • USB mouse connecting and disconnecting randomly

    - by Kalec
    I've bought an acer aspire 5742G about 2 months ago or so and it's been running great, but sometimes I used to hear the windows error beep but I had no idea what was causing it since the "bug" was automatically fixed so fast I couldn't even see an error message (also it kinda always happened when I was busy also, either in a game or while doing my homework). Later on my mouse would simply not work for 3-5 seconds then work again, I thought nothing of it at the time. I also had a problem where it only worked in one usb and one only. To move it I had to remove the battery, unplug the laptop and hold the power button for 2 minutes to reset the bios settings. Since today though it went nuts. Sometimes it disconnects / reconnects 12 times in 10 seconds and windows just keeps beeping till I unplug it, then it runs smooth for 5-6 minutes then it goes nuts again. Other times it seems like it skips (disconnects for a fraction of a second) other times just for 2-3 seconds. But this is incredibly frustrating. Sometimes the power just goes down (the laser turns off) and well that at least I would understand but this is a rare occurrence. Now I know the usb ports work since I have a lot of other devices connected and I tried the mouse on a room m8's laptop so the mouse also works. My only conclusion is that it's an operating system / settings bug and / or problem (I have tried the mouse in all ports by the way). All drivers and bios are up to date (maybe except mouse but I can't seem to update that and the mouse has no name, just a serial number which helps with nothing. Still it worked till today and nothing should have changed any way). I have made sure windows can't shut it down to save power (in device management). Also I tried to delete the drivers and re-install them, rebooting and the power button trick but nothing. Most I have done is get rid of the 12 disconnects / reconnects every 10 seconds :) but that's all :( I would buy a new one but I'm afraid it might do the same thing. ****EDIT****** Tried the mouse again at a friend but now it didn't even install it's software nor did the update work. Think I'll just buy a new one but I'd still like a suggestion at least so I'll leave this open #### EDIT 2 Now it works again, I can't explain this. Still thinking of getting a new one though

    Read the article

  • Mouse Error Code 24. Windows 7

    - by Cj.
    I've had the same mouse for a while, and it's been working fine until one day, it started giving me a message about a device not working properly. I tried updating the drivers, and re-installing, I even deleted old drivers in case my computer should be a little confused. It never made a difference, and my mouse seemed to be working just fine despite getting the permanent error in my device manager, I looked it up several times online, but I never found anything I could actually use, when I go to official websites, I always get the same response "plug in so so into a different place - drivers - install silverlight before you can watch this tutorial, try it on a different machine". so I gave up on that. But now is where I have a real problem, lately, my little strange error evolved into a fullblown Error 24, and my mouse is starting to turn on and off randomely, especially when it is being used, but I do hear it go "badum..dadum" when I'm off doing something else. when I looked up error code 24, I really didn't find much other than it meaning: Code 24 This device is not present, is not working properly, or does not have all its drivers installed. (Code 24) Cause The device is installed incorrectly. The problem could be a hardware failure, or a new driver might be needed. Devices stay in this state if they have been prepared for removal. After you remove the device, this error disappears. But, I have tried uninstalling the device entirely several times, and it'll go right back to its previous state with error 24, and turning on and off randomely. what do I do? I cannot afford taking it to a repair place, I can't really afford a new mouse either, I refuse to buy cheap ones as I am a gamer, in need of more than 3 buttons, and a good grip is important. Could there possibly be some confusion in the registry? I do remember having gotten some early problems after I converted my vista to windows7. But I hardly dare going in there unless I'm 100% certain of what I'm going for, and I can honestly say I am at a loss here. Edit: it is a USB mouse we're talking about here. MX™518 Optical Gaming Mouse (logitech) Edit2: I am seeing no rupture, so it must be on the inside of my mouse, or inside the rubber, protecting the cable, that would be really inconvenient to search for

    Read the article

  • Resizing an image using mouse dragging (C#)

    - by Gaax
    Hi all. I'm having some trouble resizing an image just by dragging the mouse. I found an average resize method and now am trying to modify it to use the mouse instead of given values. The way I'm doing it makes sense to me but maybe you guys can give me some better ideas. I'm basically using the distance between the current location of the mouse and the previous location of the mouse as the scaling factor. If the distance between the current mouse location and the center of of the image is less than the distance between previous mouse location and the center of the image then the image gets smaller, and vice-versa. With the code below I'm getting an Argument Exception (invalid parameter) when creating the new bitmap with the new height and width and I really don't understand why... any ideas? private static Image resizeImage(Image imgToResize, System.Drawing.Point prevMouseLoc, System.Drawing.Point currentMouseLoc) { int sourceWidth = imgToResize.Width; int sourceHeight = imgToResize.Height; float dCurrCent = 0; //Distance between current mouse location and the center of the image float dPrevCent = 0; //Distance between previous mouse location and the center of the image float dCurrPrev = 0; //Distance between current mouse location and the previous mouse location int sign = 1; System.Drawing.Point imgCenter = new System.Drawing.Point(); float nPercent = 0; imgCenter.X = imgToResize.Width / 2; imgCenter.Y = imgToResize.Height / 2; // Calculating the distance between the current mouse location and the center of the image dCurrCent = (float)Math.Sqrt(Math.Pow(currentMouseLoc.X - imgCenter.X, 2) + Math.Pow(currentMouseLoc.Y - imgCenter.Y, 2)); // Calculating the distance between the previous mouse location and the center of the image dPrevCent = (float)Math.Sqrt(Math.Pow(prevMouseLoc.XimgCenter.X,2) + Math.Pow(prevMouseLoc.Y - imgCenter.Y, 2)); // Calculating the sign value if (dCurrCent >= dPrevCent) { sign = 1; } else { sign = -1; } nPercent = sign * (float)Math.Sqrt(Math.Pow(currentMouseLoc.X - prevMouseLoc.X, 2) + Math.Pow(currentMouseLoc.Y - prevMouseLoc.Y, 2)); int destWidth = (int)(sourceWidth * nPercent); int destHeight = (int)(sourceHeight * nPercent); Bitmap b = new Bitmap(destWidth, destHeight); // exception thrown here Graphics g = Graphics.FromImage((Image)b); g.InterpolationMode = InterpolationMode.HighQualityBicubic; g.DrawImage(imgToResize, 0, 0, destWidth, destHeight); g.Dispose(); return (Image)b; }

    Read the article

  • Do I have to 'remove' and 're-attach' Magic Mouse when switching between Snow Leopard and Windows 7?

    - by Teerasej
    I am deciding to buy an Apple Magic Mouse but I am wondering about the method which I have to use with Apple's Mighty Mouse: CASE 1: If I am using OS X and switching to Windows 7: Remove Mighty mouse from Bluetooth device Reboot in Windows 7 Add Mighty mouse as new Bluetooth device in Windows 7 CASE 2: If I need to switch back to OS X: Remove Mighty Mouse from Windows' Bluetooth device list Reboot in OS X Add Mighty mouse as new Bluetooth device in OS X Do I still need to proceed in this way with the Magic Mouse or not?

    Read the article

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