Symbianize Forum

Most of our features and services are available only to members, so we encourage you to login or register a new account. Registration is free, fast and simple. You only need to provide a valid email. Being a member you'll gain access to all member forums and features, post a message to ask question or provide answer, and share or find resources related to mobile phones, tablets, computers, game consoles, and multimedia.

All that and more, so what are you waiting for, click the register button and join us now! Ito ang website na ginawa ng pinoy para sa pinoy!

VB.NET Programming Corner!

sir ask po ulit..paano mag print ng item(s) from listview using crystal report. salamat!

wag mo na phirapan sarili mo save mo po muna then sa DB mo na lang kunin yung print mo sa CR... bka lalo k lang malito :thumbsup:
 
View attachment 991719


pano po ba i-delete un mga rows na may same value ng textbox at sa Box No. datagrid ?


paikutan mo yung datagrid tapos icompare mo sa ibang row index ung value ng current row index

Ex.
Code:
Dim hasDuplicateRow As Boolean = True
        While hasDuplicateRow
            hasDuplicateRow = False

            For Each currow As DataGridViewRow In dglist.Rows
                Dim currentBoxNo As String = currow.Cells(0).Value
                Dim currentItem As String = currow.Cells(1).Value
                Dim currentQty As String = currow.Cells(2).Value

                For Each otherrow As DataGridViewRow In dglist.Rows
                    If currow.Index <> otherrow.Index Then
                        Dim otherBoxNo As String = otherrow.Cells(0).Value
                        Dim otherItem As String = otherrow.Cells(1).Value
                        Dim otherQty As String = otherrow.Cells(2).Value

                        'Dito mo icocompare sa ibang row index
                        If otherBoxNo = currentBoxNo And otherItem = currentItem Then
                            dglist.Rows.RemoveAt(currow.Index)
                            hasDuplicateRow = True
                            'iterminate na natin yung loop after madelete yung current row, maiiba kasi ung row index nung susunod na row since dinelete mo yung current row..
                            'since hasDuplicateRow=true, uuliting ang buong process ng pagdedelte, this time, yung rows na nadelete ay hindi na kasama
                            Exit For
                        End If
                    End If
                Next

            Next
End While
 
View attachment 991719


pano po ba i-delete un mga rows na may same value ng textbox at sa Box No. datagrid ?

Connected ba yung Datagridview sa Database?

Gamitan mo lang ng Command Object at execute mo lang yung proper SQL Statement. ex. DELETE FROM yourTable WHERE BOxNo = 1
Then refresh mo lang yung Datagridview, para ma-retrieve ang bagong records.
 
paikutan mo yung datagrid tapos icompare mo sa ibang row index ung value ng current row index

Ex.
Code:
Dim hasDuplicateRow As Boolean = True
        While hasDuplicateRow
            hasDuplicateRow = False

            For Each currow As DataGridViewRow In dglist.Rows
                Dim currentBoxNo As String = currow.Cells(0).Value
                Dim currentItem As String = currow.Cells(1).Value
                Dim currentQty As String = currow.Cells(2).Value

                For Each otherrow As DataGridViewRow In dglist.Rows
                    If currow.Index <> otherrow.Index Then
                        Dim otherBoxNo As String = otherrow.Cells(0).Value
                        Dim otherItem As String = otherrow.Cells(1).Value
                        Dim otherQty As String = otherrow.Cells(2).Value

                        'Dito mo icocompare sa ibang row index
                        If otherBoxNo = currentBoxNo And otherItem = currentItem Then
                            dglist.Rows.RemoveAt(currow.Index)
                            hasDuplicateRow = True
                            'iterminate na natin yung loop after madelete yung current row, maiiba kasi ung row index nung susunod na row since dinelete mo yung current row..
                            'since hasDuplicateRow=true, uuliting ang buong process ng pagdedelte, this time, yung rows na nadelete ay hindi na kasama
                            Exit For
                        End If
                    End If
                Next

            Next
End While


salamat paps. try ko un code mo.
 
guys sino willing magturo dito about vb.net? willing po ako magbayad (yung mura lang po sana).. sunday class po sana at marikina area.. kase my work ng monday to saturday.. my alam naman po ko about programming kaso kelangan ulit marefresh kase puro basics lang ang alam ko. just kindly txt me 09278996695 thanks..
;)
 
guys sino willing magturo dito about vb.net? willing po ako magbayad (yung mura lang po sana).. sunday class po sana at marikina area.. kase my work ng monday to saturday.. my alam naman po ko about programming kaso kelangan ulit marefresh kase puro basics lang ang alam ko. just kindly txt me 09278996695 thanks..
;)

ano po gusto mo matutunan specifically?
 
wow talaga! thanks po ng marami sa thread!:clap:
patambay po at sana po matulungan niyo ko sa mga di ko maparun! haha! :noidea:
super salute!
 
Guys patulong nman ako sa sa project ko gizduino 328+gsm shield+vb.net interface.
bale ang di ko nlang makuha e yung pagnareceive na ng vb.net yung string na galing sa gizduino eh tatawagin nya lahat ng nasa if statement ko.
sorry kung medyo nakakalito pero tignan nyo nlng codes ko sana matulungan nyo ako salamat.
Code:
Public Class Form2
Private Sub Form2_Load(sender As Object, e As EventArgs) Handles MyBase.Load
SerialPort1.Open()
 End Sub

 Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick
 If label1.ForeColor = Color.Black Then
 label1.ForeColor = Color.DimGray
 ElseIf label1.ForeColor = Color.DimGray Then
 label1.ForeColor = Color.Red
ElseIf label1.ForeColor = Color.Red Then
label1.ForeColor = Color.Gray
ElseIf label1.ForeColor = Color.Gray Then
label1.ForeColor = Color.Black

End If

 End Sub
 Dim temblin As String
 Private Sub Serial_Port1_Datareceived(ByVal sender As Object, ByVal e As EventArgs) Handles SerialPort1.DataReceived
temblin = SerialPort1.ReadLine
 Me.Invoke(New EventHandler(AddressOf DoUpdate))
End Sub

Public Sub DoUpdate()

If temblin = "a" Then
label1.Text = "ALERT LEVEL!!!"
 Timer1.Start()
Label2.Text = " Level 1 = Alert Level, Monitor the River for the possible Flood in Barangay."
Btnimage1.BackColor = Color.GreenYellow
Picmyimage.Image = My.Resources.nangka_plain_1
ElseIf temblin = "b" Then
label1.Text = "WARNING LEVEL!!!"
Timer1.Start()
Btnimage2.BackColor = Color.RoyalBlue
Label2.Text = " Level 2 = Warning Level, Anouncing a Warning and Evacuation to all residence of Barangay."
Picmyimage.Image = My.Resources.nangka_plain_2
ElseIf temblin = "c" Then
label1.Text = "CRITICAL LEVEL!!!"
 Timer1.Start()
Btnimage3.BackColor = Color.Red
Label2.Text = " Level 3 = Critical Level, Forced Evacuation of all Residence in Barangay will be implemented."
Picmyimage.Image = My.Resources.nangka_plain_3
End If

End Sub

End Class
 
Guys patulong nman ako sa sa project ko gizduino 328+gsm shield+vb.net interface.
bale ang di ko nlang makuha e yung pagnareceive na ng vb.net yung string na galing sa gizduino eh tatawagin nya lahat ng nasa if statement ko.
sorry kung medyo nakakalito pero tignan nyo nlng codes ko sana matulungan nyo ako salamat.
Code:
Public Class Form2
Private Sub Form2_Load(sender As Object, e As EventArgs) Handles MyBase.Load
SerialPort1.Open()
 End Sub

 Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick
 If label1.ForeColor = Color.Black Then
 label1.ForeColor = Color.DimGray
 ElseIf label1.ForeColor = Color.DimGray Then
 label1.ForeColor = Color.Red
ElseIf label1.ForeColor = Color.Red Then
label1.ForeColor = Color.Gray
ElseIf label1.ForeColor = Color.Gray Then
label1.ForeColor = Color.Black

End If

 End Sub
 Dim temblin As String
 Private Sub Serial_Port1_Datareceived(ByVal sender As Object, ByVal e As EventArgs) Handles SerialPort1.DataReceived
temblin = SerialPort1.ReadLine
 Me.Invoke(New EventHandler(AddressOf DoUpdate))
End Sub

Public Sub DoUpdate()

If temblin = "a" Then
label1.Text = "ALERT LEVEL!!!"
 Timer1.Start()
Label2.Text = " Level 1 = Alert Level, Monitor the River for the possible Flood in Barangay."
Btnimage1.BackColor = Color.GreenYellow
Picmyimage.Image = My.Resources.nangka_plain_1
ElseIf temblin = "b" Then
label1.Text = "WARNING LEVEL!!!"
Timer1.Start()
Btnimage2.BackColor = Color.RoyalBlue
Label2.Text = " Level 2 = Warning Level, Anouncing a Warning and Evacuation to all residence of Barangay."
Picmyimage.Image = My.Resources.nangka_plain_2
ElseIf temblin = "c" Then
label1.Text = "CRITICAL LEVEL!!!"
 Timer1.Start()
Btnimage3.BackColor = Color.Red
Label2.Text = " Level 3 = Critical Level, Forced Evacuation of all Residence in Barangay will be implemented."
Picmyimage.Image = My.Resources.nangka_plain_3
End If

End Sub

End Class

anong ibig sabihin ng tawagin lahat ng nasa if statement?
para saan yung doupdate na sub? bkt di mo nlng don ilagay sa event ng data received?
sa pag kakaalam ko maraming laman ang data galing sa gsm hindi pwede readline lang kasi maraming line yon dipende din sa text na na receive.
read about sms here http://www.developershome.com/sms/cmgrCommand3.asp
then google for substring or mid or string manipulation in general para sa parsing nung string ng data from gsm.
 
I made this thread for all programmers starting their adventure in VB.NET.

Please post relevant and sensible questions regarding VB.NET,
share your knowledge and expertise, share codes and techniques.

Post question on HOW TOs:
How to do this or that, ill supply bits of code to accomplish basic tasks.

Ill be posting series of samples leading to complete applications,
your suggestions are encouraged.
These samples will contain codes relevant to other tasks as well.

Platform = VS2003 to VS2012

i suggest learn and get the feel of VB.NET/VISUAL STUDIO IDE first before posting questions,
so that we can talk on the same page.


Topics:
VB.NET Winforms (not Web Applications)
ADO.NET as applied in VB.NET
Crystal Reports on VB.NET
SQLServer as used in VB.NET
MSAccess as used in VB.NET
Classes
UserControls

Technologies:
Serial - like using SMS, Barcode and other hardware
TCP/IP - chat applications, sockets, internet applications
MSMQ - message queuing
Remoting - executing assemblies in other computer
WebServices - using webservices in windows forms
Multithreading - executing more than 1 process at the same time


Suggested Third Party Tools:
DevXPress 2009 Free Edition
SQLServer 2005 Express Edition

Suggested references:
http://www.homeandlearn.co.uk/net/vbnet.html
http://www.java2s.com/Tutorial/VB/CatalogVB.htm

I currently use Visual Studio 2008 only, but basic codes will apply to all versions

Please do not ask for a complete system,
instead use the codes and assistance that you will find here
to build your own system.


***Thanks to moderators, STICKY na ang thread!

Lets share knowledge so that we can be a more flexible and well rounded programmer. Be it for school or work.

Links:

First Post: Populating DataGridView using MSAccess Database
Second Post : Basic VB.NET MSAccess Tutorial
SQLServer Sample




sir may example program k ba jan ng visual studio 2008 kahit anu po kahit simple lang.. kailangan ko lng po mapagaralan. .limited po kasi info dun sa book n gamit namin. .kahit anu po basta mgkapattern lng po ako ..salamat
 
View attachment 198709

sir patulong nmn po. panu ko ba makukuha un number ng rows na may value na 0 at mailalagay sa textbox kapag pinindot ko un button?
thanks
 

Attachments

  • wafer0and1.png
    wafer0and1.png
    4.7 KB · Views: 11
Paano po kunin yung MAX VALUE ng column(Customer ID) sa LISTVIEW. Wala akong mahanap sa kahit saang forum.

Listview Columns:
Customer ID Customer Name
300101 John Wall
300102 Lebron James
300103 Manny Pacquiao
and so on.



tol pwede mo work around mag sort ka......
 
anong ibig sabihin ng tawagin lahat ng nasa if statement?
para saan yung doupdate na sub? bkt di mo nlng don ilagay sa event ng data received?
sa pag kakaalam ko maraming laman ang data galing sa gsm hindi pwede readline lang kasi maraming line yon dipende din sa text na na receive.
read about sms here http://www.developershome.com/sms/cmgrCommand3.asp
then google for substring or mid or string manipulation in general para sa parsing nung string ng data from gsm.

Tnx sa reply sir.
ano po ba dapat kung gamitin para mapalabas yung nasa if statement ko??
penge nman po ng knowledge tnx
 
pano po i-copy lahat ng data sa datagridview1 papunta sa datagridview2?
 
Dim dt As DataTable = CType(DataGridView1.DataSource, DataTable)

DataGridView2.DataSource = dt.Copy()
 
Mga Sir. pano po yung ma re-receive ko yung mail na galing sa gmail account. kasi ang nagawa ko lang is isesend yung email using vb.net pero hindi nakaka receive system ko pano kaya to ? salamat :) pano po kaya coding dun at User interface ?
 
mga GoodCoders

Need tlga help kng panu mag send ng sms to mobile device via email merun ba kayung alam?
Nakuha ko na panu mag send ng email to gmail at kng panu mag send ng sms bia GSM modem..

Mabigat tlga problema ko ksi halos wla tlga sa google ang solution kng panu mag send SMS via Email using PH gateways(wla nman akung nkita dun sa mga list tapos text Capital pa nman ung PH). medjo na hihirapan tlga ako.

Pa help mga GoodCoders... :upset: :upset: :upset: :upset: :ranting: :ranting: :ranting: :ranting:
 
Meron po kayong idea kung paano i-solve yung
Code:
Error	1	Unable to read manifest 'My Project\app.manifest'. Could not find file 'C:\Users\david\AppData\Local\Temp\cl1aygzo.dll'.	Golden Dragon Billing System
 
Back
Top Bottom