Author | Message | Time |
---|---|---|
TeEhEiMaN | Does anyone know of a good tutorial on Flags update in a Listview? and all that stuff? VB | October 27, 2003, 6:02 PM |
bmwrb16 | VB 6 [code] If (Flags And BNFLAGS_OP) = BNFLAGS_OP Then frmMain.lvChannel.ListItems.Remove frmMain.lvChannel.FindItem(Username).Index With frmMain.lvChannel.ListItems.Add(1, , Username, , ICON_GAVEL) .ListSubItems.Add 1, , , GetLagIcon(Ping, Flags) End With Else With frmMain.lvChannel .ListItems(.FindItem(Username).Index).SmallIcon = icon End With End If[/code] | October 27, 2003, 6:55 PM |
Tuberload | Open up your favorite visual basic book and read the section on the bitwise operators, paying special attention to the AND, &, operator. The AND operator will tell you whether a bit is turned on, 1, or not. | October 27, 2003, 8:52 PM |
bmwrb16 | The code above is correct and does what it is supposed to do. | October 27, 2003, 9:00 PM |
Tuberload | I never said the code above was incorrect. He did however ask for a tutorial, as in something to teach him, on how to make his flags work. You responded with code, which works, and I responded with a way to learn about what you posted. See the difference? How will it help him to use code he may not understand? | October 27, 2003, 9:11 PM |
bmwrb16 | Yeah, I didn't know who you were talking to, and he can look it up on MSDN. | October 27, 2003, 10:28 PM |
iago | [quote author=bmwrb16 link=board=17;threadid=3296;start=0#msg26121 date=1067293721] Yeah, I didn't know who you were talking to, and he can look it up on MSDN. [/quote] Stop being a jerk. You both gave valid answers. | October 27, 2003, 10:32 PM |
Gangz | If want some help on Flags Look in Bnet docs on the main page...Or you can aim me on Phyc0freek and ill help you | October 27, 2003, 10:42 PM |
Adron | [quote author=bmwrb16 link=board=17;threadid=3296;start=0#msg26116 date=1067288443] The code above is correct and does what it is supposed to do. [/quote] It is not however a tutorial so it's obviously completely utterly failing to answer a question asking for a tutorial instead of a code sample. | October 27, 2003, 11:37 PM |
UserLoser | http://www.valhallalegends.com/arta/docs/flags.txt [quote] [code] If (BattleNetFlag And FlagValue) = BattleNetFlag Then ' flag is set Else ' flag is not set End If [/code][/quote] if the flag's set, update the icon on your listview, if not, leave it how it is | October 27, 2003, 11:43 PM |
Etheran | [quote author=Tuberload link=board=17;threadid=3296;start=0#msg26115 date=1067287923] Open up your favorite visual basic book and read the section on the bitwise operators, paying special attention to the AND, &, operator. The AND operator will tell you whether a bit is turned on, 1, or not. [/quote]bitmasking is the term, I believe. (just in case you want to look this up) | October 27, 2003, 11:52 PM |
bmwrb16 | [quote author=Gangz link=board=17;threadid=3296;start=0#msg26125 date=1067294547] If want some help on Flags Look in Bnet docs on the main page...Or you can aim me on Phyc0freek and ill help you [/quote] He wasn't asking for help with the flags I think he meant the event. [quote author=Adron link=board=17;threadid=3296;start=0#msg26145 date=1067297854] [quote author=bmwrb16 link=board=17;threadid=3296;start=0#msg26116 date=1067288443] The code above is correct and does what it is supposed to do. [/quote] It is not however a tutorial so it's obviously completely utterly failing to answer a question asking for a tutorial instead of a code sample. [/quote] Well his question was kind of ambiguous so I just gave a code sample of the "flagsupdate_event". [quote author=UserLoser link=board=17;threadid=3296;start=0#msg26148 date=1067298238] http://www.valhallalegends.com/arta/docs/flags.txt [quote] [code] If (BattleNetFlag And FlagValue) = BattleNetFlag Then ' flag is set Else ' flag is not set End If[/code][/quote] [/quote] Basically what i said, the code I posted covers all the flags if your "GetIconCode" function is made properly [quote author=Etheran link=board=17;threadid=3296;start=0#msg26151 date=1067298732] [quote author=Tuberload link=board=17;threadid=3296;start=0#msg26115 date=1067287923] Open up your favorite visual basic book and read the section on the bitwise operators, paying special attention to the AND, &, operator. The AND operator will tell you whether a bit is turned on, 1, or not. [/quote]bitmasking is the term, I believe. (just in case you want to look this up) [/quote] Not really since bitmasking is different then bitwise. | October 28, 2003, 2:58 AM |
Etheran | [quote]Not really since bitmasking is different then bitwise. [/quote] bitmasking is a bitwise function? [quote] Basically what i said, the code I posted covers all the flags if your "GetIconCode" function is made properly[/quote] btw, you mean MY GetIconCode function. | October 28, 2003, 3:16 AM |