I am creating a graphing calculator and am having a hard time getting the graphing part of it to work. I am using a picturebox to display the graph and i want the user to be able to type in values for the X and Y minimum and maximum values into textboxes and then have the graph be scaled accordingly. I would then like for the user to be able to move their mouse over the picturebox and have the X and Y coordinates of the mouse be displayed in separate textboxes. The problem i am having is converting the coordinates that visual basic tells me into the correct coordinates on the graph. My graphing area is 400*400 pixels and i need to convert the mouse coordinates of say (300,100) into correct values of lets say (5, 5) if the X and Y min values were -10 and the max values were 10. I was able to make it work for a graph with the X and Y min values of -10 and the max values of 10, but i need it to work for any values the user enters. Any help would be appreciated.