Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    Visual Basic




Change Back Color Of Message Box


hi guys is there any body here who knows how to change back color of message box currently i am using third party control to do that but i know that its not a good idea. third party controls can create many problems and they also input many restrictions.
thanks




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
How To Change SSTab Color (Form Not Back Color)
I hope someone can help me problem .I want to change SSTab Color user define.I do not want to change backcolor.

How To Change Back Color
Hi, everybody

I hope one of you knows how to change the background of a menu, I'm looking for it since 2 days without an answer.

Thanx a lot for reply.


The doitor.

Change Label Back Color
I have wriiten a small proceduer for coloring the Label


Code:
Private Sub lblBox_Click()
Call ColorLabel(lblBox)
End Sub


Public Sub ColorLabel(ByVal strlabelName As String)
If strlabelName.BackColor = &H80000005 Then
strlabelName.BackColor = &H80000002
Else
If strlabelName.BackColor = &H80000002 Then
strlabelName.BackColor = &H80000005
End If
End If
End Sub


Bu twhen i complie it gibes me invalid qualifier..please advice..

Can I Change The Back Color For The Mshflixgrid
peace be with you

hiw i can change the color for row to be like the data grid in .net

ex :

every row have it's back color

thanks

Change The Back Color Of Tool Bar
How Can I Change The Back Color Of Tool Bar?

How To Change Controls Back Color
hi friends,
how to change the color of all the control in the application.

thanx

Change Form Back Color
in my project the form background color was not changed i have write the code to change the back color at run time but that code will not working what i have to do?

How To Change Color Back Or Fore Of A Row In Datagrid?
Hello everyone,
I am in need of knowing, possibly the code, how to change the back-color or forecolor on Double Click action on a row in a Datagrid.
Can you pls help me?
Thanks in advance.
Master 69.

Change Selection Back Color Style In RTB
Hi ever one
I want to change the selection color in RICH TEXTBOX CONTROL V6
one by one please
not the selection text that easy
rtb.SelColor=SomeColor
NO NO NO
you know that color is black in RTB and Blue in TextBox
when you select a string the color is blue right in textbox
but in RTB is BLACk what I need is to change that Backcolor to be like TextBox
I hope that made my self clear
the answer is as simple as it seems or as complicated as I found it
and I donot think that PARAFORMAT2 Structure would do me any good
thanks

How To Change The Back Color Of Data Grid
I have Data Grid on Form and Form Backgroud is set to Dark Blue, but when I change the back color of Grid, the only Back Color of Row is changed, rest of grid color remain same. How Can I change the entrie color of Data Grid to Back Color of Form. Please help

FINALLY!! A Way To Change DTPicker Back Color
Over the last week, I have been searching and searching for a method that would allow me to change the background color of a DTPicker control. The reason I wanted to do this was as the user moves from field to field in my application, I highlight the current field that has focus. This worked fine for all the controls I used besides the DTPicker because it doesn't have a .back color property. I know you can change the colors of the dropdown calendar, but this is not what I wanted. I wanted to change the color of the entry portion of the field when the dropdown calendar wasn't displayed.

After not being able to find a method to accomplish this, I decided to tackle it myself. After a few hours, I came up with the following approach after seeing how other people have suggested or attempted to do it. Basically, you sublcass the DTPicker control to capture and monitor its messages. The message that I discovered that would need to be captured was WM_ERASEBKGND which occurs when the control is being created or refreshed. During this message, I simply get the rectangle area of the control and fill it with my desired highlighted color.

You than place your subclassing routine in the GotFocus event to highlight, and then remove the subclassing from the control in the lostfocus to remove the highlight.


I'm hoping somebody will come up with a better way to do this ( I didn't have much time to do this), but at least this puts people on the right track on how to make this functionality happen. I would be interested in better ways of doing this, but at least it works for me now.

*** USE AT YOUR OWN RISK ***

------------
DECLARATIONS
------------
Public Declare Function GetProp Lib "user32.dll" Alias "GetPropA" (ByVal hWnd As Long, ByVal lpString As String) As Long

Public Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long

Public Declare Function CallWindowProc Lib "user32" Alias "CallWindowProcA" (ByVal lpPrevWndFunc As Long, ByVal hWnd As Long, ByVal Msg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long

Public Declare Function DeleteObject Lib "gdi32" Alias "DeleteObject" (ByVal hObject As Long) As Long

Public Declare Function SetProp Lib "user32.dll" Alias "SetPropA" (ByVal hWnd As Long, ByVal lpString As String, ByVal hData As Long) As Long

Public Declare Function GetWindowLong Lib "user32" Alias "GetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long) As Long

Public Declare Function GetClientRect Lib "user32" Alias "GetClientRect" (ByVal hwnd As Long, lpRect As RECT) As Long

Public Declare Function CreateSolidBrush Lib "gdi32" Alias "CreateSolidBrush" (ByVal crColor As Long) As Long

Public Declare Function FillRect Lib "user32.dll" (ByVal hdc As Long, lpRect As RECT, ByVal hBrush As Long) As Long

Type RECT
left As Long
top As Long
right As Long
bottom As Long
End Type

Public Const GWL_WNDPROC = -4
Public Const WM_ERASEBKGND = &H14

-----------------------------------------------------------
Module Code That Work's To Subclass DTPicker Control Events
-----------------------------------------------------------
Note: You can probably use your own and it still will work.

Public Function DTPProc(ByVal hwnd As Long, ByVal iMsg As Long, _
ByVal wParam As Long, ByVal lParam As Long) As Long

Select Case iMsg

Case WM_ERASEBKGND

Dim lngBrush As Long ' Brush color
Dim rct As RECT ' Rectangle structure

' Color of highlighted field
lngBrush = CreateSolidBrush(&HFFFF80)


' Get rectangle area of dtpicker control
GetClientRect hwnd, rct

' Fill rectangle area with highlight color
FillRect wParam, rct, lngBrush

' Remove object from memory
DeleteObject lngBrush

Exit Function

End Select

DTPProc = CallWindowProc(GetProp(hwnd, "OldDTPProc"), hwnd, _
iMsg, wParam, lParam)

* Note: The GetProp(hwnd, "OldDTPProc") command above is how I keep
a past reference to the old handle of the control. You should substitute
this with how you keep reference to the old handle.

---------------------------------
DTPicker Control's GotFocus Event
---------------------------------

Note: In this event, subclass your DTPicker control
so that it's events are captured. You probably can
use your own or the countless subclassing routines
that do this.

HookControl ' Name of the routine I used to hook the control.

DTPicker.Refresh ' Issue a refresh so the highlight can be displayed.

----------------------------------
DTPicker Control's LostFocus Event
----------------------------------

Note: In this event, remove the hook to the subclassed DTPicker.
You probably can use your own or the countless subclassing routines
that do this.

UnhookControl

DTPicker.Refresh ' Issue a refresh so the highlight is removed.

----------------------------------------------
HookControl Procedure - This is the one I use.
----------------------------------------------
' Stores previous instance of handle
Call SetProp(DTPicker.hwnd, "OldDTPProc", GetWindowLong(DT_Picker.hwnd, GWL_WNDPROC))

' Subclasses the dtpicker control
mlngPrevDTPProc = SetWindowLong(dtpicker.hwnd, _
GWL_WNDPROC, _
AddressOf DTPProc)

--------------------------------------
UnHookControl - This is the one I use.
--------------------------------------
' mlngdtpHandle = Variable I use to store handle to current control
' mlngPrevDTPProc = Variable I use to store old handle

SetWindowLong mlngDTPHandle, GWL_WNDPROC, mlngPrevDTPProc

Can We Change The Back Color For A Data Report In VB6 ?
Hi ,

This is Robert.. I want to change the back color of a Data Report which is in White (default). Can we get this. And another thing is at the time of printing the color should not be printed, instead it should be default ( white ).

Regards

Robert.

Change Back Color On CCRP DateTimePicker Control?
Hey All,

I'm using CCRP's DTP control. I have a database form on which I display all required fields with a yellow back color, but that control doesn't have that option.

Is there a way to set the back color of the control? I'm guessing the word "subclass" is going to pop up, but I don't know how to do that, so any help, examples, etc., would be greatly appreciated.

Thanks much,
Bret

Change Back Color Of A Specific Cell In A Msflexgrid
In a msflexgrid, can I set a cell's back color similarly to the textmatrix property for text? I could use the cellbackcolor property but I want to do it without setting the row and col properties to those of that specific cell, i.e. without changing the current row and col values.

How Can I Change The Command Button Colour(back Color)?
How can i change the command button colour(back color)?
When i try to change the back colour in the design time, it doesn't do a job, it didn't change the colour that what i want?
IS it possible to change the color of command button?
because i need to do with the square thigs for monopoly.

How To Change Back Color For Listview Alternately For Rows
Hi,
can some body hint me on to apply backcolor for listview which is in report view. the colors need to be applied alternately for each row (for e.g 1st row blue 2n row yellow 3rd row blue 4th row yellow and so on..)
Thanks


Mind is faster than Wind --- Mahabharat

How Do I Change The Color Of The Message Box
Hello

I want to change the color of the message box that appears to the user

How To Change Back Color Of List Item In List View
Dear members,

i am having small problem with listview control , I want to assing alternate colors to list items, but i con't,

hope someone will help

regards
D.L.Narayana

Changing Back Color Or Font Color Of DTP
hi folks,
I have a DTP whose value is being populated from Access 2003 database. I require that if the year value is less than 1951 then it should have a backgroundcolor as vbred or atleast the font displayed should change to vbred. I tried the below code line in change & click event of DTP but to no effect. I did not use both codes together or use the codes in both the events simultaneously.

VB Code:
If Year(Me.dtp1.Value) <= 1950 Then Me.dtp1.CalendarForeColor = vbRedIf Year(Me.dtp1.Value) <= 1950 Then Me.dtp1.CalendarBackColor = vbred


could somebody help me.

Message Box Goes To The Back
Hi.

I'm writing a VB6 application which uses eztwain.dll to aquire scans. This is a free dll which provides a nice wrapper to TWAIN.

The dll works fine, but the problem begins when the user opens the scanner interface, and then clicks cancel. In some scanners the driver returns a message box saying that the scan operation was cancelled. The problem is that some times this message box does not appear on top of the screen, but at the back (behind the form) and since the form is waiting for the user response to the message box, the form seems to be hung. Using alt-tab will solve the problem, but the customers don't appricieate this solution...

Any ideas of how to make sure the message box goes to the front?

Thanks,
Yossi

Unresolved - Can You Change The Menu Bar Color On Forms &amp; The Face Color On SSTabs?
Is there a way to change the menu bar color on particular forms during runtime? I only have 1 form open at any any given time in my app... Also, is there a way to change the back color of an SSTab control during runtime so that the entire surface of the SStab is the new color?? When I change the back color it doesn't change the color of the active SSTab face, but only the color behind the tabs somewhere, as I can see the new color barely displayed between the SSTab tabs.
Thanks!

ddutke



Edited by - ddutke on 2/18/2005 1:42:53 PM

Back Color
I need to change the back color of a portion of a form. I only draw line on this form and I need to change the back color between 2 line only. Any ideas on how to achieve that.

Thanks

Back Color
Hi! I am trying to set the background color when I click a menu button


Code:
Private Sub BackRed_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BackRed.Click
Label1.BackColor.Red()
End Sub

The squigily line goes underneith when I do that

Thanks,

Back Color
Hi

Can somebody let me know the standard back color for the visual basic forms and command button

Back Color Of The Tab.
You can use the SS Tab control.

a)It's easy to use.
b)It has a background colour property.

------------------
Regards,
Alexander McAndrew
VB Zone
http://gsenterprise.server101.com

MDI Back Color
Hi All,

How do I Change MDI Back Color
How do i add grids to menu & Submenu

Thanks

For Datepicker How Can I Change The That Highlight Color To Anither Color
assume that I name datepicker1 to dttime, whenI click on that the default color is blue, cani change to to yellow etc?

How Do I Rid Of My Sprites Back Color?
sorry if this has been posted before, but Ive searched and couldn't find the answer to my question... And it seems like common knowledge here, so I hope some of you can help. How do I get rid of my sprite's black(or whatever color) background? I used bmps... also, is there a way to use my tilesets without making all of the tiles seperate bmps? any help would be great, thanks!

Fore/Back Color Of DC
Im having some trouble with my DCs. Im drawing things onto my backbuffer and it always draws as black and white. Is there any way to change the fore/back color of a DC thats in memory. It would be nice to draw lines in other colors than black.

Using A Frame With A Back Color
I've got a frame that I'm coloring the back color of.

The color fits nicely in the boundary of the frame - left, bottom and right.

But it bleeds out the top.

I'm assuming that is because if the frame had a caption the "text" would be in the area that is colored.

But of course - I've got no caption on my frame - so it's just looking bad that the color pours out the top.

Any way to stop this??

Statusbar Back Color
is there anyway you can change the backcolor of vb statusbar?
thank you,

Back Color Of A Listview
Hi All,

I have a listview with 12 items in it, is it possible to have the back colour of the 5th item red or any other colour?

Thanks

Loftty

How To Set Back Color Of Tab Control
I'm using sstab control which is shiped with microsoft windows common control. i want to change / set the back color of that... any one can suggest me, how can i do that. or please refer me another custome ocx of tab control which have the same property.

How To Set Tab Control Back Color
I'm using sstab control which is shiped with microsoft windows common control. i want to change / set the back color of that... any one can suggest me, how can i do that. or please refer me another custome ocx of tab control which have the same property.

Statusbar Back Color
can i change the back color for the statusbar panels i need to fill color for the panels.... a tip can do a gr8... show

Msflexgrid Back Color
Im changing the backcolor of specific cells in code during the running of my program. This is not difficult.........the question is ..... is there a way to change ALL the cells (Not the fixed cells) backcolor back to white without looping through each and every cell.

I've tried

VB Code:
fGrid.BackColor = vbWhite

but that doesnt do anything. Someone please help.

Thanx in advance

Clint

How To Set The Back Color For SSTAB?
I have set the Back color property (Microsoft) SSTAB control , but instead of the specified color it is showing it default color (gray) ..
is it required to set the any other property for it..
Urgent help will be really appriciated..

Thanks in advance..

Ashwini: confused:

Convert Hex Color Back To RGB
I am no good with hex stuff....

How do I convert this back to RGB color?

here is the code to make the color Hex...


Code:
lred = lcolor Mod &H100
lgreen = lcolor &H100 Mod &H100
lblue = lcolor &H10000 Mod &H100
lred = Hex(lred)
If lred = "0" Then lred = "00"
lgreen = Hex(lgreen)
If lgreen = "0" Then lgreen = "00"
lblue = Hex(lblue)
If lblue = "0" Then lblue = "00"
ColorConv = lred & lgreen & lblue
VBBrowser v2.2.1


Thanks

Back Color Of Datacombo
any control which we get from component window,hw can the back color of dat control get changed automatically by getting focus on it.

Textbox Back Color
can i change the backcolor of textbox when it is enabled false

How To Set Back Color Of DTPicker
I am using date control (DTPicker) provided by Microsoft in VB6. This controls surprisingly doesn't have BackColor and ForeColor properties. How can one set the back color of this control. I need to highlight the field on the screen that currently has a focus.

Changing The Back Color Of Sstab
hai, how to change the backcolor of sstab. i already used the backcolor property to change the color but it changes only in tab caption area i want to change the color in the rest of the tab area, where we place the controls
Thank you.

Cell Back Color In Excel
how do i change cell back color in excel thro vb program

Changing Button Back Color
Hi,

I feel rather stupid asking, but here goes..........

How do I change the background color of a button? I want to change it to Yellow. I set its backcolor property, but it isn't changing - it remains gray!!

What have I missed? I'm certain that is what I need to change! I've successfully changed the back color of text boxes etc. using this exact same method. It just doesn't seem to work on buttons.

Best regards,
AstroTux.

Better Hack For Option Back Color
I have many groups of option buttons in gradient pictureboxs and to control the back color i make option size just the size of just the round area and put a label
with a transparent background so the gradient shows. Is there a better way?

Flexgrid Back Color Selection
VB Code:
With MSFlexGrid3            For c = 0 To 7                      .ColAlignment(c) = flexAlignCenterCenter            .RowHeight(0) = 400                .ColAlignment(b) = flexAlignCenterCenter                .TextMatrix(0, 0) = "Jawatan" & ""                .TextMatrix(1, 0) = "Jawatan" & ""                .TextMatrix(0, 1) = "Tarikh" & ""                .TextMatrix(0, 2) = "Tarikh" & ""                .TextMatrix(1, 1) = "Dari" & ""                .TextMatrix(1, 2) = "Hingga" & ""                .TextMatrix(0, 3) = "Gaji Tahunan" & ""                .TextMatrix(1, 3) = "Gaji Tahunan" & ""                .TextMatrix(0, 4) = "ELAUN Pencen atau Pemangku" & ""                .TextMatrix(1, 4) = "ELAUN Pencen atau Pemangku" & ""                .TextMatrix(0, 5) = "Rujukan" & ""                .TextMatrix(0, 6) = "Rujukan" & ""                .TextMatrix(1, 5) = "Kertas Perjawatan" & ""                .TextMatrix(1, 6) = "Kertas Jabatan" & ""                .TextMatrix(0, 7) = "KENYATAAN (Seperti Syarat-Syarat Lantikan, Pujian, Celaan dll)" & ""                .TextMatrix(1, 7) = "KENYATAAN (Seperti Syarat-Syarat Lantikan, Pujian, Celaan dll)" & ""                 .ColAlignment(0) = flexAlignCenterCenter                .MergeRow(0) = True                .MergeCol(0) = True                .MergeCol(3) = True                .MergeCol(4) = True                .MergeCol(7) = True                                .MergeCells = flexMergeRestrictRows                .MergeCells = flexMergeRestrictColumns                                .ColWidth(0) = 3000                .ColWidth(1) = 1200                .ColWidth(2) = 1200                .ColWidth(3) = 1200                .ColWidth(4) = 1200                .ColWidth(5) = 1500                .ColWidth(6) = 1200                .ColWidth(7) = 4000            Next c                .BackColorSel = vbYellow        .SelectionMode = flexSelectionByRow     End With


the problem i encountered with merge cells is that, when i select (click) on certain row, the back color should be yellow but nothing was shown.

i guess it's due to the 'flexMergeRestrictRows'

any ideas?

thanks in advance.

TabStrip's Back Color Problems
Can i change the back color of the area where x is?

Revert Back To System Color!
I am sort of skinning a Form. Users can change the look of the Form by clicking menu items. Apart from the different skinning options, I did like to give users the option to revert back to the system color. How do I implement that?

Thanks,

Arpan

Copyright 2005-08 www.BigResource.com, All rights reserved