add html game to c# from
I 开发者_JAVA百科need some help with a C# problem. I added a HTML game I made in flash to my form, using the WebBrowser control. It works perfectly but I would like to make the url relative to the drive the program is running from. for example I am saving it to a flash drive (E:/) but if i take the flash out and connect it to another computer, the flash will most probably not be associated with the E:/ drive, so that I'll have to edit the url in order to get it working. I desperately need this because this for a major project in school. :D
You should use relative paths like .\flash\myGame.flv
, where .
(dot) mean your programm's directory.
You can get more about relative paths here.
精彩评论