codetoad.com
  ASP Shopping CartForum & BBS
  - all for $20 from CodeToad Plus!
  
  Home || ASP | ASP.Net | C++/C# | DHTML | HTML | Java | Javascript | Perl | VB | XML || CodeToad Plus! || Forums || RAM 
Search Site:
Search Forums:
  how to dynamically declare a form?  breezy82 at 13:08 on Thursday, March 18, 2004
 

Hi,
I want to declare a form using a variable, is this possible, cause this function needs to work in several project and so the forms are never known. I habe a way to extract their names to a table, but how can i use them?

This is what i'm trying to do:

'normally you do this:
dim frm as new <form_name>

'I want to do this:
formid = <record in my table>
dim frm as new formid

But I can't get it to work:(
any ideas?

  Re: how to dynamically declare a form?  Mckenzie at 09:59 on Tuesday, April 20, 2004
 

Declaring a form dynamically is possible

dim frm as form
or
dim frm as new <formname>

But ur requirement is that the form which u create dynamically should have the variable name which is stored in a table

well if u require the name for some processing purpose
a better way is make the form using the above logic, the name of the variable can be anything, but the name which you get from the table can be stored in the form's tag property for further processing

I think this will help u find a solution

Mike Mckenzie








CodeToad Experts

Can't find the answer?
Our Site experts are answering questions for free in the CodeToad forums
//








Recent Forum Threads
•  Re: Security - Code verify
•  Job @ EarlySail
•  Job @ EarlySail (perl)
•  IPC problem
•  Re: import contacts of msn/yahoo
•  Cookies and Threads C++
•  right justify a background in a table?
•  Help with Loop (C++/MFC)
•  Help with Loop (C++/MFC)


Recent Articles
ASP GetTempName
Decode and Encode UTF-8
ASP GetFile
ASP FolderExists
ASP FileExists
ASP OpenTextFile
ASP FilesystemObject
ASP CreateFolder
ASP CreateTextFile
Javascript Get Selected Text


© Copyright codetoad.com 2001-2007