# Help in VB6



## digik (Jan 28, 2012)

How can I open a local html file in default browser on click event of command button?


----------



## krishnandu.sarkar (Jan 28, 2012)

Check this out : to display html file within vb6 - CodeGuru Forums


----------



## digik (Jan 28, 2012)

Thanks Krishnandu. It has worked.


----------



## krishnandu.sarkar (Jan 28, 2012)

Glad that it helped


----------



## digik (Jan 29, 2012)

Another question.

I have made an exe file in vb6. The icon of the file is of form. I want to change it to another icon. Within vb6 only icon is of form. Right clicking the exe doesnot give any option to change icon. I have seen change icon of exe in somebody's program, but donot know how to do it.

Can anybody help?


----------



## krishnandu.sarkar (Jan 29, 2012)

Ok. I don't have vb6 installed. But this is how we do it in .NET

Check the properties of application. There should be a property named icon. You can choose .ico files only.


----------



## digik (Jan 30, 2012)

Thanks again. It worked in VB6.


----------



## krishnandu.sarkar (Jan 30, 2012)

Enjoy


----------



## Vyom (Jan 31, 2012)

VB6! 
Why using such an obsolete language!


----------



## digik (Feb 2, 2012)

krishnandu.sarkar said:


> Check this out : to display html file within vb6 - CodeGuru Forums



I associated this function with command button click event. When I click the command button, it is showing " you are about to run Active X control which may harm your computer". How can I get rid of this problem by change of program?


----------



## krishnandu.sarkar (Feb 2, 2012)

I guess no, until and unless user/you(in this case) selects allow always.

Still, I'm not sure, wait for others to confirm.


----------



## Vyom (Feb 2, 2012)

digik said:


> I associated this function with command button click event. When I click the command button, it is showing " you are about to run Active X control which may harm your computer". How can I get rid of this problem by change of program?



That's a browser related issue. Which browser do you use? Firefox has ActiveX off by default. Can't say about other browsers.


----------



## krishnandu.sarkar (Feb 2, 2012)

I guess IE..!! Because I haven't seen other browsers throwing that warning till now.

And isn't the ActiveX thing only for MS?? Other browser works in diff. way.


----------



## Vyom (Feb 2, 2012)

Ok, read a few notes on ActiveX.

Almost every major browsers supports ActiveX, but the thing is, its disables by default in Firefox and Chrome. ActiveX is enabled by default in IE, but throws a warning, since IE also knows that ActiveX can cause a security issue. 

Btw, ActiveX can be compared to Applets made in Java. With big differences like, ActiveX can work only on Microsoft OS, whereas Applet is cross platform. Also Applets are a LOT secure due to the virtual environment that it provides to run the applet.

@OP: I am assuming, you are using IE. You can disable the warning by going to Tools -> Internet Options, and then Checking the "Allow active content to run ..." options, under Advanced tab.
As I said, it's an obsolete technology. Better learn some modern languages.


----------



## krishnandu.sarkar (Feb 2, 2012)

Thanks for that..!! Learned new thing


----------



## noob (Feb 3, 2012)

Man..people stil using VB6 ? wow..cant believe


----------



## Terabyte (Feb 4, 2012)

^I guess VB.NET becomes a bit easy after knowing the basics of VB6.


----------



## digik (Feb 4, 2012)

There has been lot activity in this thread but I didnot know it as I didnot receive any email message though my email option is set to instant.

Anyway, this warning was shown in IE9. The program contained only a shell32.dll call on command click to open the web page. I don't think it is an Active X control. What are your opinion?

The program was made for autorun of CD containing html files. The program was then left out and only html files were kept. All the html files were first created in word 2003 and saved as html. Running of webpages by double clicking the file showed warning regarding active x control. Later on, same files were re-prepared in ms publisher 2003. Then there was no warning in ie6 or ie9. But, whenever, the same files were run from cd ie9 gave the same warning again.

For testing, one of the main file html file was edited to keep only html code. Running from cd didnot show any warning in ie6 but ie9 showed the warning.

Any idea why this is happening?


----------

