ListBox Capacity

I want to use ListBox without scrollbar and i want to now how many lin

Page 1 of 1

9 Replies - 1645 Views - Last Post: 30 June 2009 - 05:17 AM Rate Topic: -----

#1 dimi_s  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 5
  • Joined: 16-June 09

ListBox Capacity

Post icon  Posted 24 June 2009 - 11:46 PM

I made a program that passes records from database and displayed then in listbox. The reason that i want to now tha capacity of the listbox is because my program will run in deferent monitors and each operator will be able to change the listbox fontsize.
I want to show them the records like pages
e.g If my database have 25 records and my listbox capacity is 10 records the time, i want to show them the first 10 records for 1 minute then the second 10 records for 1 minute, then the last 5 records for 1 minute and then to start over from the begining

*Is the listbox the correct object? and how can i find capacity for an object?

Thank you for your time and for your help.

Is This A Good Question/Topic? 0
  • +

Replies To: ListBox Capacity

#2 paperclipmuffin  Icon User is offline

  • Disassembling...
  • member icon

Reputation: 13
  • View blog
  • Posts: 944
  • Joined: 16-April 09

Re: ListBox Capacity

Posted 25 June 2009 - 12:01 AM

Can you show us the code you have used so far to try to solve the problem?

Thank you for helping us help you. :ph34r:
Was This Post Helpful? 0
  • +
  • -

#3 vb5prgrmr  Icon User is offline

  • D.I.C Lover

Reputation: 109
  • View blog
  • Posts: 1,016
  • Joined: 21-March 09

Re: ListBox Capacity

Posted 25 June 2009 - 05:53 AM

Hint to get you started on your code, TextHeight.

Good Luck
Was This Post Helpful? 0
  • +
  • -

#4 raziel_  Icon User is offline

  • Like a lollipop
  • member icon

Reputation: 464
  • View blog
  • Posts: 4,255
  • Joined: 25-March 09

Re: ListBox Capacity

Posted 25 June 2009 - 06:56 AM

but dude the capaciti is different depending on how big your listbox is easy way to do that is to fill it with 25 and see how many is display then just to do your cycle
Was This Post Helpful? 0
  • +
  • -

#5 dimi_s  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 5
  • Joined: 16-June 09

Re: ListBox Capacity

Posted 25 June 2009 - 07:10 AM

View Postpaperclipmuffin, on 24 Jun, 2009 - 11:01 PM, said:

Can you show us the code you have used so far to try to solve the problem?

Thank you for helping us help you. :ph34r:



I dont now how to do it, so i put all the records in the listbox and passed thru them one by one with timer untill the end of listbox.

'add records to listbox
  With rst
	  If Not .BOF Then .MoveFirst
	  While Not .EOF
		listbox.AddItem !Stats, intLine
		intLine = intLine + 1
		.MoveNext
	  Wend
  End With

'Timer
  If listbox.Selected(intSumLines - 1) = True Then intTimerLine = 0
  
listbox.Selected(intTimerLine) = True
intTimerLine = intTimerLine + 1



i dont like that way, i want to so them the records like pages and because this records will be used for public view i dont now what monitor will they use and what fontsize.

Thank you for your time
I hope i was understandable
Was This Post Helpful? 0
  • +
  • -

#6 dimi_s  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 5
  • Joined: 16-June 09

Re: ListBox Capacity

Posted 25 June 2009 - 07:22 AM

View PostNoBrain, on 25 Jun, 2009 - 05:56 AM, said:

but dude the capaciti is different depending on how big your listbox is easy way to do that is to fill it with 25 and see how many is display then just to do your cycle


Thank you for your help

My listbox use all the form and the form.windowstate = Maximize
My listbox gets the form.width and form.height at run time.
Its easy to solve this with my monitor of 19", But what happens if someone run the program in bigger or smaller monitor.

thank you for your time.
Was This Post Helpful? 0
  • +
  • -

#7 raziel_  Icon User is offline

  • Like a lollipop
  • member icon

Reputation: 464
  • View blog
  • Posts: 4,255
  • Joined: 25-March 09

Re: ListBox Capacity

Posted 25 June 2009 - 07:42 AM

now dude dont know for listbox but........... textbox got this property

Property ScrollBars As Integer
read-only
Member of VB.TextBox
Returns/sets a value indicating whether an object has vertical or horizontal scroll bars.

may be that can help you

or not :S
Was This Post Helpful? 0
  • +
  • -

#8 dimi_s  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 5
  • Joined: 16-June 09

Re: ListBox Capacity

Posted 25 June 2009 - 07:46 AM

View PostNoBrain, on 25 Jun, 2009 - 06:42 AM, said:

now dude dont know for listbox but........... textbox got this property

Property ScrollBars As Integer
read-only
Member of VB.TextBox
Returns/sets a value indicating whether an object has vertical or horizontal scroll bars.

may be that can help you

or not :S


Thanks i will try it
Was This Post Helpful? 0
  • +
  • -

#9 raziel_  Icon User is offline

  • Like a lollipop
  • member icon

Reputation: 464
  • View blog
  • Posts: 4,255
  • Joined: 25-March 09

Re: ListBox Capacity

Posted 26 June 2009 - 12:39 AM

did you find a way dude i rly want to know if you do and i am sure not only me :)
Was This Post Helpful? 0
  • +
  • -

#10 dimi_s  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 5
  • Joined: 16-June 09

Re: ListBox Capacity

Posted 30 June 2009 - 05:17 AM

View PostNoBrain, on 25 Jun, 2009 - 11:39 PM, said:

did you find a way dude i rly want to know if you do and i am sure not only me :)



I didnt find the way to do it automatic. On the program settings in there where users adjust the size of fonts and the speed that changing the text on the screen I put a setting for users to put how many rows of text there screen fit, depending on the fontsize.

I now that this isn't the write way, but for now it works.

Thanks for help anyway.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1