Visual Basic Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming Languages - MoreVisual Basic Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old February 7th, 2003, 11:42 AM
Heinz Heinz is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2001
Location: Langley, BC Canada
Posts: 35 Heinz User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 42 m 29 sec
Reputation Power: 12
Can Attributes be set prior to 'shell' call?

I'm using VB6.

I use shell to call console apps and would like to 'dress' them up a bit by changing background color at least, i.e. away from the dreary black.

I know the user can adjust it once the window is open with the properties but how about before, so that the Shell Window uses the attribute from the start and no 'user' intervention is required.

I.e. to have ret = shell("cmd", vbNormalFocus) open a window with white background, black text instead of black background white text.

Thanks in advance

Heinz

Reply With Quote
  #2  
Old February 14th, 2003, 04:33 PM
ngibsonau ngibsonau is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2003
Posts: 138 ngibsonau User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 11
You should try cmd /? to find out what options are available.

On windows 2000 at least

cmd /T:fg

is available

where fg is two hex digits the first the background the second the foreground color.
Here are the colors

0 = Black 8 = Gray
1 = Blue 9 = Light Blue
2 = Green A = Light Green
3 = Aqua B = Light Aqua
4 = Red C = Light Red
5 = Purple D = Light Purple
6 = Yellow E = Light Yellow
7 = White F = Bright White

so if you want green text on black try "cmd /T:0A"
__________________
--

ngibsonau

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreVisual Basic Programming > Can Attributes be set prior to 'shell' call?

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap