In this paper we use the Isogeometric method to solve the Helmholtz equation with nonhomogeneous Dirichlet boundary condition over a bounded physical domain. Starting from the variational formulation of the problem, we show with details how to apply the isogeometric approach to obtain an approximation of the solution using biquadratic B-spline functions. To illustrate the power of the method we solve several difficult problems, which are particular cases of the Helmholtz equation, where the solution has discontinuous gradient in some points, or it is highly oscillatory. For these problems we explain how to select the knots of B-spline quadratic functions and how to insert knew knots in order to obtain good approximations of the exact solution on regions with irregular boundary. The results, obtained with a our Julia implementation of the method, prove that isogeometric approach produces approximations with a relative small error and computational cost.