Help
cancel
Showing results for 
Search instead for 
Did you mean: 
Copilot Lvl 3
Message 1 of 11

Readfile ... Save Binary Data

Hi All

Possible To Get Data From Scanner By ReadFile Function When Scanner Start Then Save And Load In Image Control ?
10 Replies
Commander Lvl 3
Message 2 of 11

Re: Readfile ... Save Binary Data

HI @Gerailly ,

 

To properly answer your question we really need a bit more information to work with. Please try to provide use with your goals, what you've already tried and how (approximately) you want to achieve your goal.


- Mark
Copilot Lvl 3
Message 3 of 11

Re: Readfile ... Save Binary Data

I Want To CreateDc Then Connect To Scanner And Preview Scan On DC Like Scanner Device ... EveryBody Can Dc In Screen And Load Bitmap File Into
Copilot Lvl 3
Message 4 of 11

Re: Readfile ... Save Binary Data

Hi

CreateDc Then Connect To Scanner And Show Scan Into Dc ... Example SomeBody Create Dc In Screen And Load Bitmap File Into.
Commander Lvl 3
Message 5 of 11

Re: Readfile ... Save Binary Data

We really need more information to work with. At the minimum, provide:

  • What programming languages and/or techniques (frameworks, etc.) are involved?
  • What are you trying to achieve?
  • What have you already tried to do?
  • Where exactly lies the problem in your code
  • Some example code or a repository

- Mark
Commander Lvl 3
Message 6 of 11

Re: Readfile ... Save Binary Data

Can you please point out where exactly you are having trouble with your code, and post your code in a way that makes it easier to read?

 

Also, could you please tell us if this article (https://www.w3schools.com/tags/av_prop_duration.asp) answers your question? It seems to cover what you are trying to achieve.

 


- Mark
Highlighted
Pilot Lvl 3
Message 7 of 11

Re: Readfile ... Save Binary Data

Several people have written samples of talking to a scanner in Windows. For example.

 

If your confusion is regarding the display of an image on the screen, in Winforms the easiest way to do it is via a PictureBox.

 

Using CreateDC to draw to the screen is incorrect: you want to use GetDC.

Copilot Lvl 3
Message 8 of 11

Re: Readfile ... Save Binary Data

Unfortunately I Work On Ms-Access And No Have PictureBox And Property hwnd .... So I Cannot Connect To Scanner So That Display Peview In DC .. Example EveryBody Can LoadImage In Display

Dim hDC
Dim rcBmp As RECT
hDC=GetDC(0)
GetClientRect hDC,rcBmp
hBitmap=CreateCompatibleDC(hDC)
SelectObject hDC,GetStockObject(BRUSH_PEN)
Rectangle hdc,100,200,200,400
BitBlt hDC,....
??? When Scan The Document .... Possible To Load into DC Not Save


Pilot Lvl 3
Message 9 of 11

Re: Readfile ... Save Binary Data

What you need to do is get the window handle (hWnd) of the control you wish to draw to. Once you have the hWnd, you can call GetDC() to get a device context.

 

Possible relevant links: here here here here

 

Copilot Lvl 3
Message 10 of 11

Re: Readfile ... Save Binary Data

Unfortunately I CouldNot Rotate Text To PrintPreview Of Access Report With GetDc ,CreateFontIndirect,TexoutA Just Send To Screen Not PrintPreview So That I Can Able To See Rotate Text In Print Event Of Detail ... Because In Access Report Just Detail Have Print 's event ... Here Maybe Somebody Try Copy RotateText To PrintPreview ,,, Maybe I m Wrong And Cannot Do it .... Even I Wanted To Change Color Of IDOK In MsgboxHook But It Is Impossible Because WM_PAINT Or WM_CREATE Not Working Here ... In This Next Problem Can Create Rectangle In x,y Position Of IDOK In Msgbox (#32770) But It Copy To Behinde It Not in I Think Static Area .