Navigacija
Lista poslednjih: 16, 32, 64, 128 poruka.

Problem sa kodom, VB2010, bitmap u string

[es] :: Visual Basic 6 :: Problem sa kodom, VB2010, bitmap u string

[ Pregleda: 3022 | Odgovora: 5 ] > FB > Twit

Postavi temu Odgovori

Autor

Pretraga teme: Traži
Markiranje Štampanje RSS

IKA1994
Ilija Veselinovic
Kraljevo

Član broj: 219773
Poruke: 30
*.dynamic.isp.telekom.rs.

ICQ: 584256099


+1 Profil

icon Problem sa kodom, VB2010, bitmap u string12.02.2015. u 02:04 - pre 111 meseci
Preuzeo sam kod sa bideo snimka na youtube


Code:
Option Strict On
Imports System.ComponentModel.ProgressChangedEventArgs
Public Class Form1

    Private Sub BackgroundWorker1_ProgressChanged1(ByVal sender As Object, ByVal e As System.ComponentModel.ProgressChangedEventArgs) Handles BackgroundWorker1.ProgressChanged
        ProgressBar1.Value = e.ProgressPercentage
    End Sub

    Private Sub dug1_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles dug1.Click
        OpenFileDialog1.Title = ""
        OpenFileDialog1.FileName = ""
        OpenFileDialog1.ShowDialog()
        PictureBox1.ImageLocation = OpenFileDialog1.FileName
    End Sub

    Private Sub dig2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles dig2.Click
        BackgroundWorker1.RunWorkerAsync()
    End Sub

    Private Sub BackgroundWorker1_DoWork_1(ByVal sender As System.Object, ByVal e As System.ComponentModel.DoWorkEventArgs) Handles BackgroundWorker1.DoWork
        CheckForIllegalCrossThreadCalls = False
        Dim Bild As Bitmap = CType(Me.PictureBox1.Image.Clone, Bitmap)
        Dim width As Integer = Bild.Width - 1
        Dim height As Integer = Bild.Height - 1
        For x = 1 To width
            For y = 1 To height
                ProgressBar1.Maximum = width * height
                BackgroundWorker1.ReportProgress(x * y)
                Dim R, G, B, A As Integer
                R = Bild.GetPixel(x, y).R
                G = Bild.GetPixel(x, y).G
                B = Bild.GetPixel(x, y).B
                A = Bild.GetPixel(x, y).A
                RichTextBox1.AppendText(R & "-" & G & "-" & B & "-" & A & "'" & x & "," & y & vbNewLine)
            Next
        Next
        dig2.Text = dig2.Text.Substring(0, dig2.Text.Length - 1)
        RichTextBox1.AppendText("|" & width & "*" & height)
    End Sub
End Class


pokrene se program, i ubacuje sliku, ali kad treba da mi izvrsi radnju prijavljuje gresku
Code:
BackgroundWorker1.ReportProgress(x * y)

a ovo mi pise u opisu
This BackgroundWorker states that it doesn't report progress. Modify WorkerReportsProgress to state that it does report progress.
ne znam zasto to radi, ne znam kako da ispravim taj deo koda, svaka pomoc bi mi dobrodosla
Hvala unapred! :D
 
Odgovor na temu

dusans
Stojanov Dušan
Pančevo

Član broj: 9551
Poruke: 1343
*.dynamic.sbb.rs.



+311 Profil

icon Re: Problem sa kodom, VB2010, bitmap u string12.02.2015. u 09:07 - pre 111 meseci
BackgroundWorker1, stavi WorkerReportsProgress property na true, kao što kaže i sama greška.
 
Odgovor na temu

IKA1994
Ilija Veselinovic
Kraljevo

Član broj: 219773
Poruke: 30
*.dynamic.isp.telekom.rs.

ICQ: 584256099


+1 Profil

icon Re: Problem sa kodom, VB2010, bitmap u string12.02.2015. u 22:02 - pre 111 meseci
ne razumem, gde to da ubacim
u koji deo koda?
hvala
 
Odgovor na temu

captPicard
programer
more i planine

Član broj: 216084
Poruke: 1119



+19 Profil

icon Re: Problem sa kodom, VB2010, bitmap u string13.02.2015. u 08:32 - pre 111 meseci
Pretpostavljam da je to Property od komponente pa bi trebalo biti u Property-ma.
Ili probaj

Code:
BackgroundWorker1.WorkerReportsProgress = true

F
 
Odgovor na temu

IKA1994
Ilija Veselinovic
Kraljevo

Član broj: 219773
Poruke: 30
*.dynamic.isp.telekom.rs.

ICQ: 584256099


+1 Profil

icon Re: Problem sa kodom, VB2010, bitmap u string13.02.2015. u 14:10 - pre 111 meseci
hvala, resio sam problem samo me to i zezalo
hvala puno :D
 
Odgovor na temu

captPicard
programer
more i planine

Član broj: 216084
Poruke: 1119



+19 Profil

icon Re: Problem sa kodom, VB2010, bitmap u string13.02.2015. u 16:17 - pre 111 meseci
Nema na čemu
F
 
Odgovor na temu

[es] :: Visual Basic 6 :: Problem sa kodom, VB2010, bitmap u string

[ Pregleda: 3022 | Odgovora: 5 ] > FB > Twit

Postavi temu Odgovori

Navigacija
Lista poslednjih: 16, 32, 64, 128 poruka.