Re: General Misc. Questions re VB6



In-line, Pop`

Pop` wrote:
XP Pro SP2+; VB6 Enterprise; Beginner's Queries

Like the subject says, General and Miscellaneous.
Thank to Steve, Larry and a host of others, I am now making good headway in learning VB6.
In particular Steve's last post to me served to finally get me past the most frustrating blocks; my sincere thanks to Steve and everyone else who has been so helpfull; I know I can be pretty thick, sometimes <G>.

1. I've discovered that a semi-colon " ; " used with Print, in order to temporarily print messages directly to a Form, will list the entries horizontally instead of vertically. Pretty useful for displaying an array's contents to study. e.g. "Print DA(i) & " ;";" works nicely in a For-Next loop.
-- is use of the semi-colon a legitimate feature in this context? I can't seem to find it documented anywhere.
-- Same question regarding the question mark " ? ". It converts to "Print" in the editor and is very useful.
-- And, what other shorthands might I be missing out on?


open help, index. There's lots of characters such as " @, ?, = $ &&" for you to graze (browse?) through

2. VB3D.tmp has suddenly shown up in a couple of my test directories. Its contents look like a global description of the program's Properties. Contains: Type = exe, path to OLE automation, iconform, startup, helpfile, etc. etc. etc..
It's date/time stamp doesn't correlate to any other file in that folder, interestingly enough, so it must have been created on the fly.
-- Is this a meaningful/useful file?
-- Since it's a *.tmp file, should VB or win have deleted it, or does it serve some long term purpose?
-- FWIW & Just FYI, I've been known to type with my palms before, so ... <g>.

VB creates .tmp files while it is running. If VB crashes, it can't clean up, and you'll find these growing in your working directories. VB3D.tmp could be one of them - if it's a specifically created file for some other reason, Rick or one of the more knowledgeable in here will step in and correct me


3. I think someone gave me the answer to this one recently, but draned if I can find it:
TextBox.Text="" works fine to clear a text box. But is there a better way to quickly erase (or empty) several textboxes (not an array) without having to explicitly type the txtName.Text="" for each one?

if typeof ctrl = textbox then
debug.print "textbox name is " & typename(ctrl)
if ctrl.tag = <whateveryouset> then 'can limit to specific textboxes
ctrl.text = "" 'or preset to your condition e.g. "not used"
<more code if required>
endif
endif

you have to "preset" ctrl, so I'll let you do some research on "typeof" and "typename". Can't let you have ALL the info!! <g>


4. Another one I can't find:
I'd like to find a listing of some sort that shows which Properties of the properties list in Form View can be programmatically changed in code. If it's all of them, that's all I need to know; I'll research the rest, but it seems some of them can not be changed using code.

uhhmmm. Yes. Next question. (and I've been using VB for more'n 8 years)


5. Form View again, Properties list, Back/Fore ground colors. The drop-down shows an interesting collection of grays and 2 colors but not the at least 16 windows colors I would have expected.

Not sure why you're getting only two colours, unless it's windows screen colours. I just tried re-setting mine, but the lowest it goes is 16 colours, and then it forces the screen resolution to 640 by 480. No thanks.
Try right clicking anywhere on your windows opening screen, then select the right hand tab (Settings). down the bottom left, it shows how many colours your screen is displaying. I can't remember if it was ever able to limit colours to greyscale - anybody??

I'm aware of vbRed, vbBlue, etc., but ... is there a way to add colors to that Properties drop-down list? Something tells me it can't be done, which is fine, but if I don't ask, I'll never know, right? <g>

You asked. I agree, I don't think you can change/add either. But then I have been known to change the foot in my mouth

No, haven't looked into Rich Text yet but intend to. That might be the discussion I think I'm remembering.

Thanks in advance,

Pop`


Argusy

.



Relevant Pages

  • Re: Mac advocacy again: Springer changes to Mac
    ... Steve de Mena wrote: ... Macs are more user friendly than other computers ... It also said they'll be running OS X, Windows Vista and Windows XP on ...
    (comp.sys.mac.advocacy)
  • Re: Macs not used in business?
    ... Steve de Mena wrote: ... its traditional Windows server architecture to install a similar ... The company considered upgrading its aging Windows XP terminal server ...
    (comp.sys.mac.advocacy)
  • Re: Morgan Stanley: 40% of college students plan to buy Macs
    ... Steve de Mena wrote: ... when people mainly had computers at home to do ... Windows version of the VPN client then that cross-compatability goes ...
    (comp.sys.mac.advocacy)
  • Re: Is your Windows PC, "Windows 7 Ready?"
    ... Steve de Mena wrote: ... successive upgrades to Windows NT? ... Windows operating systems is noted. ...
    (comp.sys.mac.advocacy)
  • Strange RequiredFieldValidator problem
    ... in Windows XP SP2 and Windows 2000 Server. ... In XP, which is my development environment, validators work correctly. ... If user tries to submit page without any text in textboxes --> Validator ...
    (microsoft.public.dotnet.framework.aspnet)