-
Similar Content
-
By wisel
Mencari Vb Developer Utk Handwriting Recognition System Using Svm
harga kalau boleh dibincang kan utk yg berminat
tolong email sy di [email protected]
-
By NeoLogy
Salam,
Aku nak create satu function yang akan check size file. Aku tak perlukan size file yang sebenar kerana function ni cuma perlu check adakah file tersebut lebih besar daripada size yang ditetapkan atau tidak. Ideanya begini; function ni akan read file ni by chunck of data. Let say file tu bersize 1GB. Kalau gunakan GetFileSize(), sudah tentu mengambil masa yang lama untuk dapatkan size file tersebut. Ini akan merugikan masa kerana aku hanya perlu tahu adakah file tersebut bersize lebih daripda 10MB?
Kalau file lebih daripada 10MB, function akan return true dan return false kalau kurang daripada 10MB. Dengan membaca file by chunck, let say 1024byte on each chunck, kalau total read chunck size lebih daripada 10MB, then automatically return true tanpa perlu baca chunck seterusnya.
So, nak tanya macam mana nak read file by chunck?
Kalau ada contoh, lagi bagus. Atau kalau ada mana-mana references ke..
-
By merahPutih
[color=#0000cd]Hi,
Nak mintak pendapat korang sket~~
Source code ni aku dapat dari programmer lame (ni file DLL).
Dia gune dll ni kat app dier dan stakat ni aku tengok cam ok.
ni sourcecode tu[/color]
[code]Private Sub SendToPort(ByVal code As String)
Dim logstr2 As String = ""
Dim ByteSend(16) As Byte
Dim str As String
Dim strArray() As String = code.Split("#")
Dim k As Integer
Dim l As Integer
Dim dataSize As Integer
Try
logstr2 = "1"
gCount = UBound(strArray) + 1
logstr2 = "2"
dataSize = gCount + 5
logstr2 = "3"
ByteSend(0) = 2
logstr2 = "4"
ByteSend(1) = 3
logstr2 = "5"
ByteSend(2) = dataSize
logstr2 = "6"
ByteSend(3) = strArray(0)
logstr2 = "7"
If gCount > 1 Then
l = 0
For k = 4 To (UBound(strArray) + 3)
l = l + 1
ByteSend(k) = strArray(l)
Next k
End If
logstr2 = "8"
str = CheckSum("#B#C#" & dataSize & "#" & code)
logstr2 = "9"
ByteSend(gCount) = Asc(Mid(str, 1, 1))
logstr2 = "10"
ByteSend(gCount + 1) = Asc(Mid(str, 2, 1))
logstr2 = "11"
Log_Rtn("gCount = " & gCount.ToString & vbNewLine & "logstr2 = " & logstr2)
cv.Write(ByteSend, 0, gCount + 2)
logstr2 = "12"
Dim bolWait As Boolean
bolWait = Wait_Fnc()
logstr2 = "13"
tmpRev1 = ByteSend(gCount + 1)
logstr2 = "14"
Catch ex As Exception
Log_Rtn("clsB2B|SendToPort|" & ex.Message & logstr2 & "," & gCount & "," & code)
End Try
End Sub[/code]
[color=#0000cd]jadi masalah aku ialah bile aku GO(F5), Result yang aku dapat salah, bile aku letak breakpoint lpastu step into (F10), baru dapat result yang aku nak[/color]
[color=#0000cd]Breakpoint tu aku letak kat sini[/color]
[CODE]
bolWait = Wait_Fnc()
[/CODE]
[color=#0000cd]ni Wait_Fnc()[/color]
[color=#333333][CODE]
Private Function Wait_Fnc() As Boolean
intWaitLoop = 0
tmrWait.Enabled = True
Do While tmrWait.Enabled = False
'Do Nothing[/color]
[color=#333333]Return False
End Function
[/CODE][/color]
[color=#0000ff]aku pakai visual studio 2008
ape yang ak dapat dari google, dorg suruh pastikan semua variable dah initialize , build mode = debug[/color]
[color=#0000ff]then aku try- still prob yang same
kalau build mode = release pun same jugak[/color]
[color=#0000ff]sekarang ni aku pakai [/color][color=#0000FF]build mode = debug[/color]
[color=#0000FF]ade gak yang swh pakai [/color][color=#0000FF]application.doevents, yang ni aku x dapat try (maybe pasal ni class??? )[/color]
[color=#0000ff]so aku nak mintak pendapat korang,
rase2 nye kenape ak dapat result macam ni?? ade lagi mane2 setting yang aku perlu buat ke??[/color]
-
By mon678
Tiada Error tp x kuar data kt text field huhu harap ada org blh membantu
sy gune visual studio 2008 dan sql server 2005..
sy membuat sistem gune windows form
[CODE]Private Sub Cari_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Cari.Click
Dim searchby As String = ""
If ComboBox1.SelectedIndex = -1 Then
MessageBox.Show("Please select search by field.", "Error")
ElseIf (txtCari.Text.Trim() = "") Then
MessageBox.Show("Please enter StafID number or IC number.", "Error")
ElseIf ComboBox1.SelectedIndex = 0 Then
searchby = "StafID"
Else
searchby = "kp"
Dim con As SqlConnection = New SqlConnection("server =localhost;database=Library;Integrated Security=True;Trusted_Connection = yes")
Dim myInsertQuery As String = "SELECT * FROM Staf WHERE " + searchby + " = '" + txtCari.Text + "'"
Dim myCommand As New SqlCommand(myInsertQuery, con)
Dim Dr As SqlDataReader
con.Open()
Dr = myCommand.ExecuteReader()
While (Dr.Read())
txtStaffID.Text = Dr("StafID").ToString()
txtNama.Text = Dr("nama").ToString()
txtKP.Text = Dr("kp").ToString()
'txtDob.Text = Dr("dob").ToString()
txtAddress.Text = Dr("alamat").ToString()
txtBandar.Text = Dr("bandar").ToString()
txtNegeri.Text = Dr("negeri").ToString()
txtposkod.Text = Dr("poskod").ToString()
txtNegara.Text = Dr("negara").ToString()
txtEmail.Text = Dr("email").ToString()
txthp.Text = Dr("hp").ToString()
djawatan.SelectedItem = Dr("jawatan").ToString()
End While
UbahSuai.Enabled = True
UbahSuai.Text = "Edit"
con.Close()
con.Dispose()
End If
End Sub[/CODE]
-
By mie_kkm
[img]http://i.imgur.com/OpDy2.jpg[/img]
salam semua...klu bila siap install vb.net pastu bila nak buka projek yg telah kita buat terkeluar benda ni.... projek yg kita buat tu xleh nak buka... napa eh? mintak tolong dari semua yg pakar..... dulu buat projek ni dlm pc (window XP) yg dah sedia ada vb.net... skrg istall kat pc (window 7) tapi xleh nak buka la......
TOLONG ya
-