--------------- FIDO MESSAGE AREA==> TOPIC: 178 VISUAL BASIC Ref: DG400003 Date: 11/27/96 From: DANIEL SHEPPARD Time: 10:47pm \/To: DANIEL CASSAR (Read 6 times) Subj: Err code -=> Quoting Daniel Cassar to ALL <=- DC> I have a problem with a program that I?? am creating and it works out DC> a number that you enter times by another number. (Pretty simple eh!) It seems that what you need to discover is the Val() Statement. Here's what I guess you have: 2 Text Boxes, to enter the numbers (say Text1, Text2) 1 Command Button to Calculate the answer (Command1) 1 Label For the answer (Label1) Sub Command1_Click () Label1.Caption = Val(Text1.Text) * Val(Text2.Text) End Sub What The Val Statement does is convert whatever is in the textbox into a number (or into 0 if no number is present). Hope this is what you wanted. Daniel. ... There's no such thing as gravity - the earth sucks. --- Blue Wave/RA v2.30 [NR] * Origin: The Gate, Melbourne Australia, +61-3-9809-5097 28.8k (3:633/159) --------------- FIDO MESSAGE AREA==> TOPIC: 178 VISUAL BASIC Ref: DG400004 Date: 11/27/96 From: DANIEL SHEPPARD Time: 10:47pm \/To: JAYESH RAMA (Read 6 times) Subj: Game Problems -=> Quoting Jayesh Rama to Everyone <=- JR> Ok. JR> Heres what I'm Doing JR> I am trying to make a spaceinvaders type game except you shoot the JR> australian flag. I really need to know how to work the keypress JR> thinggie. I am quite new to vb and am not very good. When I do the JR> keypress... If I say when the user presses k It shoots... What happens JR> is that every button does the same thing. If I say that k shoots and J JR> goes left then when I press any button It will shoot and go left. Firstly, Set the Form's KEYPRESS property to true. Then put this in the Form_KeyPress area If KeyAscii = Asc("K") or KeyAscii = Asc("k") Then [ Code for firing ] End If Just do that for each button. A better way to do this would be to use the cursor keys. If you want to do this you use the KeyDown Event, rather than KeyPress, as Keypress only allows a limited range of characters. If KeyCode = {keycode for left key} Then [ Code for going left ] End If The key codes for all the keys should be either in the online help somewhere (VB4) or in the file CONSTANT.TXT (VB3) And why are you trying to blow up my nice aussie flag? Daniel. ... Bother! said Pooh, as he hung onto Cloud City's antenna. --- Blue Wave/RA v2.30 [NR] * Origin: The Gate, Melbourne Australia, +61-3-9809-5097 28.8k (3:633/159) --------------- FIDO MESSAGE AREA==> TOPIC: 178 VISUAL BASIC Ref: DG400005 Date: 11/29/96 From: VINCENT WONG Time: 11:14pm \/To: JULIAN CHEUNG (Read 6 times) Subj: Newbie to VB On his death bed Julian Cheung uttered Newbie to VB to Vincent Wong..(c)96 VW>Its not as simple as that Julian, some are good some are bad, let me efer VW>to VB for Idiots, the book isn't suited for anyone seriously wanting to VW>learn VB, the book drags on and on about very basic functions until the VW>very end. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ JC> The VB for Idiots fits the description purrfectly ;) Yep I was one of the idiots that bought it. :) One of the tips I use when purchasing tutorials is to look to the very back page and see how technical everything seems if it contains pages of code I buy it of course that isn't recommened way of buying. :) JC> I'm learning VB starting this year, and I was using "Programming with JC> Microsoft Visual Basic 2.0/3.0 for Windows" by Diana Zak. I don't JC> think there is a basic book for VB4. Btw: are you starting to learn, or JC> you already know the basic? I use to program in good old qbasic in my younger years so the progression to Visual basic was pretty painless. Programming with Visual Basic, I think I've seen that around somewhere, from what I saw of it its pretty good purple, yellow, white cover colour? But I really hate thin computer books which that book is? I like the good old thick as war and peace manuals, appeals to my asthetics of I'm getting MORE! :) I've been programming in VB for a while, but I'm restricted to programming databases, and other mediocre jobs, but in my spare time I like to make that odd-useless utility. JC> Have you seen Gary's Book-List? Not yet, ask Gary. I'd be interested in getting into some VB graphics programming can you recommend some? or Gary if he sees this msg. Vin vincentw@geocities.com http://www.geocities.com/siliconvalley/Heights/2853/tabbs.htm ... Security, confine Ensign Cheung to the brig. --- Fmail - The City BBS * Origin: The City BBS Sydney Australia -> V.34 (3:711/410) --------------- FIDO MESSAGE AREA==> TOPIC: 178 VISUAL BASIC Ref: DG400006 Date: 11/29/96 From: VINCENT WONG Time: 11:22pm \/To: GARY SONNENBERG (Read 6 times) Subj: Newbie to VB On his death bed Gary Sonnenberg uttered Newbie to VB to Vincent Wong..(c)96 JC> Have you seen Gary's Book-List? GS> ^^^^ GS> That's me. GS> I can post again, if you like. It's probably still in our message GS> base somewhere, if you look back a ways. It wasn't actually me writing that question but anyhow, could you repost it, I saw numerous postings about it but could never find it. :( Vin vincentw@geocities.com http://www.geocities.com/siliconvalley/Heights/2853/tabbs.htm ... ARRRRRGGGHHH!!!! ... Tension breaker, had to be done. --- Fmail - The City BBS * Origin: The City BBS Sydney Australia -> V.34 (3:711/410) --------------- FIDO MESSAGE AREA==> TOPIC: 178 VISUAL BASIC Ref: DG400007 Date: 11/30/96 From: BILL PINFOLD Time: 02:00pm \/To: GARY SONNENBERG (Read 6 times) Subj: First Mini-FAQ -=> Quoting Gary Sonnenberg to All <=- GS> Hi All, GS> Here's my first attempt at a FAQ for this area. Comments are welcome. GS> (Be nice!) Good work, Gary. Something along these lines is a great idea!. Perhaps it could be added to with people submitting their own favourite little utility. If it grew (as I think it would), I think you will need to seperate the versions - i.e. VB3, VB4 - 16 BIT etc. Once again GREAT !!!!! ... All I need is a Wave and a board to surf it on. --- Fmail - The City BBS * Origin: The City BBS Sydney Australia -> V.34 (3:711/410) --------------- FIDO MESSAGE AREA==> TOPIC: 178 VISUAL BASIC Ref: DG400008 Date: 11/30/96 From: CHRIS MAWER Time: 06:16pm \/To: ALL (Read 6 times) Subj: vb5 What's this about VB5???? R U telling me it compile TRUE EXE files so you don't need any D*MN VB runtime librarys (ie VBRUN300.DLL, VB40016.DLL); it is TRUE machine code so it runs FAST????? And what's this about needing VC++ for the intermediate stage of compile? --- Fmail - The City BBS * Origin: The City BBS Sydney Australia -> V.34 (3:711/410) --------------- FIDO MESSAGE AREA==> TOPIC: 178 VISUAL BASIC Ref: DG400009 Date: 11/28/96 From: JOHN TOMLEY Time: 09:34am \/To: GARY SONNENBERG (Read 6 times) Subj: VB4 Set up wizard Gary - (Sorry about the extra r) Seem to have solved the problem by changing to a new directory, copying forms and vbp files to it and then making new distribution disks. Th e problem seem to occur when 1) use wizard to make disks 2) Change -say the start up form 3) use wizard to make new disks - problem is original startup form is still displayed when the program is run thanks again --- GEcho 1.12/beta+ * Origin: The InterACTive BBS - Canberra ACT - (06) 253-4933 (3:620/243) --------------- FIDO MESSAGE AREA==> TOPIC: 178 VISUAL BASIC Ref: DG400010 Date: 11/28/96 From: BILL PINFOLD Time: 11:56pm \/To: CHRIS ROACH (Read 6 times) Subj: CODE SYNTAX -=> Quoting CHRIS ROACH to BILL PINFOLD <=- CR> Bill, just a quick quess f.b. to yer query... CR> Your form code should have been enclosed in parenthisis(?) CR> Call ExitWindows(x,y,z) CR> Just a guess.... Chris, Pretty good at guessing heh!. Indeed that was my problem, I re-checked the source and there was no parenthisis shown in the example given. Should not take things for granted. Thanks for your response, it is one more thing out of the way in my transition to the 32 BIT world ... Regards, Bill Pinfold. ... A feature is a bug with seniority. --- Fmail - The City BBS * Origin: The City BBS Sydney Australia -> V.34 (3:711/410) --------------- FIDO MESSAGE AREA==> TOPIC: 178 VISUAL BASIC Ref: DG400011 Date: 11/26/96 From: GERRY QUACH Time: 04:11pm \/To: ALL (Read 6 times) Subj: subscript in text Hmm I was wondering if anybody knows how they do those little subscripts and superscripts in programs like Maths tutors and stuff like that... is it possible to do subscripts in textboxes or do you need something a little more complex and sophisticated? cheers, ͵RAG ... Format Drive C:\ now? (Nes/Yo) ___ Blue Wave/DOS v2.21 --- TSX-Online (Multi-line 32-bit BBS) * Origin: HotLine BBS (3:712/941) --------------- FIDO MESSAGE AREA==> TOPIC: 178 VISUAL BASIC Ref: DG400012 Date: 11/27/96 From: GERRY QUACH Time: 04:14pm \/To: ALL (Read 6 times) Subj: convert VB 4.0 to VB 3.0 Anybody know of a program that can convert VB 4.0 projects to VB 3.0? I know it sounds stupid but I actually prefer VB 3.0... that way I don't have to distribute 4+ megs (30+ files) of run-time files along with my 20K metric conversion utility :) And besides that, VB 3.0 proggies run 10x faster anyway, 32-bit or not. cheers, ͵RAG ... He who has the flame-thrower wins the flaming contest ___ Blue Wave/DOS v2.21 --- TSX-Online (Multi-line 32-bit BBS) * Origin: HotLine BBS (3:712/941)