|
blurboy wrote: I did not realize it had to do with registering the dll because I did not register the dll on my PC before. It seems that when I compile my project, vb6 automatically registers A.dll.
True. When you compile a .DLL project under VB6, it automatically does the registration for you. Which makes sense because VB6 is only capable of tareting COM-based .DLL's. It can't generate a normal function .DLL.
blurboy wrote: Therefore, I have coded my program to auto-register the A.dll itself.
This is normally handled by the installer for your app, not the app itself. But, it's still possible to do so long as you realize that not everyone who uses your app may be able to register a COM .DLL.
blurboy wrote: Even after I unregistered the A.dll on my PC, I still can run my program normally! For some reason, vb6 keeps locking on to my dll. and I cant seem to unregister it. Therefore I am unable to test my auto-registering code!
REGSVR32 /u mydllname.dll will unregister that .DLL files GUIDs. Once the registrations are gone, the bindings shouldn't work any more. But, there may be old GUID data from older versions of your .DLL that are still registered. There's no way to automatically remove all of those references out of the Registry. You'll have to hunt them down and remove them by hand.
|
|
|
|
|
REGSVR32 /u mydllname.dll will unregister that .DLL files GUIDs. Once the registrations are gone, the bindings shouldn't work any more. But, there may be old GUID data from older versions of your .DLL that are still registered. There's no way to automatically remove all of those references out of the Registry. You'll have to hunt them down and remove them by hand.
Already tried so. REGSVR32 /u mydllname.dll.
But when i double click on my exe to run. it still run normally!
|
|
|
|
|
Your best bet is a "clean build" PC to test on - I use VMWare Workstation for this - it allows you to rollback the state of the Virtual Machine so you can go back to "clean" for testing the installers.
As for the mystery of it still working on your PC - it depends a bit on the way the DLL is called from VB - if you are using CreateObject as in e.g. wordObj = CreateObject("Word.Application") then the registry is searched first for Word.Application class then it picks up a GUID in that to get actual reg info point to the OLE DLL. This is known as "Late Binding". Early binding is what you get when you add the DLL to the references in your VB project. Can't remember for sure but there is a good chance that when you open the VB project if it is early bound and it doesn't find the registry info that it automatically re-registers the DLL - and it is likely it does this even if you don't run the project (because it needs the reference to be working to even allow a compile). I recommend ProcMon (old Sysinternals tool - now Microsoft) to spy on what is going on and ow the registry info for your DLL is being found.
|
|
|
|
|
VB 6 will look in the WIN\system or system32 folders even if a dll is unregistered. To test your auto register you would need to either relocate the dll or rename it with a different suffix. Additionally, assure that the installer is adding the dll file to the new system. The Software Packager (To build the installation package) will have a step for you to indicate what files you want to add, especially if you are using a custom dll or ocx. The packager does not automatically assure that all the necessary dll’s are added. Simply dragging or copying an executable to a new machine does not add the needed dlls. The installer will add and register the dlls.
Good luck
It was broke, so I fixed it.
|
|
|
|
|
Thanks everyone for the help! appreciate it
|
|
|
|
|
Hi all
I have written a piece of code that retrives data from database table and does some operation with the retrived data.
Code:
Dim ensartRows As List(Of EnsartRow) = EnsartRow.GetDBRows(cad.parent, cad.enfant, GetConnectionStr())
For Each e In ensartRows
If Not e.MatchesDataLineOtherFields(cad) Then
WriteAddFromEA(cad, e)
End If
Next
That gets a list from the database for matching values in a text file.
Now I want to do an operation for all that is not in the list(for all that does not have a match in the text file).
eg: a FOR for for the non matched list with the text file.
How to accomplish this?
Thanks in Advance.
|
|
|
|
|
I'm not sure exactly what it is that you are trying to do. If the list you talk about is ensartRows , then you need to create another list with the items that aren't in ensartRows .
If you are talking about doing something for items that don't match the If condition, then add an Else block to take care of the others.
Otherwise, I just don't know what it is you are asking about.
CQ de W5ALT
Walt Fair, Jr., P. E.
Comport Computing
Specializing in Technical Engineering Software
|
|
|
|
|
Thanks for the reply.
How to create another list that arent in ensartRows?
Thanks in advance.
|
|
|
|
|
The same way you created the first one, but with other criteria. If it was an SQL query, change the WHERE clause to be opposite of what it was.
CQ de W5ALT
Walt Fair, Jr., P. E.
Comport Computing
Specializing in Technical Engineering Software
|
|
|
|
|
Thanks for the reply.
I will try it out.
|
|
|
|
|
Hi,
I want after printing on a location erase all graphics(lines, tekst, circles,...);
Write now I use comething like this:
e.Graphics.FillRectangle(Brushes.White, 300, 80, 220, 200)
Is there a beter solution to do something like this.
E.Graphics.clear clears everything.
Jan
|
|
|
|
|
Don't draw them in the first place??
If they are already on the "page", then you either have to draw those object exactly as before, only in white, or you have to do what you did here.
|
|
|
|
|
Thanks Dave,
I keep it this way. I clarify why.
I had a report and now I want to add something. I’m to lazy to add some condition do I print the old or new info. So If I want the new info. I clear the already printed info and write on top of the clear portion
Jan
|
|
|
|
|
That doesn't change the answer. I've already given you what your options are.
|
|
|
|
|
And I say thanks. I just have clearefy why I want it
|
|
|
|
|
If you're able to edit the code that renders the content you want to clear, perhaps you could adjust the clip rect before the 'content to be cleared' is drawn - thus in effect not drawing it (but leaving the paint method relatively unchanged)?
|
|
|
|
|
This looks interresting but how can I do something that?
It sounds like something like screen in the good old days of GW basic but I have never found this in VB.net
Jan
|
|
|
|
|
Hello ,
I want guidance for converting my excel work sheet to PDF using VB6.0
Parag
|
|
|
|
|
You can convert anything to PDF using PDFCreator[^] printer.
If you want to print from VB6 you will have to use the Windows API ShellExecute[^] function, passing the verb "print" to its lpOperation argument, but before you will have to make sure that PDFCreator printer is the default printer. You might want to have a look at this[^] to see how to manage the default printer.
|
|
|
|
|
Thanx Erik
But is there any other way for direct convertion from excel to pdf i got solution from text file to pdf but in text file i can't add images or tables. Please help
Parag
|
|
|
|
|
yes!
one possibility would be:
* buy an pdf library (or use one of the .net libraries an make them com visible)
* reference the Microsoft Office ... Object Library
* use it to open excel file
* create your pdf
another possibility could had been: use google with some keywords ... for example:
activex create pdf control vb6
and, if possible, throw away vb6. It´s from 1998 ...
|
|
|
|
|
I need an application that waits for a sound (beep or chime) to be detected in a speaker (maybe via Direct X and sound card). When sound is detected, I want code to be run , say for now, a Msgbox pops up and says "sound dete3cted"
Thanks,
Gary
|
|
|
|
|
Gary99 wrote: I want code
You sound like you're ordering a pizza
AFAIK, Windows doesn't raise any events when sound is played. If you only need to "detect" sound, then you might want to google for a VU meter. That would still only react to a sound-card, not the internal speaker.
Or switch the microphone on, actively listening for sounds. That's probably not a practical solution, since it would also give you background-noise.
I are Troll
|
|
|
|
|
Hi - No, it's not for pizza. I googled and was not able to find a simple way to detect sound. Would DirectX be a possibility ? I don;t know where to look for sample code.
Thanks,
Gary
|
|
|
|
|
Gary99 wrote: I don;t know where to look for sample code.
There's always the CodeProject articles[^] that provide sample code.
Do you want to detect a sound that you're making yourself, or from a third party?
I are Troll
|
|
|
|