Hey,
What is the best way to use multiple files to split up a large win forms project?
For example I would like to have global variables in one file, and global functions in another. I have multiple tabs on my win form, each to run a different admin task. I would like the code for each of these tasks to also be in separate files. Currently I have this all in one file, and it has become very difficult to manage.
How can I do this and make variables and functions available across all the files?
Your suggestion would be much appreciated.
PowerShell Studio 2014, Version & Build: 4.1.74
Using multiple files in a project
Forum rules
DO NOT POST LICENSE NUMBERS, ACTIVATION KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
DO NOT POST LICENSE NUMBERS, ACTIVATION KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
Using multiple files in a project
Last edited by UCSorted on Thu Dec 04, 2014 1:12 am, edited 1 time in total.
- SAPIEN Support Forums
- Posts: 945
- Last visit: Thu Oct 22, 2015 1:10 pm
Using multiple files in a project
This is an automated post. A real person will respond soon.
Thank you for posting, LexelSystems.
Did you remember to include the following?
*** Make sure you do not post any licensing information ***
Thank you for posting, LexelSystems.
Did you remember to include the following?
- 1. Product, version and build (e.g. Product: PowerShell Studio 2014, Version & Build: 4.1.71. Version and build information can be found in the product's About box accessed by clicking the blue icon with the 'i' in the upper right hand corner of the ribbon.)
2. Specify if you are running a 32 or 64 bit version
3. Specify your operating system and if it is 32 or 64 bit.
4. Attach a screenshot if your issue can be seen on the screen
5. Attach a zip file if you have multiple files (crash reports, log entries, etc.) related to your issue.
*** Make sure you do not post any licensing information ***
Re: Using multiple files in a project
You can create a Forms Projects and it allows you to use global file (Globals.ps1) in which you can place functions and variables accessible to the rest of the project.
To create a new project: Ribbon->File->New->New Form Project
As for the tabs, you are limited to the single form in that regard. Alternatively, you can create a main form that has buttons to show a different form for each section (assuming they are independent).
If you want to see a sample multi-form project go to: Ribbon->Help->Product Support->Samples
The SAPIEN Document Explorer is required to view the sample.
David
To create a new project: Ribbon->File->New->New Form Project
As for the tabs, you are limited to the single form in that regard. Alternatively, you can create a main form that has buttons to show a different form for each section (assuming they are independent).
If you want to see a sample multi-form project go to: Ribbon->Help->Product Support->Samples
The SAPIEN Document Explorer is required to view the sample.
David
David
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.