|
I want to know how to use Microsoft Agent Control 2.0.ocx?
I can use it but I can just show merlin (character) but I cant show the other characters (Robert,Mary,Hal)
I use the following code to show merlin
'''''''''''''''''''''''''''''''''''''''''''
'general declarations
Dim merlin As IAgentCtlCharacterEx
Const DATAPATH = "merlin.acs"
Private Sub Form_Load()
Agent1.Characters.Load "merlin.acs", DATAPATH
Set merlin = Agent1.Characters("merlin.acs")
merlin.LanguageID = &H409
merlin.Show
End Sub
''''''''''''''''''''''''''''''''''''''
but I can't use it with the other characters.
I realy neeeeeeeeeeeeed it
many thanks for all
soly
|
|
|
|
|
|
TO GUFFA
I am Using VB6 not C# read the code and
sent reply that have meaning please
soly
|
|
|
|
|
Learn how to convert it yourself. There are fewer and fewer VB6 examples on the 'Net, since there's no longer any support from Microsoft for it.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
So you can't determine from the code what to change to get a different character?
I showed you how easy it was to find code for the component. If you tried it yourself, I'm sure that you would be able to find some code in VB6.
---
b { font-weight: normal; }
|
|
|
|
|
I have been trying to divide a picture, which its contens in a picturebox IN visual basic 6..
There is a way to divide this picture in smaler pictures, for example en six small picture thah measn 3 x 2.and also how can a save this picture individually en the HD.
Than you in advance
Fantito
|
|
|
|
|
Hi all,
Im in panic mode, Ive got some strange error in my .net 2.0 project.
Its connects to an sql database and performs some actions.
However, its failing to connect to a database.
the cnn.open() fails with the following message:
Request for the permission of type System.Data.SqlClient.SqlClientPermission, System.Data, Version=2.0.0.0' failed.
Its fails on both sql authentication, and windows authentication.
However I can connect to the database using Enterprise Manager.
Anyone seen this message before? Im completely stumped.
Does anyone know of how to fix this.
Friday afternoon and im desperate!!!
Mark
|
|
|
|
|
It must be something with your connection string. Try debugging on the cnn.open() line and take a look at what your connection string looks like though the quick watch. Make sure it's being set correctly.
|
|
|
|
|
Hi Kschuler,
connection string is perfectly fine, no problems. I have 2 that I can use, one for trusted and one for untrusted connections. Both fail.
Any other ideas?
|
|
|
|
|
Sometimes you can get a more detailed error message by putting a try catch block around the line of code that is in error...then put a breakpoint on a dummy line of code in the catch block so that you can quickwatch the exception object. Maybe that will give you more information to go on.
Sorry I can't be any more helpful.
|
|
|
|
|
Yeh, thanks for the help. Unfortunately Ive already done that.
Its baffling me. In two years of development in .Net, Ive never seen this error before.
|
|
|
|
|
|
Are you running this code from a trusted source? Running from a LAN server is NOT a trusted source, btw...
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Yes,
I do believe that is the answer.
I cant confirm, but Im pretty sure the application was run from a server, not locally.
Many thanks Dave
|
|
|
|
|
In my ASP.NET.net site ,I sometimes(but not always) get this error :
Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
I think its sql server error . Some one tell me how I can solve this problem.
I need urgent help .
|
|
|
|
|
Figure out what call is timing out, and work out if you can optimise what it is doing, so it does it faster. Or, increase the timeout if need be.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
I encounter a problem regarding to the datagrid.
How can i get the value from the textbox (or other control) and bind to the datagrid?
Even it bind successfully, but the data display is in different row, how to make it in one row??
here is the code:
Dim a As String
a = txtSalesNo.Text.ToString
dgSales.DataSource = a
dgSales.DataBind()
Example, if the value is "ASD" from textbox,
the datagrid display 3 row in the same column.
How can i solve this problem?
Thanks for helps..
|
|
|
|
|
Databinding is for setting all the values. Setting a datasource as a textbox makes no sense, you want to set a value in one row/one column in that case. Is it ASP.NET or winforms ? If the latter, you can select a row from the Rows collection, and then select a column by name and set it's value.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Hi,
I'm using VB.NET 2005.
I've been playing around with a couple of macros lately and I've noticed that Debug.Print doesn't actually print anything to the Immediate Window. I've also tried Console.WriteLine but that doesn't work either. Neither one causes any errors, they just don't display anything. Is there any other way to get this functionality (At the moment I use a messagebox to show values at certain points but I figure there must be a better way).
Thanks very much,
dlarkin77
|
|
|
|
|
The output will show in the Output window, not the Immediate window. Have you launched a second Visual Studio instance to debug the code? IIRC, the instance of Visual Studio that your running in the code in cannot also debug it at the same time.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hi,
I have tried opening a second instance of VS. I double-click on the particular macro (in the Macro Explorer) in the first instance. Should I see the output in the second instance? At the moment I don't see any output. I've checked the immediate window and the output window in the second instance but there's nothing there.
Thanks,
dlarkin77
|
|
|
|
|
My data grid is showing some information from MYSQL using the ADODC.
How can i put this information from my DATA grid to EXCEL????
|
|
|
|
|
Hi
We are doing VB project, VB as frontend and mysql backend. How to write coding for mysql backup
thanks
KK
|
|
|
|
|
Hi,
I have a problem updating a spreadsheet. I can read the info into a datagridview, but cant get it to update... actually I am not to sure how to update the spreadsheet. Can someone maybe help me, or direct me to some site that can be helpful.
Code for select/read:
<br />
Public Shared Function OpenSpreadsheet(ByVal strPath As String) As DataTable<br />
<br />
'Create new dataset to hold information<br />
Dim tableStatement As New DataTable()<br />
Dim column(1) As DataColumn<br />
<br />
Try<br />
'Connectionstring to the xls spreasheet on local/network drive<br />
Dim strConn As String = "Provider=Microsoft.Jet.OLEDB.4.0;" & _<br />
"Data Source=" & strPath & ";" & _<br />
"Extended Properties=""Excel 8.0;"""<br />
<br />
'strConn..open()<br />
<br />
Dim daTimesheet As New OleDbDataAdapter("SELECT * FROM [Sheet1$B8:F30]", strConn)<br />
daTimesheet.Fill(tableStatement)<br />
<br />
<br />
tableStatement.PrimaryKey = New DataColumn() {tableStatement.Columns("projectID")}<br />
<br />
Catch Ex As Exception<br />
MessageBox.Show("Cannot fill Datatable. OpenSpreadsheet(): " & Ex.Message)<br />
<br />
Finally<br />
tableStatement.Dispose()<br />
'strConn.close()<br />
<br />
<br />
End Try<br />
<br />
Return tableStatement<br />
<br />
End Function<br />
Code for update:
<br />
Public Shared Function UpdateSpreadsheet(ByVal strPath As String) As DataTable<br />
<br />
Dim tableStatement As DataTable = New DataTable<br />
<br />
'Connectionstring to the xls spreasheet on local/network drive<br />
Dim strConn As String = "Provider=Microsoft.Jet.OLEDB.4.0;" & _<br />
"Data Source=" & strPath & ";" & _<br />
"Extended Properties=""Excel 8.0;"""<br />
<br />
Try<br />
<br />
Using connection As New OleDbConnection(strPath)<br />
<br />
Dim adapter As New OleDbDataAdapter()<br />
adapter.SelectCommand = New OleDbCommand("SELECT * FROM [Sheet1$B8:F30]", connection)<br />
adapter.UpdateCommand = New OleDbCommand("UPDATE [Sheet1$B8:F30] SET FirstName= ?, LastName = ?", connection)<br />
<br />
Dim builder As OleDbCommandBuilder = New OleDbCommandBuilder(adapter)<br />
<br />
connection.Open()<br />
<br />
adapter.Fill(tableStatement)<br />
<br />
tableStatement.PrimaryKey = New DataColumn() {tableStatement.Columns("projectID")}<br />
<br />
' Code to modify data in DataSet here <br />
<br />
adapter.Update(tableStatement)<br />
<br />
'Return 1<br />
Return tableStatement<br />
<br />
End Using<br />
<br />
Catch Ex As Exception<br />
MessageBox.Show("Cannot Update Datatable. UpdateSpreadsheet(): " & Ex.Message)<br />
'Dim strErrorUpdate As String = "Cannot Update Datatable. UpdateSpreadsheet(): " & Ex.Message<br />
<br />
'Return strErrorUpdate<br />
<br />
End Try<br />
<br />
End Function<br />
|
|
|
|
|
I am new to vb2005. I dun understand y do my DTPicker keep showing the calendar only. i have already set the formal to time but it only display the time but when i click the dropdown arrow it still show the caledar. Anyone knows how to change the calendar to time???
|
|
|
|