The best approach is to add an ApplicationSettings in the settings tab of your project property.
Call this property, for example, "ImagePath"
and set this property to your default development path.
After doing that, you will have an entry in your app.config file (that becomes, when compiled YourApplicationName.exe.Config
) with the value of your default path.
<applicationSettings>
<YourAppNamespace.Properties.Settings>
<setting name="ImagePath" serializeAs="String">
<value>C:/Users/user/Documents/College Work/4th ......</value>
</setting>
<(YourAppNamespace.Properties.Settings>
</applicationSettings>
This file will be distributed with your application and you could change that path using your deployment procedure.
In code you could refer to the path stored in the config file using
string imagePath = Properties.Settings.Default.ImagePath;
pictureBox2.Image = Image.FromFile(Path.Combine(imagePath, Quiz1FromFile.Q1Ans, ".jpg"));
In this way you don't hard code the path to your image folder inside the application and you don't need to handle relative paths. You have only to set this value on the target machine to the storage of your image files.