-
Dec 26th, 2009, 09:25 AM
#1
Thread Starter
Addicted Member
javascript & Compatibilty
hi vbforums
how would i call a javascript file that will automatically put in the code in the url combobox and it will press enter automatically ?
And
How Would i Make my Application Compatible with vista and xp at the moment its built for windows 7 but if i get to xp and vista i would need to disable a windows 7 feature so it will work on xp and vista please tell me
thanks a lot
pillhead2007
-
Dec 26th, 2009, 09:43 AM
#2
Fanatic Member
Re: javascript & Compatibilty
Okay, first of all, do you want to load the contents of a javascript file into a combobox on your application and automatically press it?
Well use IO.File.ReadAllText()
And to press the combobox, you can raise the ComboBox_Enter event.
Secondly, you can try to find a replacement for that code so it works on all OSes or you can disable it by doing a check like this:
Code:
My.Computer.Info.OSFullName.Contains("7")
Im not sure though, what the full OS name of Windows 7 contains.
-
Dec 26th, 2009, 01:50 PM
#3
Member
Re: javascript & Compatibilty
how do you mean put a javascript file code into a combobox?
do you mean, call a javascript method in a webpage? do you mean put the url returned by the javascript method into IE URL combobox? your own combobox?
again your not clear about windows 7. what feature would you need to disable? what are you doing in windows 7 that vista/xp don't have?
-
Dec 26th, 2009, 02:22 PM
#4
Re: javascript & Compatibilty
Originally Posted by Zeelia
Okay, first of all, do you want to load the contents of a javascript file into a combobox on your application and automatically press it?
Well use IO.File.ReadAllText()
And to press the combobox, you can raise the ComboBox_Enter event.
Secondly, you can try to find a replacement for that code so it works on all OSes or you can disable it by doing a check like this:
Code:
My.Computer.Info.OSFullName.Contains("7")
Im not sure though, what the full OS name of Windows 7 contains.
There's a CodeBank entry for identifying the OS. It's more in-depth than that and provides a little more stability.
CodeBank contributions: Process Manager, Temp File Cleaner
Originally Posted by SJWhiteley
"game trainer" is the same as calling the act of robbing a bank "wealth redistribution"....
-
Dec 26th, 2009, 03:30 PM
#5
Fanatic Member
Re: javascript & Compatibilty
Originally Posted by weirddemon
There's a CodeBank entry for identifying the OS. It's more in-depth than that and provides a little more stability.
Yeah I found it some time ago, forgot to mention it in the post.
However I just want to say that if you are trying to load a javascript method into a webbrowser, depending on what you want to do, you might need to add void 0 to the method, to prevent that the javascript method changes the site into the methods value.
-
Dec 27th, 2009, 11:36 AM
#6
Thread Starter
Addicted Member
Re: javascript & Compatibilty
yes i need the javascript to be called in a webpage and windows 7 features taskbar progress bar i would have to disable that for it to work in xp or vista
-
Dec 27th, 2009, 12:43 PM
#7
Fanatic Member
Re: javascript & Compatibilty
Why would you have to disable that?
All webbrowsers have progress bars in their taskbars.
Besides, you are developing in .NET, installing the required framework should solve the problem.
However, to call a javascript in a webpage, depending on what you want to do, you could do like this:
WebBrowser1.Navigate("javascript:alert('Hello World!'); void 0;")
That will load the javascript javascript:alert('Hello World!') into the webbrowser.
-
Dec 27th, 2009, 12:45 PM
#8
Thread Starter
Addicted Member
Re: javascript & Compatibilty
in windows 7 the actual taskbar is progress bar i would have to disable the feature i have made for my web browser so it would work with xp and vista
-
Dec 27th, 2009, 12:52 PM
#9
Fanatic Member
Re: javascript & Compatibilty
Okay, I've basically already given you the code that you need to disable it.
If you want a more ingoing code and more exact code, take a look at this:
http://www.vbforums.com/showthread.php?t=434149
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|