| |
|
|
|
###################################################################
DOPPELTE LISTBOXEINTRÄGE LÖSCHEN
speedy function to that delete doppelter Lines in sortierten List-
Boxes.
copyright Sven Bader 2001
this View source is Freeware. with usage Please fountain . Indicate
review and suggestions on: svenbader.de
for possible auftretende Schäden becomes no Liability übernommen.
###################################################################
Declare listbox&,button&
Window %MaxX,%MaxY-640,480
listbox& = Control(ListBox,,$54211143,10,28,600,300,%hwnd,0,%hinstance,$0200)
button& = Control(Button,double Lines delete,$54010000,10,328,600,30,%hwnd,0,%hinstance,$0200)
WhileLoop 260 Listbox fill
AddStrings(listbox&,Chr$(add(Rnd(26),65)))
EndWhile
Window (%MaxX / 2 - 320), (%MaxY / 2 - 240) - 640,480 Window in Bildschirmmitte Show
Cls RGB(192,192,192)
Proc DeleteDoubleLines
Parameters listbox&
Declare i%
SendMessage(listbox&,11,0,0) Listbox Refresh blockieren (faster)
While Neq(i%,Getcount(listbox&))
If GetString$(listbox&,i%) = GetString$(listbox&,(i% + 1))
DeleteString(listbox&,i%)
Dec i%
EndIf
Inc i%
EndWhile
SendMessage(listbox&,11,1,0) Listbox Refresh again enable
ENDPROC
While %ScanKey <> 27
WaitInput
Case GetFocus(button&) : DeleteDoubleLines listbox&
EndWhile
|
|
|
| |
|
|