|
Hey
I created an application that automatically enters a webmail account (enters automatically the username and password and enters the account).
the problem is that if one of the e-mail messages opens a new window, its being opened using IE (and thats fine by me b-u-t), when the IE window trys to show the content of that message, it can't because IE doesn't know that I already signed in with MY program so it asks the password and username again.
does anyone know how to fix it?!
I really have no clue!
|
|
|
|
|
Handle the NewWindow or NewWindow2 event. You'll need to return an implementation of the IWebBrowser (like a new instance of your AxWebBrowser control) in the first parameter and VARIANT_TRUE ((short)-1, or 0xffff) in the second). If you search for "NewWindow2" here on Code Project using the article search at the top of every page right below the logo you should find several examples.
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Customer Product-lifecycle Experience
Microsoft
[My Articles] [My Blog]
|
|
|
|
|
thanks, I'll get to work on that
|
|
|
|
|
Is there a C# method that will return me a path for a file name that I passed in? I need to remove a shortcut that place during an installation of another product. I know the name of the shortcut but not the location of the shortcut, thanks.
-- modified at 18:52 Monday 7th November, 2005
|
|
|
|
|
If you know absolutely nothing about the location of the file, then you probably need to search all the disks on the system for the thing.
But that would be a bit ridiculous. I'm guessing you know something about the location. For example, if it is somewhere on the start menu or desktop you could use System.Environment.GetFolderPath along with Environment.SpecialFolder to narrow down the search.
Or are you are you asking how to get the fully qualified path from a filename that has a relative path? If so, look at the FileInfo object.
Matt Gerrans
-- modified at 19:26 Monday 7th November, 2005
|
|
|
|
|
i have a remote object installed in each remote machine within my network, is there anyway to auto detect if the remote machine is active?
|
|
|
|
|
Is there an alternate tool to nDoc for creating help from documentation comments in C# code? (One that is updated for VS 2005.)
Anyone who thinks he has a better idea of what's good for people than people do is a swine.
- P.J. O'Rourke
|
|
|
|
|
I am trying to set up an application that will allow users to view a pdf depending on the version of adobe acrobat. Some of the users have 6.0 and others have 7.0.
I can open one or the other based on the version that is installed on my machine.
The com object ( tool ) seems to get updated depending on the version I have.
To further explain, I created an app that opens a pdf with pdf viewer 7.0 embedded in the windows form. I installed the application and removed adobe 7.0 and installed 6.0. The application doesn't work.
The com tool is different from 6.0 to 7.0.
|
|
|
|
|
Yes, that is the nature of COM. I'd say you need to import both, and check which one is installed.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I can do conditional logic and that will open a version if a particular version exists.
However, the code will not compile if I have logic for both version 6 and for version 7.
|
|
|
|
|
Why not ? Are they both the same named COM object ? Then you may have to do it via a dll, and have one for each version, perhaps.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Yes, it appears that you can only have one or the other.
I tried saving the dll's in my project folder and then adding references to the dll's and that doesn't seem to work the same as actually adding the the COM tool.
If the current version of the com tool is 6.0 and and I try to browse to the 7.0 version and select it, the original is now replaced.
|
|
|
|
|
The nature of COM is such that - if developers follow the rules - you should import the 6.0 library and that would work for the 7.0 library as well. Since interfaces should never be changed (though some, like Microsoft Office, only add to existing dispatch interfaces since automation clients can only use one default dispatch interface) they are still typically implemented so that you can do what you need. Now, if you require calling into 7.0-specific functionality in your client then you should cast to 7.0 interfaces. If null is returned then you're dealing with 6.0 and you won't be able to call into the 7.0 functionality.
The same goes for Office (using basic PIAs, not, say, Visual Studio for the Office System): use the oldest typelib you can tolerate in your app to generate the PIAs. Using them should work going forward (unless some day long, long down the line some older functionality is deprecated but then you should just not get the result you were expecting as opposed to a runtime error).
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Customer Product-lifecycle Experience
Microsoft
[My Articles] [My Blog]
|
|
|
|
|
The customize toolbox com components will contain only 1 adobe acrobat browser control.
the files( dll's ) created when you move the control to a form are different from version 6 to version 7.
Are you saying that I can just add a reference to the dll's for version 7.0 and somehow cast the version 6 class as a version 7?
|
|
|
|
|
No, actually you create an interop assembly from version 6, which means you may have to uninstall 7.0 and install 6.0 to create one, or do this on a separate machine, or just extract the ActiveX server or separate type library (if there is one, a .tlb file) and run tlbimp.exe on it.
If you use the 7.0 library the default class interface - depending on whether they create new interfaces per-version or add to the existing default dispatch interface - then where 6.0 is installed it may not work. The referse should hold true, however. This is how COM is designed to work in terms of versioning interfaces.
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Customer Product-lifecycle Experience
Microsoft
[My Articles] [My Blog]
|
|
|
|
|
somebody have "Professional C# 2005" book in fdf format.
Please
help me.
Mi nombre es Renier Jorge Telles
Soy estudiantes de informatica y estoy interaso en compartir con ustedes conocimientos y dudas de esta rama.
|
|
|
|
|
Hi there. Welcome to this site. Most of us are professional developers. Which means we work for a living. Some of us write books. Which means we work harder than we should have to in order to make a few bob. Which means we won't send a pdf off to some scumbag who is not willing to pay us for the work that we do.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Don't hold back, Christian, tell him what you really think!
Matt Gerrans
|
|
|
|
|
Seriously, of all the people in the world who steal intellectual property, developers are the group that make the least sense to me.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Actually, it is kind of interesting -- In my experience the higher the quality of the developer, the less likely they are to steal. I wonder if there is some link between competence and integrity? I guess that was often Ain Rand's thesis.
(or, maybe -- and more likely -- my experience doesn't amount to anything of statistical significance)
Matt Gerrans
|
|
|
|
|
This guy has been emailing me all morning trying to justify his position. Which proves in my mind, even he knows it's wrong.
Wrox books are crap, anyhow.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
While I can see where you are "coming from", and agree with your statement. There's no need to be hostile about it. Calling people a scumbag takes validity out of your argument.
I do think that not everyone has the resources to buy every book that comes out just because one chapter will be of use to them. I've seen guys in my college that barely have the money to eat. They are poor and manage to be in college with scholarships. Really brilliant people! Should they be denied the oportunity to learn? Not, in my opinion. If there's a case where a professor recommends a particular chapter from an additional book as a reference, I've bought it, and they have a real need, I will lend it to them. Dont take me wrong, you shouldnt be denied your right to eat and provide for your family either.
That problem could be solved to some extent if publishers allowed customers to buy excerpts from the book instead of forcing you to buy a whole book for a single useful chapter or two. Because a person could spend perhaps $7 for the part of the book he needs, instead of simply not buying the book, and downloading it off the net. But then again, letting you buy parts of the book would require them to recognize that not everything they publish is useful. And not all authors want to believe that.
-- modified at 20:55 Monday 7th November, 2005
|
|
|
|
|
azazel00 wrote: There's no need to be hostile about it.
Perhaps. But the fact is, he is a thief. I wanted to highlight that this is as true if he downloads a pdf as if he steals a paper book.
azazel00 wrote: I do think that not everyone has the resources to buy every book that comes out just because one chapter will be of use to them.
That's true. Those people should look into subscribing to Safari or something, or making do without.
azazel00 wrote: Should they be denied the oportunity to learn?
No. I guarentee you that the book in question teaches nothing that cannot be learned online.
azazel00 wrote: That problem could be solved to some extent if publishers allowed customers to buy excerpts from the book instead of forcing you to buy a whole book for a single useful chapter or two.
Sort of an iTunes model ? That could work, and I'm sure it will come into being. I'm also pretty sure that the web has hurt book sales a lot.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I have to agree with Christian. This guy has been openly and blatantly asking for a pyrated copy of this book for days. Its even worse if he has been emailing Christian trying to justify his position. People who don't even try to do it underhandedly are scumbags, in the truest sense of the word. They apparently have no qualms about steeling, despite the fact that it is WRONG. The proliferation of steeling only serves to keep the poor poor, and make those who work hard for their money have to work harder. Plain and simple, yes, this guy is a theif, and if he doesn't realize that (which seems doubtful in light if is attempts at justification), a sharp wakeup call is certainly acceptable.
|
|
|
|
|
Ah yes, the "it's okay to steal if you are poor argument" followed by the "it's okay to steal if the product isn't offered in the style you'd like" (or is that, "really, I would pay for it if it were packaged differently").
There are people with integrity and very little money -- they won't steal.
Then there are with very little integrity, rich and poor alike -- they'll steal left and right and they'll always have lots of "reasons" why it is okay or why in this case it isn't really stealing.
Matt Gerrans
|
|
|
|