Author | Message | Time |
---|---|---|
warz | If InStr(GetAccess(user),"A") Then Select Case Command Case "quit" unload frmmain End Select End If ---- Public Function GetAccess(user as string) as string for x = 1 to lstDatabase.listitems.count if lstdatabase.listitems(x).text = user Then GetAccess = lstdatabase.finditem(user).tag Else End If Next End Function that's an idea for flag based bots. just load database into a listview. for number based bots i guess you could do.. If GetAccess(user) >= 90 Then Select Case Command Case "quit" unload frmmain End Select End If Get creative :P | September 8, 2002, 6:55 PM |
MesiaH | 1. warz said: If GetAccess(user) >= 90 Then Select Case Command Case "quit" unload frmmain End Select End If 2. Now if ur gonna make a quit command, u cant just unload frmmain, you would use the End statement to terminate the bot, otherwise the project will still be open and eatin resources :-P Well if your going to load them into a listview and split em up, then you can make it extremely detailes, such as what rank, what access, when he was added, and who he was added by, and stick them in subitem arrays. get super creative :-P | September 8, 2002, 7:55 PM |
Justin | k thx im trying it out right now ;) ill be as creative as i can be :D | September 8, 2002, 9:36 PM |
warz | Was general idea plz | September 8, 2002, 10:23 PM |
kamakazie | Actually 'end' is much worse then 'unload'. The smart thing to do is unload all active forms. | September 8, 2002, 10:45 PM |
CaPSuLeS | Ending thr program kills it from active process, resulting it it NOT eating resources. Unload simply takes those forms away, which takes longer to do, and leaves for more errors. :P | November 18, 2003, 6:02 PM |
Grok | [quote author=CaPSuLeS link=board=17;threadid=772;start=0#msg29932 date=1069178556] Ending thr program kills it from active process, resulting it it NOT eating resources. Unload simply takes those forms away, which takes longer to do, and leaves for more errors. :P [/quote] Hi, welcome to our forums. Two things. 1) It is generally frowned upon to revive dead topics unless you have a significantly different viewpoint on maybe an unsolved issue. 2) Your viewpoint in this reply is technically wrong. Unload causes a form to follow a sequenced shutdown path, while End leaves allocated objects in memory. End almost never appears in a program except when written by a first-year VB programmer. | November 18, 2003, 6:10 PM |
warz | [quote]« on: September 08, 2002, 01:55 pm »[/quote] Damn, quite some time ago. | November 18, 2003, 9:29 PM |
St0rm.iD | Over a year ago! | November 18, 2003, 11:48 PM |
Grok | Seems as though it's a hit-and-run too. | November 19, 2003, 1:38 AM |
warz | Man, my skills were intense back then. Look at me go! | November 19, 2003, 4:39 AM |
Adron | And I still like to use End, and see it in lots of programs. And I still tend to look at it as a great way to shut down a program nice and quick. Sure, if there's cleanup you'd want to do first, you better do it, but if you just want to end the program, End does it. | November 21, 2003, 12:46 AM |