PC Review


Reply
Thread Tools Rate Thread

Can you dynamically build a function call ?

 
 
Simon
Guest
Posts: n/a
 
      10th Oct 2003
Is it possible in VB to dynamically build a function call?

eg Something like:
strParams = strParam(0) & ", " & strParam(1)
strFunc = "Logon"
if not( frmMain.objMxAPI.strFunc( strParams ))


Regards,
Simon.


 
Reply With Quote
 
 
 
 
Jeremy Cowles
Guest
Posts: n/a
 
      10th Oct 2003
"Simon" <(E-Mail Removed)> wrote in message
news:03ce01c38f29$f5f52260$(E-Mail Removed)...
> Is it possible in VB to dynamically build a function call?
>
> eg Something like:
> strParams = strParam(0) & ", " & strParam(1)
> strFunc = "Logon"
> if not( frmMain.objMxAPI.strFunc( strParams ))


Yes it is possible but not how you think, I would read up on Delegates:

http://msdn.microsoft.com/library/de...ClassTopic.asp

HTH,
Jeremy

 
Reply With Quote
 
Fergus Cooney
Guest
Posts: n/a
 
      10th Oct 2003
Hi Simon,

You might also like to look up CallByName()

Regards,
Fergus


 
Reply With Quote
 
Herfried K. Wagner [MVP]
Guest
Posts: n/a
 
      10th Oct 2003
* "Simon" <(E-Mail Removed)> scripsit:
> Is it possible in VB to dynamically build a function call?
>
> eg Something like:
> strParams = strParam(0) & ", " & strParam(1)
> strFunc = "Logon"
> if not( frmMain.objMxAPI.strFunc( strParams ))


Have a look at 'CallByName'.

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding a function call to an event dynamically Vince Panuccio Microsoft Dot NET Framework Forms 3 5th May 2007 12:34 PM
Dynamically create and call a function MRW Microsoft ASP .NET 7 6th Aug 2006 11:58 PM
Dynamically instantiate class and call function =?Utf-8?B?Q2hyaXN0aWFuIEhhdmVs?= Microsoft C# .NET 9 25th Jan 2006 01:43 PM
Dynamically call a function depending on the value of a variable =?Utf-8?B?U3VwYSBIb29wc2E=?= Microsoft Dot NET 3 22nd Mar 2005 02:17 PM
Call a function from a dynamically created ImageButton =?Utf-8?B?UGF0cmljayBNYXJ0aQ==?= Microsoft Dot NET 1 18th Feb 2005 01:12 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:26 AM.