how to simulate the right mouse button in programs

  • Thread starter Thread starter sandro72
  • Start date Start date
S

sandro72

hi, i need to simulate the right mouse click and choose an option.
i want to use (in .net) the option "print" that appear when i right-click on
..doc file and be able to change the printer before and after the print.
can i launch word from command line forcing it to print a document?

thanks
 
* "sandro72 said:
hi, i need to simulate the right mouse click and choose an option.
i want to use (in .net) the option "print" that appear when i right-click on
.doc file and be able to change the printer before and after the print.
can i launch word from command line forcing it to print a document?

\\\
Dim p As New System.Diagnostics.ProcessStartInfo()
p.Verb = "print"
p.WindowStyle = ProcessWindowStyle.Hidden
p.FileName = "C:\filename.doc"
p.UseShellExecute = True
System.Diagnostics.Process.Start(p)
///
 
I found the classes you wrote of but it doesn't work. i tested also this
code but it cretaes instances of worpad.exe that i only see

by task manager. have you any ideas?



Dim pr As New System.Diagnostics.Process

pr.StartInfo.WindowStyle = Diagnostics.ProcessWindowStyle.Normal

pr.StartInfo.CreateNoWindow = False

pr.Start("C:\Programmi\Windows NT\Accessori\wordpad.exe")
 
Back
Top