Click here to Skip to main content
16,008,750 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Events fired up on focus change. Pin
Dave Kreskowiak29-Aug-04 3:17
mveDave Kreskowiak29-Aug-04 3:17 
GeneralRe: Events fired up on focus change. Pin
Member 132035229-Aug-04 21:40
Member 132035229-Aug-04 21:40 
QuestionHow to change the color of the text of a DateTimePicker?? Pin
claytonvaldo27-Aug-04 10:48
claytonvaldo27-Aug-04 10:48 
GeneralBuild the tree view in vb 6 Pin
lardex27-Aug-04 7:12
susslardex27-Aug-04 7:12 
Generalfile access problem Pin
tommy_tanaka27-Aug-04 5:32
tommy_tanaka27-Aug-04 5:32 
GeneralRe: file access problem Pin
Dave Kreskowiak27-Aug-04 6:09
mveDave Kreskowiak27-Aug-04 6:09 
GeneralRe: file access problem Pin
tommy_tanaka28-Aug-04 3:03
tommy_tanaka28-Aug-04 3:03 
GeneralRe: file access problem Pin
Dave Kreskowiak29-Aug-04 3:16
mveDave Kreskowiak29-Aug-04 3:16 
tommy_tanaka wrote:
path = "\\Matrix\Kunden\" + user._computerName.ToString + ".bmp"

First, you don't need to call .ToString here. _computerName is already a String and doesn't need to be converted to one.


tommy_tanaka wrote:
Dim screenShot, screenShotTemp As Bitmap
Dim screenGraphics As Graphics

For Each user In _clients.Values
Try
user._captureScreen()
path = "\\Matrix\Kunden\" + user._computerName.ToString + ".bmp"
screenShotTemp = Image.FromFile(path)
screenGraphics.FromImage(screenShotTemp)
screenGraphics.DrawImage(screenShot, 0, 0)
screenShotTemp.Dispose()
screenGraphics.Dispose()
Me._schoolMain.Screenshot.Image = screenShot


Second, you're doing alot of unecessary work and this is where your hanging up. All you need to do is load the picture into your screenShotTemp and make a copy of it using a new Bitmap object. Then use the copy as your PictureBox source image and release the original image in your temp variable.
        Dim screenShotTemp As Bitmap
        Dim path As String
.
.
.
        path = "\\Matrix\Kunden\" + user._computerName + ".bmp"
        screenShotTemp = Image.FromFile(path)
        Dim screenShot As New Bitmap(screenShotTemp)
        PictureBox1.Image = screenShot
        screenShotTemp.Dispose()

The Bitmap class has about a dozen different constructors. Read up on them here[^].


RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

GeneralPrint MSChart from VB.Net Pin
amdinar27-Aug-04 5:19
amdinar27-Aug-04 5:19 
Generalstore a sql result in a xml document Pin
tofito27-Aug-04 4:26
tofito27-Aug-04 4:26 
GeneralRe: store a sql result in a xml document Pin
Dave Kreskowiak27-Aug-04 6:16
mveDave Kreskowiak27-Aug-04 6:16 
GeneralWMI and Terminal Server Pin
Anonymous27-Aug-04 3:08
Anonymous27-Aug-04 3:08 
GeneralWMI and Terminal Server Pin
Anonymous27-Aug-04 3:07
Anonymous27-Aug-04 3:07 
GeneralRe: WMI and Terminal Server Pin
Dave Kreskowiak27-Aug-04 3:37
mveDave Kreskowiak27-Aug-04 3:37 
GeneralRe: WMI and Terminal Server Pin
Anonymous27-Aug-04 3:47
Anonymous27-Aug-04 3:47 
GeneralRe: WMI and Terminal Server Pin
Dave Kreskowiak27-Aug-04 4:25
mveDave Kreskowiak27-Aug-04 4:25 
GeneralProblems with the GUID Pin
BoxenBiene26-Aug-04 23:24
BoxenBiene26-Aug-04 23:24 
GeneralRe: Problems with the GUID Pin
Dave Kreskowiak27-Aug-04 3:32
mveDave Kreskowiak27-Aug-04 3:32 
QuestionHow can I access the Comport Pin
BoxenBiene26-Aug-04 23:17
BoxenBiene26-Aug-04 23:17 
AnswerRe: How can I access the Comport Pin
Dave Kreskowiak27-Aug-04 3:27
mveDave Kreskowiak27-Aug-04 3:27 
GeneralXml & VB.Net- Please help me Pin
Meysam.Khayatan26-Aug-04 21:16
Meysam.Khayatan26-Aug-04 21:16 
GeneralRe: Xml & VB.Net- Please help me Pin
Dave Kreskowiak27-Aug-04 3:25
mveDave Kreskowiak27-Aug-04 3:25 
Generalstoring data client side Pin
anjali_k26-Aug-04 19:09
anjali_k26-Aug-04 19:09 
GeneralRe: storing data client side Pin
Dave Kreskowiak27-Aug-04 3:08
mveDave Kreskowiak27-Aug-04 3:08 
GeneralApplication terminated itself while running Pin
Member 46394826-Aug-04 18:47
Member 46394826-Aug-04 18:47 

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.