Donate. I desperately need donations to survive due to my health

Get paid by answering surveys Click here

Click here to donate

Remote/Work from Home jobs

c# capture WindowClass #32770 dialog and Select Number of Copies and Click Print Button

valuable members of the forum. I want your help;

ahk_class # 32770, I want to wait for the print dialog. After the dialog window opens, I want to make the copy number of the "Edit5" box, which is the number of copies box, 2, then press the Print button.

How do we get this with c # encoding? Thank you

print dialog menu class code "#32770"

copy number box name "Edit5"

Print button name "Button13"

[DllImport("user32.dll", SetLastError = true)]
public static extern IntPtr FindWindowEx(IntPtr parentHandle, IntPtr childAfter, string className, string windowTitle);

 void FindPrintDialog()
{
    var handle = IntPtr.Zero;
    do
    {
        handle = FindWindowEx(IntPtr.Zero, handle, "#32770", null);
        if (handle != IntPtr.Zero )
             MessageBox.Show("Print dialog found");
    } while (handle != IntPtr.Zero);

}

The code I found above captures the # 32770 class window. but after that I could not.

Send "2" digits to Edit5 box, Click the "Print" button named Button13.

I would like your help for this part.

I would like your help for this part.

Comments