Domanda

I have created an application in C#/visual studio 2010.

In that application, i have some background images for software.when i select to change the background of software, it goes to that folder for file selection.

It is working well on win7, but it is not working on winxp on client's system.He says that it goes to last opened folder.

I have set the initial directory path but not working on xp.

È stato utile?

Soluzione

Sounds like you need to set the InitialDirectory property of the Dialog.

Setting it to something like 'My Documents' can be done by setting it to:

   openFileDialog1.InitialDirectory = System.Environment.GetFolderPath(System.Environment.SpecialFolder.MyDocuments)

Altri suggerimenti

Make sure FileDialog.RestoreDirectory = false; this should solve your problem.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top