------------------- ' add a module and put this code in it 'Type MyVar 'Game As Integer 'Value As integer 'End Type 'Global MySol(7) As MyVar ' then put the rest in a Sub Form_activate() Private Sub Form_activate() Dim swap, x, temp1, temp2 As Integer 'input data MySol(1).Game = 1 MySol(1).Value = 0 MySol(2).Game = 2 MySol(2).Value = 3 MySol(3).Game = 3 MySol(3).Value = 1 MySol(4).Game = 4 MySol(4).Value = 2 MySol(5).Game = 5 MySol(5).Value = 3 MySol(6).Game = 6 MySol(6).Value = 0 MySol(7).Game = 7 MySol(7).Value = 1 'processing data Do swap = 0 For x = 1 To 6 '(max-1) If MySol(x).Value < MySol(x + 1).Value Then temp1 = MySol(x).Game temp2 = MySol(x).Value MySol(x).Game = MySol(x + 1).Game MySol(x).Value = MySol(x + 1).Value MySol(x + 1).Game = temp1 MySol(x + 1).Value = temp2 swap = 1 End If Next Loop While swap <> 0 'showing data For x = 1 To 7 Print "game: "; MySol(x).Game; " was played: "; MySol(x).Value; " times" Next End Sub Greetings, Ruud Schoppema, Nijmegen, the Netherlands. rudine@wxs.nl --- * Origin: (2:284/604.1) --------------- FIDO MESSAGE AREA==> TOPIC: 178 VISUAL BASIC Ref: F4200000 Date: 03/28/98 From: FRANCOIS ROY Time: 09:55am \/To: RUUD SCHOPPEMA (Read 6 times) Subj: NoKeyInputWanted RS> q = q + 1 RS> For r = 1 To 1000000: Next 'waiting loop RS> Loop Until q = 8 RS> Command1.Enabled = True Aha! That old Dos thinking is what got you! While you are in the Loop, grabbing every CPU cycle you can, Windows does not process your user actions. The Click only gets processed once the machine gets a chance to breathe! You might want to throw a DoEvents in that loop. But the _real_ solution would be to use a Timer to enable the button, and not grab all those CPU cycles until the button gets enabled. --- Msged 4.00 * Origin: Ready & Determined (819) 772-9277 (1:163/506) --------------- FIDO MESSAGE AREA==> TOPIC: 178 VISUAL BASIC Ref: F4200001 Date: 03/26/98 From: BUCKY CARR Time: 01:18pm \/To: TIMOTHY DUEHRING (Rcvd) (Read 6 times) Subj: Thanks for all the help! TD> BC>and the heavy coating of body hair is diminishing, too! TD> Spring must be coming to the Rockies! Heh, heh. And the propensity to want to write VB code is diminishing... --- PPoint 2.00 * Origin: Vanishing Point 7198460140 Trinidad CO (1:15/7.1) --------------- FIDO MESSAGE AREA==> TOPIC: 178 VISUAL BASIC Ref: F4200002 Date: 03/26/98 From: EILEEN LOUISE Time: 08:14am \/To: BUCKY CARR (Read 6 times) Subj: Question #1, type statement Hi Bucky, Quoting Bucky Carr to Eileen Louise on Tuesday March 24 1998 BC> I'd need to live to age 329 to find the time to read everything I BC> want. grin. it is impossible anyway, because everything changes too fast. i am sort of groaning and procrastinating looking at VS 6 ... sigh. --- eileen@technologist.com * Origin: We Gladly Feast On Those Who Would Subdue Us (1:326/431) --------------- FIDO MESSAGE AREA==> TOPIC: 178 VISUAL BASIC Ref: F4200003 Date: 03/26/98 From: EILEEN LOUISE Time: 08:05am \/To: BUCKY CARR (Read 6 times) Subj: DateAdd() Function Inconsistency Hi Bucky, Quoting Bucky Carr to Eileen Louise on Tuesday March 24 1998 BC> Yeah, I thought about the AMPM thingy, too. Adding that made no BC> difference, oddly. it is prolly somewhere in the way DAO is managing that parse tho ... since the only thing i really saw that you changed (but i was skimming) was the cdate() BC> Gonna take me forever to get to sql server/RDO. i expect that DAO will be phased out and RDO will be too in favor of ADO anyway .... that is almost a fully functional commandset now. --- eileen@technologist.com * Origin: We Gladly Feast On Those Who Would Subdue Us (1:326/431) --------------- FIDO MESSAGE AREA==> TOPIC: 178 VISUAL BASIC Ref: F4200004 Date: 03/26/98 From: EILEEN LOUISE Time: 08:07am \/To: BUCKY CARR (Read 6 times) Subj: Application Bloat... Hi Bucky, Quoting Bucky Carr to Eileen Louise on Tuesday March 24 1998 BC> the sites I have pcAnywhere running so I can send updates rather than BC> driving. yes that works well .... but no matter how many fixes you do, feel good. i saw a quote from MS in Sm@rt Reseller ... and i believe this is a marketing pitch ... "Windows 98 fixes over 5000 bugs in Win 95". BC> Ah. Didn't know that. I might have some of those imbedded, too. BC> I'll lookee. Thanks. it doesn't return errors, just unexpected values :) yes, imbedded waws the word beyond my fingertips ... thanx. BC> Nah. Local folks can have it for free in exchange for finding bugs BC> and making improvement suggestions. They also get to run it raw BC> (minimal documentation). Have had a chance to see some other systems BC> demo'd as our hospital is looking at upgrading its computer system. BC> My program doesn't hold a tee to those, so I'll likely do little more BC> than use it as an intellectual exercise in the long run. well there is a lot of office level stuff that is not nearly as good as what you're doing. The Cure, LPBS, Versaform, MedLite, etc .... anyway, will recommend "Legal Care for Your Software" as a worthwhile book for your shelf ... under $30, available from amazon or wherever. if you are going to skip your own legal advice, it's a good resource. --- eileen@technologist.com * Origin: We Gladly Feast On Those Who Would Subdue Us (1:326/431) --------------- FIDO MESSAGE AREA==> TOPIC: 178 VISUAL BASIC Ref: F4200005 Date: 03/26/98 From: EILEEN LOUISE Time: 08:11am \/To: BUCKY CARR (Read 6 times) Subj: Question #1, type statement Hi Bucky, Quoting Bucky Carr to Eileen Louise on Tuesday March 24 1998 EL>> grin. if it was the property let/get pairs you didn't like, you EL>> are stuck with them in VB for the forseeable future. BC> You are a mind reader. oddly enuf, that is quite a bit of a mirror of the way VB controls work internally. just when you get into controls, you also have a property bag, giving you design time capabilities in addition to the run time classes. BC> Da, da. On my list... giggle ... ok i will lay off the subject. --- eileen@technologist.com * Origin: We Gladly Feast On Those Who Would Subdue Us (1:326/431) --------------- FIDO MESSAGE AREA==> TOPIC: 178 VISUAL BASIC Ref: F4200006 Date: 03/29/98 From: EMMANUEL BERLEMONT Time: 12:35pm \/To: ALL (Read 6 times) Subj: Kill window How can I kill a "finished" DOS session window ? (I use VB4 & win95.) eg: I use the function SHELL(...) which runs an "external" program written in C, after the run of this program in a DOS window, the DOS window stays on the Win95 desktop with caption : Finished... Thanks in advance for any reply... B y e N e P h --- FMail 1.02 * Origin: *** The Marginal BBS * Brussels * Belgium *** (2:291/766.157) --------------- FIDO MESSAGE AREA==> TOPIC: 178 VISUAL BASIC Ref: F4200007 Date: 03/31/98 From: FRANCOIS ROY Time: 06:11am \/To: EMMANUEL BERLEMONT (Read 6 times) Subj: Kill window EB> in C, after the run of this program in a DOS window, the DOS window stays EB> on the Win95 desktop with caption : Finished... You need to set the properties of the Dos prompt to include "Close on exit" or whatever it's called (I don't have Win95 here to go check the exact words, but it's a checkbox that is off by default) --- Msged 4.00 * Origin: Ready & Determined (819) 772-9277 (1:163/506) --------------- FIDO MESSAGE AREA==> TOPIC: 178 VISUAL BASIC Ref: F4200008 Date: 03/31/98 From: KURT TISCHER Time: 09:51pm \/To: CHRISTIAN RIVA (Read 6 times) Subj: Format? CR>How can I see just the last 3 decimals from "0.00000", "00.0000000", etc. CR>For eg.: CR> 1.234567 = 1.234 CR>34.56789012 = 34.567 CR>It is using 'format', right? How? Thank you very much, Yeah, like this: Dim mySingle as Single mySingle = 1.234567 mySingle = Format(mySingle, "0.000") Now you could use a pound (#) symbol instead of the zero (0). A pound would display a digit or nothing, depending on where it is used. For example: Format(mySingle, "#.000") will display only the numbers to the right of the decimal point if the number to the left of the decimal point is zero. kt * SLMR 2.1a * This tagline is umop apisdn --- ViaMAIL!/SL v1.30 * Origin: ViaMAIL! - If you run Searchlight, you gotta have it! (1:157/438)