|
Have you tried searching for "dataset" on this web site? There are several articles on datasets and ADO.NET out of over 15,000 articles. Also, you can search the forums too!
"We make a living by what we get, we make a life by what we give." --Winston Churchill
|
|
|
|
|
hi
Does anyone know how to change the Microsoft Agent Control voice to women voice?
Is there a way to change it?
Thanks,
Aung Myo Aye
|
|
|
|
|
I think you just change the sound pitch, but I could be wrong.
Trinity: Neo... nobody has ever done this before.
Neo: That's why it's going to work.
|
|
|
|
|
One way is tho use Agent Character Creator. Dealing with Agent voices is explained here (scroll to "Setting Your Character's Output Options").
Also, as MS Agent uses Text-to-Speech feature, this can help.
Hope it helps,
- Dmitry.
-------------------------
Don't worry, be happy )
|
|
|
|
|
I have migrated a VB.Net 2003 forms project to 2005 Express Edition. This went surprisingly well.
One problem remains.
The main form sets up a delegate system to update it's text property from a background thread.
Public Class FormMain
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'other stuff
frmTxt = New FormText(AddressOf WriteFormText)
End Sub
#Region "Delegates"
Public frmTxt As FormText
Public Delegate Sub FormText(ByVal inText As String)
Private Sub WriteFormText(ByVal inText As String)
Try
Me.Text = inText
Catch ex As Exception
Shw.Err("frmMain.WriteFormText " & ex.Message)
End Try
End Sub
#End Region
End Class
A class "Clock" runs on a background thread and updates the main form's text once a second to show the time.
Public Class clsClock
Private Sub MainLoop() '8/9/05
Do
'determine if it is a new second using Now.Second and set isNewSecond accordingly
if isNewSecond = True Then
frmMain.frmTxt.BeginInvoke("TheCore" & Space(100) & Now.ToString, Nothing, Nothing)
End If
'do all kinds of things depending on the time
Thread.Sleep(100)
Loop
End Sub
End Class
Running in .Net 1.1, this works fine, in .Net 2.0 it throws this error
"Cross-thread operation not valid: Control 'FormMain' accessed from a thread other than it was created on."
I have a system of delegates to update a progress bar from background threads and a system of delegates to write to a picture box from background threads. Both of these work correctly in 2005.
Help and my books have not solved the problem. Several hours of Google has only found other folks with the same problem.
Does anyone know how to fix it?
Thanks
RCarey
RCarey
|
|
|
|
|
|
Hello,
VS 2005
I have a user control. On the parent form i have placed my user control inside a tab control. Inside the user control i have fields for saving and deleting tasks.
When a user wants to delete a task the taskID is taken from the tab name and passed to the user control in a public property. So I know what task I want to delete.
<br />
'Code in the user control<br />
Public Property TaskID() As Integer<br />
Get<br />
Return _taskID<br />
End Get<br />
Set(ByVal value As Integer)<br />
_taskID = value<br />
End Set<br />
End Property
'
In the parent form I get the TaskID from the tab name and pass it to the public property<br />
Private Sub TabControl1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TabControl1.Click<br />
Try<br />
Dim taskID As Integer = 0<br />
<br />
taskID = Integer.Parse(Me.TabControl1.SelectedTab.Name)<br />
newTask.TaskID = taskID<br />
Catch ex As Exception<br />
MessageBox.Show(ex.Message)<br />
End Try<br />
End Sub
But the problem is when I delete I want to be sure that the deletion was successful and pass this back to the parent control. And that is something I can't see to do.
For example: if there was a problem with the delete then I don't want to delete the tab but inform the user there was a problem.
'code in the user control for deleting the task, but if not successful, how do i send this back to the parent control?<br />
Private Sub btnDelete_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnDelete.Click<br />
Try<br />
Dim rowsAffected As Integer = 0<br />
rowsAffected = Me.TA_IncidentTask1.DeleteTask(_taskID)<br />
If (rowsAffected = 0) Then<br />
'Not successful so how do i inform the user<br />
End If<br />
Catch ex As Exception<br />
MessageBox.Show(ex.Message)<br />
End Try<br />
End Sub
I am ok at passing information to the user control by using public properties as you have seen in the code above. But i need to know if the delete was successful or not.
Can anyone help and advice me on this. code examples would be most grateful.
Many thanks,
Steve
|
|
|
|
|
Why don't you create a method yourself that will check whether the task can be deleted. If it can it will return true and set the specific property with the correct information. If the method returns false then the property will be unchanged and you will be able to tell whether the deletion was successful or not.
Regards,
Thomas Stockwell
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Visit my homepage Oracle Studios[ ^]
|
|
|
|
|
Hello,
Thanks for your help.
The delete button itself is on the user control. So making a method that will return true or false in the user control itself, wouldn't do any good. As the parent would not know if the delete button has been clicked or not.
Its a bit like having a child form and clicking on a button on the child form. How would the parent form know if a button had been clicked on the child.
Steve
|
|
|
|
|
It sounds like you could setup an event system between the two controls. When the delete button is pressed set off an event that the parent will listen for. Then when the parent recieves the event notification then you can check the method of the usercontrol for true or false.
Regards,
Thomas Stockwell
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Visit my homepage Oracle Studios[ ^]
|
|
|
|
|
Hello,
Once again thanks for your reply.
It sounds like that will work. However, I am not sure how to put that in code. An article where this is done would be very helpful if you know any. I would like to learn more about this.
Many thanks,
Steve
|
|
|
|
|
In your user control define an event like:
Public Class UserControl1
Public Event Deleting(ByRef bCancel As Boolean)
Public Event Deleted()
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim bDel As Boolean
RaiseEvent Deleting(bDel)
If bDel = True Then Exit Sub
'DELETE CODE HERE
RaiseEvent Deleted()
End Sub
End Class
The form you are using your control in, you should see the events like:
Public Class Form1
Private Sub UserControl11_Deleting(ByRef bCancel As Boolean) Handles UserControl11.Deleting
'CHECK YOUR CONDITION HERE, YOU CAN OPTIONALLY SET bCancel=TRUE
'IF YOU WANT TO ABORT THE DELETE BEING DONE IN YOUR USER CONTROL
End Sub
Private Sub UserControl11_Deleted() Handles UserControl11.Deleted
MSGBOX "Item Deleted"
End Sub
End Class
Hope this helps!
~ CodeDoctor ~
|
|
|
|
|
Hi!
How can I save the fontdialog or colordialog settings to a text file(to a path I have chosen), then retrieve it again and assign it back to my program.
thanks in advance.
|
|
|
|
|
If i were you, i'd save the settings in the register using the SaveSetting(..) method, and to retrieve the data again by using the GetSetting(..) method. It almost always works at me
Example:
SaveSetting("Program Name", "Settings", "Color", ColorDialog1.Color)
SaveSetting("Program Name", "Settings", "Font", FontDialog1.Font.FontFamily.ToString)
Enjoy
--Zaegra--
|
|
|
|
|
thanks, but; can you give me a complete example on how to save and retrieve.
|
|
|
|
|
hello all,
am creating one small project using vb and msaccess. my problem is i have a field name barcodeno in it i want incremental values. for example i have a partno in that Part no it self contain 1200 different Barcodeno i cant even enter one by one so am in need of some auto incremental mechanism. start value and end value only recevied in different text boxes. Annnnnnnnnny Ideas Please Help me.......
Thanks in advance
|
|
|
|
|
There's not enough information on the problem to tell you anything. ALl we have is you have field that holds 1200 BarCodeNo's and you need to increment the BarCodeNo value.
Increment how? Are you looking to get the last BarCodeNo in the database and increment it? Are you looking to autogenerate all the BarCodeNo's between two values (entered in TextBox's) and store them in the database? ??????
Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic 2006, 2007
|
|
|
|
|
Hello Mr.Dave,
Thanks For Your reply. s am looking autogenerate all the barcode no's between two values and store them in the database. Please help me is it possible? and further how can we insert Bulk data's in the database (ie More than 300 rows at a time by cliclking a Button like "save"). am a begginer Please help me.
|
|
|
|
|
Creating the records for the barcodes isn't that hard. You already know how to add records to a database in your code. All you have to do is enclose that in a loop and start inserting new records, one at a time.
If all you're doing is creating records that have nothing but a barcode, why are you even creating them? Normally, you wouldn't do this until you actually assigned the barcode to an item and entered the details of the item into the database.
Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic 2006, 2007
|
|
|
|
|
hello Am a beginer only i dont know how to increment a value in a datagrid and also the bulk insert in MSAccess. at a time we can only enter one row in a database but in my project for exammple they have one product, that product belonging from one company but that particular product contain 100 different barcode no in that case only i need increment mechanism. am creating text boxes for enter product and company name below that a datagrid for enter all barcode for that product whenever i submit all the barcode and then press a add button 100 rows will automatically enter into a database. is it possible or not? if possible how? Please give me any example code
|
|
|
|
|
rrrriiizz wrote: Am a beginer only
Nothing like jumping into the deep end of the pool without knowing how to swim! You don't know what you're doing. This is what is making this description so hard. I'll simplify this as much as I can.
When you create the barcode records, you don't have to put the barcodes in a DataGrid. Actually, you don't ever insert them into a DataGrid. All you do is create the barcodes using an SQL INSERT (OleDbCommand object) directly into your table, inside a for/next loop.
When those records are completed, you requery the database using a SELECT statement and a OleDataAdapter object, to retrieve the records between the beginning barcode and ending barcode numbers, filling a DataTable with the results.
You then bind the DataGrid to the DataTable. Your user can then start entering the information about each barcode into the table. When they're done, you write the information back to the database using the same OleDbDataAdapter you created to fill this table.
Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic 2006, 2007
|
|
|
|
|
Good day!
I have a problem about hiding and unhiding a web objects in AxWebBrowser using VB.Net.
Our teacher's condition are:
(1) There must be a command button outside the AxWebBrowser. The command button will generate a random number from 1 to 4.
(2) After generating random number it automatically select a value in a listbox inside the AxWebBrowser.
(3) Every value of a listbox theres a corresponding control that show and hide the other objects.
Mark Angelus V. Movida
Student
|
|
|
|
|
How do you intend to approach it ? With this sort of thing, often there's more than one way to do something, your teacher will expect you to do it in the way you've been shown. What have you been shown to do in this case ? What have you got working already ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"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 )
|
|
|
|
|
There is several ways to approach this.
First, get a reference to the Document object within the AxWebBrowser.
The best time to get this reference is on the DocumentCompleted event.
This will give you access to the underlying objects contained within.
You can optionally tie into the eventing of the browser object itself. But you'll need a reference a COM library Microsoft Internet Controls and another one for Microsoft HTML Object Library.
With references to these two libraries, you can declare the Document object WithEvents. Assign the Document to local (withevents) variable. Then place code in the event of that variable's event procedures.
This techique I've used, and you can ultimately do pre and post processing on any HTML objects that show in the page. In addition, you can gain full control over the Styles used within the HTML. For instance, you can set Styles dynamically on the HTML elements once you gain a reference to them.
Lastly, you can gain access to the Window object contained through the reference to the Document object. Then you can detect any of the areas the mouse is over or on.
Hope this helps!
~ CodeDoctor ~
|
|
|
|
|
Connect DVR Card for capture Pic.
|
|
|
|