well.. i am still searching for the answer thou.. :)
Audrey
well.. i am still searching for the answer thou.. :)
Audrey
Hi.. i have read before that we can receive file using bluetooth through obex file transfer.. but there is one question that i just cant find the answer.. how can we receive multiple file using bluetooth.. thanks in advance..
Audrey
wuih..... huh.... :confused: thanks for the article... i'll try to read it... hopefully understand it... but anyway thanks
Audrey
i have a problem with my printer, i wanted to send an esc/pos command to the printer but i dont know how to send it to LPT port through vb, can someone help with this? thanks before...
Audrey
or you can use module level boolean variable to check wether the button is already clicked :)
well you can use quite lot of choices. you can directly add the row into database using sql or just using dataset
you can use 'print document' component from the toolbox and handle the printing event for that component. something like using grapics.drawstring function
hope this little code will help you. here i am assuming that in 'customerdetails' table there are fields called 'uname' and 'pwd'. you call this function from you code and check for its return value, if it's true then the login is valid, or otherwise its invalid. for the ConStr property contain connectionstring that will be used to connect to the database, you can use something like this : 'provider=microsoft.jet.oledb.4.0;data source=d:\database\BankingMS.mdb' where you can replace 'd:\database\BankingMS.mdb' with you actual database location.
'before placing this code, make sure you have imported system.data.oledb
public function IsLoginValid(byval ConStr as string, byval UName as string, byval Password as string) as boolean
dim c as new oledbconnection(ConStr)
dim cmd as oledbcommand=c.createcommand
dim da as new oledbdataadapter(cmd)
dim dr as oledbdatareader
with cmd
.commandtext="select pwd from customerdetails where uname='" & _
uname.trim & "'"
try
dr=.executereader
catch x as exception
messagebox.show("Cant connect to database.")
finally
c.close
end try
end with
if dr.hasrows then
dr.read
if cstr(dr("pwd")).trim=password.trim then
return true
else
return false
end if
else
return false
end if
end function
ups my mistake, the code suppose to be something like this, sorry.. sorry..
for i=2 to 10
if i mod 2<>0 then debug.print i
next i
"if we dont want to help people, then don't at least don't say something rude to them" --how sad.. -- modified at 3:36 Sunday 3rd December, 2006
well, looks like no one here will help with the homework... try this
private sub Commad1_click()
dim i as integer
for i=2 to 10 'why 2 cos 1 is not prime number
if i mod 2 =0 then debug.print i
next i
end sub
selamat berjuang....
well, congratulation then....:-D
a bit type, is more like a boolean in vb6, it can contain 0 or 1, 0 means false, 1 means true. if you try to update a field of type bit you should use 0 or 1 as value, for example:
UPDATE tablename SET Field2 = 0 WHERE Field1 = 0
if you try to update a field called "Field2" where the criteria is Field1 of type BIT.
ups, my mistake, you should replace c:\db1.mdb with your database location, and you should use db.open instead of db.opendb methods, good luck:doh:
usually that error raise because of we forget declaring new instance of an object in vb6 try this
...
dim DB as new adodb.connection, tick as string
if answer=vbyes then
tick="True"
db.connectionstring="provider=microsoft.jet.oledb.4.0;data source=c:\db1.mdb"
db.open
db.execute "UPDATE Dono SET InvoicePrint = " & tick & " WHERE [NO] = "'" & dorder.dono.text & "'"
end if
end sub
thanks for the info, i will try to use GDI first with visual basic 6;)...
i think you should try this ;)
dim tick as string
if answer=vbyes then
tick = "true"
db.execute "UPDATE Dono SET InvoicePrint = " & tick & " WHERE [NO] = "'" & dorder.dono.text & "'"
mr_a_ghost@yahoo.com
i have been writing my own software by using windows controls such as command button and textbox. but sometime i wanted to create my own control perhaps a star-shaped command button, not just controls that were provided by vb, i have heard that this can be done by using windows GDI, can someone tell me where should i find info-beside msdn, like tutorial to better understand it. Thankz before.:^)
ok, i will try it out, thankz for the info.. ;) Ghost
yes, i am.. i dont know how to add icon to it.
can we add icon to mainmenu control in windows form? how? thanks. is there a sub or function like "mainmenu.items(x).icon=(filename)... :laugh:"