|
It speaks the "say.txt" file OK. But when I add the 'UnLoad Me' to stop it from running, it quits before it speaks. How do I wait until it is done speaking to UnLoad???
Private Sub Form_Load()<br />
Open "c:\webster\1\say.txt" For Input As 1<br />
txtText.Text = Input(LOF(1), 1)<br />
Close 1<br />
spkSpeak.AudioReset<br />
spkSpeak.Speak txtText.Text<br />
'Unload Me<br />
End Sub
Robert, still trying
|
|
|
|
|
Robert from Florida wrote: spkSpeak.AudioReset
spkSpeak.Speak txtText.Text
What type of object is spkSpeak? Have you checked out the other methods and properties available in this object? Maybe there is some property that says that the "speech" is still in progress...
|
|
|
|
|
DirectSS (MS Direct Text-to-Speach)
I'm very new to VB but I didn't see any property jump out that looks helpful. May be I'm missing something. Is there an easier way to get vb6 to speak a text file?
Robert, still trying
|
|
|
|
|
I'm sorry, but I've never used DirectSS. Can you maybe list out the properties/methods on that control? Something is bound to be there which says "in progress" or some such thing...
|
|
|
|
|
My simple code has three objects;
Form (frmSpeak)
DirectSS (spkSpeak)
TextBox (txtText)
the only thing I see in spkSpeak properties that I don't understand is under Behavior; [CausesValidatio]= true & Misc; [CallBackEnable]=1,[CurrentMode]=1,[Intialized]=0.
Robert, still trying
|
|
|
|
|
Maybe these sites could help you more:
http://www.developerfusion.co.uk/show/1989
http://www.developerfusion.co.uk/show/1598
|
|
|
|
|
Hi,
I am using Infragestics UltraWinTree on my application.
The text that comes in the node should be word wrapped to two lines and then the text should be truncated. For example if the the text in the node is "abcdefghijklmnopqrstuvwxyz" the text should show as
abcdefg
hijk...
is it possible? Thru code or thru designer properties?
Thanks n Regards,
Lavanya
|
|
|
|
|
I think you'll better check the forums of infragistics or ask for there help. In order to be able to answer this people have to work with the component and have it available and changes to that are small
http://news.infragistics.com/[^]
if you don't find it in the forums maybe this can help
http://www.infragistics.com/gethelp/default.aspx#Overview[^]
If my help was helpfull let me know, if not let me know why.
The only way we learn is by making mistaks.
|
|
|
|
|
hi,
thanks a lot.
i searched the forum u speicified and got the answer.
will send u macintosh choclates.
thank you.
regards,
lavanya.
|
|
|
|
|
how can i create a graph using the values from a dataset from a database (ms.Access)?
the graph control should run on a form.
i'm able to do this in vb6 but i'm not familiar with vb.net!
need help!
thank you in advance!!
|
|
|
|
|
The Graphics object can be built from a Bitmap, which can be built from a constructor. Then, that class has all the methods you need to draw your graph.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
How to Save record or row changes in DataGridView directly into Database programmatically without using DataGridView Wizard or using an button events like btnSave_Click???
Anybody please help... I'm having difficulty with this problem...
Here's my code how to fill records into DataGridview
this works ok but i dont know how to save or update the new changes of the record inside this DataGridView Directly into database
anyone can help me please???
please note: im using an MS ACCESS as database
************************
Private Sub LoadRecord(ByVal strSQL As String)
Try
'open the connection
oleConnection.ConnectionString = dbConnectionString
oleConnection.Open()
oleDataAdapter = New OleDbDataAdapter(strSQL, oleConnection)
dbDataTable = New DataTable()
dbBindingSource = New BindingSource
oleDataAdapter.Fill(dbDataTable)
dbBindingSource.DataSource = dbDataTable
'bind datagrid to BindingSource
dgDailyTimeRecord.DataSource = dbBindingSource
Catch ex As Exception
MsgBox(ex.ToString())
Finally
oleConnection.Close()
End Try
End Sub
****************************
|
|
|
|
|
see this only u want to save the data grid
this is the code
objsqlcon=new sqlconnection("user id=sa;password=;initial catalog=databasename;data source=servername")
objsqlcon.open
dim i as integer
for i=0 to datagridview1.rowcount-1
strinsert="insert into tablename(fieldname1,fieldname2) values('" & datgridview1.cell(columnname1).rows(i)(0).value & "',"' & datgridview1.cell(columnname1).rows(i)(0).value & "')"
objsqlcmd=new sqlcommand(strinsert,objsqlcon)
objsqlcmd.executenonquery()
next
messagebox.show("Record Successfully Saved ")
|
|
|
|
|
thanks for the reply... i appreciate that...
your connection is SQLConnection Type so i've a little convertion as OleDBConnection type because im using an .MDB database..
********************
Dim strinsert As String
oleConnection.ConnectionString = dbConnectionString
oleConnection.Open()
Dim i As Integer
For i = 0 To dgDailyTimeRecord.RowCount - 1
strinsert = "insert into tablename(fieldname1,fieldname2) values('" & dgvDailyTimeRecord.rows(i).cell(0).value & "', '" & dgvDailyTimeRecord.rows(i).cell(0).value & "')"
oleCommand = New OleDbCommand(strinsert, oleConnection)
oleCommand.ExecuteNonQuery()
Next
MessageBox.Show("Record Successfully Saved ")
********************
Thank you so much...
|
|
|
|
|
I want to disable back and forward menu button In IE(or any) browser for my project which one I am developing in vb.net.
Ashish Kumar Vyas
|
|
|
|
|
You have to use java script
For getting javascript code reply this message
Best Regards,
Chetan Patel
|
|
|
|
|
Hi chetan
first of thanks for reply me.I think now you got it what I want.
give me that java script and also tell me where I need to add this code either head section or body section?
Ashish K. Vyas
|
|
|
|
|
Thanks for Appritiation
Best Regards,
Chetan Patel
|
|
|
|
|
Could somebody give the code for listing all the nodes by name or IP address in a network.
Thankyou
|
|
|
|
|
is there got some more example code that i can refer if i wan to automatically update the database when new data that being detected?
let say i have 4 textboxes which will display the data that being extracted .the data that will stored into database just either will b 0 or 1 oni...
thanks..
|
|
|
|
|
You might want to look at timers and triggers.
"Find it your bloody self - immediately!" - Dave Kreskowiak
|
|
|
|
|
I have created an ocx in vb, i want to place this ocx in vb.net form .
I am developing one test device application for my purpose.
I am selecting the ocx from customerise toolbox but is not showing in the toolbox (invisible to me)... and also for some dll files it is showing in disable mode..Please help me out immediately to get out of this problem..
Thanking you
|
|
|
|
|
You have to add reference of the dll of the user control
and then drag the .dll file from the solution explorer to tool box. you get the control.
Best Regards,
Chetan Patel
|
|
|
|
|
Hello
I have been using VB for an @ page directive extender. I now need to add code for Paypal PDT (Payment Data Transfer). This code is currently commented out in my project as you can see.
The first chunk of code is for extending the @ page directive.
'Imports System '1
'Imports System.Web.UI '1
'Imports System.Web.UI.HtmlControls '1
'Imports System.Web.UI.HtmlControls.HtmlGenericControl '1
'Partial Class Store_thankyou '1
' Inherits BasePage '1
' Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load'1
' Dim body As HtmlGenericControl'1
' body = Master.FindControl("body")'1
' body.Attributes.Add("class", "store")'1
' End Sub
'End Class '1
The 2nd chunk of code is for the paypal side of things:
Imports System.Net
Imports System.IO
Imports System.Text
Public Class store_thankyou
Inherits System.Web.UI.Page
#Region " Web Form Designer Generated Code "
'This call is required by the Web Form Designer.
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
End Sub
Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init
'CODEGEN: This method call is required by the Web Form Designer
'Do not modify it using the code editor.
InitializeComponent()
End Sub
#End Region
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here
Dim tx, PDTvalidateQuery, token As String
Dim strResponse As HttpWebResponse
Dim temp As String
Dim PDTArray() As String
Dim iParts, sResults(0, 0), aParts(), sParts(), sKey, sValue As String
Dim i As Integer
Dim firstname, lastName, itemName, mcGross, mcCurrency As String
'set this to token from PayPal account
token = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
'set tx to value of tx passed in via Querystring from PayPal
tx = Request.QueryString("tx")
'set string = to the cmd value, tx and at that needs to be
'POSTed back to PayPal to validate the PDT
PDTvalidateQuery = "cmd=_notify-synch&tx=" & tx & _
"&at=" & token
'Now we need to POST this info back to PayPal for validation
'of the PDT
' Create the request back
Dim req As HttpWebRequest = CType(WebRequest.Create("https://www.sandbox.paypal.com/cgi-bin/webscr"), _
HttpWebRequest)
' Set values for the request back
req.Method = "POST" 'set method
'set content type
req.ContentType = "application/x-www-form-urlencoded"
'set length
req.ContentLength = PDTvalidateQuery.Length
' Write the request back to PayPal
Dim stOut As StreamWriter = New StreamWriter(req.GetRequestStream(), _
Encoding.ASCII)
stOut.Write(PDTvalidateQuery)
stOut.Close()
Try
strResponse = CType(req.GetResponse(), HttpWebResponse)
Catch ex As SystemException
'############################################
'ADD CODE HERE TO HANDLE AN EXCEPTION IF THE SCRIPT
'CANNOT GET THE RESPONSE FROM PAYPAL
'############################################
End Try
'Once we write the stream back to PayPal, we need to read the
'response.
Dim IPNResponseStream As Stream = strResponse.GetResponseStream
Dim encode As Encoding = System.Text.Encoding.GetEncoding("utf-8")
Dim readStream As New StreamReader(IPNResponseStream, encode)
'read the response into a String variable "temp"
temp = readStream.ReadToEnd
'Check to see if the 1st line of the response was "SUCCESS"
If Mid(temp, 1, 7) = "SUCCESS" Then
'if it is SUCCESS, the code below puts the
'response in a nice array
temp = Mid(temp, 9)
sParts = Split(temp, vbLf)
iParts = UBound(sParts) - 1
ReDim sResults(iParts, 1)
For i = 0 To iParts
aParts = Split(sParts(i), "=")
sKey = aParts(0)
sValue = aParts(1)
sResults(i, 0) = sKey
sResults(i, 1) = sValue
'add more case statements here in order to access other returned variables
Select Case sKey
Case "first_name"
firstname = sValue
Case "last_name"
lastName = sValue
Case "item_name"
itemName = sValue
Case "mc_gross"
mcGross = sValue
Case "mc_currency"
mcCurrency = sValue
End Select
Next
'############################################
'This is where the script begins to output the
'receipt page.
'############################################
Response.Write("<h2><b>Thanks for your Order!!</b></h2><br><br>")
Response.Write("<li>Name: " & firstname & " " & lastName & "</li>")
Response.Write("<li>Description: " & itemName & "</li>")
Response.Write("<li>Amount: " & mcCurrency & " " & mcGross & "</li>")
Response.Write("<hr>")
'debug
OutputEntirePDTString(temp)
Else
' IF PDT response is "FAIL" - investigate
Response.Write("Error - PDT FAIL")
End If
'close opened streams
readStream.Close()
strResponse.Close()
End Sub
Private Function OutputEntirePDTString(ByVal myPDTString As String) As String
Dim tempString() As String = Split(myPDTString, vbLf)
Dim x As Integer
For x = 0 To tempString.GetUpperBound(0)
Response.Write(tempString(x) & "<br>")
Next
End Function
End Class
How can I get the two pieces of code to work together?
|
|
|
|
|
Using Partial Class
Best Regards,
Chetan Patel
|
|
|
|