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!

Pre may example ka po ba nang pag insert n laman ng listview to database using stored procedure...?
possible naman yon di ba... salamat... ang tagal ko na naipit dyan...
using vb.net!

one thing na pwedeng gawin considering na mysql gamit mo is to start it with a transaction then loop on each row ng listview sa save. commit when all rows are successfully saved. which means na e cacancel ng database ang mga previous na na insert if may error sa kalagitnaan. see start transaction / commit.
 
gumawa ka ng function na e seset ang show ng form, this function accepts 2 forms at naka byref, hindi bval.

ex.

function swap(byref form1 as winform, byref form2 as winform)
form1.show = false
form2.show = true
end func

its not the exact code but thats the logic.





ayun. kuha nyo sir. eto yung hanap ko thanks :) haha.. feedback nlng aq, nga pala salamat dun sa dati ah. napa run ko na siya haha. yung query hehe.. thanks. :) FB nlng:clap::yipee:
 
patulong naman po sa Cash register ..
with database na yung simple lng gagawen ko lng pong basehan :praise:
 
Patulong naman po about sa Text to Speech program ko. Bale gusto ko po kasi yung pwedeng piliin kung male/female yung voice. Meron na po akong nagawang program pero male lang yung voice. Paano po yun lalagyan ng female voice? Salamat
 
Patulong naman po about sa Text to Speech program ko. Bale gusto ko po kasi yung pwedeng piliin kung male/female yung voice. Meron na po akong nagawang program pero male lang yung voice. Paano po yun lalagyan ng female voice? Salamat

download ka ng voices search mo lang microsoft voice sa google
 
mga kaSB mai idea po bah kau kung paano mag save ng array sa sql server?..gusto ko po kasi gumawa ng treeview at isave sa database..

Audio Setup 1
--2 Speaker Fitlord
--Boss Amplifier
--2 Tweeters
--Wirrings
--2 Colored Lights
--2 Blinking Lights

posible po ba to na ma save sa database?..ideas naman po mga kaSB...:help::help::help:
 
patulong naman po..

yun usercontrol ko, lumalabas sa panel sa from ko.
ito po kasi gusto kong mangyari, pag ni click ko yung button sa ribbon ko sa form, mag eenable yung textbox ko sa usercontrol..

ito po code sa form..

Private Sub btnNewInvoice_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnNewInvoice.Click
Dim bLoad As Boolean = True
Dim f As New uscPOS

If UIPanel.HasChildren Then
If Not TypeOf (UIPanel.Controls(0)) Is uscPOS Then
bLoad = False
End If
Else
bLoad = False
End If

If bLoad Then
f.btnNewInvoice.PerformClick()
f.txtCustomerName.Enabled = True
End If
End Sub

ito yung code sa usercontrol.

Private Sub btnNewInvoice_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnNewInvoice.Click
Dim y = MsgBox("na access mo ko!", MsgBoxStyle.YesNo)
If y = vbYes Then
txtCustomerName.Enabled = True
txtCustomerAddress.Enabled = True
txtContactNo.Enabled = True
End If

End Sub

trial and error lang yung silbi nung performclick.

lumalabas yung msgbox pero hindi niya na inii-enable yung textbox!
hindi ko alam kung bakit..:upset:
 
Last edited:
VB6>> ask ko may idea like buzzer type game.. example when the player clicks the Enter key then ppunta cya sa textbox1 and kpag Spacebar key mpupunta cya sa textbox2... keyascii b any idea nman po ... TIA
 
Mga IDOL! san po pwede magdl ng tutorial ng vb.net? mas prefer ko po kasi video pag puro txt inaantok ako Salamat po :excited:
 
VB6>> ask ko may idea like buzzer type game.. example when the player clicks the Enter key then ppunta cya sa textbox1 and kpag Spacebar key mpupunta cya sa textbox2... keyascii b any idea nman po ... TIA
yup, keyascii gagamitin mo dyan.
tagal na ako hindi nag VB6.
pero naalala ko lang, keyascii nan enter is 13.
ginamit din kasi namin yan dati.
if mo nalang then if = 13 then textbox1.focus elseif =(keyascii nan spacebar kung meron) then textbox2.focus mo.

@maskio sir, any idea kung ano problema sa code ko bakit hindi nag eenable yung textbox ko sa usercontrol?:thanks: in advance..
 
patulong naman po..

yun usercontrol ko, lumalabas sa panel sa from ko.
ito po kasi gusto kong mangyari, pag ni click ko yung button sa ribbon ko sa form, mag eenable yung textbox ko sa usercontrol..

ito po code sa form..

Private Sub btnNewInvoice_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnNewInvoice.Click
Dim bLoad As Boolean = True
Dim f As New uscPOS

If UIPanel.HasChildren Then
If Not TypeOf (UIPanel.Controls(0)) Is uscPOS Then
bLoad = False
End If
Else
bLoad = False
End If

If bLoad Then
f.btnNewInvoice.PerformClick()
f.txtCustomerName.Enabled = True
End If
End Sub

ito yung code sa usercontrol.

Private Sub btnNewInvoice_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnNewInvoice.Click
Dim y = MsgBox("na access mo ko!", MsgBoxStyle.YesNo)
If y = vbYes Then
txtCustomerName.Enabled = True
txtCustomerAddress.Enabled = True
txtContactNo.Enabled = True
End If

End Sub

trial and error lang yung silbi nung performclick.

lumalabas yung msgbox pero hindi niya na inii-enable yung textbox!
hindi ko alam kung bakit..:upset:

vb.net ba ito? alam ko sa vb.net hindi vbyes eh msgboxresult.yes
 
sir door breaker, gumagana po yan.
wag niyo nalang po pansinin yung msgbox, rekta nalang po kayo sa txtCustomerName.Enabled=true.
hindi ko lang po kasi alam bakit hindi niya ini-enable yung textbox sa user control gamit button sa form.

ganto po kasi nangyayari dyan.
me form ako namely frmMainMenu.
pag click nan ribbontab, lalabas yung user control ko sa loob nan panel ko sa frmMainMenu na nakadisable yung mga textbox.
pag click naman nan btnNewInvoice sa ribbonbar, DAPAT SANA mag eenable yung mga textbox sa usercontrol.

hindi ko maintindihan kung bakit hindi niya ma-enable, pero wala namang error na lumalabas.
pero pag naglagay ako nang button sa loob nang usercontrol na e-enable niya yung textbox, gumagana.
pero pag ina-access ko na yung button na yun sa frmMainMenu using uscPOS.Button1.Perfromclick(), ayaw gumana..
 
Last edited:
SQL!!!

Paano ako gagawa ng column, which is sum ng Cn2 sa sql?

here's the pix.
View attachment 134990


Note wala yang sum na Column .. pero paano ko ididisplay yan ? thanks po..


eto code ko

Code:
select distinct aa.site_id,aa.date_survey,aa.hour,sum(aa.cnt)as cn2 from (



SELECT ab.site_id, ab.date_survey, ab.hour, ab.cnt FROM(


SELECT a.site_id,a.date_survey,(a.hour_from + " - " + a.hour_to) AS hour, b.volume as cnt
FROM survinfo_1dir a,survraw_1dir b 
WHERE a.site_id =  "SV01003LZ_MC" AND a.header_no=b.header_no 
AND a.date_survey = "7/12/2004"

UNION ALL

SELECT   c.site_id,c.date_survey,(c.hour_from + " - " + c.hour_to) AS hour, (isnull(d.volume_inc_post,0 ) + isnull(d.volume_dec_post,0))  as cnt
FROM survinfo_2dir c,survraw_2dir d
WHERE c.site_id=   "SV01003LZ_MC" AND c.header_no=d.header_no 
AND c.date_survey = "7/12/2004"


)ab

GROUP BY ab.site_id,ab.date_survey, ab.hour



)aa
group by hour;



:pray::help::pray:
 

Attachments

  • ColumnSum.png
    ColumnSum.png
    7.3 KB · Views: 16
patulong naman po..

yun usercontrol ko, lumalabas sa panel sa from ko.
ito po kasi gusto kong mangyari, pag ni click ko yung button sa ribbon ko sa form, mag eenable yung textbox ko sa usercontrol..

ito po code sa form..

Private Sub btnNewInvoice_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnNewInvoice.Click
Dim bLoad As Boolean = True
Dim f As New uscPOS

If UIPanel.HasChildren Then
If Not TypeOf (UIPanel.Controls(0)) Is uscPOS Then
bLoad = False
End If
Else
bLoad = False
End If

If bLoad Then
f.btnNewInvoice.PerformClick()
f.txtCustomerName.Enabled = True
End If
End Sub

ito yung code sa usercontrol.

Private Sub btnNewInvoice_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnNewInvoice.Click
Dim y = MsgBox("na access mo ko!", MsgBoxStyle.YesNo)
If y = vbYes Then
txtCustomerName.Enabled = True
txtCustomerAddress.Enabled = True
txtContactNo.Enabled = True
End If

End Sub

trial and error lang yung silbi nung performclick.

lumalabas yung msgbox pero hindi niya na inii-enable yung textbox!
hindi ko alam kung bakit..:upset:

im not quite sure ano ang prob kasi di ko kita ang buong code, but my assumption is: naka readonly ang textbox or hind nag eevaluate ng maayos ang y...

pwede mong e msgbox ang y.tostring at ang textbox.enabled.tostring pati ang textbox.readonly.tostring para makita mo ang property nila. pwede ka din mag lagay ng break point mismo dun sa nag eenable ng textbox.
 
Re: SQL!!!

Paano ako gagawa ng column, which is sum ng Cn2 sa sql?

here's the pix.
View attachment 789755


Note wala yang sum na Column .. pero paano ko ididisplay yan ? thanks po..


eto code ko

Code:
select distinct aa.site_id,aa.date_survey,aa.hour,sum(aa.cnt)as cn2 from (



SELECT ab.site_id, ab.date_survey, ab.hour, ab.cnt FROM(


SELECT a.site_id,a.date_survey,(a.hour_from + " - " + a.hour_to) AS hour, b.volume as cnt
FROM survinfo_1dir a,survraw_1dir b 
WHERE a.site_id =  "SV01003LZ_MC" AND a.header_no=b.header_no 
AND a.date_survey = "7/12/2004"

UNION ALL

SELECT   c.site_id,c.date_survey,(c.hour_from + " - " + c.hour_to) AS hour, (isnull(d.volume_inc_post,0 ) + isnull(d.volume_dec_post,0))  as cnt
FROM survinfo_2dir c,survraw_2dir d
WHERE c.site_id=   "SV01003LZ_MC" AND c.header_no=d.header_no 
AND c.date_survey = "7/12/2004"


)ab

GROUP BY ab.site_id,ab.date_survey, ab.hour



)aa
group by hour;



:pray::help::pray:












okay na HAHA.. galing ko talaga chumamba :P :excited::help::yipee::clap: :p
 
Questions:

1st part :
1. 1st click - form1.show vbmodal.
2. In form1. - Click button then form1.hide and form2.show.
3. close form2.

2nd part :
1. 1st click - form3.show vbmodal
2. In form3. - Click button then form3.hide and form2.show.
3. close form2.

Question:
Gusto ko sana everytime na isasarado(QueryUnload/close) ko yung form2. dapat lalabas yung nakahide na form.
Else-if yung code nun dba? pero paano po ba yung condition nun? thanks. sana may tumulong.



-up ko lang to. di ko pa din makuha eh.

pwede ba tong code ko ?



hal.

isasarado ko na yung form2...


if form1.hide = true then
form1.show
else if form3.hide = true then
form3.show



mali kasi eh. but dapat ganyan mangyari..


:pray::help: help ulit ka sb :))
 
sir help po. pano yung code ng pag nag-click ng record sa listview lalabas sa mga textbox, pero hindi pa pwede maedit yung record, ma-e-edit lang sya kapag may na-click na button. help po sir.

:salute: :salute: :help: :help: :pray: :pray: :thanks: :thanks:
 
sir help po. pano yung code ng pag nag-click ng record sa listview lalabas sa mga textbox, pero hindi pa pwede maedit yung record, ma-e-edit lang sya kapag may na-click na button. help po sir.

:salute: :salute: :help: :help: :pray: :pray: :thanks: :thanks:

Data gridview nalang tapos gawin read-only para hindi maedit ,gawin mo sa rowheadermouseclick event,

Sample:
Dim dr as datagridviewrow=datagridview1.selectedrows(0)

txt1.txt=dr.cell(0).value.tostring()
'every textbox represent 1 cell kaya kung ilan ung cell mo sa selected rows ganun din un textbox mo
 
Questions:

1st part :
1. 1st click - form1.show vbmodal.
2. In form1. - Click button then form1.hide and form2.show.
3. close form2.

2nd part :
1. 1st click - form3.show vbmodal
2. In form3. - Click button then form3.hide and form2.show.
3. close form2.

Question:
Gusto ko sana everytime na isasarado(QueryUnload/close) ko yung form2. dapat lalabas yung nakahide na form.
Else-if yung code nun dba? pero paano po ba yung condition nun? thanks. sana may tumulong.



-up ko lang to. di ko pa din makuha eh.

pwede ba tong code ko ?



hal.

isasarado ko na yung form2...


if form1.hide = true then
form1.show
else if form3.hide = true then
form3.show



mali kasi eh. but dapat ganyan mangyari..


:pray::help: help ulit ka sb :))

Sir try mo maglagay ng label sa form2, na kapag ngclick ng hide sa form1 at form3 may designated na text na lalabas, tapos ung ngayon ang iche2ck mo using if statement... Hide mo nalang ung label para hindi kita,
 
Back
Top Bottom