Making a variable available to all forms.. | Bytes (2024)

Home Posts Topics Members FAQ

rj

Hi all,

How do i make a variable that i can call in all my forms?
I want to get a value when the user logs in, and carry that value
throughout all the forms for queries etc.

Thanks in advance..

Apr 3 '06 #1

Subscribe Reply

1 Making a variable available to all forms.. | Bytes (1) 1428 Making a variable available to all forms.. | Bytes (2)

SMS_Dev_Dept

Add a New Module to your project and add a friend property like this:

Private m_MyVariable As Object
Friend Property MyVariable() As Object
Get
Return m_MyVariable
End Get
Set(ByVal value As Object)
m_MyVariable = value
End Set
End Property

"rj" wrote:

Hi all,

How do i make a variable that i can call in all my forms?
I want to get a value when the user logs in, and carry that value
throughout all the forms for queries etc.

Thanks in advance..


Apr 3 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2779

Making a shoutbox from phpMyChat

by: |-|erc |last post by:

Hi! Small challenge for you. The index.php uses this file and calls layout(). Take a look at www.chatty.net this file draws the chat login box on the right. I traced the CHAT button it submits and goes to the index file again, I can't figure out how it opens the chatroom. I want to get it to skip the login box and go straight to the room, with user name "guest" or "" or whatever but I'll add a field to type the name in the chat room....

PHP

3 1568

making a local variable available

by: Christine |last post by:

I am working on code that I have posted several questions on, they have been helpful, but as I am new to programming, I have come across something else I am not sure how to fix. This is a build error referring to an unassigned local variable. The problem is this variable was defined in a local procedure and is therefore not available when I need to use it. I have posted a bit of the code I am working on, the bit with the problems. How...

C# / C Sharp

5 1581

Session Variable Alternative

by: Drew |last post by:

I have a few questions for ASP.net in C#. I am using a session variable to pass the user name from page to page. After a while, the session variable times out. Is there a way around the time out? Also, what would be a better way to keep track of the user's name. Will using forms authentication work better? Right now it is just a debug application, so I didn't turn on Forms Authentication. I've also never used it. So I don't know...

ASP.NET

1 1307

making the value in a variable available to all the pages

by: Carlos |last post by:

Hi all, I am new to asp .net with vb, and just need to know how to make the value of a variable available to all the pages in the project. That is, I capture the value of a variable using querystring in the inital page, and I need to use that value it in the other pages in the project. sample code would be ideal. Thanks in advance,

ASP.NET

5 14198

How to use a variable in form1--> form2

by: John |last post by:

Hi, I can't find a simple example for a simple(?) problem. I am working on an application with a variable in form1, that variable is needed in form2 for a calculation but i can't get that variable in form2. Is there a simple method (in VSexpress2005) to get that specific variable in form2? TIA,

C# / C Sharp

35284

Variable Scope in VBA for MS Access

by: MMcCarthy |last post by:

We often get questions on this site that refer to the scope of variables and where and how they are declared. This tutorial is intended to cover the basics of variable scope in VBA for MS Access. For the sake of brevity I am sticking to common usage. Wherever the term procedure is used in this tutorial it actually refers to a subroutine or function. Definition of Scope The scope of a variable where this variable can be seen or accessed...

Microsoft Access / VBA

3 8903

PreRender checking value in textbox before making gridiview itemvisible

by: jc |last post by:

Hello. I have a gridview column item that i want to not make visible if the bound data in that cell is less than a value in a textbox. However, I notice at the time my code checks a function that I call from the visible property of the gridview itemtemplate, the textbox is always blank. I tried setting the textbox in the prerender, but I suspect the

ASP.NET

5 1905

Making an instance of an object available for all events and methods of a class

by: Andy B |last post by:

I am trying to figure out how to make an object instance available for all methods of a class. I tried to do something like this: public class test { TheObject Instance = new TheObject(); TheObject.Dictionary<string, string= new Dictionary<string, string>(); .... } The first line (TheObject instance = new TheObject();) doesn't get

C# / C Sharp

4 5339

Forms authentication vs session variable

by: Bjorn Sagbakken |last post by:

In a web-application with login creds (user, pwd), these are checked against a user table on a SQL server. On a positive validation I have saved the userID, name, custno and role-settings in a userobject (custom build class) and added this to the session using as session variable like session For all other pages I have added a small test in the page_load event, basically testing if the session != null, but also checking if the...

ASP.NET

9964

Changing the language in Windows 10

by: Hystou |last post by:

Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...

Windows Server

11530

Problem With Comparison Operator <=> in G++

by: Oralloy |last post by:

Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...

C / C++

11112

Maximizing Business Potential: The Nexus of Website Design and Digital Marketing

by: jinu1996 |last post by:

In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...

Online Marketing

1 11295

The easy way to turn off automatic updates for Windows 10/11

by: Hystou |last post by:

Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...

Windows Server

7389

Couldn’t get equations in html when convert word .docx file to html file in C#.

by: conductexam |last post by:

I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...

C# / C Sharp

6079

Trying to create a lan-to-lan vpn between two differents networks

by: TSSRALBI |last post by:

Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...

Networking - Hardware / Configuration

6298

Windows Forms - .Net 8.0

by: adsilva |last post by:

A Windows Forms form does not have the event Unload, like VB6. What one acts like?

Visual Basic .NET

2 4449

How to add payments to a PHP MySQL app.

by: muto222 |last post by:

How can i add a mobile payment intergratation into php mysql website.

PHP

3 3506

Comprehensive Guide to Website Development in Toronto: Expert Insights from BSMN Consultancy

by: bsmnconsultancy |last post by:

In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

General

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisem*nts and analytics tracking please visit the page.

Making a variable available to all forms.. | Bytes (2024)
Top Articles
Latest Posts
Article information

Author: Dean Jakubowski Ret

Last Updated:

Views: 6279

Rating: 5 / 5 (70 voted)

Reviews: 93% of readers found this page helpful

Author information

Name: Dean Jakubowski Ret

Birthday: 1996-05-10

Address: Apt. 425 4346 Santiago Islands, Shariside, AK 38830-1874

Phone: +96313309894162

Job: Legacy Sales Designer

Hobby: Baseball, Wood carving, Candle making, Jigsaw puzzles, Lacemaking, Parkour, Drawing

Introduction: My name is Dean Jakubowski Ret, I am a enthusiastic, friendly, homely, handsome, zealous, brainy, elegant person who loves writing and wants to share my knowledge and understanding with you.