.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
Kaviya Balasubramanian
Imran Ghani
Post New Web Links

zoom on mouse down and dragging in winforms picturebox

Posted By:      Posted Date: October 21, 2010    Points: 0   Category :Windows Application
 

Hello,

I have found so many samples doing zoom on button click or on mouse wheel. But I am looking to zoom an image on mouse move. So if i do mouse down and then drag the mouse downside, the image should zoom in and if i drag the mouse on upside the image should zoom out.

Please help.

 


C# Developer


View Complete Post


More Related Resource Links

Seadragon mouse wheel motion zoom/zoomout not working

  
using following code.. vs 2008 andajaxtoolkit 3.5.40412.2what is is to be done to make it work? <form id="form1" runat="server"> <ajaxToolkit:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server"> </ajaxToolkit:ToolkitScriptManager> <ajaxToolkit:Seadragon ID="Seadragon2" Height="500px" Width="500px" runat="server" SourceUrl="dzc_output.xml" MouseNavEnabled="true" > </ajaxToolkit:Seadragon> </form>

Mouse scroll up and down event is not triggered on picturebox.

  

I have a picture box in my form and now I want to add an event so that if the mouse is scrolled up the scale of the picture box gets larger and when the user

scrolls down the size off the picture box gets smaller. This way I want to make a zoom in and out effect.

So now i have the following code in the mouse wheel event of the Picture box:

  

If 
e
.
Delta
 >
 0
 Then

Pboxmain.scale(1.1)
   

Else
      

Pboxmain.scale(0.9)
    

End If



 

But somehow this whole mouse wheel event isn't fired. Does anybody know what might be the problem here?

 


How to highlight datagrid or GridView row on mouse over?

  
This article will show how you can Ajax with GridView to display popup messages when mouse moves over certain column. In the demo project I have added first column as an image column with a help icon in it. This kind of implements a feature that if you want more information about the row you can move mouse over this icon, a asynchronous request is sent to server for data about that row and when call returns the returned message is show as a popup message.

Entity Framework 4 Tips for WinForms Development

  
I've been recently working on a smart client (WinForms) application backed by Entitiy Framework 4 (EF4) on Visual Studio 2010. In this blog post I will try to give you some tips regarding some limitations and points to be careful about EF4.

Wicked Code: Taking Silverlight Deep Zoom To The Next Level

  

With the help of Silverlight Deep Zoom and a remarkable control named MultiScaleImage, you can create scenes with many levels of zoom. Jeff Prosise illustrates with what else but the Mandlebrot set.

Jeff Prosise

MSDN Magazine July 2009


Netting C++: EEK!-Time to Design the Mouse

  

This month begins the design of the actual mouse class for EEK!

Stanley B. Lippman

MSDN Magazine December 2007


Cutting Edge: Context-Sensitive PictureBox Controls

  

Great ideas are timeless. A long time ago in Microsoft Systems Journal Paul DiLascia demonstrated a neat trick to display context-sensitive tooltips floating over pictures. As the user moved the mouse over the picture, the tooltip control updated its text to reflect the name of the pointed figure.

Dino Esposito

MSDN Magazine July 2006


Highlight gridview row on mouse hover in asp.net

  
The article Highlight gridview row on mouse hover in asp.net was added by uniquesaiful on Sunday, June 06, 2010.

Gridview control is a customizable and flexible control used to display data in tabular format. It has some nice features. But lacks of some client side features that makes web users happy. We can easily add these features with few lines of code. For

Buttons with Mouse-Over Behaviors - Redux

  
I recently posted some CSS and HTML snippets for a buttons collection I was using for a Menu style UI Scott Koon from www.LazyCoder.com posted a comment with a better way (thanks Scott). This way I don't have to set the CSS Class for each button. Just contain them in a div. Here is the [...] Read More......(read more)

How to capture ReportViewer Mouse Events

  

I have a ReportViewer which I'm pulling into a C# WPF project, and would like to be able to capture the row a user clicks on in the reportViewer, but have had no success tapping into the mouse event handlers.   Does anyone know how to accomplish this?  

This MSDN link seems to imply that ReportViewer(winforms) supports mouse click events such as Click, DoubleClick..etc.  http://msdn.microsoft.com/en-us/library/microsoft.reporting.winforms.reportviewer_events.aspx, but I've not had any luck.

If mouse events are not currently supported, does anyone know when they will be, and whether properties such as SelectedItem or SelectedIndex would also be exposed?

Thanks for the help.


Winforms Updating UI Asynchronously Pattern - Need to Generalize

  
  Setup: Main MDI form with a progress bar and a label. Code in Main form.   public delegate void UpdateMainProgressDelegate(string message, bool isProgressBarStopped); private void UpdateMainProgress(string message, bool isProgressBarStopped) { // make sure we are running on the right thread to be // updating this form's controls. if (InvokeRequired == false) { // we are running on the right thread. Have your way with me! bsStatusMessage.Caption = message + " [ " + System.DateTime.Now.ToShortTimeString() + " ]"; progressBarStatus.Stopped = isProgressBarStopped; } else { // we are running on the wrong thread. // Transfer control to the correct thread! Invoke(new ApplicationLevelValues.UpdateMainProgressDelegate(UpdateMainProgress), message, isProgressBarStopped); } } Code in Child Form private readonly ApplicationLevelValues.UpdateMainProgressDelegate _UpdateMainForm; private void btnX_Click(object sender, EventArgs e) { _UpdateMainForm.BeginInvoke("StartA", false, null, null); try { if(UpdateOperationA()) { _UpdateMainForm.BeginInvoke("CompletedA", true, null, null); } else { _UpdateMainForm.BeginInvoke("Cance

SendInput fails to control mouse in x64

  
I am currently working on a project in which I'm trying to make a program which can input mouse movements to click and drag objects. I've imported user32.dll and created my inputs exactly as the help info and pinvoke.net instruct so as to be able to send mouse inputs. Nevertheless, whenever I implement the SendInput function, it always returns that it successfully inserted 0 events into the keyboard and mouse input stream and when I run GetLastError, it gives me error 1400 INVALID_WINDOW_HANDLE. I've tried the same code on two different systems, both running in x64. One is XP and the other is Windows 7. Neither works. If you're interested in the code, it's basically a 64-bit version of Johnny Chung Lee's Wiimote Whiteboard program. I've made a few modifications, but the main gruntwork of the program is the same as his original. His stuff can be found here: http://johnnylee.net/projects/wii/

Best approach to handle concurrent requests in winforms

  
I have a windows client application which would be used many users. This application submit requests to run a workflow (note that this is not a WWF or WCF service, its a class library thats gonna do some processing). What would be the best approach to code this? Would processing each request on a separate thread be a correct way? I am a newbie at this. PLease help. Thanks!

Best approach to handle concurrent requests in winforms

  
I have a windows client application which would be used many users. This application submit requests to run a workflow (note that this is not a WWF or WCF service, its a class library thats gonna do some processing). What would be the best approach to code this? Would processing each request on a separate thread be a correct way? I am a newbie at this. PLease help. Thanks!   
Categories: 
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend