Solved

Web browser control problem

Posted on 2004-10-18
17
242 Views
Last Modified: 2007-12-19
I had to scratch my computer and re install OS e.t.c. After I finished installing windows 2000 Prof with service pack 4 and all windows updates I installed VS 2003. I then tried to load a project I was working on and when I opened a form that contained a web browser control in gave me the following errors:

1)ThenaAction.vb(2698): The variable 'AxWebBrowser1' is either undeclared or was never assigned.

concerning the following lines of code:

        Me.leftPanel.Controls.AddRange(New System.Windows.Forms.Control() {Me.AxWebBrowser1, Me.lstMailKey, Me.RichTextBox1, Me.lstRefresh})
        Me.ErrorProvider1.SetIconPadding(Me.AxWebBrowser1, CType(resources.GetObject("AxWebBrowser1.IconPadding"), Integer))
        Me.ErrorProvider1.SetIconAlignment(Me.AxWebBrowser1, CType(resources.GetObject("AxWebBrowser1.IconAlignment"), System.Windows.Forms.ErrorIconAlignment))
        Me.ErrorProvider1.SetError(Me.AxWebBrowser1, resources.GetString("AxWebBrowser1.Error"))

2)Could not find type 'AxSHDocVw.AxWebBrowser'.  Please make sure that the assembly that contains this type is referenced.  If this type is a part of your development project, make sure that the project has been successfully built.

Any suggestions as to what is happening???

0
Comment
Question by:pallmall77
  • 7
  • 5
  • 4
17 Comments
 
LVL 6

Expert Comment

by:etmendz
ID: 12337156
Do you have this 'AxSHDocVw.AxWebBrowser' installed? See these:

http://www.codeguru.com/Csharp/Csharp/cs_internet/desktopapplications/article.php/c5925/
http://weblogs.asp.net/stevencohn/archive/2004/06/09/151836.aspx
http://weblogs.asp.net/stevencohn/archive/2004/08/04/208422.aspx

Check your references... You might need to install this component first.

Have fun.
0
 

Author Comment

by:pallmall77
ID: 12337159
Also I forgot to say.. If after I added the web browser control to my tool bar I tried to insert it to a new form ona new project and I get the follwoing error:

One or more of the types in the assembly unable to load
0
 

Author Comment

by:pallmall77
ID: 12337165
I dont think I need to add anything. This component is part of the OS. In winnt\system32 directory. Last time I used it I just added it from the com component menu and then dragged it on the form..
0
 
LVL 6

Expert Comment

by:etmendz
ID: 12337169
Try to refresh your references. Check out the links I gave you. I'm sure you'll get something from them. Have fun...
0
 

Author Comment

by:pallmall77
ID: 12337192
I have used this plenty of times. I am not new at it.
I was wondering if somebody else has come across this. It is not a matter of refreshing references.
Something has gone wrong. This is what I am trying to figure out. I have deleted and added the references about 100 times. It is not that complicated. You should just drag and drop and everything is added for you!

I am wondering would could have become corrupt?? Another computer with the same things installed is loading the project fine!

HELP!

0
 
LVL 2

Accepted Solution

by:
dogsdieinhotcars earned 500 total points
ID: 12340800
You need to install the assemblies first.

Go to the command prompt and type:

aximp c:\windows\system\shdocvw.dll


You should be good to go after doing that.
0
 
LVL 6

Expert Comment

by:etmendz
ID: 12344023
I am sure you've used this plenty of times. But you've just re-installed your OS so your PC environment's changed. Read the articles I gave you. Even the tip dogsdieinhotcars gave you is in one of the articles I gave you.

Have fun.
0
 

Author Comment

by:pallmall77
ID: 12345255
let me give it another shot. I have always used this control in a very simple way. It is interesting how to use command line tools to create a wrapper e.t.c. but reality is you dont need to since VS does it for you if you insert the com component.

I have two new pc's with fresh installation of OS/VS 2003... I pull the same project from sourcesafe and in my computer I get the errors on the other it works fine! If you notice the error I get is only on a few lines that concern the control.

Even if I follow the instructions you give me.

1) Use aximp for the wrapper
2) Try to add the web browser control on a new project/empty form i get the EXACT same error :

"One or more of the types in the assembly unable to load"

Something has gone wrong with my installation. At least that is what I think.. Any other suggestions?
0
Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

 
LVL 2

Expert Comment

by:dogsdieinhotcars
ID: 12699799
I believe that etmendz should get credited.  His/her post was the first with the actual solution, and I feel that pallmall77 first did not follow the instructions and now has abandoned the question because he/she probably followed etmendz's advice and now has a solution.  I also posted a solution, but after reading etmendz's first post, he/she got there before me and I think they deserve the points :)

0
 

Author Comment

by:pallmall77
ID: 12703737
Just a small comment..

1) I have not abandoned the question
2) All above remarks are nowhere near an answer. Both attempted answers are fundamentaly wrong! YOU DO NOT NEED TO INSTALL THE WEB BROWSER CONTROL. It is just a drag-and-drop operation. Giving a link to a document that just says "add a reference and it should work" is not giving the answer. I can use google as well. The reason why I am a bit dissapointed is because the past few questions I have asked in experts exchange I have not received any valid answers. Just links to information that did not help.

For people that have simple questions yes but because my job is in IT my questions are very specific.

I gave up fighting for the above problem because I was running out of time. I scratched the computer and re-installed everything. I opened VS and... now everything works fine!

Sorry for being a bit hard

Thanks
0
 
LVL 2

Expert Comment

by:dogsdieinhotcars
ID: 12705596
You're not being hard, you just failed to listen to any of our advice.  The fact that you said the "you do not need to install the web browser control" and that it's a drag and drop operation shows that you absolutely didn't even bother to fully read the responses - especially etmendz initial links.  It's too bad you reinstalled windows - you didn't have to - you just had to read one of the responses fully.  If you're not willing to give him/her credit and not even willing to have fully tried his advice, well then it looks like etmendz will not be getting credit.  Fortunately, we can choose whose questions to answer.
0
 

Author Comment

by:pallmall77
ID: 12705929
Let me make another attempt so I dont get misunderstood..

I READ all of the links and tried everything I could try.... and YES when I say no installation is needed what i mean is that you dont have to go to the command prompt and  do "aximp c:\windows\system\shdocvw.dll". I am really sorry but you dont need to. VS does it for you. Its just a wrapper...

Pointing to links that just say add to comm objects menu and drag and drop doesnt help either. I had a very specific error i was getting and it had to do with the installation. Thats why second time round it worked without me changing anything. It doesnt matter that someone doesnt know the solution although for me it matters if someone believes he deserves points for not giving the solution. Furthermore my last article ended with... "any more suggestions.." obviously because the above didnt help. I got no responses after that?????????

Anyhow and anyway I am not intimidated by you threatening of never answering one of my questions. Like you say you can choose to answer questions and i can coose who can indeed answer the question.

Thanks
0
 
LVL 2

Expert Comment

by:dogsdieinhotcars
ID: 12706940
Ok, as you point out very clearly above, you didn't bother to try the advice, you just read it and disagreed.  It would have worked for you... It's a shame you had to reinstall.  Also, my comment was definitely not meant as a threat it was just trying to open your eyes to the fact that people who want to help you will look at your history (and I mean beyond this question here) and see that (a) you often don't bother to try the advice that was given - you "read" it and disagree and then post that you know you don't need to do that (by the way, in this particular question almost all of the time you don't need to generate the assemblies from the webbrowser typelibs --- your error message indicated it was one of those rare times you would need to) and (b) you still won't try the exact steps even after being implored to -- well that pretty much makes it too frustrating to offer you advice because you act like you know better!  

It's too bad that we didn't see eye to eye here, but I wish you the best of luck.  I know how aggravating it can be when something doesn't work the way you want it to!
0
 

Author Comment

by:pallmall77
ID: 12707443
This...

QUOTE

Even if I follow the instructions you give me.

1) Use aximp for the wrapper
2) Try to add the web browser control on a new project/empty form i get the EXACT same error :

"One or more of the types in the assembly unable to load"

UNQUOTE

kind of indicates that it didnt work. Actually I read the articles and tried all the steps (there were not that many) but obviously nothing of the above worked. Frustration comes when somebody insists on something that does not work! Nevertheless for you to spent time to reply to my comments shows that you actually believe you are right and although you are most definetely wrong I will award you the points for trying and for the last two lines in your previous comment. I like it when people react when they feel they have been wronged.

Thanks..!
0
 
LVL 2

Expert Comment

by:dogsdieinhotcars
ID: 12709258
That was a kind message of yours - thanks!

So I guess you did drop to the command line and do the aximp c:\windows\system\shdocvw.dll...   It's so strange that that didn't work --- I guess I should have explained that I had this same exact problem happen to me on a new install and it was doing that that fixed it - I wish it would have worked for you.  Since you did run that command and it didn't work, I apologize then because I thought you kept trying to do it from the IDE.

On the points front, it's very kind of you, but not necessary - if you need the points on your end I'll grant them back to you ... It sounds cheesy, but I try to help here because I find it fun to try to solve the mystery of why something went awry --- so part of what has me crazy about yours is that we failed in solving the mystery!   I'm not so sure what I do with the points, so if you paid for them or anything like that (I'm not sure how they work 'cause I'm pretty new here), I'll gladly pass them back.  It's a bummer that we'll never know what could have fixed it, but I guess at least I learned that the fix that worked for me doesn't work for everyone.
0
 
LVL 6

Expert Comment

by:etmendz
ID: 12712443
I would like to thank and congratulate dogsdieinhotcars for the efforts. It is sad that pallmall77 had to re-install from scratch. I guess its a learning for everyone to know that what works for you doesn't always work for everyone.

Though I'd like to express something and I am not expecting any replies from anyone.

I strongly believe that we should be more careful when reading content that we are (or think we are) already familiar with. More likely, we are bound to miss the same information we missed the first time we read the content. Something like "familiarity breeds contempt". Sometimes even the shortest phrase or sentence in the document is the answer to your question...

I am not saying that pallmall77 did not dare to even re-read the articles he said he's already familiar with. It is only fair to assume that he probably read them again. Whether you missed anything or not, it's ok. We can never find out what would really solve the problem. Not anymore. But at least re-installing was an option afterall and it fixed your problem. To be very honest, I would've done the same thing (re-install) in the first place.

busy lazy me

Peace and have fun... :-D
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

This article explains how to create and use a custom WaterMark textbox class.  The custom WaterMark textbox class allows you to set the WaterMark Background Color and WaterMark text at design time.   IMAGE OF WATERMARKS STEPS Create VB …
I think the Typed DataTable and Typed DataSet are very good options when working with data, but I don't like auto-generated code. First, I create an Abstract Class for my DataTables Common Code.  This class Inherits from DataTable. Also, it can …
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now