Register | Login | |||||
Main
| Memberlist
| Active users
| ACS
| Commons
| Calendar
| Online users Ranks | FAQ | Color Chart | Photo album | IRC Chat |
| |
0 user currently in Programming. | 3 guests |
Acmlm's Board - I2 Archive - Programming - VB - Scrollbar with bigger values? | | | |
Add to favorites | "RSS" Feed | Next newer thread | Next older thread |
User | Post | ||
HyperLamer <||bass> and this was the soloution i thought of that was guarinteed to piss off the greatest amount of people Sesshomaru Tamaranian Level: 118 Posts: 1673/8210 EXP: 18171887 For next: 211027 Since: 03-15-04 From: Canada, w00t! LOL FAD Since last post: 2 hours Last activity: 2 hours |
| ||
Well I found out that the Scrollbar objects in VB can only have values from 0-32767. I need one that goes 0-65535, how can I do that? | |||
neotransotaku Baby Mario 戻れたら、 誰も気が付く Level: 87 Posts: 1443/4016 EXP: 6220548 For next: 172226 Since: 03-15-04 From: Outside of Time/Space Since last post: 11 hours Last activity: 1 hour |
| ||
what are you trying to do? If i remember scrollbars correctly, scroll bars have a limited range of 0-32767 because of the WinAPI uses a 16-bit value to do scrollbars. So unless you do some extra mapping, say you have that counter and a flag, you can't really improve on it. i.e. Larger Range: 0 1 2 3 Smaller Range: 0 0 1 1 Flag: 0 1 0 1 (edited by neotransotaku on 10-03-04 12:51 AM) |
|||
HyperLamer <||bass> and this was the soloution i thought of that was guarinteed to piss off the greatest amount of people Sesshomaru Tamaranian Level: 118 Posts: 1674/8210 EXP: 18171887 For next: 211027 Since: 03-15-04 From: Canada, w00t! LOL FAD Since last post: 2 hours Last activity: 2 hours |
| ||
Er, are you trying to say I should just have it scroll all the way to the bottom, then reset it, and keep my own internal counter? That won't really work too well. Say you wanted to scroll to the bottom, you move it to the bottom and it takes you to the middle. Very confusing. As for what I'm doing, I have a listbox that shows a disassembly of a byte array (0-65535), one instruction per line. Of course adding 65,536 lines to a listbox would take forever, and this is updated in realtime, so I just show 12 at a time (the most that can fit at once). The scrollbar is used to 'scroll' the listbox (really just changing the starting address), so it needs to be able to start at any address. (Currently, I have it set at 0-32755 (32767-12), and multiply that by 2 to get the address, but that looks really dumb because it will only scroll 2 lines at a time. ) Is there some way to replace the scrollbar? Maybe an API function of some sort? That'd work a lot better. (Or maybe I should just try to make my own. ) |
|||
neotransotaku Baby Mario 戻れたら、 誰も気が付く Level: 87 Posts: 1445/4016 EXP: 6220548 For next: 172226 Since: 03-15-04 From: Outside of Time/Space Since last post: 11 hours Last activity: 1 hour |
| ||
no, 2 instructions = 1 tick of the the scrollbar, or you can say floor(instruction address / 2) to get the equivalent of the scrollbar. The reason why you are restricted to 16-bits is because the API was first written for 16-bit processing and just has never been updated... As for replacing the scrollbar, i do not think there is another scrollbar in the windows API. From the literature I've read so far about MFC, you have to do mapping your numbers to 0 - 2^15 range. There is no getting around it... |
|||
HyperLamer <||bass> and this was the soloution i thought of that was guarinteed to piss off the greatest amount of people Sesshomaru Tamaranian Level: 118 Posts: 1675/8210 EXP: 18171887 For next: 211027 Since: 03-15-04 From: Canada, w00t! LOL FAD Since last post: 2 hours Last activity: 2 hours |
| ||
Yeah, that's how I have it now. Address = Scrollbar * 2. It's really hacky though. I found a replacement scrollbar OCX, but it gives me an error message when I try to add any user controls, including this one and ones I made myself: "Unable to set the version compatible component: [path to .ocx]" So WTF does that mean and how do I fix it? |
|||
Jraregris Blue Octorok Level: 10 Posts: 18/36 EXP: 4319 For next: 95 Since: 09-28-04 From: Norway Since last post: 16 days Last activity: 5 days |
| ||
I'm not a VB-expert but to me making a button that does Address = Address + 1and a button directly beneath it that does Address = Address - 1doesn't sound difficult. |
|||
HyperLamer <||bass> and this was the soloution i thought of that was guarinteed to piss off the greatest amount of people Sesshomaru Tamaranian Level: 118 Posts: 1676/8210 EXP: 18171887 For next: 211027 Since: 03-15-04 From: Canada, w00t! LOL FAD Since last post: 2 hours Last activity: 2 hours |
| ||
No, but mimicking a scrollbar is a bit harder. | |||
Lenophis Super Koopa Level: 44 Posts: 169/830 EXP: 584360 For next: 26925 Since: 03-15-04 From: Duluth, MN Since last post: 4 hours Last activity: 3 hours |
| ||
Well, you COULD do four scroll bars, and each would have 16,384 entries. Or two of 32,768 entries. That or wrack your brain over this mess. That's all I could come up with. | |||
Squash Monster New Age Retro Hippie Togateiru Fohku Kohgeki!! GRUNGE no HAMSTER otona bite Peace love and turnpike! Level: 40 Posts: 426/677 EXP: 430507 For next: 10802 Since: 03-15-04 From: Maryland (of the Country Between Canada and Mexico) Since last post: 5 hours Last activity: 5 hours |
| ||
You could make a picture box with the background of a scrollbar, two buttons for the arrows, and an image inside the picture box for the bar. Use the drag move, drag drop, and mouse down events of the picture box for scrolling, and the arrow buttons for changing the adress by one. (edited by Squash Monster on 10-04-04 03:07 PM) |
|||
Jesper Busy, busy, busy. Level: 69 Posts: 968/2390 EXP: 2856000 For next: 13743 Since: 03-15-04 From: Sweden. Since last post: 176 days Last activity: 79 days |
| ||
All the solutions I've seen here sound hackish and not really well thought-out (it won't work on your neighbor's computer, or it just plain won't make sense). I suggest asking at some more focused "hardcore" VB place, like vbcity.com, whose FAQs rock, by the way. | |||
HyperLamer <||bass> and this was the soloution i thought of that was guarinteed to piss off the greatest amount of people Sesshomaru Tamaranian Level: 118 Posts: 1741/8210 EXP: 18171887 For next: 211027 Since: 03-15-04 From: Canada, w00t! LOL FAD Since last post: 2 hours Last activity: 2 hours |
| ||
I can probably get it to work if VB would just let me add controls. Any idea why that's happening? (See earlier posts.) |
Add to favorites | "RSS" Feed | Next newer thread | Next older thread |
Acmlm's Board - I2 Archive - Programming - VB - Scrollbar with bigger values? | | | |