473,396 Members | 1,895 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Changing title of form dynamically.

Markus
6,050 Expert 4TB
Is it possible to change the title of a form if a conditional statement is fulfilled?

Edit: I looked over my files and saw how to!

Expand|Select|Wrap|Line Numbers
  1. this.Text = 'new title';
  2.  
Simple *embarrassed*
Oct 16 '08 #1
5 1280
OuTCasT
374 256MB
form.text = "bla bla bla"
Oct 16 '08 #2
joedeene
583 512MB
form.text = "bla bla bla"
This will not work if the form is being called from its own class, you would have to use ' this.text = "title" ' or ' me.text = "title" ' but any other class it will work that way.

joedeene
Oct 16 '08 #3
Curtis Rutland
3,256 Expert 2GB
joedeene makes a good point. You have to have a reference to the form. Inside the form's class, "this" is a reference to the form. Outside, you would need an instance to call on.
Oct 17 '08 #4
OuTCasT
374 256MB
joedeene makes a good point. You have to have a reference to the form. Inside the form's class, "this" is a reference to the form. Outside, you would need an instance to call on.
i have used me.text = "" is most of my forms and it works.
if i wld change the title from another form it wld be the forms name .text.
Oct 27 '08 #5
joedeene
583 512MB
i have used me.text = "" is most of my forms and it works.
if i wld change the title from another form it wld be the forms name .text.
Yes that does work calling the me.text from anything that is on the form, but if you're changing it from a different form or class, you'll need the reference of the form, as iA has said. So, if your form's name is Form1, then anything IN the Form1 class uses "this"(c#) or "me"(VB.NET) as the reference. But calling from another class your reference is whatever you make it to be.

joedeene
Oct 27 '08 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: tshad | last post by:
Is there a way during Page_Load to change or add an attribute to the Body tag? I want to be able to change the onLoad body attribute to do a focus on one of my text boxes, such as: ...
14
by: Paul | last post by:
I want to set the page title and/or a form hidden field programatically through ASP.Net. I do not want to use something like... <% sTitle ="My Title" %> <html><title><%=sTitle%></title>..... ...
1
by: Pablo | last post by:
I do not know like changing the color of bottom of: a menu, of the bar of the title of form, messagebox?
0
by: Geraldine Hobley | last post by:
Hello I have a problem changing the title of a crownwood docking form called CProjectInfo which is contained within anothe form called mdiClient 'definition in form mdiclien Public Shared...
3
by: Michael Groeger | last post by:
Hi all, is there a way to change the title of a page dynamically from code-behind? Regards, Michael
12
by: GaryDean | last post by:
In the original post I failed so indicate that I am using framework 1.1....... I need to be able to change the background color of a page from code. I found an answer to this question in...
3
by: marik | last post by:
Hi, people. I have a question: Can somebody link me to a simple javascript piece of code, that allows me to get input from a combo box and set the refresh interval of the page to be that...
3
by: ICPooreMan | last post by:
The following is a very simple example of what I want to do take an elements oncontextmenu and changing it dynamically onclick of that same element. The code below will fail unless you change the...
7
by: petethebloke | last post by:
Can anyone help? I have a client who has made a "dynamic interactive map" of our city using Dreamweaver. Each map file has hotspots that pop-up a div with a little image when the mouse goes over...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.