borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder

AndreaVB | Forum | News | Downloads | Register | Help | Member List | Statistics | Search | PM | Profile

Print This Topic
Previous Topic (repeat/hold button?)Next Topic (recognition) New Topic New Poll Post Reply
AndreaVB Forum : VB General : Very Important problem in OCX & Resource (plzzzzzzzzzzzzzzzzzzzzz)
Poster Message
Slim Shady
Level: Scholar

Registered: 11-01-2005
Posts: 46

icon Very Important problem in OCX & Resource (plzzzzzzzzzzzzzzzzzzzzz)

First...I just wanna say that i've been searching the world for this answer and i still didn't find one  
but the question is very easy but i don't think that people know what i mean
i put this question in many forums and still no answer
..........................................................................................
Note: I don't speak english very well  
...
well i don't know where to start..
ok.. i made a program using "comdlg32.ocx" and then a made another program wich contain a resource file....
this resource file contain "comdlg32.ocx
and i make it EXE..
and when i start the program.. the OCX files will go to the system directory...  
but when i start the program that i use in it the OCX file,the program dosn't work (but the comdlg32.ocx is in the system directory  ) the picture of the message box is in the Attachement
and plz don't tell me to use a setup program or any thing like that  
i hope that you understand what i mean cause i don't speak english very well..
and plz before to answear check this ansewears

http://www.vbforums.com/showthread.php?t=324144&highlight=OCX+resource

cause this is not what i want...   
if u didn't understand what i mean...plzzzzzzzzzzzzzzzzzzzzzzz
i want you to do that for me:
make a normal vb application...and put in it any ocx file
then made a splash screen before it and put in the splash screen a resource file that contain the ocx file
and when running it the splash screen will extract it and put in in the system dir and registered it and i don't know what...
all that metter is that when you extract it the program will work...
plzzzzzz don't ignore this message..
i really search the world for this proplem and i really need your help..
note: i am telling you that this will work..because i see in another program what i am asking you to do for me..and the ather program work normally..
plz         

[Edited by Slim Shady on 19-02-2005 at 12:08 AM GMT]

____________________________
Attached:
error.jpg (9 KB)

19-02-2005 at 12:06 AM
View Profile Send Email to User Show All Posts | Quote Reply
Slim Shady
Level: Scholar

Registered: 11-01-2005
Posts: 46
icon Re: Very Important problem in OCX & Resource (plzzzzzzzzzzzzzzzzzzzzz)

No body know what i should do   
not even the Admin

[Edited by Slim Shady on 19-02-2005 at 07:52 AM GMT]

19-02-2005 at 07:44 AM
View Profile Send Email to User Show All Posts | Quote Reply
Goran
Level: Moderator

Registered: 16-05-2002
Posts: 1681
icon Re: Very Important problem in OCX & Resource (plzzzzzzzzzzzzzzzzzzzzz)

The error tells you that you dont have all files that comdlg32 needs. If we take VSI, for example, when it creates installation, he ships comdlg32.msm with the installation, which I hardly believe is only a wrapper to comdlg32. This all points to a conclusion that also some other files are needed so comdlg32.ocx can be registered.
If you have Visual Studio installed on your machine, go to Start - Programs - Microsoft Visual Studio 6.0 - Microsoft Visual Studio 6.0 Tools - Depends

and open comdlg32.ocx there, and you will see all the dll's thatn it depends on, so all of them must be present on the target machine.

... and shipping all dependant files with your exe is not an appropriate way to do it, esepcially since it will make your exe much larger, and therefore it will execute slower... and all this tells you that things shouldnt be done the way you like them to do, but the proper way they should be done, that is why installers exist...

[Edited by Goran on 19-02-2005 at 01:43 PM GMT]

____________________________
If you find the answer helpful, please mark this topic as solved.

19-02-2005 at 12:13 PM
View Profile Send Email to User Show All Posts | Quote Reply
Goran
Level: Moderator

Registered: 16-05-2002
Posts: 1681
icon Re: Very Important problem in OCX & Resource (plzzzzzzzzzzzzzzzzzzzzz)

And another thing, what exactly do you use your comdlg32 for? I mean, what functions do use/need in your program? Post them here, and I will show you how you can easily bypass comdlg32 problem.

____________________________
If you find the answer helpful, please mark this topic as solved.

19-02-2005 at 12:47 PM
View Profile Send Email to User Show All Posts | Quote Reply
Slim Shady
Level: Scholar

Registered: 11-01-2005
Posts: 46
icon Re: Very Important problem in OCX & Resource (plzzzzzzzzzzzzzzzzzzzzz)

But you don't understand...
There is another person that did what i am telling you without shipping all of this...
http://www.geocities.com/kkanj22/exemple.zip
and plz it doesn't contain viruses and i don't know what..
and beside the runtime file that is in the zip file there is aloso a read me text...

20-02-2005 at 03:39 AM
View Profile Send Email to User Show All Posts | Quote Reply
~Bean~
Level: VB Guru


Registered: 07-04-2003
Posts: 488
icon Re: Very Important problem in OCX & Resource (plzzzzzzzzzzzzzzzzzzzzz)

First, you are including the comdlg32 control on a form, right?

Second, if you think that person was able to do this then have you asked him?

Third, nowhere does it way that the author used comdlg32...I am quite sure that all his little exe does is register those 3 ocx's with something like...


'register
Shell "REGSVR32.EXE c:\WINDOWS\System\whatever.OCX", vbMaximizedFocus


If this is what you're attempting with comdlg32 then please listen...Goran is right, you are missing one of the ocx's dependant files (a dll)...perhaps reading into the comdlg32 controls help (in MSDN), just a quick look I found this

quote:

The CommonDialog control provides an interface between Visual Basic and the routines in the Microsoft Windows dynamic-link library Commdlg.dll. To create a dialog box using this control, Commdlg.dll must be in your Microsoft Windows SYSTEM directory.



Lastly, even if you get this to work, (as Goran said) an install is the best way to implement this especially if you're going to be on different versions of Windows...

[Edited by ~Bean~ on 20-02-2005 at 03:06 AM GMT]

____________________________
Eggheads unite! You have nothing to lose but your yolks.
20-02-2005 at 08:05 AM
View Profile Send Email to User Show All Posts Visit Homepage | Quote Reply
Goran
Level: Moderator

Registered: 16-05-2002
Posts: 1681
icon Re: Very Important problem in OCX & Resource (plzzzzzzzzzzzzzzzzzzzzz)

quote:
But you don't understand...


It seems to me that you dont want to accept facts. There is nothing misterious in your error, it is a common-well known error and I explained you why you are getting it. Anyway, I wanted to show you easier and better way than distributing a common dialog control, but since you didnt answer my quesiton, it seems that you are only interested in the way you want it to be.

____________________________
If you find the answer helpful, please mark this topic as solved.
20-02-2005 at 12:41 PM
View Profile Send Email to User Show All Posts | Quote Reply
Slim Shady
Level: Scholar

Registered: 11-01-2005
Posts: 46
icon Re: Very Important problem in OCX & Resource (plzzzzzzzzzzzzzzzzzzzzz)

quote:
Goran wrote:
quote:
But you don't understand...


It seems to me that you dont want to accept facts. There is nothing misterious in your error, it is a common-well known error and I explained you why you are getting it. Anyway, I wanted to show you easier and better way than distributing a common dialog control, but since you didnt answer my quesiton, it seems that you are only interested in the way you want it to be.


First..thx alot for ur helps...
Second..If i gonna use the P&D how does it work
i mean how can i make a setup program using it
and the most important thing is
exemple my program's name is 11.exe and there is number of OCX files that required with it.. The setup wizard exemple install my exe to C:/ and install the ocx files to the system directory? If so how can i use it?
20-02-2005 at 01:43 PM
View Profile Send Email to User Show All Posts | Quote Reply
Goran
Level: Moderator

Registered: 16-05-2002
Posts: 1681
icon Re: Very Important problem in OCX & Resource (plzzzzzzzzzzzzzzzzzzzzz)

I thought that you have only one OCX needed for your program - comdlg32 (along with the VB run time files), but now you say you have number of them. You werent trying to install all of them manually? Dont worry about PDW, it does all the job by itself (almost).

I will ask a question again, since you didnt answer to it... If you have only need commdlg32 to distribute wqith your application (along with the VB run time files), and you want not to make install package, then tell me what functions do you use with Common dialog control, and I will explain you how to bypass this problem with commong dialog.

If you do want to make an installation, then just run the PDW and let it do the whole job. Visual Studio Installer is much more proffesional, but my advise would be that if you are not familar with installers, you should first learn PDW, to understand how things work, and then after it makes some sence, move to Visual Studio Installer...

____________________________
If you find the answer helpful, please mark this topic as solved.

20-02-2005 at 05:53 PM
View Profile Send Email to User Show All Posts | Quote Reply
Slim Shady
Level: Scholar

Registered: 11-01-2005
Posts: 46
icon Re: Very Important problem in OCX & Resource (plzzzzzzzzzzzzzzzzzzzzz)

Look...I email the programmer that i was told u about and this is what he told me to do:

1) Add the runtime as a resource to your VB project.
2) Use submain() as the startup object
3) In submain() add code to check if the runtime is already on the computer (simple file exist code)
4) If the file is not there, extract it from the resource and write it to disk
5) Register the runtime (MUST BE DONE FOR THE RUNTIME TO WORK!!!)  

is that true?

[Edited by Slim Shady on 21-02-2005 at 05:30 AM GMT]

21-02-2005 at 04:37 AM
View Profile Send Email to User Show All Posts | Quote Reply
~Bean~
Level: VB Guru


Registered: 07-04-2003
Posts: 488
icon Re: Very Important problem in OCX & Resource (plzzzzzzzzzzzzzzzzzzzzz)

OK Goran...take deep breaths mate...I'll try to answer...

quote:

is that true?



No...obviously not if its not working for you...

change #5 to...


5) Register the runtime and all of it's dependant files (MUST BE DONE FOR THE RUNTIME TO WORK!!!)


Not that I like to give you this as an answer but you could try to include and register comdlg32.dll along with the ocx and see if that works...but as I said, this is not a good way to go about distributing your applications...

Why is it again that you don't want to use an install?

and why don't you tell us what you're using comdlg32 for as Goran has offered to give you alternatives...(?)


____________________________
Eggheads unite! You have nothing to lose but your yolks.
21-02-2005 at 07:02 PM
View Profile Send Email to User Show All Posts Visit Homepage | Quote Reply
Goran
Level: Moderator

Registered: 16-05-2002
Posts: 1681
icon Re: Very Important problem in OCX & Resource (plzzzzzzzzzzzzzzzzzzzzz)

quote:
OK Goran...take deep breaths mate...I'll try to answer...





quote:
and why don't you tell us what you're using comdlg32 for as Goran has offered to give you alternatives...(?)


    

____________________________
If you find the answer helpful, please mark this topic as solved.
21-02-2005 at 11:55 PM
View Profile Send Email to User Show All Posts | Quote Reply
Slim Shady
Level: Scholar

Registered: 11-01-2005
Posts: 46
icon Re: Very Important problem in OCX & Resource (plzzzzzzzzzzzzzzzzzzzzz)

no man.. i can use a setup program
but tell me how does it work with ocx
and i don't want to use the P&D
and hey..can i use it exemple for ocx only with out the exe ?

22-02-2005 at 03:28 PM
View Profile Send Email to User Show All Posts | Quote Reply
AndreaVB Forum : VB General : Very Important problem in OCX & Resource (plzzzzzzzzzzzzzzzzzzzzz)
Previous Topic (repeat/hold button?)Next Topic (recognition) New Topic New Poll Post Reply
Surf To:


Not Logged In? Username: Password: Lost your password?
Partners: Download Actual Software | Free Software Download
borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder