I'm a newbie in c# programming and I hope this is an easy question.
I have this code that was working fine on Visual Studio 2010 with WinXP:
SaveFileDialog saveFile2 = new SaveFileDialog();
saveFile2.InitialDirectory = "C:\\BARCODE";
saveFile2.FileName = "modulaListaV.txt";
saveFile2.DefaultExt = "*.txt";
//saveFile2.Filter = ".txt File|*.txt";
SendKeys.Send("{ENTER}");
if (saveFile2.ShowDialog() == System.Windows.Forms.DialogResult.OK &&
saveFile2.FileName.Length > 0)
{
richTextBox3.SaveFile(saveFile2.FileName, RichTextBoxStreamType.PlainText);
}
After I moved to Win 7 and Visual Studio 2015, it's not firing the ENTER key anymore.
I tried also to replace the SendKeys with this:
InputSimulator.SimulateKeyPress(VirtualKeyCode.RETURN); (had to add the specific .dll)
But that's not working either.
Anyone that can please help?
Thanks in advance.
Lorrido