|
Hi All,
I'm new to Visual Basic
My question is: When i tried to execute the EXE in vb6 it is getting error as 'Run-time 430: class doesnot support automation or does not support expected interface'
I'm using Microsoft.Jet.OLEDB.4.0 in my component. I'm calling component from vb6, my component is made com visible.
I've tried googled for hours, but could not find solution to my problem .
Also i didnot register my component with regsvr32, but it is visible in COM.
Please help me out from this.
Also please explain why this problem has occured.
OS: Windows 7
Component developed on Visual Studio 2010
Please help me out.
Thanks,
|
|
|
|
|
Karthik Reddy wrote: I'm new to Visual Basic
Welcome to the wondrous world of programming! Now, uninstall VB6 and install VB.NET; VB6 has been developed a long time ago, and targeted a Windows-version prior to Win7. VB6 is no longer sold, no longer supported. VB.NET on the other hand, has a growing community, and it is free.
Karthik Reddy wrote: I've tried googled for hours, but could not find solution to my problem .
Because VB6 is not only old, it's actively being abandoned. If you "insist" on using VB6, then your best source of information are old second-hand books.
Karthik Reddy wrote: OS: Windows 7
Component developed on Visual Studio 2010
If you want to use a .NET control in your VB6-app, you'd best use the VB6 interop toolkit[^]. Contains a complete walkthrough and examples.
Bastard Programmer from Hell
if you can't read my code, try converting it here[^]
|
|
|
|
|
I also dont want to use this Visual Basic, but client wants to develop app in vb6
let me know if you have an answer to this ...
By the way, thanks for the instant reply
|
|
|
|
|
Karthik Reddy wrote: I also dont want to use this Visual Basic, but client wants to develop app in vb6
Since when do clients dictate which language we use? Does your client know the implications of this choice? Do they understand that there will be almost zero support?
If the client tells you that "strings" are bad, would you try to create a program that doesn't use strings?
Karthik Reddy wrote: let me know if you have an answer to this .
It's a generic error, and usually it includes the classname. It'll be caused by "any" of the components not being registered correctly, with MDAC being the prime suspect. You'd need to install the exact same version of the libraries that you developed against.
Hence the pointer to the VB6-Toolkit from Microsoft; it also explains what needs to be deployed and how, and the most common pitfalls. It's free to download, and it's created to help with mixing VB/.NET.
And again; if you are using .NET already, you'd have the dependency anyway. Why not write the whole thing in a modern language?
Bastard Programmer from Hell
if you can't read my code, try converting it here[^]
|
|
|
|
|
The client has asked in vb6, if we guys develop in VB.NET then there is no point that we are serving the clients with their requirements.
And i don't understand that what should be the best version of MDAC to be installed on the machine. I've the latest 2.8.
Mr.Eddy Vluggen I can see my component in COM, still do I need to register my component with 'regsvr32' ?
|
|
|
|
|
Karthik Reddy wrote: The client has asked in vb6, if we guys develop in VB.NET then there is no point that we are serving the clients with their requirements.
You mentioned VS2010; sounds like you are already developing in .NET - what language is the component written in? And yes, I expect you to understand "why" the client proposes the requirement, as opposed to simply agreeing. Keep in mind that you're the programmer, you are the one who knows what the language-choice implicates, and YOU are the one responsible for using it.
Karthik Reddy wrote: Mr.Eddy Vluggen I can see my component in COM, still do I need to register my component with 'regsvr32' ?
Yes. You need to register your .NET control before you can use it in VB6.
That goes for all ActiveX controls.
Bastard Programmer from Hell
if you can't read my code, try converting it here[^]
|
|
|
|
|
crieterion is to develop a component. We have done everything and sent to them..
After few days, all of a sudden he said he want the component to be used in vb6 applications.
Thank you for your suggestions !!
But my component is not registering with regsvr32.exe
|
|
|
|
|
Karthik Reddy wrote: After few days, all of a sudden he said he want the component to be used in vb6 applications.
I believe it's regasm[^], not regsvr. I tend to confuse them often; it's easier to search codeproject[^] for an article that has the procedure than it is to remember it after not using it for a few years. The CP-article shows all required steps, including registering.
Bastard Programmer from Hell
if you can't read my code, try converting it here[^]
|
|
|
|
|
Its working a bit now.
But error giving some error, i'll try to get rid of it.
Thanks Eddy Vluggen.
|
|
|
|
|
You're welcome
|
|
|
|
|
The component is in C#.NET in VS2010
|
|
|
|
|
Private Sub btnHostTools_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnHostTools.Click
If GameActive Then
frmHostTools.Visible = True
Else
MsgBox("Please launch halo first!")
End If
End Sub
My problem is when the game isn't active it displays the message as it should, but the problem is that when the game does become active it will automatically show the form if you clicked the button when it was inactive.
How do I make it stop doing this, it's VERY annoying.
|
|
|
|
|
Disable[^] the button when it shouldn't be active. That way it won't be able to receive input (-focus).
Bastard Programmer from Hell
if you can't read my code, try converting it here[^]
|
|
|
|
|
I have a table with student info.
It is possible for the user to enter the some
student 2 or 3 times, even if the studentId (primary Key) maybe diffirent. the first name, last name, classe ect may be the same.
If I have a student that have the same 6 fields the same I want to automatically delete them form the table remember the Student is set to auto increment.
thanks in advance
|
|
|
|
|
And your question/problem is what?
Why is common sense not common?
Never argue with an idiot. They will drag you down to their level where they are an expert.
Sometimes it takes a lot of work to be lazy
Please stand in front of my pistol, smile and wait for the flash - JSOP 2012
|
|
|
|
|
Member 9331278 wrote: It is possible for the user to enter the some student 2 or 3 times, even if
the studentId (primary Key) maybe diffirent
This may be true in your applications, but not in mine. If you're running into this, you did something very wrong, or not at all, during validation and data integrity checking before you wrote the record to the database.
Oh, you didn't check for duplicate data entered before you added the record?? Huh, that would explain why you've got this problem now, wouldn't it?
|
|
|
|
|
Member 9331278 wrote: It is possible for the user to enter the some
student 2 or 3 times, even if the studentId (primary Key) maybe diffirent. the first name, last name, classe ect may be the same.
Normalize your dataset; if an autonumber-key would solve all those structural problems, Access would have been a first-class development environment.
Bastard Programmer from Hell
if you can't read my code, try converting it here[^]
|
|
|
|
|
I am using Sql not access
can anyone help
|
|
|
|
|
The same advice applies; normalize your dataset to PREVENT this from happening in the first place.
Google for "SQL remove duplicates".
Bastard Programmer from Hell
if you can't read my code, try converting it here[^]
|
|
|
|
|
There is a article in here that has a class that puts a wrapper around "Lame.exe" so you can use Lame to convert .wav files to .mp3. It works great, but I cannot seem to get it to loop through a directory and convert all files in that directory. Does anyone know how to do it with this method, or have another way of doing it?
|
|
|
|
|
Do you use this:
VB.NET LameMP3 Shell[^]?
If so you would have to create a new instance of your converter for each file you are trying to convert. WAV to MP3 is quite math heavy to do, so I'd guess it would take quite a while to complete the convertion...
|
|
|
|
|
I do use that. Can you help me with a little example of what you mean? Also, do you know a easier way to do it, or do you think this is the best?
|
|
|
|
|
Use the Directory.GetFiles [^] method. There's an example on the same page on how to use it.
Call your convert-method foreach item that you encounter.
iismoove wrote: Also, do you know a easier way to do it, or do you think this is the best?
I like forking, and I don't mind the overhead compared to a thread. No, it's not the "best" way, because it'll be hard to display some progress, the user might think that your software is "stuck" somewhere and decide to terminate it.
Bastard Programmer from Hell
if you can't read my code, try converting it here[^]
|
|
|
|
|
What do you mean by "forking"? I am kind of new to programming, so please excuse my ignorance. I got the code to work, but like you said it seems to "hang". I also noticed that there are about 20 or so instances of "lame.exe" running in the task manager, so the machine becomes very slow and sluggish.
|
|
|
|
|
iismoove wrote: What do you mean by "forking"?
Applications sometimes do multiple stuff at once; in that case you often need threading. I'm more of a fan of "forking", where one runs an executable and fetches the result. An independent executable can be tested without the rest of the crap, makes maintenance a bit easier.
iismoove wrote: I also noticed that there are about 20 or so instances of "lame.exe" running in the task manager
Aight, that means it works. It's best not to start all 20 conversions at once, but one after another. You're probably using the Process class to launch those, and you'd have to wait after launching until it is done before moving on to the next one.
Call the Process.WaitForExit [^] method in your loop to block execution until the external application finishes.
Bastard Programmer from Hell
if you can't read my code, try converting it here[^]
|
|
|
|