Click here to Skip to main content
15,895,871 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Using OpenPrinter/SetPrinter in Win2K3 Pin
Anonymous6-Oct-04 21:07
Anonymous6-Oct-04 21:07 
GeneralRe: Using OpenPrinter/SetPrinter in Win2K3 Pin
cnurse6-Oct-04 19:05
cnurse6-Oct-04 19:05 
GeneralRe: Using OpenPrinter/SetPrinter in Win2K3 Pin
Anonymous6-Oct-04 19:11
Anonymous6-Oct-04 19:11 
GeneralCheckbox Unchecks Itself Pin
Baraholka5-Oct-04 15:36
Baraholka5-Oct-04 15:36 
GeneralRe: Checkbox Unchecks Itself Pin
MohammadAmiry6-Oct-04 5:31
MohammadAmiry6-Oct-04 5:31 
Generaldatepicker Pin
Paps25-Oct-04 11:11
Paps25-Oct-04 11:11 
GeneralRe: datepicker Pin
Anonymous5-Oct-04 11:29
Anonymous5-Oct-04 11:29 
QuestionHow to optimize image transfer Pin
tommy_tanaka5-Oct-04 9:40
tommy_tanaka5-Oct-04 9:40 
hello there -

i have a bitmap image, saved in an byte array to transfer this to the network.
up to now, i realised this by the remoting technology of .Net. i just called a
function of my remote client with a byte array parameter.
if i do this with just one client - everything works fine. i got an image transfer rate
of about half a second (i want to transfer the screenshot of my desktop and try
to get a smooth motion).
but my application will run with about 10 to 20 clients and therefore i will have
a transferrate of 5 to 6 second per image, what is definetly to slow. at the
moment i just run through an array of my clients, as you can see in the following
code:

Public Sub _captureScreen()

Dim i As Integer

Dim user As IClient

Dim screenTime As DateTime

Dim duration As TimeSpan

Do While keepRunning

screenTime = DateTime.Now

Dim getScreenShot As Interfaces.ScreenShot

Dim ic As Byte()

Try

Dim screen As Image

screen = getScreenShot.GetDesktopImage

'Ein MemoryStream wird deklariert

Dim ms As New System.IO.MemoryStream()

'Das Image wird Byteweise in den MemoryStream gespeichert

screen.Save(ms, System.Drawing.Imaging.ImageFormat.Png)

'Das sich im Buffer des MemoryStream befindliche ByteArray wird im ic
gespeichert

ic = ms.GetBuffer()

'Der MemoryStream wird freigegeben

ms.Flush()

ms.Close()

ms = Nothing

screen.Dispose()

screen = Nothing

Catch e As Exception

MessageBox.Show(e.ToString)

End Try

For i = 0 To server._clients.Count - 1

user = server._clients(i)

Try

SyncLock user

user._giveServerScreenShot(ic, server.guid)

End SyncLock

Catch e As Exception

server._reOrgArray()

End Try

Next

ic = Nothing

getScreenShot = Nothing



duration = DateTime.Now.Subtract(screenTime)

server._schoolMain.screenTime.Text = duration.ToString

Loop

End Sub

so, has anyone any idea how i can optimize my image transfer rate?

thanks for all help.

tom

AnswerRe: How to optimize image transfer Pin
Dave Kreskowiak5-Oct-04 11:07
mveDave Kreskowiak5-Oct-04 11:07 
GeneralRe: How to optimize image transfer Pin
tommy_tanaka6-Oct-04 0:11
tommy_tanaka6-Oct-04 0:11 
GeneralRe: How to optimize image transfer Pin
tommy_tanaka15-Oct-04 4:30
tommy_tanaka15-Oct-04 4:30 
Questionshow to interface with vb.net using the parallel port? Pin
orihsot5-Oct-04 9:39
orihsot5-Oct-04 9:39 
AnswerRe: show to interface with vb.net using the parallel port? Pin
Dave Kreskowiak5-Oct-04 11:00
mveDave Kreskowiak5-Oct-04 11:00 
GeneralRe: show to interface with vb.net using the parallel port? Pin
orihsot5-Oct-04 15:28
orihsot5-Oct-04 15:28 
GeneralRe: show to interface with vb.net using the parallel port? Pin
Dave Kreskowiak5-Oct-04 17:07
mveDave Kreskowiak5-Oct-04 17:07 
AnswerRe: show to interface with vb.net using the parallel port? Pin
Anonymous5-Oct-04 12:21
Anonymous5-Oct-04 12:21 
GeneralRe: show to interface with vb.net using the parallel port? Pin
orihsot5-Oct-04 15:38
orihsot5-Oct-04 15:38 
GeneralRe: show to interface with vb.net using the parallel port? Pin
Dave Kreskowiak8-Oct-04 4:25
mveDave Kreskowiak8-Oct-04 4:25 
GeneralCalculate totals from a col of a datagrid Pin
Paps25-Oct-04 8:21
Paps25-Oct-04 8:21 
GeneralRe: Calculate totals from a col of a datagrid Pin
Dave Kreskowiak5-Oct-04 8:39
mveDave Kreskowiak5-Oct-04 8:39 
GeneralRe: Calculate totals from a col of a datagrid Pin
Paps25-Oct-04 10:04
Paps25-Oct-04 10:04 
GeneralRe: File Formatting Pin
Dave Kreskowiak5-Oct-04 8:33
mveDave Kreskowiak5-Oct-04 8:33 
GeneralTool tip text on DataGrid Pin
Paps25-Oct-04 3:46
Paps25-Oct-04 3:46 
GeneralRe: Tool tip text on DataGrid Pin
Dave Kreskowiak5-Oct-04 4:45
mveDave Kreskowiak5-Oct-04 4:45 
GeneralThe application's forms collection. Pin
PinMaker5-Oct-04 2:26
PinMaker5-Oct-04 2:26 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.