Metal window frames are usually made from aluminium. While removing the windows from the frames is the only way to fully paint them, including the tracks in which the windows slide, you can still repaint the frames in their visible areas if you can't remove them. Wait for a time when the weather has been at 15.6 to 23.9 degrees Celsius for a few days and is expected to stay there. This reduces cracking and bubbling because of temperature variations. According to master builder Tim Carter, painting aluminium requires an oil based-primer and an acrylic topcoat.
Clean the window frame with a powdered abrasive cleaner and a damp cloth to remove oil, dirt and loose paint, then wipe away any cleaner residue with a fresh damp cloth. Allow it to dry thoroughly, then tape off the glass as close to the frame as possible, using painter's masking tape to protect it from stray brushstrokes.
Thin 1 qt. of oil-based primer with 1/4 cup of paint thinner and mix thoroughly. Paint this onto each part of the metal window, using long brush strokes in one direction (rapid back-and-forth strokes can create air bubbles). Use a quality brush to avoid losing brush hairs into the paint. Allow the frame to dry in one position, such as with the window closed.
Slide the window to the other (open) position and paint any remaining metal. Allow the primer to dry.
Apply the acrylic enamel to the frame, using a quality brush and long brushstrokes in one direction. Allow the frame to dry, then shift it to the second position and apply the paint to the exposed areas.
Paint fumes can be toxic. Always paint in a well-ventilated area.