|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
ShellExecute to html file in VB.netVisual Studio 6. I am currently using Visual Studio 2008 coding in Visual Basic. All the examples I have tracked down to use ShellExecute to open a file with the appropriate application end up looking something like this: Private Declare Function ShellExecute Lib "shell32.dll" _ Alias "ShellExecuteA" _ (ByVal hwnd As Long, _ ByVal lpOperation As String, _ ByVal lpFile As String, _ ByVal lpParameters As String, _ ByVal lpDirectory As String, _ ByVal nShowCmd As Long) As Long Private Sub Command1_Click() Const SW_SHOWDEFAULT As Long = 10 Dim sFullPathToFile As String Dim rc As Long sFullPathToFile = "C:\tmp\EditMenu.htm" rc = ShellExecute(0, "Open", sFullPathToFile _ , 0&, 0&, SW_SHOWDEFAULT) End Sub When I execute the above, it does not throw an exception, It does not generate anything in the event log. It appears to run. rc is returned as 1642688007033061378 x"16CA000A00000002" The path to the file does exist and IE is defined as the default application for .html files. I have not been able to track down what that error means. Can someone give me a pointer as to how to fix this issue? -- Robert Styma Principal Engineer (DMTS) Alcatel-Lucent "Robert Styma" <rollingbigbob@newsgroup.nospam> wrote in message [Canned response]news:B98E6266-40E1-4A5A-8B12-FDD08282F534@microsoft.com... > I am currently using Visual Studio 2008 coding in Visual Basic. This is a VB "classic" newsgroup. Questions about VB.NET (including VB 2005/2008 and VB Express, which have dropped .NET from their names) are off-topic here. Please ask .NET questions in newsgroups with "dotnet" in their names. The *.vb.* groups are for VB6 and earlier. If you don't see the *.dotnet.* groups on your news server, connect directly to the Microsoft server: msnews.microsoft.com. For questions specific to the VB.NET language, use this group: microsoft.public.dotnet.languages.vb Please note that things like controls and data access, which have their own subgroups in the Classic VB hierarchy, are not language-specific in .NET, so you should look for groups like these: microsoft.public.dotnet.framework.windowsforms.controls microsoft.public.dotnet.framework.adonet (Note that "vb" is not present in the group name.) > I have used SHellExecute from C++ successfully on You're using VB.Net. VB and VB.Net two different things.> Visual Studio 6. I am currently using Visual Studio 2008 > coding in Visual Basic. This group is for VB. For VB.Net try here: microsoft.public.dotnet.languages.vb Microsoft dropped ".Net" from the name "VB.Net" as part of their marketing strategy to sell .Net to VB developers. Adding to that confusion, VB.Net has been named with several versioning systems. There is .Net v. 1, 1.1, 2 and 3. There is .Net 2005 and .Net 2008. And sometimes the VB.Net versions are referred to as VB7, VB8 and VB9, even though VB.Net is not a continuation of VB6! These days, anything other than VB5 or VB6 is probably VB.Net. You need to be aware of the difference between "the two VBs" when looking for newsgroups. The same applies when searching for sample code. VB and VB.Net code can look very similar in some cases, but code in one system is not applicable to the other. Give it up Mayayana. This spam of yours is adding nothing of any real help.
"mayayana" <mayayaX***@rcXXn.com> wrote in message Nonsense. The reason they dropped .NET from their naming was across the news:%23cwVqOxpJHA.1172@TK2MSFTNGP04.phx.gbl... > > Microsoft dropped ".Net" from the name "VB.Net" as > part of their marketing strategy to sell .Net to VB developers. board for all their products because they found it caused confusion, the very same confusion you are still demonstrating today after being told you've got it wrong (so many times) > Adding to that confusion, VB.Net has been named with several No there is not. .Net v. 1, 1.1, 2 and 3 refers to the framework versions > versioning systems. There is .Net v. 1, 1.1, 2 and 3. There is .Net > 2005 and .Net 2008. (aka the runtimes) Only products such as Visual Studio, Visual Basic or Visual C# are denoted with the year of release. So will you please stop posting this nonsense of yours claiming that "There is .Net 2005 and .Net 2008. " There isn't, and you have been told this umpteen times. The only reason you continue to post this must be because you are deliberately trying to start and argument or deliberately trying to confuse people. In either case, try growing up and maybe next time even just skip over any dotnet question rather than posting misleading info, hey ? Bill McCarthy wrote:
> The reason they dropped .NET from their naming was across the Just like Vista, eh? I dunno about you, but I sure didn't see too many folks > board for all their products because they found it caused confusion, confused about what that portended! <g> Face it, .NET is to Vista what Bush is to Cheney. The only difference is magnitude of abomination. Hi Robert,
Have a look for the Process class in System.Diagnostics namespace. It has a Start method such as Process.Start(sFullPathToFile). NOTE: For VB.NET questions please use the dotnet newsgroups such as : microsoft.public.dotnet.languages.vb, Show quoteHide quote "Robert Styma" <rollingbigbob@newsgroup.nospam> wrote in message news:B98E6266-40E1-4A5A-8B12-FDD08282F534@microsoft.com... >I have used SHellExecute from C++ successfully on > Visual Studio 6. I am currently using Visual Studio 2008 > coding in Visual Basic. All the examples I have tracked down > to use ShellExecute to open a file with the appropriate application > end up looking something like this: > > > Private Declare Function ShellExecute Lib "shell32.dll" _ > Alias "ShellExecuteA" _ > (ByVal hwnd As Long, _ > ByVal lpOperation As String, _ > ByVal lpFile As String, _ > ByVal lpParameters As String, _ > ByVal lpDirectory As String, _ > ByVal nShowCmd As Long) As Long > > Private Sub Command1_Click() > Const SW_SHOWDEFAULT As Long = 10 > Dim sFullPathToFile As String > Dim rc As Long > sFullPathToFile = "C:\tmp\EditMenu.htm" > > rc = ShellExecute(0, "Open", sFullPathToFile _ > , 0&, 0&, SW_SHOWDEFAULT) > End Sub > > When I execute the above, it does not throw an exception, It does not > generate anything in the event log. It appears to run. > rc is returned as 1642688007033061378 > x"16CA000A00000002" > The path to the file does exist and IE is defined as the > default application for .html files. I have not been able to track > down what that error means. > > Can someone give me a pointer as to how to fix this issue? > > > > > -- > Robert Styma > Principal Engineer (DMTS) > Alcatel-Lucent "Bill McCarthy" <I have a little tiny dick> wrote in message Again you must be reminded that this is a VB Classic newsgroup and that news:ezvbaj1pJHA.4516@TK2MSFTNGP02.phx.gbl... | Hi Robert, | | Have a look for the Process class in System.Diagnostics namespace. It has a | Start method such as Process.Start(sFullPathToFile). | NOTE: For VB.NET questions please use the dotnet newsgroups such as : | microsoft.public.dotnet.languages.vb, VB.NET is off topic and inappropriate. And, you are an identity thief by using the URL of my website in your email information. No one at any time should take you seriously. All replies from here on in will be redirected towards the appropriate group. Please discontinue your encouraging further replies of off topic material in the incorrect newsgroup, or suffer the consequences. > NOTE: For VB.NET questions please use the dotnet newsgroups such as : Why Bill as the MSDN newsgroup servers directs every question with VB and > microsoft.public.dotnet.languages.vb, Net in it to this newsgroup? Cor Show quoteHide quote "Bill McCarthy" <TPASoft.com Are Identity Thieves> wrote in message news:ezvbaj1pJHA.4516@TK2MSFTNGP02.phx.gbl... > Hi Robert, > > Have a look for the Process class in System.Diagnostics namespace. It has > a Start method such as Process.Start(sFullPathToFile). > NOTE: For VB.NET questions please use the dotnet newsgroups such as : > microsoft.public.dotnet.languages.vb, > > > > "Robert Styma" <rollingbigbob@newsgroup.nospam> wrote in message > news:B98E6266-40E1-4A5A-8B12-FDD08282F534@microsoft.com... >>I have used SHellExecute from C++ successfully on >> Visual Studio 6. I am currently using Visual Studio 2008 >> coding in Visual Basic. All the examples I have tracked down >> to use ShellExecute to open a file with the appropriate application >> end up looking something like this: >> >> >> Private Declare Function ShellExecute Lib "shell32.dll" _ >> Alias "ShellExecuteA" _ >> (ByVal hwnd As Long, _ >> ByVal lpOperation As String, _ >> ByVal lpFile As String, _ >> ByVal lpParameters As String, _ >> ByVal lpDirectory As String, _ >> ByVal nShowCmd As Long) As Long >> >> Private Sub Command1_Click() >> Const SW_SHOWDEFAULT As Long = 10 >> Dim sFullPathToFile As String >> Dim rc As Long >> sFullPathToFile = "C:\tmp\EditMenu.htm" >> >> rc = ShellExecute(0, "Open", sFullPathToFile _ >> , 0&, 0&, SW_SHOWDEFAULT) >> End Sub >> >> When I execute the above, it does not throw an exception, It does not >> generate anything in the event log. It appears to run. >> rc is returned as 1642688007033061378 >> x"16CA000A00000002" >> The path to the file does exist and IE is defined as the >> default application for .html files. I have not been able to track >> down what that error means. >> >> Can someone give me a pointer as to how to fix this issue? >> >> >> >> >> -- >> Robert Styma >> Principal Engineer (DMTS) >> Alcatel-Lucent > "Cor Ligthert[MVP]" <Notmyfirstn***@planet.nl> escribió en el mensaje What are you talking about? Could you be so kind and being more specific and news:u$svI44pJHA.3876@TK2MSFTNGP02.phx.gbl... >> NOTE: For VB.NET questions please use the dotnet newsgroups such as : >> microsoft.public.dotnet.languages.vb, > > Why Bill as the MSDN newsgroup servers directs every question with VB and > Net in it to this newsgroup? say how to look into this issue? "Eduardo" <m*@mm.com> wrote in message news:gpr32v$fsh$1@aioe.org... It's either one of two things.| | What are you talking about? Could you be so kind and being more specific and | say how to look into this issue? 1) Weak minded, clueless MVPs who don't know dick about anything taking matters into their own hands. 2) More MSFT FUD in an ongoing effort to pollute this community. Really, it's the same thing if you think about it. Time to rewrite the canned responses. Make sure that when .netters are directed here that you redirect all follow ups to the .net group so that all consequent replies end up there, where they belong. And I would also go as far as to advise in such replies Cor's and Bill's private email addresses so the OP can get the kind of personall attention that off topic replies seem to get here. Clutter up their inboxes enough and maybe they'll think twice before cluttering up this group with their proaganda. Eduardo wrote:
> "Cor Ligthert[MVP]" <Notmyfirstn***@planet.nl> escribió en el mensaje... Silly old goat doesn't know NNTP from HTTP, clearly.>>> NOTE: For VB.NET questions please use the dotnet newsgroups such as : >>> microsoft.public.dotnet.languages.vb, >> >> Why Bill as the MSDN newsgroup servers directs every question with VB and >> Net in it to this newsgroup? > > What are you talking about? Could you be so kind and being more specific and > say how to look into this issue? What a (useless old) tool he is... "Bill McCarthy" <TPASoft.com Are Identity Thieves> wrote in message Hi McCarthy. Have a look at your of tank of sheep dip. In fact, have a drink news:ezvbaj1pJHA.4516@TK2MSFTNGP02.phx.gbl... > Hi Robert, Have a look for the Process class in > System.Diagnostics namespace. of it to see if it knocks any sense into your stupid head. This is a Classic VB newsgroup. Just redirect dotnet questions to the correct group and STOP attempting to answer them here. Dick brain. Michael
Value > Long Data Type
How to make this call from form to control Differences between VB amd VBA and VBA Education Application.Quit but Word remains open in Task Manager VB App fails when log reaches 65536 HOW IS Memory Used by a VB App vb.net executing on NET Required ??? Knowing what launched an EXE that used CreateProcess()? Internal String Visibility |
|||||||||||||||||||||||