Wrox Programmer Forums
|
VS.NET 2002/2003 Discussions about the Visual Studio.NET programming environment, the 2002 (1.0) and 2003 (1.1). ** Please don't post code questions here ** For issues specific to a particular language in .NET, please see the other forum categories.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VS.NET 2002/2003 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 30th, 2004, 07:26 AM
Authorized User
 
Join Date: Oct 2004
Posts: 39
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to dotnetprogrammer
Default Environment variables

Hi
I need to create a variable that is accessed in all the forms

how can i do that
i am working on vc++.net(windows form application)

thanks




dotnet
__________________
dotnet
 
Old November 30th, 2004, 07:35 AM
Friend of Wrox
 
Join Date: Jun 2004
Posts: 449
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via MSN to r_ganesh76
Default

u can use a session variable

Regards
Ganesh
 
Old November 30th, 2004, 07:41 AM
Authorized User
 
Join Date: Oct 2004
Posts: 39
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to dotnetprogrammer
Default

Sorry i think i didn't mentioned my problem clearly.
Let me make it more clear to u

I have project in which there are several classes. some are windows .net
form class some are component classes. I need to have a variable (say a string
 variable), that have only one instance i.e only one declaration.

thanks

dotnet
 
Old November 30th, 2004, 10:10 AM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

You could use an application setting string that you configure in the app.config or web.config file. Then any code can access the value through the configuration class.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Building and passing Environment variables Durkee VB.NET 2002/2003 Basics 0 November 7th, 2007 04:25 PM
Environment Variables Error axla BOOK: Beginning ASP.NET 1.0 0 May 23rd, 2004 02:43 AM
configuring environment variables pete_m BOOK: Beginning ASP.NET 1.0 0 April 28th, 2004 04:40 AM
Environment Variables cmiller PHP How-To 1 October 29th, 2003 06:53 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.