It's working
You need to add the Reference (Microsoft Windows Image Acquisition Library) or WIA.
in the code replace powerImage to PIctureBox
that's it
I hope it will work for you
Public Shared Function ScanDocs() As Image
Dim CD As New WIA.CommonDialog
Dim F As WIA.ImageFile = CD.ShowAcquireImage(WIA.WiaDeviceType.ScannerDeviceType)
' set your own folder
Dim strTempfile = "Your Folder Here" & Format(Now, "MMddyyyyhhmmssms") & (1000 * Rnd()).ToString & ".tmp"
Dim pic As New PictureBox
F.SaveFile(strTempfile)
pic.Image = New Bitmap(strTempfile)
Return pic.Image
End Function