jhai_salvador 48 Junior Poster

On form 1

Public Sub Command1_Click()

On form 2

Private Sub Command1_Click()

just change it to public....
then call

Form1.Command1_Click()
jhai_salvador 48 Junior Poster

wow.. thank you.. you solve it..

I'll be back for the part 2 next time. Thanks..

jhai_salvador 48 Junior Poster

Hello!.. I am a VB6 programmer and I want to learn basic of C# Programming. So can anyone help me out?..

I just want to learn on "How will I do this in Visual C#"..

this is a sample code from VB6, now, how will I do this in C#?

Sub Routines

Private sub SetValue(ByVal str as String)
'Some statements here...
Call AssignIt("Some String Here")
End Sub

Function

Public Function AssignIt(ByVal str as string) as String
'Some statements here..
AssigntIt = str
End Sub

Can anyone help me...

jhai_salvador 48 Junior Poster

hehe.. because that code is for VB6 and not for VBS... sorry..

jhai_salvador 48 Junior Poster

MSDN library might help you...

jhai_salvador 48 Junior Poster

if you just need to open it, you can use SHELL in vb, something like this...

Shell YourVBSFile, vbMaximizedFocus
jhai_salvador 48 Junior Poster

Developinga Touch Screen application like a Touch Screen POS huh, you dont need anything (Except for the touch screen hardware).., Just build it like a normal application in VB6 and Thats it.

jhai_salvador 48 Junior Poster

try browsing my website, you might find something in my Project page.

jhai_salvador 48 Junior Poster

Does your listview property is a is in report view?..
I do my list view this way..

Do While Not rs.EOF
    ListView1.ListItems.Add , , rs!model_name
    ListView1.ListItems.Item(ListView1.ListItems.Count).ListSubItems.Add , , rs!BOXID
    ListView1.ListItems.Item(ListView1.ListItems.Count).ListSubItems.Add , , rs!Description
    rs.MoveNext
Loop

You can do it just like that...

jhai_salvador 48 Junior Poster

dao... i dont use dao....

jhai_salvador 48 Junior Poster

use a variable to hold it..

jhai_salvador 48 Junior Poster

Try searching BASS dll in google. You can use this to record / play music.

jhai_salvador 48 Junior Poster

Yeahh.. they are right.. but if your a totally noob in software development / game development, you can just google it or you can visit my website for some samples.

jhai_salvador 48 Junior Poster

Well, first you need a Crystal Report. Their are different version of Crystal Report (Just search it on the internet). If you want a free one, I think you can search the older version of it version 4.5 i guess, This was release as an Add In in Visual Basic so you can use it for free.

jhai_salvador 48 Junior Poster

have you tried using DoEvents then sleep.. try it.. i hope it helps..

jhai_salvador 48 Junior Poster

I dont use class methods for some of my projects.....

download WinRAR or WinZIP, Just google it.
jhai_salvador 48 Junior Poster

hello... Try visiting my website and download some sample of my projects their, you might learn something there... I think i have some ado sample without sql...

jhai_salvador 48 Junior Poster

One more thing, if you found a solution on how to lock pendrive by serial number, pm me or just post it where you found it. thanks.

jhai_salvador 48 Junior Poster

You need to get serial no of a specific drive right?... Here..
Add this reference "Microsoft Scripting Runtime"
Then, to get Serial No of the drive, add this Function.

Public Function GetDriveSerial(xDrive as string) as string
Dim FSO As New FileSystemObject
If FSO.GetDrive(xDrive).IsReady = True then
   GetDriveSerial = FSO.GetDrive(xDrive).SerialNumber
End if
End Function

xDrive = Drive letter.. ex. "C"
This will return the serial no of xDrive..
Hope this will help you.

jhai_salvador 48 Junior Poster

Heres another one, hide it... lol.. haha..

Combo1.Visible = False
jhai_salvador 48 Junior Poster

Dont know what is your problem, If you want to learn something like basic database management, visit my website, download some samples codes, and start learning SQL and ADO..
http://www.silentproject.tk
Use it for studies only.
More samples in google and yahoo..
Peace Out Peeps...

jhai_salvador 48 Junior Poster

Dont know what is your problem, If you want to learn something like basic database management, visit my website, download some samples codes, and start learning SQL and ADO..
http://www.silentproject.tk
Use it for studies only.
More samples in google and yahoo..
Peace Out Peeps...

jhai_salvador 48 Junior Poster

Yeahh... post that project here.. http://www.rentacoder.com then look for me so i can participate in the bid. hehe

jhai_salvador 48 Junior Poster

wow... sorry for the late reply.. lol..
i can only make school projects when I am going to be paid. haha... peace out.

jhai_salvador 48 Junior Poster

"LCD.*, LCS.*, LS.*, LMM.*"

try changing the * to the real field name / table name...

jhai_salvador 48 Junior Poster

How to connect username and password in a database for more secure login?

yeah.. your lucky.. hehe.. maybe you can use encryption method in your application for it if you want it secured.

jhai_salvador 48 Junior Poster

Try creating a view in your MSAccess Database then use that in your Data Report..

jhai_salvador 48 Junior Poster

Im a freelance programmer, maybe i can help you, as long as you pay through Western Union.. :) haha.. if your interested, PM me, or visit my website... :)

jhai_salvador 48 Junior Poster

if your new to VB6, then visit my website, there are lots of sample about database management that I created. You might learn something there. Just download the project you like, then learn from it. SilentProjectâ„¢ Softwares

jhai_salvador 48 Junior Poster

Please give us more details like where is the line your getting that error..

jhai_salvador 48 Junior Poster

Ok here is an example..

Private Sub ListView1_Click()
Text1.Text = ListView1.SelectedItem.Text
End Sub

This is on ListView1_Click event, this will Display the selected text of listview in the Textbox.

jhai_salvador 48 Junior Poster

Okei thanks, i found something.. ill try it later..

jhai_salvador 48 Junior Poster

you must have a GSM MODEM and you should know AT Commands for it to function. GSM Modem must also have a SIM Card so you can use it.

jhai_salvador 48 Junior Poster

just remove this line

dataDeposit.Recordset.Edit
jhai_salvador 48 Junior Poster

if you are going to connect it from a remote server.
Here is the connection string..

"Driver={MySQL ODBC 5.1 Driver};Server=servername;Port=3306;Database=database;User=username; Password=password;Option=3;"

you must also have MySQL connector driver.. just google it then download the driver...

jhai_salvador 48 Junior Poster

See DataFormat of the TextBox in Property Window, maybe there is something useful there..

Goodluck..

jhai_salvador 48 Junior Poster

Hello!.. Its me again..

I Just want to know that, is it possible to Disable a user from copying a file from computer to another device like USB Drive?

I want to Disable Copying of files by;

Disabling CTRL+C,
Removing Copy from Right Click or Move (when dragging the file to another location), or by
Sending a keystroke in "Cancel" button of the "Copying..." window..

I am not writing a virus or something, i just want to prevent other user from copying my files..

Hoping for your positive response...

jhai_salvador 48 Junior Poster

Here.. try this..

Private Declare Function InternetGetConnectedStateEx Lib "wininet.dll" (ByRef lpdwFlags As Long, ByVal lpszConnectionName As String, ByVal dwNameLen As Integer, ByVal dwReserved As Long) As Long

Dim sConnType As String * 255

Sub CheckNetCon()
Dim Ret As Long
Ret = InternetGetConnectedStateEx(Ret, sConnType, 254, 0)
If Ret = 1 Then
    MsgBox "You are connected to Internet via a " & sConnType, vbInformation
Else
    MsgBox "You are not connected to internet", vbInformation
End If

End Sub

Reference: http://www.ex-designz.net/apidetail.asp?api_id=465

jhai_salvador 48 Junior Poster

Note: Divide yourselves into groups

Your funny... lol.. if you are just starting database management in visual basic then visit my website @ http://silentproject.tk

Download some of my projects there and start learning..

jhai_salvador 48 Junior Poster

hello sir thank you i got it.. but i have some problem regarding in my icon..what is the best resolution to use.?...hoping for your positive responds.thank you in advance...

I know you will have this problem (But if you are using .NET version of VB, you will not have this problem)

You must have an icon editing tool, like this one (I use this always to edit my icons)..

http://www.axialis.com

Then. use it to edit your icon with "True Color" Format
(Windows XP icon format) (256 - 32 bit color) (16,8M - 32).

Thats it.

jhai_salvador 48 Junior Poster

hello sir thank you for helping me...more power to you...

Your welcome!.. you can mark this thread now as Solve.

jhai_salvador 48 Junior Poster

hello sir thank you for the reply..i got it sir i also copied my database to the desktop,without this database i can get an error...thank you again sir.
by the way sir how can i change my icon of my exe file?..hoping for your positive responds...

Changing an application can be done by doing this:

if you haven't change the Icon of you FORM then do this

Click your form.
Then look for Icon in Properties window.
Click [...] button and browse your icon file.

Now to change your Exe Icon.

In Menu, Click Project > Project Properties
Click the Make Tab
Just select your Form Icon that you want to use.

I Hope this will help you.
See picture attachment.

jhai_salvador 48 Junior Poster
Copy your exe and Database in one folder
change the database path in your code and use;
App.Path & "\project.mdb"
jhai_salvador 48 Junior Poster

Oracle9i database...

Goto my website at http://www.silentproject.tk
and browse to My Project > 2nd Year 2nd Semester
download one of my project and you can see how did i connect it to oracle database...

jhai_salvador 48 Junior Poster
Private Sub Form_Load()
'Add ITems in the List
List1.AddItem "One"
List1.AddItem "Two"
List1.AddItem "Three"
List1.AddItem "Four"
List1.AddItem "Five"
List1.AddItem "Six"
List1.AddItem "Seven"
List1.AddItem "Eight"
List1.AddItem "Nine"
List1.AddItem "Ten"
End Sub

Private Sub List1_Click()
MsgBox "youve selected: " & List1.List(List1.ListIndex) & vbCrLf & "with an Item Index of: " & List1.ListIndex
End Sub

List1.Selected is Boolean, this will just tell you if an item is selected and returns you a boolean answer..

List1.ListIndex - this will show you what INDEX in the list what you have just selected

List1.List(List1.ListIndex) - this will show you the TEXT you have selected..

Hope you understand what i am saying... lol..

jhai_salvador 48 Junior Poster

Downlowd a SETUP FACTORY from INDIGO ROSE... just google it...

the use it to created a setup for your visual basic project..

jhai_salvador 48 Junior Poster

I recommend you to Program your calculator using Programming Software like VB5, VB6 VB.net etc.

yahhh... you realy nid to program it.. or you can download the attachment and use it, (Contains the compiled project)..

jhai_salvador 48 Junior Poster
Private Sub btnBill_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnBill.Click

        item = txtItem.Text
        duration = txtduration.Text

        Dim fmtstr As String = "{0, -15} {1, 17:c2}"
        '-----------------------------------------------------------------------------------------------
        lstResult2.Items.Add(" Receipt from Eddie's Equipment Rental")
        Select Case item.ToUpper & duration.ToUpper

            Case "1", "h"
                lstResult2.Items.Add(String.Format(fmtstr, "Rug cleaner", 16))
            Case "2", "h"
                lstResult2.Items.Add(String.Format(fmtstr, "Lawn mower", 12))
            Case "3", "h"
                lstResult2.Items.Add(String.Format(fmtstr, "Paint sprayer", 20))
            Case "1", "f"
                lstResult2.Items.Add(String.Format(fmtstr, "Rug cleaner", 24))
            Case "2", "f"
                lstResult2.Items.Add(String.Format(fmtstr, "Lawn mower", 18))
            Case "3", "f"
                lstResult2.Items.Add(String.Format(fmtstr, "Paint sprayer", 40))
        End Select
        lstResult2.Items.Add(String.Format(fmtstr, "Deposit", 30))
        lstResult2.Items.Add(String.Format(fmtstr, "Total", 25 + 25))
        '-----------------------------------------------------------------------    End Sub
End Class

Make a breakpoint at:
Select Case item.ToUpper & duration.ToUpper

Add to watch:
item.ToUpper & duration.ToUpper

what is the value of:
item.ToUpper & duration.ToUpper

analyze your select statement again or just use IF ELSE IF Statement...

jhai_salvador 48 Junior Poster

hello,
i was ask to document how to connect vb6 and access2007. what are the steps on connecting vb6 and access 2007 and can anyone give an example of its codes?
please help me.

How...

You must already created your database on you access 2007.
Open your VB6 Project
Goto Project > References
Tick - Microsoft ActiveX Data Objects 2.0
Click Ok

After that, Create a Module and add this Code...

Public cn as New ADODB.Connection

Public Sub Con(DBPath as String, optional DBPass as string)

cn.Open "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" & DBPath & ";Jet OLEDB:Database Password=" & DBPass & ";"

end Sub

DBPath - Location of your access 2007 database and its filename
DBPass - password of your database if you have put password on it.

That sub will just open a connection to your database..

I hope you anderstand it and I hope this will help you..
If you want more, just search it on yahoo or google..

jhai_salvador 48 Junior Poster

Here it is...

Download the attachment...

Hope this will help you..

Thanks..