|
-
Jan 23rd, 2004, 11:39 PM
#1
Thread Starter
Addicted Member
Screenshot problems . .. .
I have a huge amount of code and i found the line that is wrong. I am taking a screenshot, saving it to a temporary file (*.bmp) and opening it up for transfer via winsock. Could someone read over my code and tell me what is wrong? By the way my error is:
Variable uses an automtion type not supported in VB.
The error line is changed to a comment!
VB Code:
Private Sub Winsock3_DataArrival(ByVal bytesTotal As Long)
Dim PicDat
Winsock3.GetData PicDat, vbString, bytesTotal
If PicDat = "PICPLZ" Then
Dim hwnd&, hdc&
hwnd& = GetDesktopWindow()
hdc& = GetDC(hwnd&)
BitBlt Form1.hdc, 0, 0, Screen.Width / 15, Screen.Height / 15, hdc&, 0, 0, SRCCOPY
DoEvents
SavePicture Form1.Image, App.Path + "\Temp" + ".BMP"
DoEvents
Open App.Path & "\Temp.BMP" For Binary As #1
PicCont = String(FileLen(App.Path & "\Temp.BMP"), " ")
'Get #1, , PicCont
DoEvents
Close #1
Winsock3.SendData PicCont
DoEvents
End If
End Sub
Kinda lengthy and messy.
-
Jan 24th, 2004, 12:22 AM
#2
Thread Starter
Addicted Member
Help!
I really need help on this because this has to be done in two days and i have to add the file transfer features so if i could get help asap it would be great.
-
Jan 24th, 2004, 05:40 AM
#3
Fanatic Member
Have u declare PicCont as a string?
If the prob still persists, try this code:
VB Code:
PicCont = Input$(FileLen(FilePath),#1)
'instead of:
Get #1,,PicCont
ASM,C,C++,BASIC,VB,JAVA,VBS,HTML,ASP,PHP,mySQL,VB.NET,MATLAB
Programming is fun, but only if you're not on a tight deadline 
So I consider all those working engineers sad people
VB FTP class
3 page PHP crash course
Crash Course on DX9 Managed with VB.NET covering basics till terrain creation
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|