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!

thnaks po na po sir jayrwafu

last na lang po nag build na ako ng proj.

tapos may parang mga system file pa sya. na parang ganito

WindowsApplication1.pdb
WindowsApplication1.vshost.exe
WindowsApplication1.vshost.exe.config
WindowsApplication1.xml

possible po bang matago ko yan?
 
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



mga boss baka meron kayung search code sample diraa pra sa crystal report gamit ang vb.net 2010. kasi may report daily kami at monthly.. sa sales & rental management system with SMS tracking system and monitoring system. sa monitoring nlang talaga kulang samin need lang talga namin yung search.. tapos edit kunti..
 
Last edited:
Hey.. :help::help::help:

Alam nyu ba kung pano kunin ung image/location ng isang image ng isang process using VB.net?

For example, may process na 'image.exe' tapos may image ung process na un, pano ko makukuha ung image/image location ng image na un from that process using VB.net program?

I assume, need ko pa kunin ung address ng image na ung from memory...

Or need na ng low-level programming dito?

Di ko talaga expertise ang software programming :weep:

:weep::weep:
 
Last edited:
Sirs..Good day!


VB.NET newbie here.. with C++ knowledge lang..

I am planning to create an APP just like a reviewer sana.. where in sa 1st Form mo pwd ka mkapili ng Topic(e.g. MATH,ENGLISH,SCIENCE and the like), then it will automatically generate random question as you go throughout, then lalabas dun ung mga questions continually unless i-end mo na ung session mo.. Then it will give you your score, correct items tsaka ung mga mali mo.

Then meron nman specific Form pra mkapag update ka ng questions mo, mkadagdag ng questions, mag load ng questions..






I have question/s:

1. Is it possible na pwd mkasave ng data entries(i.e. Questions) sa local lang na station?
2. Is it simply means po ba na kapag may Microsoft Visual Studio ka, need mo din ng SQL,mySQL?( dpends on how they called it.) Medyo nangangapa pa kc ako sa VB.Net at SQL(?)
3. Would you give me advice kung anung approach ang dapat kong gawin with these scenarios?
4. If i don't have an SQL installed sa station ko, mkakapag save po kaya ako ng entries dun sa APP?



Hoping for your kind feedbacks.
 
ask ko lang po. how can i refresh the datagridview ?

plan ko maglagay ng timer and every 5 seconds mag rerefresh sya

pano po kaya yun? thanks
 
ask ko lang po. how can i refresh the datagridview ?

plan ko maglagay ng timer and every 5 seconds mag rerefresh sya

pano po kaya yun? thanks


kung pano mo niload yung data, ganun din ang pag refresh.. pero pangit pag laging mag rerefresh kahit wala naman na update..
gawa ka ng isang table para sa i-read kung may update ba o wala, kung may update then refresh, pag wala eh di walang refresh.. :thumbsup:

- [email protected]
 
Last edited:
nag drop and drag lang ako dito

Untitled.png


ngaun via click button ako kung mag refresh and ung gamit ko is

Me.DBTableAdapter.Fill(Me.DBDataSet.DB)

ok naman kaso pag nilagay ko sa timer parang nag fliflicker ung dgv ko...

may nabasa ako na pag may changes sa db auto refresh na daw ung dgv kaso sa akin wala.

btw. di ako nag aadd sa dgv via windows form ako kung mag insert.


---- edit

medyo ok na po ung program ko ung refresh dgv na lang problema ko pero ready to use na

ask ko lang po paano ko gagawin oneclick tong program ko thanks.
 
Last edited:
nag drop and drag lang ako dito

http://s17.postimg.org/tddwfagwf/Untitled.png

ngaun via click button ako kung mag refresh and ung gamit ko is

Me.DBTableAdapter.Fill(Me.DBDataSet.DB)

ok naman kaso pag nilagay ko sa timer parang nag fliflicker ung dgv ko...

may nabasa ako na pag may changes sa db auto refresh na daw ung dgv kaso sa akin wala.

btw. di ako nag aadd sa dgv via windows form ako kung mag insert.



add ka ng table para dun ka mag read ng boolean kung may update o wala para hindi laging nag loload yung gridview mo..
 
help po kasi susubukan ko mag publis hng file and then nag publish naman sya kaso di makita ung accdb ko...

paano po kaya yun? i also need to publish a folder named image... di kasi makita pagtapos kong mag install
 
guys pahelp naman panu paganahin eto sa vb .. sa sql kasi gumagana pag inaaply ko na sa vb ayaw na "insert into voidreport select * from orderrecord where OrderNumber= 'ORN0000079'" gusto ko sana madelete ung mismong laman taz mapunta sa kabilang table ung mismong record na yan.. sample code nga po thanks
 
Pwede po ba paturo kung paano yung coding ng Search User sa Active Directory? May nakagawa na ba dito nun? Thank you in advance.
 
hello i have a button here. then i call nya si form3.showdialog ang problem is pag close ko ng form3. and then pag reopen ko ng form 3 di nag rereset ung form kung baga kung ano ininsert ko sa form nandun pa rin sya... si sya nag clclear pag form close.... help pls thanks.
 
hello i have a button here. then i call nya si form3.showdialog ang problem is pag close ko ng form3. and then pag reopen ko ng form 3 di nag rereset ung form kung baga kung ano ininsert ko sa form nandun pa rin sya... si sya nag clclear pag form close.... help pls thanks.

use form.close() and dispose it instead of form.hide().
or use a function like below

[CODE}
Sub OpenForm()
Dim myForm as Form1

myForm = new Form1()
myForm.ShowDialog()
myForm.Dispose()
End Sub
[/CODE}
 
Last edited:
form.close or me.close ginamit ko ee pero andun pa rin

pero yung me.dispose works .. tyvm !
 
do i have to install ung oledb driver para magamit ung isang app ?
 
Hi Good day po,

Sino na po naka encounter nitong error na to?

kadalasan syang lumalabas after ko mag execute ng queries ko ng pag iinsert ng madaming records.
ang process ko, read text file, onload then iinsert sya sa database ko.
nag susuccess naman sya mag insert, pero after ng procedure lalabas yang error na yan.
SQL Problem kaya or sa memory ng mobile ko? madami pa naman ako extra space sa disk kaya sa tingin ko hindi ito sa disk space.

any comments or suggestion?



Code:
Public Sub ReadMaster()
        If File.Exists("\Application\SOROSORO\IMPORT\Master.txt") = True Then
            Dim strItems_Data() As String
            Dim strItem As String
            Dim sqlceconn As SqlCeConnection
            Dim sqlsr As StreamReader = New StreamReader("\Application\SOROSORO\IMPORT\Master.txt")
            sqlceconn = New SqlCeConnection("Data Source = \Application\SOROSORO\SQL_DATA\DB.sdf ;Max Database Size = 4000 ;")
            sqlceconn.Open()
            'Ignore the First Line - HEADER
            '   sqlsr.ReadLine()
            Do While sqlsr.Peek > -1
                strItem = sqlsr.ReadLine.Trim
                strItem = strItem.Replace(Chr(34), Chr(32))
                strItem = strItem.Replace(Chr(37), Chr(32))
                strItem = strItem.Replace(Chr(38), Chr(32))
                strItem = strItem.Replace(Chr(39), Chr(32))
                strItem = strItem.Replace(Chr(44), Chr(32))

                strItems_Data = strItem.Split(Chr(9))
                insertMaster(strItems_Data, sqlceconn)
                Loop
            sqlceconn.Dispose()
            sqlceconn.Close()
            sqlsr.Close()
        End If
    End Sub

Code:
 Public Sub insertMaster(ByVal _data() As String, ByVal _myConn As SqlCeConnection)
        Dim _sqlcecmd As SqlCeCommand
        Try

            _sqlcecmd = New SqlCeCommand
            _sqlcecmd = _myConn.CreateCommand
            _sqlcecmd.CommandText = "INSERT INTO tbl_Master(Itemcode,ItemName,UomCode,ItmsGrpNam,Barcode" + _
                          ")" + _
                            "VALUES(@Itemcode,@ItemName,@UomCode,@ItmsGrpName,@Barcode)"

            _sqlcecmd.Parameters.Add("@Itemcode", SqlDbType.NVarChar, 50)
            _sqlcecmd.Parameters.Add("@ItemName", SqlDbType.NVarChar, 250)
            _sqlcecmd.Parameters.Add("@UomCode", SqlDbType.NVarChar, 50)
            _sqlcecmd.Parameters.Add("@ItmsGrpName", SqlDbType.NVarChar, 100)
            _sqlcecmd.Parameters.Add("@Barcode", SqlDbType.NVarChar, 100)
            _sqlcecmd.Prepare()

            _sqlcecmd.Parameters("@Itemcode").Value = _data(0).ToString.Trim
            _sqlcecmd.Parameters("@ItemName").Value = _data(1).ToString.Trim
            _sqlcecmd.Parameters("@UomCode").Value = _data(2).ToString.Trim
            _sqlcecmd.Parameters("@ItmsGrpName").Value = _data(3).ToString.Trim
            _sqlcecmd.Parameters("@Barcode").Value = _data(4).ToString.Trim


            _sqlcecmd.ExecuteNonQuery()
            _sqlcecmd.Dispose()

        Catch ex As Exception
            MsgBox("Insert" & ex.Message)
        End Try
    End Sub
 
EDIT Again: :D

Pa help naman po :) I have this code below .

Ano po ang tamang code para sa InitialDirectory,

I mean like this my project located at,

Code:
 C:\Users\Mema\Documents\Visual Studio 2008\Projects\Inventory\

Then after clicking the button(w/ opendialog) automatic na po sya na dyan ang directory.

My point is kahit anong directory sya malagaay, pag iopen ulit dun lang din sa local directory. :help:



Code:
With OpenFileDialog1
            .InitialDirectory = "C:\"
            .Filter = "All Files|*.*|JPEGs|*.jpg|Bitmaps|*.bmp|GIFs|*.gif"
            .FilterIndex = 2
        End With

        If OpenFileDialog1.ShowDialog() = DialogResult.OK Then
            With PictureBox1
                .Image = Image.FromFile(Me.OpenFileDialog1.FileName)
                .SizeMode = PictureBoxSizeMode.StretchImage
            End With
        End If
 
Last edited:
Back
Top Bottom