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!

Um, di ko sir magets.. nung sinubukan ko yang codes na binigay nyo di na gumana.. pano po ito? :noidea:

tangalin mo n ung loop mo dun s codes ni sir erik at ung combobox. plitan mo nung mga txtbox mo.. running n un.
 
Hello Guys!
Pano magOutput ng data from database to listview without adding columns. Pili lang kasi yung column ko sa listview, gusto ko sana iOutput pa yung iba. :help:
 
ok. base on the code on Easy1, the code was not handled nicely. just pass the parameter to the parent.

ex.

easy1 has a public variable, lets say AnswerIsCorrect as Boolean.

after ng line frm.ShowDialog() saka mo e evaluate ang AnswerIsCorrect to have a running total. that way, hindi masyado mahaba ang code for each form, then to free resources, e dispose ang form before sya pupunta sa next item sa loop...

ts has a point, rather than having all 30 forms, make a generic form to call, then just replace the text in each button.

but thats your program... its your choice...

about sa 30 form,

Increase questionCount = 30, you might want this to be dynamic, pag click ng easy, = 10, pag click ng all = 30. then gawin mo nalang easy11 to easy20 (medium) and easy21 to easy30 (hard)

pag medium update mo ang line na to GenerateUnique(questioncount, 11, questioncount) and 21 for hard.

i'm not here to change what you have created (its your creativity) i'm here to help fix your creativeness...

oh I think I got it. hhe

I didn't notice the explanation earlier.. :)

I will try it, but
there's a problem, :)
nag try aku mag singit ng code para pag lumabas yung game over for, di mag eenable yung frm.showdialog, peru mukhang mahirap at di rin nagana ...

Actually balak ku nga sya lagyan ng high score peru yung laptop na gamit ku di pwede maa connect database, our instructor says that our laptop mihht have delete some dll, :)
 
what is the real goal of your app?

having 30 forms na slightly different from each other ir resource consuming,
if you can explain the real goal of this app baka meron approach na mas simple

like using 1 form and inheriting it

having an app opne 20 forms on my desktop is a nightmare,
i close ko agad yan and never to run that kind of app again
just sayin'

oh? so what's simple? I need it.. :)

that may be good.. :)
 
oh? so what's simple? I need it.. :)

that may be good.. :)

i see it as simple because i have the idea on how to implement a similar system, what i do not have my friend is the luxury of time to do it for you

what i have is just the time to guide you and point you to the direction i think i should go if ill be the one to do it myself
 
i see it as simple because i have the idea on how to implement a similar system, what i do not have my friend is the luxury of time to do it for you

what i have is just the time to guide you and point you to the direction i think i should go if ill be the one to do it myself

hhe. oh.. that's a big problem,, I'll pass it tomorrow and I don't have any clean code replid to me.. :)
 
hhe. oh.. that's a big problem,, I'll pass it tomorrow and I don't have any clean code replid to me.. :)

pls understand that this is not a "please do it for me, i need it asap" section,
we are just here to share ideas and give guidance.

as it is, im spending time monitoring and giving answers to questions on this thread while working on project with a tight deadline.

others who contribute answers on this section typically drop by once in a while to give their time to help, they also have their day jobs to attend to.

so you see that is the only thing i can provide right now, if there are other professional programmers out there who have the time to do it for you then you'll just have to wait or look for them,
otherwise you can start listening to suggestions and start doing it with our guidance.

if you want detailed suggestions you can chat me up on YM, i can spare time for a quick chat for you.
 
pls understand that this is not a "please do it for me, i need it asap" section,
we are just here to share ideas and give guidance.

as it is, im spending time monitoring and giving answers to questions on this thread while working on project with a tight deadline.

others who contribute answers on this section typically drop by once in a while to give their time to help, they also have their day jobs to attend to.

so you see that is the only thing i can provide right now, if there are other professional programmers out there who have the time to do it for you then you'll just have to wait or look for them,
otherwise you can start listening to suggestions and start doing it with our guidance.

if you want detailed suggestions you can chat me up on YM, i can spare time for a quick chat for you.
hhe. oh okay.. sorry haha

then what's your ym?
 
patulong po sa RFID tag..
ayaw po mastore o macopy yung 1st character( yung pabaligtad na "L") nung rfid tag sa database..nvarchar na yung datatype na ginamit ko pero ayaw pa din, gumamit na rin ako ng ibang datatypes :( gagamitin ko kasi yung rfid sa paglogin pero di sya nagana....yung pagsisisave kasi sa database eh ayaw nya tanggapin yung special character na yun..

rfid.png


eto lang po naisip kong solusyon:
1. letters/numbers lang pwede tanggapin ng textbox
2. maremove yung special characters pagkasalpak nung RFID card sa Reader at iinput sya sa ibang textbox then save sa database...

pero di ko alam..madami na po ako nasearch na codes kay google pero wala ako nakuha :(

paano po tanggalin yung 1st character na yun? o paano makuha lahat yung letters/numbers except yung mga special character?

vb.net po lang. na gamit ko. salamat po sa tutulong :salute:

up ko lang po :help:
 
up ko lang po :help:

gagamitin ba yan for search?
if not, try mo as binary gaya ng image, stored as byte array


**EDIT

need mo ba talaga i show sa textbox ang laman ng rfid card mo?
di yan secured kung nakikita ang laman
 
Last edited:
gagamitin ba yan for search?
if not, try mo as binary gaya ng image, stored as byte array


**EDIT

need mo ba talaga i show sa textbox ang laman ng rfid card mo?
di yan secured kung nakikita ang laman

yup..sa search po sya gagamitin..ang gagawin ko po dyan eh ihahide ko lang po yung textbox na may rfid code para di sya makita..
sige try ko po gawin binary..

eto po code ko

If Button21.Text = "Open" Then
'open the port
If Not (ComboBox4.SelectedItem Is Nothing) Then
SerialPort1.PortName = ComboBox4.SelectedItem.ToString
With SerialPort1
.BaudRate = 9600
.DataBits = 8
.Parity = IO.Ports.Parity.None
.StopBits = IO.Ports.StopBits.One
.WriteTimeout = 2
.ReadTimeout = 0
'.Encoding = System.Text.Encoding.GetEncoding("Windows-1252") 'encoding
'etc
End With
Try
SerialPort1.Open() 'try open
Button21.Text = "Close" 'opened
Catch ex As Exception
'port did not open
End Try
End If
Else
'close the port
If SerialPort1.IsOpen Then SerialPort1.Close()
Button21.Text = "Open"
End If
Button21.Enabled = True
End Sub


Private Sub DataReceived(ByVal sender As Object, _
ByVal e As System.IO.Ports.SerialDataReceivedEventArgs) _
Handles SerialPort1.DataReceived
If SerialPort1.BytesToRead > 0 Then 'are there bytes to read, s/b
Dim buff(SerialPort1.BytesToRead - 1) As Byte 'get a buffer to hold bytes
SerialPort1.Read(buff, 0, buff.Length) 'read the bytes
Me.BeginInvoke(New myDelegate(AddressOf SerialPortDelegate), buff)
End If
End Sub
Public Delegate Sub myDelegate(ByVal buff() As Byte)
Public Sub SerialPortDelegate(ByVal buff() As Byte)
RFIDCodeTextBox1.Text = System.Text.Encoding.ASCII.GetString(buff, 0, buff.Length)

End Sub

bale po naka-ASCII sya..tinry ko na din po yung ibang char type gaya ng UTF32, UTF7, UTF8 pero ganun pa din..yung UTF32 chinese characters sya..di din pwede mastore sa database kasi nag-iiba sya pag sinasave ko sya :help:

ang naisip ko lang po talaga eh: tanggalin na lang yung 1st character tas yung mga naiwan na characters eh icocopy at ipapaste sa ibang textbox then isasave ko sya sa database...ang problema po eh di ko magawa:

eto yung tinry ko na code:

RFIDCodeTextBox1.Text.Remove(0, 1)

^^ may kulang po ba dyan o mali?
 
yup..sa search po sya gagamitin..ang gagawin ko po dyan eh ihahide ko lang po yung textbox na may rfid code para di sya makita..
sige try ko po gawin binary..

eto po code ko



bale po naka-ASCII sya..tinry ko na din po yung ibang char type gaya ng UTF32, UTF7, UTF8 pero ganun pa din..yung UTF32 chinese characters sya..di din pwede mastore sa database kasi nag-iiba sya pag sinasave ko sya :help:

ang naisip ko lang po talaga eh: tanggalin na lang yung 1st character tas yung mga naiwan na characters eh icocopy at ipapaste sa ibang textbox then isasave ko sya sa database...ang problema po eh di ko magawa:

eto yung tinry ko na code:

RFIDCodeTextBox1.Text.Remove(0, 1)

^^ may kulang po ba dyan o mali?


kaya mo ba i convert sa HEX man lang yung string?

wala ba sa setting ng reader mo yan? baka naman pwede bsahin as HEX, kasi yun ginamit kong ACR120 wala naman ganyan, binabasa ko as hex so walang problem sa characters


baka sayo chinese ang settings
 
mga sir ask ko lng kung may idea kayo about sa "Performance Appraisal System" p share namn po pls...:help:

ano po b ung mga scope sa performance appraisal system



TIA>>>:clap:
 
mga sir ask ko lng kung may idea kayo about sa "Performance Appraisal System" p share namn po pls...:help:

ano po b ung mga scope sa performance appraisal system



TIA>>>:clap:

double post ka pa brod

bakit di mo muna i try mag research ng konti instead of coming here empty handed

sa wikipedia lang may nakita ako
http://en.wikipedia.org/wiki/Performance_appraisal

do your research muna then saka natin i discuss dito kung ano ang malabo sayo
hayaan mo muna yung coding at program, basta yung kung ano ang ginagawa ng system muna

that way masasanay kang mag research.
 
tangalin mo n ung loop mo dun s codes ni sir erik at ung combobox. plitan mo nung mga txtbox mo.. running n un.

ito po ung error na nalabas sir bakit po ganyan?
Syntax error in string in query expression 'EmployeeIDNumber = ''.
 
yoh..,:)

I'm back again hhe

I have a question.. :)

How can I disabled the code of this loop.. or codes when the the lives in the form turn out to 0 and show the GameOver form I've created a while ago to open the form that having the difficulty level of the questions?

Code:
Public Class Quiz1a
Const QuestionCount As Integer = 10
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim QuestionList As List(Of Integer) = GenerateUnique(QuestionCount, 1, QuestionCount)

For Each x As Integer In QuestionList
Dim frm As Form = DirectCast(Activator.CreateInstance(Type.GetType(S tring.Format("{0}.{1}{2}", "software", "Easy", x))), Form)
frm.ShowDialog()


Next
End Sub
Private Shared Function GenerateUnique(ByVal LoopCount As Integer, ByVal rMin As Integer, ByVal rMax As Integer) As List(Of Integer)
Dim holder As New HashSet(Of Integer)
Dim rand As New Random
Do
holder.Add(rand.Next(rMin, rMax + 1))
Loop Until holder.Count = 10
Return holder.ToList
End Function
End Class

Code for the lives - 3, which is seen on the label of the form.. :
Public Class Easy1
Public Count As Integer
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Count -= 1
Label2.Text = Str(Count)
Easy2.Label2.Text = Label2.Visible
Easy3.Label2.Text = Label2.Text
Easy4.Label2.Text = Label2.Text
Easy5.Label2.Text = Label2.Text
Easy6.Label2.Text = Label2.Text
Easy8.Label2.Text = Label2.Text
Easy7.Label2.Text = Label2.Text
Easy9.Label2.Text = Label2.Text
Easy10.Label2.Text = Label2.Text
If Label2.Text = 0 Then
GameOver.Show()
Me.Close()
End If
End
End Sub

Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
Count -= 1
Label2.Text = Str(Count)
Easy2.Label2.Text = Label2.Visible
Easy3.Label2.Text = Label2.Text
Easy4.Label2.Text = Label2.Text
Easy5.Label2.Text = Label2.Text
Easy6.Label2.Text = Label2.Text
Easy8.Label2.Text = Label2.Text
Easy7.Label2.Text = Label2.Text
Easy9.Label2.Text = Label2.Text
Easy10.Label2.Text = Label2.Text
If Label2.Text = 0 Then
GameOver.Show()
Me.Close()
End If
End Sub

Private Sub Easy1_Load_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Count = Label2.Text
End Sub

Private Sub Button1_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Count -= 1
Label2.Text = Str(Count)
Easy2.Label2.Text = Label2.Visible
Easy3.Label2.Text = Label2.Text
Easy4.Label2.Text = Label2.Text
Easy5.Label2.Text = Label2.Text
Easy6.Label2.Text = Label2.Text
Easy8.Label2.Text = Label2.Text
Easy7.Label2.Text = Label2.Text
Easy9.Label2.Text = Label2.Text
Easy10.Label2.Text = Label2.Text
If Label2.Text = 0 Then
GameOver.Show()
Me.Close()
End If
End Sub
End Class
 
Last edited:
Back
Top Bottom