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!

Kung Gusto niyo ng magandang Design


QNNNclS.png

MaterialSkin for .NET WinForms

Pa Delete Nalang kung may nag post na
 
mga vb.net pro pa help naman po the problem is how to looping a selected listview item..?
kapag na select muna mag nenext siya sa susunod na item ..Click image for larger version.

View attachment 265940
 

Attachments

  • gg.jpg
    gg.jpg
    143.2 KB · Views: 31
mga idol please patulong naman ako iprogram to parang awa nyo na T_T

ganito po ung prang format nya, using radiobox,checkbox, array po ito

Yung program e pang-cashier. May mga menu tas pag tinype mo kung ilang burger o kaya sandwich lalabas yung amount pag nagclick ka. Tas may mga nakaset na amount yung burger, sandwich etc. Tas sa kabilang form e pang discount naman kunware student ka may discount na 20% tas lalabas yung babayaran mong amount pati yung magiging change mo.

asan yung code na icocorect namen? mahirap sagutan yan.. do it yourself, then kung may error help ka naming,

Always wag mang hingi
 
mga vb.net pro pa help naman po the problem is how to looping a selected listview item..?
kapag na select muna mag nenext siya sa susunod na item ..Click image for larger version.

View attachment 1117621


Eto Sample Code Copy Paste mo na lang testing mo muna sa New Form



Code:
Imports System.Drawing
Imports System.Globalization
Imports System.Windows.Forms
Public Class Form1
    Dim xValue As Int32 = 0
    Dim LV As New ListView
    Dim btnUP As New Button
    Dim btnDOWN As New Button

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        With LV
            .Columns.Add("NO.", 100)
            .Columns.Add("ITEM", 250)
            .Columns.Add("TOTAL", 100)
            .GridLines = True
            .MultiSelect = False
            .FullRowSelect = True
            .View = View.Details
            .Size = New Size(450, 200)
            .Location = New Point(10, 10)
        End With

        Me.Controls.Add(LV)
        PopulateLV(LV)

        With btnDOWN
            .Size = New Size(105, 30)
            .Location = New Point(10, (LV.Height) + 20)
            .Name = "btnDOWN"
            .Text = "Button DOWN"
        End With
        Me.Controls.Add(btnDOWN)
        AddHandler btnDOWN.Click, AddressOf btnDown_Click
        With btnUP
            .Size = New Size(105, 30)
            .Location = New Point(150, (LV.Height) + 20)
            .Name = "btnUP"
            .Text = "Button UP"
        End With
        Me.Controls.Add(btnUP)
        AddHandler btnUP.Click, AddressOf btnUP_Click
        LV.Items(0).Selected = True
        LV.Items(0).Selected = True
        LV.Select()

    End Sub

    Private Sub PopulateLV(ByVal myLV As ListView)
        myLV.Items.Clear()
        For X As Integer = 1 To 10
            With myLV.Items.Add("NO. " & X)
                .SubItems.Add("ITEM " & X)
                .SubItems.Add("TOTAL " & X)
            End With
        Next X

    End Sub

    Friend Sub btnUP_Click(ByVal sender As Object, ByVal e As System.EventArgs)
        If xValue = 0 Then
            Exit Sub
        Else
            xValue -= 1
        End If
        LV.Items(xValue).Selected = True
        LV.Select()

    End Sub
    Friend Sub btnDown_Click(ByVal sender As Object, ByVal e As System.EventArgs)
        If lv.Items.Count = xValue Then
            Exit Sub
        Else
            xValue += 1
        End If
        LV.Items(xValue).Selected = True
        LV.Select()

    End Sub

End Class
 
Last edited:
Tulong nman mga pro......
about po sa datagridview... paano po ma change ung color ng row ng nkadepende sa value ng specific record sa isang row..
;):thumbsup::thumbsup:

View attachment 266447
 

Attachments

  • images.jpg
    images.jpg
    8.1 KB · Views: 9
Tulong nman mga pro......
about po sa datagridview... paano po ma change ung color ng row ng nkadepende sa value ng specific record sa isang row..
;):thumbsup::thumbsup:

View attachment 1118321

eto po ung sample code ng colored row. Copy the code then paste sa new winform

Code:
Imports System.Drawing
Imports System.Globalization
Imports System.Windows.Forms
Public Class DatagridColorRow
    Dim DGV As New DataGridView

    Private Sub DatagridColorRow_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        With DGV
            .Columns.Add("col1", "NO")
            .Columns.Add("col1", "ITEM")
            .Columns.Add("col1", "PRICE")
            .Columns.Add("col1", "QTY")
            .Columns.Add("col1", "STATUS")
            .MultiSelect = False
            .AllowUserToAddRows = False
            .AllowUserToDeleteRows = False
            .AllowUserToResizeRows = False
            .Location = New Point(10, 10)
            .Size = New Size(530, 200)
        End With
        Me.Controls.Add(DGV)
        PopulateDGV()

        ColoredRow(DGV)
    End Sub

    Private Sub PopulateDGV()
        DGV.Rows.Add("1", "Banana", "10 Pesos", "99", "On Stocks")
        DGV.Rows.Add("2", "Orange", "15 Pesos", "99", "On Stocks")
        DGV.Rows.Add("3", "Apple", "15 Pesos", "10", "Below Stocks")
        DGV.Rows.Add("4", "Pineapple", "30 Pesos", "0", "Out of Stocks")
        DGV.Rows.Add("5", "Grapes", "50 Pesos", "20", "Below Stocks")
        DGV.Rows.Add("6", "Strawberry", "40 Pesos", "0", "Out of Stocks")

    End Sub

    Private Sub ColoredRow(ByVal DataGrid As DataGridView)
        For x As Integer = 0 To DataGrid.Rows.Count - 1
            If DataGrid.Rows(x).Cells(4).Value = "On Stocks" Then
                DataGrid.Rows(x).DefaultCellStyle.BackColor = Color.Blue
                DataGrid.Rows(x).DefaultCellStyle.ForeColor = Color.White
            ElseIf DataGrid.Rows(x).Cells(4).Value = "Below Stocks" Then
                DataGrid.Rows(x).DefaultCellStyle.BackColor = Color.Pink
                DataGrid.Rows(x).DefaultCellStyle.ForeColor = Color.Red
            ElseIf DataGrid.Rows(x).Cells(4).Value = "Out of Stocks" Then
                DataGrid.Rows(x).DefaultCellStyle.BackColor = Color.Gray
                DataGrid.Rows(x).DefaultCellStyle.ForeColor = Color.Black
            End If
        Next
    End Sub
End Class
 
Last edited:
Mga sir Patulong naman po.. paano gumawa ng program like usb data cut-off? for thesis po.. bagsak po ako sa thesis ko naiwan na nko...:praise: :praise:

katulad po nito oh

Regular PisoPro (ProcessKiller + Shutdown)
Download PisoPro Beta v2.5


Special Request PisoPro - MultiPC (No Shutdown)
Download PisoPro Beta v2.5 w/o Shutdown


Improvements:
1. Customizable Time (Time for process killer, Time for Shutdown)
2. Customizable USB Drive (ranging from D: to Z:)
3. Security (Disable all Low level Keys, Level 3 Process security, Kernel Level execution which means kahit safe mode mag run pa rin)

New Feature:
1. New Looks (Gui)
2. Mute sounds when no time left (software mute) *
3. Power Save Mode by turning off monitor (software off) **
4. Timer Compatibility (pwde sa single at dual relay timer)


1. Download PisoPro Zip File
2. Extract Files from PisoPro Zip File to drive C:\
3. Run the RegAutorun.exe then click "Set to Autorun"
4. Copy AJCSHOP file to USB (ito yung usb checker mo na nakakabit sa timer)
5. Restart the your computer and lets the software do the work for you.
 

right click references on solution explorer
add reference
browse -> goto your mysql.data.dll (usually nasa program files\mysql\connector net x.x.x)
click ok

- - - Updated - - -

Mga sir Patulong naman po.. paano gumawa ng program like usb data cut-off? for thesis po.. bagsak po ako sa thesis ko naiwan na nko...:praise: :praise:

katulad po nito oh

Regular PisoPro (ProcessKiller + Shutdown)
Download PisoPro Beta v2.5


Special Request PisoPro - MultiPC (No Shutdown)
Download PisoPro Beta v2.5 w/o Shutdown


Improvements:
1. Customizable Time (Time for process killer, Time for Shutdown)
2. Customizable USB Drive (ranging from D: to Z:)
3. Security (Disable all Low level Keys, Level 3 Process security, Kernel Level execution which means kahit safe mode mag run pa rin)

New Feature:
1. New Looks (Gui)
2. Mute sounds when no time left (software mute) *
3. Power Save Mode by turning off monitor (software off) **
4. Timer Compatibility (pwde sa single at dual relay timer)


1. Download PisoPro Zip File
2. Extract Files from PisoPro Zip File to drive C:\
3. Run the RegAutorun.exe then click "Set to Autorun"
4. Copy AJCSHOP file to USB (ito yung usb checker mo na nakakabit sa timer)
5. Restart the your computer and lets the software do the work for you.

gawa ka ng program na gagalaw ng regedit. usually nasa HKCU->software->ms windows->policies->explorer or sa HKLM->software->ms windows->policies->explorer

sa pagka-alala ko dyan yung location. may ginawa na ako dati na bat file pero pwede mo yan magawa sa vb.

- - - Updated - - -

mga vb.net pro pa help naman po the problem is how to looping a selected listview item..?
kapag na select muna mag nenext siya sa susunod na item ..Click image for larger version.

View attachment 1117621

here's my function:

Code:
Private Shared Sub MoveListViewItem(ByRef lv As ListView, ByVal moveUp As Boolean)
        Dim i As Integer
        Dim cache As String
        Dim selIdx As Integer

        With lv
            If .SelectedItems.Count > 0 Then
                selIdx = .SelectedItems.Item(0).Index
                If moveUp Then
                    ' ignore moveup of row(0)
                    If selIdx = 0 Then
                        Exit Sub
                    End If
                    ' move the subitems for the previous row
                    ' to cache so we can move the selected row up
                    For i = 0 To .Items(selIdx).SubItems.Count - 1
                        cache = .Items(selIdx - 1).SubItems(i).Text
                        .Items(selIdx - 1).SubItems(i).Text = _
                           .Items(selIdx).SubItems(i).Text
                        .Items(selIdx).SubItems(i).Text = cache
                    Next
                    .Items(selIdx - 1).Selected = True
                    .Refresh()
                    .Focus()
                Else
                    ' ignore move down of last row
                    If selIdx = .Items.Count - 1 Then
                        Exit Sub
                    End If
                    ' move the subitems for the next row
                    ' to cache so we can move the selected row down
                    For i = 0 To .Items(selIdx).SubItems.Count - 1
                        cache = .Items(selIdx + 1).SubItems(i).Text
                        .Items(selIdx + 1).SubItems(i).Text = _
                           .Items(selIdx).SubItems(i).Text
                        .Items(selIdx).SubItems(i).Text = cache
                    Next
                    .Items(selIdx + 1).Selected = True
                    .Refresh()
                    .Focus()
                End If
            End If
        End With
    End Sub

usage: btnDown - MoveListViewItem(ListViewHere, False)
btnUp - MoveListViewItem(ListViewHere, True)
 
Last edited:
Done sir, nothing happen :help:
C:\Program Files\MySQL\MySQL Connector Net 6.1.6\Assemblies ("MySql.data.dll")
or C:\Program Files\MySQL\Connector.NET 6.9\Assemblies\ ("RT/v2.0/v4.0/v4.5")


View attachment 1119249
View attachment 1119250
View attachment 1119251
View attachment 1119252

download mo to: http://dev.mysql.com/get/Downloads/MySQL-for-VisualStudio/mysql-for-visualstudio-1.2.3.msi
install lang at lalabas na ang connector
View attachment 267174

*** EDIT ***
download mo yung latest connector: http://dev.mysql.com/downloads/connector/net/
install mo una to bago yung 1.2.3
 

Attachments

  • mysql.png
    mysql.png
    22 KB · Views: 6
Last edited:
sir may sample codes po ba kayu ng pangrandom sa Lan Based Entrance Exam para dun sa tanong namin . every time na lalabas yung tanong with random sa database .?
 
sir may sample codes po ba kayu ng pangrandom sa Lan Based Entrance Exam para dun sa tanong namin . every time na lalabas yung tanong with random sa database .?

maglagay ka ng id an auto number tapos dun ka mag random.. siyempre dapat may column ka na category para ma filter mo kung anong itatanong..
 
Back
Top Bottom