What are the best possible ways to prevent melanoma?

Sunscreen+avoidance. It is generally thought that the best way to prevent melanoma is to avoid excessive sun exposure and to use sunscreen. However those measures will not completely protect someone from developing melanoma, particularly if they have sun sensitive skin or a family history or skin cancer or melanoma.
Sun protection. The main risk factor you can control is sun exposure. Apply high protection sunblock early and often, and wear appropriate full length clothing as much as possible (clothing designed for sun shielding will keep you comfortable, cool and safe). If you have any suspicious lesions, get them checked out asap. Early detection of melanoma is critical to a good result. See www.Melanomafoundation.Org.
Sunscreen. Limiting your exposure to uv radiation is the most important way. Never use a tanning bed. Wear sunscreen cover up as much as possible with long sleeves and a hat if you are going to be outside for prolonged periods of time. In addition see your friendly dermatologist for complete skin examinations.