- Messages
- 4,715
- Reaction score
- 2
- Points
- 28
- Thread Starter
- #21
thanks po ok na prob ko.
try multithreading din kung need ng project mo ang asynch processing
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!
thanks po ok na prob ko.
bago pa lang ako sa vb.net...meron po ba kayong sample na simple calculator program para mapag-aralan at ma modify ko.?
try multithreading din kung need ng project mo ang asynch processing
thanks po...first ko pa pong gumamit nang vb.net..at kasisimula pa lang nang klase..so i hope na gagaling din ako..ahmm..anyway..na-aaplay ba talaga ang oop of vb.net ngayon?
ginawa ko nlng po sya class para asynch ang processing. hindi rin po pwede gamitin ang threading pag may pass na values eh kaya sa class ako naglagay ng timer. and ayun nga it behaves differently sa windows.forms.timer.
actually pwede;
pero sa case ng project mo, since kausap mo ay serial device, isang process lang pde kumausap sa kanya.
pero pwede mo ipasok sa thread yung process after makuha yung message:
for example;
specific message >>> may specific task
so you can run that task and read sms from the modem at the same time.
ang ginawa ko dati sa isang project ay yung SMS reader ay nasa isang thread,
ikot lang ng ikot, basa ng basa ng SMS,
since nasa isang bakcground thread sya, walng effect sa GUI at ibang process.
then pag may new SMS, i pass nya yung message sa isang process.
anyway, ok yang ginawa mo, pero what happens if
walang load yung sim?
walang signal?
do you return an error kung di nakapagsend
invalid number?
meron ako dati error mesages mg modem, di ko na mahanap, andami nun.
ganun din po gawa ko, nsa background lang read ng read tapos lagay ng lagay sa table, when sending stop ko reading, start konlng sya ulit after masend.
yan po mga kulang ko error trapping, lahat ng error ang nireturn ko is "error sending" so far sa gui ko nlng kinocontrol ung iba dapat gawin pero ung class na ginawa ko po eh try lang send once. ill improve it nlng as time goes by.
thanks po
start ka muna dito
http://homeandlearn.co.uk/NET/vbNet.html
OOP ang VB.NET,
halos lahat ng modern PL ay OOP na.
inaaply mo na yun without knowing it,
nasa language na yun.
btw, what is OOP ba sa pagkakaintindi mo?
review mo to, then tell us kung ganito ang VB.NET
http://en.wikipedia.org/wiki/Object-oriented_programming
http://en.wikibooks.org/wiki/Object_Oriented_Programming
as i said i presented 3 ways to do it, look at method3.
malamang naka bound ka sa isang design time datasource. i dont do that,
wala masyado control sa runtime pag ganun.
madami ka di pde gawin pag naka bound na yung grid.
which you will see as the samples progress.
what im showing here is also applicable to other controls not just datagridview.
and i want to show rin how it is done in code
the code is not only for datagridview, you can use the code in other operations as well.
if you have a better code to share then tignan natin, you can open your file naman sa notepad muna so we can see it.
baka di ko pa alam yang method mo.
share tayo ng mag codes and techniques. this is what this forum is for.
Public Function getStudent() As DataTable
If con.State = ConnectionState.Open Then con.Close()
con.Open()
cmd = New OleDbCommand("Select * from Students order by StudentID asc", con)
da = New OleDbDataAdapter(cmd)
da.Fill(ds, "Students")
Return ds.Tables("Students")
con.Close()
End Function
ganyan po ang paggawa ko! Datasource nga ang gamit ko sa pag.populate ng datagrid.. And besides, di lang po sa datagrid siya applicable... I know mas expert ka dito, e yan po ang natutunan ko! Tzk3.. Dyan po ako comfortable.. Hehehe! Paturo namn kung pano gumawa ng SMS app at pg.connect nito sa Internet! Wla kasi kaming project na ganyan, gustohin ko man, kakagraduate ko lang! tzk3..
i kwento ko lang sayo yung adventure ko sa SMS development:
long time ago....
NOKIA32 GSM Modem ang gamit ko
trial and error, VB6, basic forms palang, simple serial comm, AT Commands
then pinasalubungan ako ng boss ko ng WAVECOMM GSM Modem
meron akong mga codes na binago kasi mas flexible at mas madami supported ang wavecomm
then ginawa kong class sa vb6, still ganun parin
ginamit na namin sa tunay na application, para sa GCASH to noon
then meron pa sumunod, SMS Banking yata and others
still, every project kelangan ko i modify halos lahat ng code
then another modem, RoundSolutions naman
then from China, Teltonica at Huawei
nagsawa na ako kakagawa ng code
tapos nilipat ko sa .NET
may nakita akong project sa internet, gawa sa c#, i improved and modified it.
ginawa kong isang SMS Engine na capable of multiple modems, so isang program can command like 4 modems at once.
this is created as parang SERVICE, running lang sa likod.
other programs will communicate sa service na to using TCP/IP, MSMQ or via database to send, list or read SMS
so far nandun 24/7 na tumatakbo sa server, ginagamit sa SMS banking, notifications ng fund transfer at ewan king ano pa ang gamit ngayon
so for any new project, i just create the GUI and the business intelligence tapos connect na sa SMS Engine.
like yung isang project na walang pambili ng modem
we ended up using 6 USB Modems ng Broadband,
para sa loading business naman to.
this is inspired by ESET antivirus, eset has separate GUI for front end,
yung AV Engine nya is running as service, the 2 parts talks in TCP/IP channel
@ericgmejia
nice tutorials there sir,
very much understandable even bago ka sa VB.net
kailangan na lang nila magexperiment ng konti para maintindihan nila ang behavior ng bawat ng bawat objects...
keep it up sir...
ill try to help pag may time ako,
hehehe as for your SMS Engine,
naka VB.net na din ba xa?
Pwd makahingi ng source code,
kahit yung pang prepaid modem kits lang ang gamit,
hahaha
gusto ko lang po mapagaralan,
tnx
@sir eric
sana po mkabigay ung example ng multithreading na pwede mag pass ng parameters. kasi sa msdn walang parameter na pinapasa sa example.
ang iniisip ko po para mapass ang parameter sa ibang thread eh gagamit ng variable.
pagganto po kasi error.
dim trd as thread
trd = new thread(addressof somthing("ayaw"))
public sub somthing(variable as string)
msgbox(vairable)
end sub
NewThread = New Thread(AddressOf ProcessClientConnection)
NewThread.IsBackground = True
NewThread.Start()
Public Class MyProcessClass
dim _Param as string =""
Friend Sub New(parameter1 as string)
.....
_Param = parameter
End Sub
Friend Sub DoProcess()
...
_Param = .........
End Sub
Friend ReadOnly Property ProcessResult as string
... return result of DoProcess
End Property
End Class
Private Function StartProcess as boolean
dim parameter as string = "test"
dim cProcess as New MyProcessClass(parameter) 'pass the parameter thru this
Dim t As New Thread(AddressOf cProcess.DoProcess)
t.Start() 'start the thread
'======== pwede mo lagyan ng timeout yung thread, lalo pag BLOCKING ang thread
If t.Join(1000) Then
If cx.ProcessResult Then
Return True
Else
Return False
End If
Else
Return False
End If
End Function
try mo to:
using your code, populate a datagridview,
then on last column, put a counter with even numbers (2,4,6,8) for each rows.
lets see kung magagawa mo yan using your code.
point is, good presentation needs more code that usual.
regarding sa SMS app, just ask what you need to know,
wala kasi sa plan ko mag build ng ganun for a tuturial.