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 Eric, ask lang po..ano po ask lang po ako ng way kung pano ma set dynamically yung X and Y points para sa printing para kusa sya mag a-adjust depende sa length nung text or string, saka kung san mag start yung point ng printing... salamat po :)
 

Attachments

  • grid.jpg
    grid.jpg
    91.4 KB · Views: 12
mga master penge naman po ako sample codes ng unit converter sample po sana dollar to peso newbie lang kasi ako sa vb.net prelim exam kasi namin..salamat sa magbibigay ng codes.
 
Paano po ito?

paano ba kunin ung item na nasa listbox? at ilagay sa variable I mean ilalagay ko kasi siya na value ng combobox .. thx .. nasa column 3 at 4 kasi siya eh see pix

/View attachment 766671
 
Re: Paano po ito?

paano ba kunin ung item na nasa listbox? at ilagay sa variable I mean ilalagay ko kasi siya na value ng combobox .. thx .. nasa column 3 at 4 kasi siya eh see pix

/View attachment 766671



Do you mean ListView not ListBox? ListView yan dba.


Try mo to kung gagana:

Under ListView_MouseDoubleClick event . .

Code:
If ListView1.SelectedIndices.Count <= 0 Then
            Return
End If
        
Dim myData = ListView1.SelectedIndices(0)      
If myData>= 0 Then                
     combobox1.items.add(ListView1.Items(myData).SubItems(2).Text)
     combobox2.items.add(ListView1.Items(myData).SubItems(3).Text)
End If
 
Last edited:
Re: Paano po ito?

paano ba kunin ung item na nasa listbox? at ilagay sa variable I mean ilalagay ko kasi siya na value ng combobox .. thx .. nasa column 3 at 4 kasi siya eh see pix

/View attachment 766671

combobox1.selectedtext = listView.SelectedItems(0).SubItems(1).Text

where subitems is the column, palitan mo nalang ang 1
 
combobox1.selectedtext = listView.SelectedItems(0).SubItems(1).Text

where subitems is the column, palitan mo nalang ang 1

Do you mean ListView not ListBox? ListView yan dba.


Try mo to kung gagana:

Under ListView_MouseDoubleClick event . .

Code:
If ListView1.SelectedIndices.Count <= 0 Then
            Return
End If
        
Dim myData = ListView1.SelectedIndices(0)      
If myData>= 0 Then                
     combobox1.items.add(ListView1.Items(myData).SubItems(2).Text)
     combobox2.items.add(ListView1.Items(myData).SubItems(3).Text)
End If




--working na po siya.. thx.. nakahanap na ako ng codes in internet
 
mga boss panu po ba ang tamang code para pag maximize mo ang isang form ay pati button niya at lahat ng content ay nasa tamang lalagyan??pahelp po...
 
mga boss panu po ba ang tamang code para pag maximize mo ang isang form ay pati button niya at lahat ng content ay nasa tamang lalagyan??pahelp po...

use anchor property. by default naka top left ang anchor. if gusto mo sa gitna lang remove the left anchor. if gusto mo nasa bottom parati remove the top anchor and put the bottom one.

experiment mo nlng kung ano gusto mo mangyari.
 
Sir anu po ba ang magandang thesis title:noidea:..?using vb.net...malaking salamat po sa magbibigay ng ideas.:help:
 
mga sir sino po may workaround sa reporting ng RTF sa RDLC. di po kasi supported ng RDLC ung RTF, html lang daw kaso hindi ko pwede gamitin yun strictly rtf lang. pa help naman po sa may alam salamat
 
meron po bang framework na pang design sa components ng vb.net?, yung mga buttons, tabs, windows.. pero iba ang design nd yung default lng?..,, kumbaga sa web parang jqwidget, dhtmlx ganun..
 
Mga Master tanung ko lang po regarding Threading

Gusto ko sana mag try mag Threading without using

CheckForIllegalCrossThreadCalls = False

Snippet Code po to ng Sub na nag QueQuery sa Database

Panu po ba ma Implement yung InvokeRequest parate kasing

Cross-thread operation not valid: Control 'lblLoading' accessed from a thread other than the thread it was created on.
If DataRead.HasRows Then
lblLoading.Visible = False
While DataRead.Read
countitem += 1
If ListView2.InvokeRequired Then
ListView2.Items.Add(Trim(DataRead(0).ToString))​
End If
ListView2.Items.Add(Trim(DataRead(0).ToString))
ListView2.Items(ListView2.Items.Count - 1).SubItems.Add(Trim(DataRead(1).ToString))
ListView2.Items(ListView2.Items.Count - 1).SubItems.Add(Trim(Format(DataRead(2), "yyyy-MM-dd")))

End While
lblItem.Visible = True
lblItem.Text = countitem & " Item/s"
End If
 
Last edited:
[question]

bakit po hindi nalang gumamit ng adodb dito?

mas madali din naman po?

what is their difference?
 
bakit ayaw mag Update ng records ko.

Patingin nga mga boss kung anong kulang?

Code:
Private Function Update_Record() As Boolean

Dim STRSQL As String
Dim iStatus As Integer

Dim dateOnly As Date
dateOnly = format(dtp1.Value, DATEFORMAT)



If optApprvd.Value Then
    iStatus = 1
    Else
    iStatus = 0
End If
    


sComma = Chr(44)
sSpace = Chr(32)

Dim intLoopIndex As Integer
Dim sList As Variant
    For intLoopIndex = 0 To List1.ListCount - 1
       sList = sList & List1.List(intLoopIndex) & sComma & sSpace
    Next intLoopIndex
        
    
    

   On Error GoTo errHandler
STRSQL = "UPDATE " & APPROVAL & " SET site_id=  '" & txtSite.Text & "'  ," & _
                                           "date_survey='" & txtDateSurvey.Text & "'   ," & _
                                             "loginname=  '" & txtUserName.Text & "'," & _
                                             "date_approved=  '" & dateOnly & "' ," & _
                                             "approval_status= " & CInt(iStatus) & "," & _
                                             "remarks=  '" & sList & "'      " & _
                 "WHERE " & _
                                             "site_id='" & txtSite.Text & "' AND date_survey='" & txtDateSurvey.Text & "'"
  
  
    Debug.Print STRSQL
    
    gConnect1.BeginTrans
      Update_Record = True
    gConnect1.Execute STRSQL

         MsgBox "Check and Approval Information was Updated!", vbInformation
         

    Exit Function
errHandler:
    MsgBox Err.description
    Update_Record = False
End Function


eto yung VALUE NG STRSQL KO!


thx mga ka SYMB .:D :help:
 
[question]

bakit po hindi nalang gumamit ng adodb dito?

mas madali din naman po?

what is their difference?

ado.net na kasi luma na ang adodb


Patingin nga mga boss kung anong kulang?

Code:
Private Function Update_Record() As Boolean

Dim STRSQL As String
Dim iStatus As Integer

Dim dateOnly As Date
dateOnly = format(dtp1.Value, DATEFORMAT)



If optApprvd.Value Then
    iStatus = 1
    Else
    iStatus = 0
End If
    


sComma = Chr(44)
sSpace = Chr(32)

Dim intLoopIndex As Integer
Dim sList As Variant
    For intLoopIndex = 0 To List1.ListCount - 1
       sList = sList & List1.List(intLoopIndex) & sComma & sSpace
    Next intLoopIndex
        
    
    

   On Error GoTo errHandler
STRSQL = "UPDATE " & APPROVAL & " SET site_id=  '" & txtSite.Text & "'  ," & _
                                           "date_survey='" & txtDateSurvey.Text & "'   ," & _
                                             "loginname=  '" & txtUserName.Text & "'," & _
                                             "date_approved=  '" & dateOnly & "' ," & _
                                             "approval_status= " & CInt(iStatus) & "," & _
                                             "remarks=  '" & sList & "'      " & _
                 "WHERE " & _
                                             "site_id='" & txtSite.Text & "' AND date_survey='" & txtDateSurvey.Text & "'"
  
  
    Debug.Print STRSQL
    
    gConnect1.BeginTrans
      Update_Record = True
    gConnect1.Execute STRSQL

         MsgBox "Check and Approval Information was Updated!", vbInformation
         

    Exit Function
errHandler:
    MsgBox Err.description
    Update_Record = False
End Function





thx mga ka SYMB .:D :help:

asan ang connection string mo? and command?
 
Last edited:
Re: bakit ayaw mag Update ng records ko.

Patingin nga mga boss kung anong kulang?

Code:
Private Function Update_Record() As Boolean

Dim STRSQL As String
Dim iStatus As Integer

Dim dateOnly As Date
dateOnly = format(dtp1.Value, DATEFORMAT)



If optApprvd.Value Then
    iStatus = 1
    Else
    iStatus = 0
End If
    


sComma = Chr(44)
sSpace = Chr(32)

Dim intLoopIndex As Integer
Dim sList As Variant
    For intLoopIndex = 0 To List1.ListCount - 1
       sList = sList & List1.List(intLoopIndex) & sComma & sSpace
    Next intLoopIndex
        
    
    

   On Error GoTo errHandler
STRSQL = "UPDATE " & APPROVAL & " SET site_id=  '" & txtSite.Text & "'  ," & _
                                           "date_survey='" & txtDateSurvey.Text & "'   ," & _
                                             "loginname=  '" & txtUserName.Text & "'," & _
                                             "date_approved=  '" & dateOnly & "' ," & _
                                             "approval_status= " & CInt(iStatus) & "," & _
                                             "remarks=  '" & sList & "'      " & _
                 "WHERE " & _
                                             "site_id='" & txtSite.Text & "' AND date_survey='" & txtDateSurvey.Text & "'"
  
  
    Debug.Print STRSQL
    
    gConnect1.BeginTrans
      Update_Record = True
    gConnect1.Execute STRSQL

         MsgBox "Check and Approval Information was Updated!", vbInformation
         

    Exit Function
errHandler:
    MsgBox Err.description
    Update_Record = False
End Function





thx mga ka SYMB .:D :help:





--OKAY NA PO , Running na siya haha.. thx . na Search ko sa google
 
patulong papz. Type MISMATCH .. bkit kaya?

ado.net na kasi luma na ang adodb




asan ang connection string mo? and command?

Code:
STRSQL = " SELECT g.date_approved, (a.hour_from + " - " + a.hour_to) AS hour, g.site_id, g.date_survey,                            b.volume as cnt,                                                    e.vehicle_type,                                     g.remarks   FROM " & APPROVAL & "g ," & SURVHEADERS_1 & " a, " & SURVDETAILS_1 & " b , " & VEHICLE_TYPES & " e " & _
         " WHERE  a.header_no=b.header_no AND a.site_id = g.site_id AND e.vehicle_type = b.vehicle_type " & _
         " UNION ALL " & _
         " SELECT g.date_approved, (c.hour_from + " - " + c.hour_to) AS hour, g.site_id,g.date_survey,                          (isnull(d.volume_inc_post,0 ) + isnull(d.volume_dec_post,0))  as cnt, f.vehicle_type,                                      g.remarks   FROM " & APPROVAL & "h ," & SURVHEADERS_2 & "c,  " & SURVDETAILS_2 & " d , " & VEHICLE_TYPES & " f " & _
         " WHERE  c.header_no=d.header_no AND c.site_id = h.site_id AND f.vehicle_type = d.vehicle_type"
         '" ORDER BY hour"

thx ka SYmB.:pray::pray::pray:
 
Back
Top Bottom