voici le code que j'utilise pour générer un fichier texte. Je veux que mon fichier se génère dans le dossier d'installation de l'application :
Dim mydocpath As String = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) Using sw As New StreamWriter(mydocpath & Convert.ToString("\WriteLines.txt"),True)
sw.WriteLine(installedprinter) sw.WriteLine(papersize) sw.WriteLine(papersource) sw.WriteLine(pageorientation) sw.WriteLine(margingauche) sw.WriteLine(margindroit) sw.WriteLine(marginhaut) sw.WriteLine(marginbas) End Using
Cependant, on dirait que tu veux enregistrer les paramètres de l'imprimante, pour j'imagine les recharger par la suite.
Il s'agit donc d'une configuration de ton application.
14 nov. 2017 à 17:57