473,386 Members | 1,673 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,386 software developers and data experts.

update form background color

I have a vb.net app that serves our four campuses. A student logs in to

start the app.

Based on their login domain, I wish display the campus color and image
on the form.

I cannot find any sort of me.backgoundcolor attribute however...

Can someone help me dynamically chage the background color of the main
form?
Thanks,
HankC

Apr 27 '06 #1
9 1251
Me.BackColor = Color.Azure
seems good

HankC a écrit :
I have a vb.net app that serves our four campuses. A student logs in to

start the app.

Based on their login domain, I wish display the campus color and image
on the form.

I cannot find any sort of me.backgoundcolor attribute however...

Can someone help me dynamically chage the background color of the main
form?
Thanks,
HankC

Apr 27 '06 #2
"HankC" <cl****@missouri.edu> schrieb:
Can someone help me dynamically chage the background color of the main
form?


Assign the desired color to the form's 'BackColor' property.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>
Apr 27 '06 #3

which is where I am confused...

In the page_load sub when I type 'me.' the type-ahead has no such
property....

I can set static attributes when I right-click the form and use the
'Document property pages' in development.
HankC

May 1 '06 #4
Hank,

http://msdn.microsoft.com/library/de...colortopic.asp

Are you sure that you are typing the me inside a method by instance the
load_event?

I hope this helps,

Cor


"HankC" <cl****@missouri.edu> schreef in bericht
news:11**********************@e56g2000cwe.googlegr oups.com...

which is where I am confused...

In the page_load sub when I type 'me.' the type-ahead has no such
property....

I can set static attributes when I right-click the form and use the
'Document property pages' in development.
HankC

May 1 '06 #5

Thanks fo repsonse...

here's my code layout:

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here

'' my code to process based on logged in user and domain name

'' I can access the buttons, labels, textboxes, etc, .backcolor but not
me.backcolor...

end sub

I thought of using button1.parent.backcolor, but it is not available
either...
thanks,
HankC

May 1 '06 #6

Let me add that I am working inside:

Public Class WebForm1
Inherits System.Web.UI.Page
....
....
....
End Class

May 1 '06 #7
Hank,

This is nice confusing. You write "update form background color", which is
for us direct a windowsform application.

Now that you you show the load event of a "Page" which is a webform, about
which is never spoken as a form. It is than Page or webform.

You can get that frm. by using this code,
Dim frm As Control = Me.FindControl("Form1") 'Form1 is the HTML form Id

However there is no backcolor property. A webform is a page build using HTML
by the ASPNET dll that you build.

I have never tried to set style parts as code in HTML controls which are in
fact containers.

The most simple way is to click righclick on the Page in design mode and
than start setting the style property.

I hope this helps,

Cor

"HankC" <cl****@missouri.edu> schreef in bericht
news:11**********************@i40g2000cwc.googlegr oups.com...

Thanks fo repsonse...

here's my code layout:

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here

'' my code to process based on logged in user and domain name

'' I can access the buttons, labels, textboxes, etc, .backcolor but not
me.backcolor...

end sub

I thought of using button1.parent.backcolor, but it is not available
either...
thanks,
HankC

May 1 '06 #8

funny that the backcolor of the controls can be changed but not the
page itself...

HankC

May 1 '06 #9
Hank,

No not funny, that is just the behaviour of HTML.
The most terrible thing for me is a repeated image on the background as
attribute from the Body.

In fact can you give every cell its own background.

Cor

"HankC" <cl****@missouri.edu> schreef in bericht
news:11**********************@g10g2000cwb.googlegr oups.com...

funny that the backcolor of the controls can be changed but not the
page itself...

HankC

May 1 '06 #10

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

Similar topics

3
by: Vinay | last post by:
Hello I am trying to update a Progress bar on a form. I am able to update it via using a simple clock timer, but as soon as I perform a long operation G1 (generation of a report) in a separate...
1
by: mursyidatun ismail | last post by:
Dear all, database use: Ms Access. platform: .Net i'm trying to update a record/records in a table called t_doctors by clicking da edit link provided in the database. when i ran through da...
16
by: Ian Davies | last post by:
Hello Needing help with a suitable solution. I have extracted records into a table under three columns 'category', 'comment' and share (the category column also holds the index no of the record...
7
by: John J. Hughes II | last post by:
I have a DataGridView with a TextBoxColumn. I setting the data source to a List<stringvalue in a static class. The list is filled from a background thread. So far all is fine and it works...
8
by: =?Utf-8?B?R3JlZyBMYXJzZW4=?= | last post by:
I'm trying to figure out how to modify a panel (panel1) from a backgroundworker thread. But can't get the panel to show the new controls added by the backgroundwork task. Here is my code. In...
3
by: dhaneshrs | last post by:
I have a gridview i managed to update using the edit option in the smartmenu. The problem comes when i delete a value or make a value read only. Say i have a table Employee with the following...
2
by: Curious | last post by:
I have two classes: BulkProcessing.cs BulkProcessingStatusForm.cs BulkProcessing uses a background worker to process each row of data. BulkProcessingStatusForm is a UI form (dialog) that...
4
by: justice750 | last post by:
Hi All, I am using a FormView control. The allows me to update records in the database. However, when a database field is null I can not update the field on the form. It works fine when the field...
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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
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
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
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...
0
jinu1996
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...

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.