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!

Display frmAbout as a modal dialog

Code:
Dim frmAbout as New Form()
frmAbout.ShowDialog()


Display frmAbout as a modal dialog with owner
Me = ParentForm e.g. MdiMain
Code:
' Visual Basic
Private Sub mnuAbout_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles mnuAbout.Click
   Dim f As New Form()
   f.ShowDialog(Me)
End Sub
 
Hello mga sir! Patulong nga po:

1. Pano po iset ng (yyyy-mm-dd) sa vb10 yung date na galing sa mysql database?
2. Pano po magcalculate ng age sa vb10 base sa birthdate na galing sa mysql database?
 
Hello mga sir! Patulong nga po:

1. Pano po iset ng (yyyy-mm-dd) sa vb10 yung date na galing sa mysql database?
2. Pano po magcalculate ng age sa vb10 base sa birthdate na galing sa mysql database?

1.
Dim dr As MySqlDataReader = cmd.ExecuteReader(sql)

If dr.Read()
Dim mydate As DateTime = dr("date_column")

txtDate.Text = mydate.ToString("yyyy-MM-dd")
End If

2.
Public Function GetCurrentAge(ByVal dob As Date) As Integer
Dim age As Integer
age = Today.Year - dob.Year
If (dob > Today.AddYears(-age)) Then age -= 1
Return age
End Function

txtAge.Text = GetCurrentAge(myDate).ToString()

Pad di gumana, ask google...
 
Pa help naman po sa pag select ng files. gusto ko po sanang mang yari is, kahit anong file name nya basta XML sya, e mareread sya.
or Like inv____.xml

eto po code ko.

Code:
Dim directory1 As String = My.Application.Info.DirectoryPath + "\XML\"
Dim filePath As String = directory1 + "Inventory001.xml"
ds_xml.ReadXml(filePath)
ang ginawa is manual na pag set ng file.
gusto ko sana basta xml sya eh makuha yung filename nya or path.
auto updater po ito kaya di pwede gumamit ng openfile dialog hehe.
 
Try mo to....


Code:
Imports System.IO

Dim fInfo As FileInfo()                
Dim i As Integer = 0         
Dim path AS String = "INSERT FILE PATH"       
Dim dInfo As New DirectoryInfo = New DirectoryInfo(path)   

fInfo = dInfo.GetFiles("*.xml")              
Dim files As String()                
Dim File As String                
files = Directory.GetFiles(path, "*.xml")                
For Each File In files                        
   'Do Something With The File                 
   i += 1                
Next
 
Sir Knives ask ko lang po how to create client-server sa vb.net.. halimbawa si PC1 andun ung server po tapos si PC2 magaad ng data then magsisave cya sa PC1 panu po ang connection nun at san po my babaguhin pa?
 
Guys patulong naman! Gumamit ako ng arraylist to put multiple data. So ang problema ko naman ngayon nag duduplicate siya since galing siya sa query ko. Pano ko tatanggalin yung duplicates sa Arraylist ko? As you can see in my attachment marami na siyang comment lines since ang dami ko nang procedure na ginawa pero nag duduplicate pa rin. Any suggestions and codes to get through this? I need urgent help about this. Thank you Pro Programmers!

- - - Updated - - -

Guys patulong naman! Gumamit ako ng arraylist to put multiple data. So ang problema ko naman ngayon nag duduplicate siya since galing siya sa query ko. Pano ko tatanggalin yung duplicates sa Arraylist ko? As you can see in my attachment marami na siyang comment lines since ang dami ko nang procedure na ginawa pero nag duduplicate pa rin. Any suggestions and codes to get through this? I need urgent help about this. Thank you Pro Programmers!

Okay na po pala mga ka SB :)
Ang ginawa ko Instead of removing duplicated items in array.
I remove duplicated items in the listbox wherein I putted the data in arraylist
I used this method :
Private Sub RemoveDupItems(ByRef ListBoxObj As ListBox)
Dim ItemCount As Integer = ListBoxObj.Items.Count
Dim Position1 As Integer = 0

While (Position1 < ItemCount)
Dim Position2 As Integer = 0
While (Position2 < ItemCount)
If Position1 <> Position2 Then
If ListBoxObj.Items(Position1) = ListBoxObj.Items(Position2) Then
ListBoxObj.Items.RemoveAt(Position2)
ItemCount -= 1
Exit While
End If
End If
Position2 += 1
End While
Position1 += 1
End While
End Sub

And call this method :
For Each Item In actorslistf
ListBox1.Items.Add(Item)
RemoveDupItems(ListBox1)
Next
 

Attachments

  • Untitled.png
    Untitled.png
    31.4 KB · Views: 4
Sir Knives,

How to Create Login Form using vb.net

- vb.net Login Code
- connection string
- how to connect to the database MsSql


Hoping for your soon reply!


Thanks!
 
Sir Knives,

How to Create Login Form using vb.net

- vb.net Login Code
- connection string
- how to connect to the database MsSql


Hoping for your soon reply!


Thanks!

Hindi kita magagawan ng tutorial...
Pero try mo to...
Goto first page of this thread, merong sample si sir Eric, aralin mo lang...
Basic CRUD lang naman ang need mo.

From scratch gawa ka ng simpleng data-entry, kapag naka-encounter ka ng problem, balik ka lang dito and I'm willing to help...
 
Hello, sino po pwede tumulong sa akin ? Malapit na kasi deadline nito. >.< Health Services Management Information System para sa School Clinic yung study.
Madami pa akong gagawin, may mga tanong lang ako na sana pwedeng masagot po agad. Pa PM po ako. :(
Eto isa, paano po isasave sa database yung mga nacheck na item sa checkbox yung multiple?
 
Last edited:
Hello, sino po pwede tumulong sa akin ? Malapit na kasi deadline nito. >.< Health Services Management Information System para sa School Clinic yung study.
Madami pa akong gagawin, may mga tanong lang ako na sana pwedeng masagot po agad. Pa PM po ako. :(
Eto isa, paano po isasave sa database yung mga nacheck na item sa checkbox yung multiple?

Papano ba yung process flow mo?
 
Papano ba yung process flow mo?

Eto po sir, Nagawa ko na po yung saving ng Personal Information Tab at tsaka Physical Examination Tab. Yang medical history tab nalang po sa add patient.
Di ko po alam if paano yung table na gagawin ko sa db for the medical history para sa mga sakit na yan at paano siya masesave sir.
Bali ang naiisip ko sir e sa table na medicalhistory is lalagay ko lahat yan sa column isa isa Allergy.. bla bla. tapos pag nachecked eh ang mapupunta sa database ng result is "Yes". Pag unchecked eh kahit wala nang laman.

attachment.php

View attachment 189434
 

Attachments

  • Screenshot_1.jpg
    Screenshot_1.jpg
    282.4 KB · Views: 60
Last edited:
Elow mga master.. need your help po sana para sa mga VB.net master dyan.. currently im doing a POS system and halos kompleto na.. ang problem ko po ngaun is hindi ko madirect yung printing ko papunta sa printer. Im using crystals report for my receipt and other reports. which is nakareport view, at nag po-prompt sya to choose the printer..gusto ko kasi walang user intervention,pag click nya ng botton mag print na agad sa assign printer.please see may sample report.



View attachment 189454
View attachment 189455
 

Attachments

  • Receipt.JPG
    Receipt.JPG
    88.5 KB · Views: 14
  • Script.JPG
    Script.JPG
    55.7 KB · Views: 9
Last edited:
Mga sir ask ko lang po kung pwede ba ilipipat ung print code nung sa report viewer po.. gusto ko sana ilipat sa isang button po..
 
Back
Top Bottom