Basic4ppc - Windows Mobile Development  

Go Back   Basic4ppc - Windows Mobile Development > Main Category > Questions & Help Needed
Home Register FAQ Members List Search Today's Posts Mark Forums Read

Questions & Help Needed Post any question regarding Basic4ppc.


Passing a control as a parameter


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-16-2008, 08:39 AM
Newbie
 
Join Date: Jun 2008
Posts: 4
Cool Passing a control as a parameter

Hi all,

Apologies if this has been answered elsewhere but I can't find it.

I need to pass a control name (a table in this case) into a Sub. The application has three tables and I want one Sub to deal with the updates to all of them instead of putting 3 copies of the same code behind each table...

Anyone know how I can do this? Is it possible?

Thanks in advance for any assistance...

Mike
Reply With Quote
  #2 (permalink)  
Old 06-16-2008, 08:45 AM
Basic4ppc Veteran
 
Join Date: Feb 2008
Location: Hilversum, The Netherlands
Posts: 205
Awards Showcase
Beta Tester 
Total Awards: 1
Default

Can't you use the Control(Sender) controle?
Reply With Quote
  #3 (permalink)  
Old 06-16-2008, 08:53 AM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 3,186
Default

You can pass the control's name and use the Control keyword.
See this tutorial for more information: Runtime controls manipulation
Reply With Quote
  #4 (permalink)  
Old 06-18-2008, 03:17 PM
Newbie
 
Join Date: Jun 2008
Posts: 4
Smile Cheers!

Thanks guys.

That did the trick... was having some difficulty getting my head round the differences between this and VB....

Cheers!

Mike
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Parameter is not valid lancaster Questions & Help Needed 2 10-27-2008 10:27 PM
Passing a value back from a dll Ricky D Questions & Help Needed 2 10-25-2008 10:00 AM
passing a module name as a variable Cableguy Questions & Help Needed 4 10-24-2008 10:47 AM
passing objects paul j Questions & Help Needed 4 11-10-2007 10:33 AM
Passing Args Cableguy Questions & Help Needed 19 11-10-2007 05:45 AM


All times are GMT. The time now is 01:29 PM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.1.0