--------------- FIDO MESSAGE AREA==> TOPIC: 178 VISUAL BASIC Ref: F1S00000 Date: 01/21/98 From: MARK BAPPE Time: 08:15pm \/To: EILEEN LOUISE (Read 4 times) Subj: RE: sleep ->Hi MARK, Hey there Eileen, ->I keep meaning to correct that myth -- i am still wondering where in ->proggieland it started. ...I tell you what :) Its not only in this echo :) Its all over the News groups as well :). But I didn't just believe the hype . I could have sworn that I typed a wrong Declare statement (what I thought was Capitalization error) and the call failed each and everytime. What I probably did was miss-spell something in the Declare statement itself (can't remember the error) it was back in my VB4 days . So with all the information in the newsgroups, and what I thought was a cap problem turns out to be bogus :) Thanks! I never really did take the time to examine this further. And yeah the alias name has to be exact. Found this out a while back when a C++ dll (one of its calls) got mangled. :) ->Option Explicit ->'get user name ->Private Declare Function EileenSays& Lib "ADVapi32.dLl" _ -> Alias "GetUserNameA" (ByVal lpVBECHO As String, _ -> nsize As Long) 'see below for the "real" call ... ->Private Sub Label1_Click() ->Dim s$, cnt&, dl& -> cnt& = 199 -> s$ = String$(200, 0) -> dl& = EileenSays(s$, cnt&) -> Label1 = Left$(s$, cnt&) ->End Sub Works like a charm :) ->now run it. you will find it has the exact same functionality as the official ->declaration. ->there are only two things that are required in this declaration. ->1. *a* (not *the*) correct type structure for parameters Thanks for that information :) But you know, whats kind of odd, is that I do this in practise as well. Although my mind didn't make the connection. I use different Declare types (IE SendMessageString) when calling a SendMessage when I specifically need to pass it othe than ANY. So do this all the time, but the connection never hit me . ->2. the properly spelled and capatalized alias name. Knew about this one :) ->i want to diagram this out for anyone who doesn't understand API calls (i know ->you do Mark, but it confuses a lot of VB programmers.) I would be lost without them :) Enjoy Eileen ---===========================--- Mark Bappe S and T Software Internet: http://bozax.iainc.net mark.bappe@bozax.iainc.net ---===========================--- ...BapStats Module (BapMSG v1.0 Build 8) * Origin: The BoZax Bulletin (1:133/5007) --------------- FIDO MESSAGE AREA==> TOPIC: 178 VISUAL BASIC Ref: F1S00001 Date: 01/22/98 From: EILEEN LOUISE Time: 06:46am \/To: BUCKY CARR (Read 4 times) Subj: VB & SQL Hi Bucky, Quoting Bucky Carr to Eileen Louise on Tuesday January 20 1998 BC> Do you remember just how long a line *can be* in VB source? Seems actually i have no clue. i skimmed through the help justnow and if it's in there it was not obvious. BC> on the screen without having to scroll horizontally, it is a BC> nuisance. hear, hear! BC> I'm not trying to avoid sending you what I'm doing, just that I doubt BC> that your time would be well spent looking at this presently. ok -- i was just offerring :-) no strings. BC> Perfect it isn't (never would be :), but it is pretty good. well a pretty good pracman program is going to be a first in that market!! BC> Almost done with the appointment scheduling part (that is what you BC> saw part of in SQL). It is a separate table. the thing with that appointment is just that the record should be related to the provider via the provider's schedule table, but the office hours and stuff shouldnt be in every row of the record. BC> Most of the "competition" systems I've looked at have dozens of disk BC> files required to do what I'm doing. One written in VB3 has about 75 BC> files. Mine is all done with 3 files: the .EXE, a .HLP and the .MDB. BC> Very neat and clean looking on the hard disk. One competitor's BC> product written in MSDOS (Clarion, I think), has 150 separate files to BC> make it run. My hat is off to the programmer, but I'd lose my mind BC> keeping track of all that. heehee ... that is a flat file system if i recall correctly -- i have never been able to stand workign like that. BC> Microsoft, despite what many say about it, has a truly wonderful BC> programming package in VB and I'm having a ball. you are gonna love 5 -- it's a blast. my only problem is that it has me so damn spoiled that the Power Builder editor is driving me nuts. I'm thinking of upgrading to PB6, but i use enterprise and it's going to be expensive. and i'm not sure the editor is that much better, although it's allegedly "improved" whatever that means. --- eileen@technologist.com * Origin: We Gladly Feast On Those Who Would Subdue Us (1:326/431) --------------- FIDO MESSAGE AREA==> TOPIC: 178 VISUAL BASIC Ref: F1S00002 Date: 01/21/98 From: JIM BROADBENT Time: 11:21pm \/To: RUUD SCHOPPEMA (Read 4 times) Subj: wrong sort? Hi Ruud; RS> make a lstbox and then RS> list1.additem 9 RS> 23 RS> 8 RS> 14 RS> 12 RS> 16 RS> The output will be 9-23-8-14-12-16. So far so good. RS> But when I set sort=true then the output looks like RS> 12-14-16-23-8-9. I thought it should be started RS> with the 8 and then the 9 and so on. RS> What it is wrong with me? ;) Nothing is wrong....the sort is done alphabetically...not numerically. so the sort is done by the first character..then by each character in each number. Regards Jim --- Maximus 2.01wb * Origin: RASCAL Calgary, Alberta (403)686-2550 USR V.Everything (1:134/122) --------------- FIDO MESSAGE AREA==> TOPIC: 178 VISUAL BASIC Ref: F1S00003 Date: 01/21/98 From: JIM BROADBENT Time: 11:28pm \/To: EILEEN LOUISE (Read 4 times) Subj: Just Curious Well I got this reply....next post. Fido connection and feed seem to be ify lately...I miss a lot of posts because of it...thanks for responding. Regards Jim --- Maximus 2.01wb * Origin: RASCAL Calgary, Alberta (403)686-2550 USR V.Everything (1:134/122) --------------- FIDO MESSAGE AREA==> TOPIC: 178 VISUAL BASIC Ref: F1S00004 Date: 01/21/98 From: JIM BROADBENT Time: 11:33pm \/To: EILEEN LOUISE (Read 4 times) Subj: OLE AUTOMATION Hi Eileen; Thanks for responding :-) JB> I've been working for the past 4 months on applying OLE Automation JB> to commercial wordprocessing and spreadsheet packages from our JB> database collector/reporter package written in VB3. EL> ooo, where can i send flowers? this stuff is a PITA. So...you're like Clinton and "know my pain", eh? Actually, once you get the hang of it, it isn't so bad...WordPerfect8 is a real pain since all of their logic functions are prefaced with a "?" for example if you are doing a find/replace on a document...their way of telling you that you >>have<< found the document is with a function "?FindFound" so try to use that in VB eg. object.?FindFound VB doesn't like the question mark so we had to do a rather flaky workaround to do it another way. EL> i don't have a super clear picture of what is going on here for you. EL> However if I were faced with a problem EL> approximately like this one, I would attempt two EL> things. First, I would determine the lowest common My problem is starting the wordprocessor or spreadsheet app. Once it is started the rest is a piece of cake (well almost there are a few other problem...like my machine gives me a Dibeng.dll error occassionally). We have a great "token" system for filling in the needed data. but starting the app is the problem. regards Jim --- Maximus 2.01wb * Origin: RASCAL Calgary, Alberta (403)686-2550 USR V.Everything (1:134/122) --------------- FIDO MESSAGE AREA==> TOPIC: 178 VISUAL BASIC Ref: F1S00005 Date: 01/20/98 From: DAVE NICHOLS Time: 08:14am \/To: SPONSOR (Read 4 times) Subj: SEED MESSAGE (GT-Tools v1.121 With this message, #### #### ################ ########### ######### ######### # ##### # ###### ### ### ####### #### # ### ######### # # #### ########## # # # # ## ##### ## # #### ######### GT Node 071/003 160 echo areas: 800 megs..files * 615-824-5014 * US Robotics..33.6k Dual Standard now joins this echo........... ##GT Tools v1.121# --- * Origin: NetComm BBS 303-730-7045 (1:104/603.0) --------------- FIDO MESSAGE AREA==> TOPIC: 178 VISUAL BASIC Ref: F1S00006 Date: 01/22/98 From: DAVID STUMPF Time: 08:18pm \/To: MARK BAPPE (Read 4 times) Subj: RE: RE: sleep - Quoting Mark Bappe - to David Stumpf ->You can in VB 3/Pro. ->Just put it under "General" and it works just fine. MB> MB> Correct, but he is using VB5. You can do it in VB5 as well, but you MB> have to put make it a Private Declaration. Ahh, I'll try and remember that. BTW: You wouldn't happen to know when multi-color(font) text boxes were added? VB4 or 5? I know 3 has no way of doing them without a third party VBX. [David.Stumpf@Earthling.net] [http://www.dzs.home.ml.org] [*] AutoSig v1.20 ... "I'm not a Democrat... I'm just anti-Republican!" ___ Blue Wave/DOS v2.30 --- Telegard/QWK v3.09.g1 * Origin: The World WIthin * 281-324-2745 (1:106/4725) --------------- FIDO MESSAGE AREA==> TOPIC: 178 VISUAL BASIC Ref: F1S00007 Date: 01/21/98 From: WILLIAM HURN Time: 08:49pm \/To: RUUD SCHOPPEMA (Read 4 times) Subj: Re: wrong sort? -=> Quoting Ruud Schoppema to all <=- RS> I make a lstbox and then RS> list1.additem 9 RS> 23 RS> 8 RS> 14 RS> 12 RS> 16 RS> The output will be 9-23-8-14-12-16. So far so good. RS> But when I set sort=true then the output looks like 12-14-16-23-8-9. I RS> thought it should be started with the 8 and then the 9 and so on. RS> What it is wrong with me? ;) Visual Basic Help, under "Sorted Property", says in part (please notice the Note: ------------------------ Quote on ---------------------------- Setting Description True List items are sorted alphabetically (case-insensitive). False (Default) List items aren't sorted alphabetically. Remarks When this property is True, Visual Basic handles almost all necessary string processing to maintain alphabetic order, including changing the index numbers for items as required by the addition or removal of items. Note Using the AddItem method to add an element to a specific location in the list may violate the sort order, and subsequent additions may not be correctly sorted. ----------------------- Quote off ----------------------------- Are the items correctly sorted when you close and reopen the program or listbox looses and regains focus following any changes to the contents? --- * Origin: D.M.U.G. BBS Dayton Ohio (1:110/69)