--------------- FIDO MESSAGE AREA==> TOPIC: 178 VISUAL BASIC Ref: EAD00005 Date: 06/08/97 From: DIK COATES Time: 07:51am \/To: STEVEN LAGER (Read 6 times) Subj: answered questions >>>> QUOTING Steven Lager to All <<<< SL> This is just a quick note to say thank you to all that SL> replied to my question concerning FileExists/Dir$. SL> The Dir$ worked great. Just waitin' for the next assignment... Regards Dik ... For people who like peace and quiet: a phoneless cord. ___ Blue Wave/QWK v2.12 --- Maximus 3.01 * Origin: StarLab! In Orbit, Lindsay, Ont. (705) 328-2954 (1:253/232) --------------- FIDO MESSAGE AREA==> TOPIC: 178 VISUAL BASIC Ref: EAD00006 Date: 05/30/97 From: EDWARD ALOSKOFIS Time: 10:31am \/To: MIKE MEYER (Read 6 times) Subj: Project Hello Mike! 21 May 97 18:42, Mike Meyer wrote to Edward Aloskofis: MM> Here is a short program I came up with (object descriptions ommited): MM> Sub Form_Load () MM> 'Written in VB 3.0 MM> 'Determines the number of seconds from the time MM> 'That the program started. (Stopwatch) MM> 'Will not work correctly across midnight MM> lblStart = Format$(Time, "h:mm:ss AM/PM") MM> lblStart.Tag = Timer MM> End Sub etc. I wrote it and it works fine. My only problem comes with the display of elapsed time where it shows only the seconds and do not mark the minutes. Could not yet figure out where I am wrong. I liked the way you solved the problem of me having my application starting to run automatically before clicking the START button. Thanks you so much for this help. Best regards Edward Edward Aloskofis/Athens-Greece DDY ---------------------------------------------------------------------- --- GEcho 1.00 * Origin: Edward Aloskofis /Athens-Greece (2:410/138.5) --------------- FIDO MESSAGE AREA==> TOPIC: 178 VISUAL BASIC Ref: EAE00000 Date: 06/08/97 From: RICHARD DEVANEY Time: 09:04am \/To: LILA GODEL (Read 6 times) Subj: Button Can't Be Activated Hello Lila! Saturday May 31 1997 17:11, Lila Godel wrote to All: LG> I have a Visual Basic 5.0 program with one form. On the form is LG> a masked edit control, a label, and two buttons. One of the LG> buttons with a caption of OK is set as the default button. The LG> other with a caption of Cancel is set as the cancel button. LG> When I run my program I would like the masked edit control to LG> receive the focus and the OK button to be active so I activate LG> its got focus procedure by clicking it or pressing enter. This LG> is the case when I run the program in the design environment. LG> When I compile the program and run the exe I can only activate LG> the button by clicking on it. I would like to fix this problem, LG> but I do not know how. A fix for this would allow me to enter LG> my date and press enter to get the program to do the LG> necessary date calculations then display the message box with my LG> results with no mouse use required. Ok, If I am understanding the problem correctly, here is a possible solution. Assuming for the moment that the masked edit control (I don't have my VB docs handy) has a KeyPress or KeyDown event, add code to one of those events to check for chr$(13) (Enter) and if it finds it then do a Call cmdOK_Click (or whatever you named your button). Of course if I DIDN'T read the problem correctly then we'll just pretend that this message never happened. :) Richard --- * Origin: B5Ranger's Node on a No-BBS Diet-Birmingham, A (1:3602/20) --------------- FIDO MESSAGE AREA==> TOPIC: 178 VISUAL BASIC Ref: EAE00001 Date: 06/08/97 From: RICHARD DEVANEY Time: 09:51am \/To: ROD JAMES (Read 6 times) Subj: Your comments please.... Hello Rod! Wednesday May 28 1997 14:57, Rod James wrote to All: RJ> I'm starting to learn the basics of it by playing with it and RJ> now am consisdering buying a copy. AIUI there is now version 5 RJ> available so my question is, should I get this new version or go RJ> for version 4 as there appears to be plenty of stuff already RJ> about for version 4? Personal opinion: I still use VB4 and it will be around for quite some time. Because I use VB extensively I will probably upgrade to 5 in the next couple of months but don't worry, VB4 isn't going anywhere yet. RJ> Secondly, could someone tell me where I'm going wrong in this RJ> bit of code: RJ> I'm trying to automatically capitalise the first letter of every RJ> word in a string of text, the code below almost works - unless RJ> an even number of spaces (ie: 2,4, 8, 22 etc) are between the RJ> words... I cooked up this little snippet of code. It does what you were asking about. Capitalizes the first character of each word including the first letter. Now I won't guarantee it's foolproof, it will need some tweaking to make it idiot safe . --------begin code--------- Private Sub txtInput_KeyPress(KeyAscii As Integer) Static bUpperFlag As Boolean If Len(txtInput.Text) = 0 And (KeyAscii > 96 And KeyAscii < 123) Then KeyAscii = KeyAscii - 32 End If If KeyAscii = 32 Then bUpperFlag = True Exit Sub End If If bUpperFlag And (KeyAscii > 96 And KeyAscii < 123) Then KeyAscii = KeyAscii - 32 bUpperFlag = False End If End Sub ---------end code ------------ I hope that works for you or gives you something you can build on. RJ> Regards from Rod, Regards, Richard --- * Origin: B5Ranger's Node on a No-BBS Diet - Birmingham, A (1:3602/20) --------------- FIDO MESSAGE AREA==> TOPIC: 178 VISUAL BASIC Ref: EAE00002 Date: 06/07/97 From: BUCKY CARR Time: 09:47pm \/To: GARY SONNENBERG (Read 6 times) Subj: Udao - 16 GS> Took a peek at GS> VB5. Still not convinced I'll ever move there. Should check out the GS> student price tho. They say the IDE is much nicer than VB4, even. I'll probably go with VB5 later this year. --- PPoint 2.00 * Origin: Vanishing Point 7198460140 Trinidad CO (1:15/7.1) --------------- FIDO MESSAGE AREA==> TOPIC: 178 VISUAL BASIC Ref: EAE00003 Date: 06/07/97 From: BUCKY CARR Time: 09:49pm \/To: KRISTOPHER BRAY (Read 6 times) Subj: VB5.0 KB> cAN SOMEONE TELL ME HOW TO LINK ONE FORM TO ANOTHER FORM? KB> I WANT FORM1 TO OPEN FORM2 WHEN I CLICK THE YES COMMAND BUTTON. Look up the .Show method. Also read about Modal. Then read about the .Hide method. Ex: Form2.Show vbModal will open Form2 and not allow input anywhere except on Form2. When you are done with Form2, put Form2.Hide in your exit routine back to Form1. --- PPoint 2.00 * Origin: Vanishing Point 7198460140 Trinidad CO (1:15/7.1) --------------- FIDO MESSAGE AREA==> TOPIC: 178 VISUAL BASIC Ref: EAE00004 Date: 06/08/97 From: LAWRENCE KELLIE Time: 09:56am \/To: CHARLES BROWN (Read 6 times) Subj: ini stuff yet again =) > reads from BT#.ini (#=version of issue) what its going to read is > such things as: > now i know i could take and just call it from the program by > Form_load but i want to have INI access to be able to change screen > location like move a BMP or something.. plus with the change of names > i wouldnt have people messing up.. if you can help in ANY way at > all(even calling me crazy at this point would probably help :) ) > please do so im really wanting to do this progra but i cant get it!!! One point that you may want to consider is to start your VB program with a Sub Main instead of a particular form. This can be set under the Options menu then select Project (in VB3, at least). This way, you could have the Sub Main call different procedures/functions to set up the program the way you want when you load the form. Lawrence ... What is the output of a vacuum pump? --- FMail 1.0g * Origin: Cala Creek Resort (in seclusion) (1:343/70.164) --------------- FIDO MESSAGE AREA==> TOPIC: 178 VISUAL BASIC Ref: EAE00005 Date: 06/08/97 From: EILEEN LOUISE Time: 07:04am \/To: NEVILLE HARRIP (Read 6 times) Subj: Setting related database forms Hi Neville, Neville Harrip to All on Thursday May 29 1997 NH> How can this be achieved using Visual Basic? I can create a NH> form using a data control, then add a db grid control. The NH> problem I have is linking so that only the records relating to NH> the main form will be shown in the grid control. when you populate the grid you either need to use a select query or a filter to get the members. typically a query is faster than filtering ... --- eileen@technologist.com * Origin: Television is furniture. (1:326/431) --------------- FIDO MESSAGE AREA==> TOPIC: 178 VISUAL BASIC Ref: EAE00006 Date: 06/08/97 From: EILEEN LOUISE Time: 07:05am \/To: IVAN NAGY (Read 6 times) Subj: Hungarian VB Hi Ivan, EL>> full blown VB recommended hungarian drives me nuts. it's too EL>> complicated. i do recommend you develop some reasonably readable EL>> form of hungarian for your own use. DefTyping helps this EL>> practice right IN> Dear Eileen I refer to the above message dated 25th of April IN> 1997. Can you please elaborate on it. I never heard of it and IN> being of Hungarian descent I am curious. Can you tell more about IN> it and of DefTyping? Hungarian is a naming convention. it involves the way you name your variables and objects. it was developed over at MS originally by a chap (Simonyi?) who was of Hungarian descent. And when you do it in C you produce code that is remarkably unintelligible. (unless you know what you are looking at) hence the name. the basic idea is that a variable name has two parts. a lower case one that describes the type of variable, and sometimes the context. and an InitCaps part that describes the function of the variable. so variables for first and last name would be structured as sFName or sLastName. strFirstName is probably the 'official version', however, i prefer a simpler dialect. especially because when you start writing objects the variable names get longer, and the context types at the beginning can get more complicated. some dialects of hungarian recommend a scope identifier along with the type identifier. so then a global first name becomes gstrFName (or gsFName). i have my own dialect which involves something simpler. when i start declaring vars that don't have default types, i do use a slightly longer identifier. for example Dim ctlControl as Control or fldField as Field for generic control and field variables. by default, VB makes a variant of anything you don't dimension as a specific variable type. so then you wind up typing Dim sFirstName as string, sLastName as string. this gets cumbersome, and it's easy to occasionally forget the type statement. if you go into your declarations section, you can set up default types for the first character. DefStr S DefInt I etc ... then dimensioning is simpler. you just declare Dim sFirstName, sLastName i have a standard block of deftypes that i use is non-API modules. strings are s, integers i, bytes b, booleans y, singles x, doubles d and variants v. in global modules where my API declarations and calls get placed, i DefLng A-Z so anything that is untyped will automatically be a long instead of a variant. ultimately it doesn't matter how you do it, so long as it makes a reasonable amount of sense and as long as you do it consistently. IN> I would be at miss not to mention my appreciation of your kind IN> effort in answering questions and giving short lectures in VB IN> albeit in VB4. I still try my prowess in VB3. I have just realised grin. i appreciate being here. it's important to me to give to the community in this way ... i regret to not have more time to do it. i'd prefer to do in VB5 .... but there are too many people who don't have it. i no longer have VB3 loaded, so i avoid those questions because i can't remember that far back which and what changed where, and have no way to test. --- eileen@technologist.com * Origin: Television is furniture. (1:326/431)