A method for operating a handling device for use in the mast of a drilling rig and for moving drill rods or drill pipe elements, wherein the handling device comprises a base which is vertically movable in or on the mast, wherein the handling device on the base has an arm movable about an axis of rotation, wherein the axis of rotation is parallel or at least substantially parallel with the mast or a movement path of the handling device in or on the mast, wherein the arm is pivotable about at least one pivot axis, wherein the pivot axis lies in a plane perpendicular or at least substantially perpendicular to the mast or a movement path of the handling device in or on the mast, wherein the handling device at a free end of the arm comprises a movable tool for gripping a portion of an end of a drill rod, wherein the handling device for moving drill rods or drill pipe elements is moved in a vertical direction in or on the mast and/or wherein the arm of the handling device is rotated about the axis of rotation and/or pivoted about the pivot axis, wherein the handling device is vertically movable in or on the mast on local front mast corner posts (22, 24) and for this purpose is guided on the front mast corner posts (22, 24), and wherein the tool of the handling device can be pivoted in any vertical position of the handling device in the direction of a drill hole centre axis or to the drill hole centre axis, characterised in that, to create drill pipe elements by means of the handling device a horizontally or at least substantially horizontally oriented first drill rod is received by means of the handling device in the region of the mast foot and is erected in a vertical orientation by means of a vertical movement along the mast, - the first drill rod is placed in the region of the mast by means of the handling device in the vertical orientation, - a horizontally or at least substantially horizontally oriented second drill rod is received by means of the handling device in the region of the mast foot and is erected in a vertical orientation by means of a vertical movement along the mast, - the second drill rod is pulled by means of the handling device by means of a vertical movement along the mast to a height in the region of the upper end of the first drill rod and - the second drill rod is positioned over the first drill rod by means of the handling device to obtain a drill pipe element in the form of a combination of the first drill rod and the second drill rod. - the first drill rod is placed in the region of the mast by means of the handling device in the vertical orientation, - a horizontally or at least substantially horizontally oriented second drill rod is received by means of the handling device in the region of the mast foot and is erected in a vertical orientation by means of a vertical movement along the mast, - the second drill rod is pulled by means of the handling device by means of a vertical movement along the mast to a height in the region of the upper end of the first drill rod and - the second drill rod is positioned over the first drill rod by means of the handling device to obtain a drill pipe element in the form of a combination of the first drill rod and the second drill rod.