need for you…………. August 16, 2007
Posted by Shamim Ahmed in Java Cript.8 comments
I have completed a project on children learning in visual basic where i faced various problem so i want to give some code which may need for you.
Option Explicit //declaration;
Dim Voice As SpVoice
Private Sub Form_Load()
Set Voice = New SpVoice
End Sub
Private Sub ExitBtn_Click()
Unload Form1
End Sub
Private Sub SpeakItBtn_Click()
On Error GoTo Speak_Error
If SaveToWavCheckBox Then
SaveToWav
Else
If Not TextField.Text = “” Then
Voice.Speak TextField.Text, SVSFlagsAsync
End If
End If
TextField.SetFocus
Exit Sub
Speak_Error:
MsgBox “Speak Error!”, vbOKOnly
End Sub
Private Sub SaveToWav()
Dim cpFileStream As New SpFileStream
cpFileStream.Format.Type = SAFT22kHz16BitMono
ComDlg.CancelError = True
On Error GoTo Cancel
ComDlg.Flags = cdlOFNOverwritePrompt + cdlOFNPathMustExist + cdlOFNNoReadOnlyReturn
ComDlg.DialogTitle = “Save to a Wave File”
ComDlg.Filter = “All Files (*.*)|*.*|Wave Files ” & “(*.wav)|*.wav”
ComDlg.FilterIndex = 2
ComDlg.ShowSave
cpFileStream.Open ComDlg.FileName, SSFMCreateForWrite, False
Set Voice.AudioOutputStream = cpFileStream
Voice.Speak TextField.Text, SVSFDefault
cpFileStream.Close
Set cpFileStream = Nothing
Set Voice.AudioOutputStream = Nothing
Cancel:
Exit Sub
End Sub
only you need to design a form including a textfield,two button,and a checkbox,then it will be nice project.
Now I am trying to be a php developered, I know php allready I can connect MySQL database, insert,delete ,search and update data from table, now i will try to learn javacript…… if you have any suggetion please comment me.
Learning MYSQL i faced various problem such as how to connect data base, i seems my given cood will need for MYSQL beginer,
All program should write in the php program:
db_connect :
$link = mysql_connect (“localhost”, “”, “”)
or die (“Could not connect”);
print (“Connected successfully”);
mysql_close ($link);
Create database in the Mysql:
$link = mysql_pconnect (“localhost”, “”, “”)
or die (“Could not connect”);
if (mysql_create_db (“database_name”)) {
print (“Database created successfully\n”);
} else {
printf (“Error creating database: %s\n”, mysql_error ());
}
Show data from table
mysql_connect (“localhost”, “”, “”);
$result = mysql_db_query (“database_name”,”select * from table_name”);
while ($row = mysql_fetch_array ($result)) {
echo $row["user_id"];
echo $row["fullname"];
}
mysql_free_result ($result);
Show table from database:
mysql_connect (“localhost”,”",”");
$result = mysql_list_tables (“database_name”);
$i = 0;
while ($i < mysql_num_rows ($result)) {
$tb_names[$i] = mysql_tablename ($result, $i);
echo $tb_names[$i];
$i++;
}
Data insert in the database Table:
$query=”INSERT INTO table_name” .”(name,roll, dept, mobile, dis) VALUES “.”(‘$a’, ‘$b’, ‘$c’, ‘$d’, ‘$e’)”;
mysql_query($query);
Delete data from table:
mysql_query(“DELETE FROM `table_name` WHERE roll = ‘$a’ “)]