473,664 Members | 2,972 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

creating code on the fly at runtime

what is the prefered method of creating a VB function or subroutine on the
fly at runtime. for example:

a user types in a function at runtime into a text field. then the user wants
to evaluate the function. the function may contain variables that the user
will enter just before execution. the function would be standard VB code. is
it possible to create VB code, build it and then execute it from within my
running VB program?

thanks
Jun 10 '06 #1
4 1906
Hi,

Maybe this will help.
http://msdn.microsoft.com/msdnmag/is...n/default.aspx

Ken
-----------------

"gyoder" wrote:
what is the prefered method of creating a VB function or subroutine on the
fly at runtime. for example:

a user types in a function at runtime into a text field. then the user wants
to evaluate the function. the function may contain variables that the user
will enter just before execution. the function would be standard VB code. is
it possible to create VB code, build it and then execute it from within my
running VB program?

thanks

Jun 10 '06 #2
thanks. i've looked at the link and it looks interesting.
"Ken Tucker [MVP]" <Ke**********@d iscussions.micr osoft.com> wrote in message
news:9F******** *************** ***********@mic rosoft.com...
Hi,

Maybe this will help.
http://msdn.microsoft.com/msdnmag/is...n/default.aspx

Ken
-----------------

"gyoder" wrote:
what is the prefered method of creating a VB function or subroutine on
the
fly at runtime. for example:

a user types in a function at runtime into a text field. then the user
wants
to evaluate the function. the function may contain variables that the
user
will enter just before execution. the function would be standard VB code.
is
it possible to create VB code, build it and then execute it from within
my
running VB program?

thanks

Jun 10 '06 #3
Gyoder,

In addition to Ken if some simple evalutation is important than you can as
well use this.

http://www.vb-tips.com/default.aspx?...1-2b03e1a439ae

I hope this helps,

Cor

"gyoder" <ge*********@co mcast.net> schreef in bericht
news:eP******** *************** *******@comcast .com...
what is the prefered method of creating a VB function or subroutine on the
fly at runtime. for example:

a user types in a function at runtime into a text field. then the user
wants to evaluate the function. the function may contain variables that
the user will enter just before execution. the function would be standard
VB code. is it possible to create VB code, build it and then execute it
from within my running VB program?

thanks

Jun 11 '06 #4
thanks. very interesting. between the two of these ideas i may be able to
accomplich what im trying to do. thanks for all your help.
"Cor Ligthert [MVP]" <no************ @planet.nl> wrote in message
news:uq******** *****@TK2MSFTNG P04.phx.gbl...
Gyoder,

In addition to Ken if some simple evalutation is important than you can as
well use this.

http://www.vb-tips.com/default.aspx?...1-2b03e1a439ae

I hope this helps,

Cor

"gyoder" <ge*********@co mcast.net> schreef in bericht
news:eP******** *************** *******@comcast .com...
what is the prefered method of creating a VB function or subroutine on
the fly at runtime. for example:

a user types in a function at runtime into a text field. then the user
wants to evaluate the function. the function may contain variables that
the user will enter just before execution. the function would be standard
VB code. is it possible to create VB code, build it and then execute it
from within my running VB program?

thanks


Jun 11 '06 #5

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

Similar topics

8
5961
by: Nanda | last post by:
hi, I am trying to generate parameters for the updatecommand at runtime. this.oleDbDeleteCommand1.CommandText=cmdtext; this.oleDbDeleteCommand1.Connection =this.oleDbConnection1; this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_ApplicantName", dataset.Tables.Columns.DataType, 50,
15
6743
by: Carlos Lozano | last post by:
Hi, What is the right way to create an OCX COM component. The component is already registerred, but can't create an instance. I am using the reference to the interop module created. If I use javascript or vbscript it works. I will appreciate any help. I do the following (C#):
2
2893
by: Anand Sagar | last post by:
I have a Panel1 and button1 on my webform. At runtime, I create 2 textboxes. I do it at the Page_Load event. I put the code within the " If Not isPostBack" For the button click event, I will do a post-to-database coding and then show the same page again. I put EnableViewState = True for the textboxes. In the Page_Load if I dont use the IsPostBack checking, the code works fine. The button shows that the code has been fired and the page...
12
3153
by: Mats Lycken | last post by:
Hi, I'm creating a CMS that I would like to be plug-in based with different plugins handling different kinds of content. What I really want is to be able to load/unload plugins on the fly without restarting the application. What I did was to create an AppDomain that loaded the plugins and everything was great, until I tried to pass something else that strings between the domains...
5
3491
by: Sam777 | last post by:
I was under the impression that creating the app_offline.htm file at the root of the webapp would cause all handles to be closed so that the app could be removed. Unfortunately, this isn't the case. One handle remains open. Debugging shows that it's actually the IIS cache and not ASP.NET that owns this handle. During IIS shutdown, the handle is closed with the following stack trace: ChildEBP RetAddr 0006fbe4 5a403e05...
7
2206
by: Varangian | last post by:
Hello is creating controls at runtime the same as designtime ? will a page be faster if controls are created at designtime rather than at runtime ? If so why ? thanks :)
8
2212
by: julia_beresford | last post by:
Hi I need to create the following class at runtime: public class MyCollection : CollectionBase { public void Add(MyItem item) { List.Add(item); }
19
1941
by: =?Utf-8?B?WWFua2VlIEltcGVyaWFsaXN0IERvZw==?= | last post by:
I'm doing my c# more and more like i used to code c++, meaning i'm casting more often than creating an instance of objects. like : protected void gvOrderDetailsRowDataBound(object sender, GridViewRowEventArgs e) { if (e.Row.RowType == DataControlRowType.DataRow) { switch (((Sale)e.Row.DataItem).SzPN) {
0
6105
by: austincolby | last post by:
I am working on creating a SOAP client in Visual Studio 2008 for the first time but am running into a few issues. I added the Web Service reference to the project and am able to see the namespace and set the information for the classes but cannot figure out how to send the information to the server or receive a response. Below is my code and any help is appreciated! Imports Microsoft.Web.Services2 Public Class Form1 Public...
0
8437
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
8348
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8861
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8549
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7375
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...
0
5660
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
4185
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
4351
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1759
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.