Set color for free placed toolbar[Windows]

Share your advanced PureBasic knowledge/code with the community.
CNESM
User
User
Posts: 54
Joined: Sat Jun 21, 2003 11:15 pm
Contact:

Set color for free placed toolbar[Windows]

Post by CNESM »

Code: Select all

If OpenWindow(1,0,0,400,300,"Set color for free placed toolbar") 
  SetWindowColor(1,RGB(27,150,86)) 
  MDIGadget(2,20,20,100,22, 0,0,#PB_MDI_BorderLess|#PB_MDI_NoScrollBars) 
    SetGadgetColor(2,#PB_Gadget_BackColor,RGB(255,242,0)) 
      TB=CreateToolBar(3,GadgetID(2)) 
      SendMessage_(TB,#TB_SETSTYLE,0,SendMessage_(TB,#TB_GETSTYLE,0,0)|#CCS_NODIVIDER) 
      SendMessage_(TB,#TB_SETINDENT,0,0) 
      ToolBarStandardButton(4,#PB_ToolBarIcon_New) 
      ToolBarStandardButton(5,#PB_ToolBarIcon_Open) 
  Repeat:Until WaitWindowEvent()=#PB_Event_CloseWindow 
EndIf