Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

[VB.net] Bild per Networkstream übertragen

Empfohlene Antworten

Veröffentlicht

Hi,

Ich versuche hier mit nem Client - Server Programm einen Screenshot von einem Computer zu einem anderen zu Übertragen dazu verwende ich folgenden Code

Server:

  Dim currentScreenSize As Size = New Size(My.Computer.Screen.Bounds.Width, My.Computer.Screen.Bounds.Height)

                    Dim ScreenToBitmap As New Bitmap(My.Computer.Screen.Bounds.Width, My.Computer.Screen.Bounds.Height)

                    Dim gGraphics As System.Drawing.Graphics = System.Drawing.Graphics.FromImage(ScreenToBitmap)

                    gGraphics.CopyFromScreen(New Point(0, 0), New Point(0, 0), currentScreenSize)

                    ScreenToBitmap.Save("C:\Screen.bmp", System.Drawing.Imaging.ImageFormat.Bmp)

'Screenshot machen     ^

'Screenshot übertragen v


                    Dim fs As New IO.FileStream("C:\Screen.bmp", IO.FileMode.Open)

                    Dim sendBytes(CInt(fs.Length)) As Byte

                    fs.Read(sendBytes, 0, CInt(fs.Length))

                    netstream.Write(sendBytes, 0, sendBytes.Length)

                    fs.Close()
Client:
Dim receiveBytes(socket.ReceiveBufferSize) As Byte

        netstream.Read(receiveBytes, 0, CInt(socket.ReceiveBufferSize))

        Dim fs As New IO.FileStream("C:\Users\Screen.bmp", IO.FileMode.Create)

        fs.Write(receiveBytes, 0, receiveBytes.Length)

        fs.Close()

Leider kommen von den knapp 80kb nur 8kb an, woran könnte das liegen, und was müsste ich ändern damit der Screenshot komplett übertragen wird ? Danke für eure Hilfe.

Mockba

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.