User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the ASP.NET section within the Web Development category of DaniWeb, a massive community of 456,524 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,809 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our ASP.NET advertiser: Lunarpages ASP Web Hosting
Views: 1635 | Replies: 5
Reply
Join Date: Sep 2007
Posts: 69
Reputation: geetajlo is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
geetajlo geetajlo is offline Offline
Junior Poster in Training

sample message box.

  #1  
Oct 2nd, 2007
Hi ! Can you guide me to change the colour of a message box. that is by default it is always blue. i want to change it to another color. plzzz help
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Sep 2007
Posts: 1,058
Reputation: SheSaidImaPregy is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 61
SheSaidImaPregy SheSaidImaPregy is offline Offline
Veteran Poster

Re: sample message box.

  #2  
Oct 2nd, 2007
    NBox.MB_TitleBarColor = System.Drawing.Color.Orange
    NameOfBox.MB_BoxColor = System.Drawing.Color.LightSeaGreen
    NameOfBox.MB_BoxShadowColor = System.Drawing.Color.LightSalmon
    NameOfBox.MB_TitleFontColor = System.Drawing.Color.Maroon
    NameOfBox.MB_TitleFontName = "Arial"
    NameOfBox.MB_TitleFontBold = True
    NameOfBox.MB_ImageBorderSize = 5
    NameOfBox.MB_ImageBorderColor = System.Drawing.Color.Red
    NameOfBox.MB_ImageBorderStyle = BorderStyle.Double

    NameOfBox.MB_ButtonBackColor = System.Drawing.Color.Green
    NameOfBox.MB_ButtonBorderColor = System.Drawing.Color.Red
    NameOfBox.MB_ButtonBorderWidth = 4
    NameOfBox.MB_ButtonBorderStyle = BorderStyle.Double
    NameOfBox.MB_ButtonForeColor = System.Drawing.Color.Yellow
    NameOfBox.MB_ButtonFontBold = True
    NameOfBox.MB_BorderWidth = 5
    NameOfBox.MB_BorderStyle = BorderStyle.Double
    NameOfBox.MB_BorderColor = System.Drawing.Color.Honeydew
    Panel1.Controls.Add(NBox)

basically, use the lines above and change color by setting them equal to "System.Drawing.Color.(actual color)". Oh, this is VB.NET and inside a private function in a vb script.

Enjoy
Reply With Quote  
Join Date: Sep 2007
Posts: 69
Reputation: geetajlo is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
geetajlo geetajlo is offline Offline
Junior Poster in Training

Re: sample message box.

  #3  
Oct 3rd, 2007
Thanks Friend bt where should i put all this . am using asp.net .. a hint plzzzz
Reply With Quote  
Join Date: Aug 2007
Posts: 70
Reputation: zmariow is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 1
zmariow's Avatar
zmariow zmariow is offline Offline
Junior Poster in Training

Re: sample message box.

  #4  
Oct 3rd, 2007
How are you displaying your messages using ASP.NET... show us the code so that we can help
Reply With Quote  
Join Date: Feb 2005
Location: Braintree, UK
Posts: 1,166
Reputation: hollystyles will become famous soon enough hollystyles will become famous soon enough 
Rep Power: 7
Solved Threads: 59
hollystyles's Avatar
hollystyles hollystyles is offline Offline
Veteran Poster

Re: sample message box.

  #5  
Oct 3rd, 2007
If you're using javascript alert or confirm you are stuffed you can't control the style it is part of the users system and therefore controled by their current theme, browser skin etc.

You will have to create your own 'pop-up' by dynamicaly creating an absolute positioned div add some controls to it and make it visible when required by setting its left, top and visibility style properties.
==========================================
Yadda yadda yadda...
Web junky, fevered monkey
Reply With Quote  
Join Date: Sep 2007
Posts: 1,058
Reputation: SheSaidImaPregy is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 61
SheSaidImaPregy SheSaidImaPregy is offline Offline
Veteran Poster

Re: sample message box.

  #6  
Oct 3rd, 2007
But if you are using VB, then this goes in your "pagename.aspx.vb" file. You have to create a function for it to be called when clicked via javascript. It will pop up your box and be dynamically edited for appearance.

Do a search on google for "asp.net vb message box" and you will find what you need.
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb ASP.NET Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the ASP.NET Forum

All times are GMT -4. The time now is 4:14 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC