473,789 Members | 2,446 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

windows script control 1.0

in vba is used windows script control 1.0 for molded got from txtFunction

as possible do this in vb.net?
thank you

I have written code but he does not work

Function FunctionEval(By Val X As Double) As Double

ScriptControl.E xecuteStatement ("X=" & X)
FunctionEval = ScriptControl.E val(txtFunction .Text)

End Function

Nov 21 '05 #1
3 4557
"VladimirT" <vt**@mail.ru > schrieb:
in vba is used windows script control 1.0 for molded got from txtFunction

as possible do this in vb.net?
thank you

I have written code but he does not work

Function FunctionEval(By Val X As Double) As Double

ScriptControl.E xecuteStatement ("X=" & X)
FunctionEval = ScriptControl.E val(txtFunction .Text)

End Function


What does not work? Are you sure added the reference to the script control?

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 21 '05 #2
Function FunctionEval(By Val X As Double) As Double

Try

ScriptControl.E xecuteStatement ("X=" & X)

Console.WriteLi ne(ScriptContro l.Eval("Cos(X * 10)"))

Console.WriteLi ne(Cos(X * 10))

Catch exc As Exception

Throw New Exception("Can' t evaluate function at X=" & X)

End Try

yes certainly I have changed code

considers he ÐÒÁÉÌØÎÏ but stops on "END TRY" but gives error

An unhandled exception of type 'System.Excepti on' occurred in
WindowsApplicat ion1.exe

Additional information: Can't evaluate function at X=1,00167224080 268

"Herfried K. Wagner [MVP]" <hi************ ***@gmx.at> ÓÏÏÂÝÉÌ/ÓÏÏÂÝÉÌÁ ×
ÎÏ×ÏÓÔÑÈ ÓÌÅÄÕÀÝÅÅ: news:#R******** ******@TK2MSFTN GP09.phx.gbl...
"VladimirT" <vt**@mail.ru > schrieb:
in vba is used windows script control 1.0 for molded got from txtFunction
as possible do this in vb.net?
thank you

I have written code but he does not work

Function FunctionEval(By Val X As Double) As Double

ScriptControl.E xecuteStatement ("X=" & X)
FunctionEval = ScriptControl.E val(txtFunction .Text)

End Function
What does not work? Are you sure added the reference to the script

control?
--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>

Nov 21 '05 #3
yes certainly

he stops on "End try" and writes mistake

An unhandled exception of type 'System.Excepti on' occurred in
WindowsApplicat ion1.exe

Additional information: Can't evaluate function at X=-0,9966555183946 49

Function FunctionEval(By Val X As Double) As Double

Try

ScriptControl.E xecuteStatement ("X=" & X)

Console.WriteLi ne(ScriptContro l.Eval("Cos(X * 10)"))

Console.WriteLi ne(Cos(X * 10))

Catch exc As Exception

Throw New Exception("Can' t evaluate function at X=" & X)

End Try

End Function

"Herfried K. Wagner [MVP]" <hi************ ***@gmx.at> ÓÏÏÂÝÉÌ/ÓÏÏÂÝÉÌÁ ×
ÎÏ×ÏÓÔÑÈ ÓÌÅÄÕÀÝÅÅ: news:#R******** ******@TK2MSFTN GP09.phx.gbl...
"VladimirT" <vt**@mail.ru > schrieb:
in vba is used windows script control 1.0 for molded got from txtFunction
as possible do this in vb.net?
thank you

I have written code but he does not work

Function FunctionEval(By Val X As Double) As Double

ScriptControl.E xecuteStatement ("X=" & X)
FunctionEval = ScriptControl.E val(txtFunction .Text)

End Function
What does not work? Are you sure added the reference to the script

control?
--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>

Nov 21 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
2278
by: Wayne Gibson | last post by:
Hi, Was wondering if anybody could point me in the right direction. I'm looking at developing a Windows User Control using Visual Studio .NET 2005 in C#. The user control is to be used on a web page to replace an existing Java applet. One of the main reasons for switching from Java to the Windows User Control is to reduce the amount of the time spent maintain two lots of source code, keeping the online and offline versions in sync. So...
2
1273
by: Mike D | last post by:
I have a windows control in an aspx page. It receives data from some serial hardware on the client. How do I get this data to an aspx page so that I can post it to the server? I will need to post an instrument id to the server and return some data to the usercontrol. How is this done?? Thanks Mike
3
7490
by: Chris Paul | last post by:
I'm having trouble with PHP & PostgreSQL/OpenLDAP/Apache on Windows. I've set this up countless times on BSD (piece of cake) but I'm trying to do this on Windows now so that my developer can work on her local machine. Everything looks pretty good. OpenLDAP/cygwin works great. PostgreSQL works great. Apache runs. PHP runs. But when I try to connect to my PostgreSQL server using PHPPgAdmin, I
7
5328
by: unacoder | last post by:
Is it possible to request the user's permission to be able to control IE or FireFox windows that are pointed to domains other than the base domain the script is running from? For example, if my page launches a new window pointing to a web site originating from a different domain, is it possible for my script to request and gain access to the content of that window, and be able to control the window?
5
21480
by: JulioHM | last post by:
Hi all, I'm trying to use WMP in FireFox and I have the following tag to embed the player into the html page. <EMBED TYPE="application/x-mplayer2" PLUGINSPAGE="http://microsoft.com/windows/mediaplayer/en/download/" ID="wmp" Name="wmp"
69
4179
by: Peter Olcott | last post by:
Does JavaScript represent its controls internally as Microsoft Windows controls, or does it build them from scratch like Java?
1
7826
by: Vinod Sadanandan | last post by:
Cross Platform Migration An Unproblematic Approach (Windows-UNIX ) Oracle 10\11g The principal restriction on cross-platform transportable database is that the source and destination platform must share the same endian format. Redo log files and control files from the source database are not transported to destination database . New control files and redo log files are created for the new database during the transport process, and an ...
0
30248
AmberJain
by: AmberJain | last post by:
Windows Autorun FAQs: List of autostart locations Linked from the Original article- "Windows Autorun FAQs: Description". Que: Can you list all the autostart locations for windows? Ans: Here is a comprehensive list of all autostart locations for Windows OSes: NOTE : These are some abbreviations used in this list. Please note them carefully: HKCU = HKEY_CURRENT_USER HKLM = HKEY_LOCAL_MACHINE
0
9964
AmberJain
by: AmberJain | last post by:
Windows Autorun FAQs: Programs dealing with autoruns Linked from the Original article- "Windows Autorun FAQs: Description". Que: Can you list programs that help me to view/modify the autoruns on my Windows PC? Ans: Other than Sysinternals Autoruns, there are only a few programs which are good enough to be used when dealing with autoruns. For more information about Sysinternals Autoruns, read Que-7 in Windows Autorun FAQs: Description....
0
9663
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10193
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9016
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7525
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6761
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5415
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5548
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4089
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2906
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.