home *** CD-ROM | disk | FTP | other *** search
/ Planet Source Code Jumbo …e CD Visual Basic 1 to 7 / 1_2002.ISO / Data / Zips / SebaMix_Pr53742272002.psc / !ReadMe.txt next >
Encoding:
Text File  |  2002-02-08  |  7.3 KB  |  218 lines

  1. SebaMix ProgressBar
  2.  
  3. v. 1.1.3
  4.  
  5. ~~~~~~~~~
  6. Copyright
  7. ~~~~~~~~~
  8.  
  9. This DLL is (c) by Pallaro Sebastiano. 
  10. You can use it as you wish (but first send me an e-mail! :) ).
  11. The DLL is give "as is", so the author don't take any kind of responsability.
  12.  
  13. ~~~~~~~~~~~~
  14. ENUMERATIONS
  15. ~~~~~~~~~~~~
  16.  
  17.  Public Enum SMOrientation
  18.      SMHorizontal = 0
  19.      SMVertical = 1
  20.  End Enum
  21.  
  22.  Public Enum SMDrawStyles
  23.      SM_MergePen = vbMergePen
  24.      SM_MergePenNot = vbMergePenNot
  25.      SM_MergeNotPen = vbMergeNotPen
  26.      SM_NotXorPen = vbNotXorPen
  27.      SM_MaskPen = vbMaskPen
  28.      SM_NotMaskPen = vbNotMaskPen
  29.      SM_XorPen = vbXorPen
  30.      SM_Invert = vbInvert
  31.      SM_MaskPenNot = vbMaskPenNot
  32.      SM_MaskNotPen = vbMaskNotPen
  33.      SM_NotMergePen = vbNotMergePen
  34.  End Enum
  35.  
  36. ~~~~~~~~~
  37. PROPERIES
  38. ~~~~~~~~~
  39.  
  40.  ╖ BackColor
  41.     (OLE_COLOR) The back color of the ProgressBar;
  42.  
  43.  ╖ Caption
  44.     (String) Set the progressbar's caption. In this property
  45.      is left blank, the progress value will be show;
  46.  
  47.  ╖ ForeColor
  48.     (OLE_COLOR) The color of the caption;
  49.  
  50.  ╖ Max
  51.     (Long) The max value that the Value property can assume;
  52.  
  53.  ╖ Min
  54.     (Long) The min value that the value property can assume;
  55.  
  56.  ╖ Percent
  57.     (Integer) Read only, return the curren value's percent;
  58.  
  59.  ╖ PictureProgress
  60.     (SMDrawStyles) Specify the print style of the progression.
  61.      Using this propery will change the DrawMode of the PictureBox. Refer
  62.      to the OldDrawMode propery to have the original DrawMode.
  63.  
  64.  ╖ ProgressColor
  65.     (OLE_COLOR) The color of the progression;
  66.  
  67.  ╖ OldDrawMode
  68.     (Byte) Read only, return the original DrawMode propery of the
  69.      PictureBox;
  70.  
  71.  ╖ Orientation
  72.     (SMOrientation) Set the orientation for the progressbar
  73.     (horizontal or vertical)
  74.  
  75.  ╖ ShowCaption
  76.     (Boolean) If true the caption will be show;
  77.  
  78.  ╖ TextAfter
  79.     (String) The string that will print before the value propery on the 
  80.      caption if the caption propery is empty;
  81.      (e.g. "Step 40/100")
  82.  
  83.  ╖ TextBefore
  84.     (String) The string that will be print after the value property on the
  85.      caption if the caption property is empty;
  86.      (e.g. "40/100 done")
  87.  
  88.  ╖ TextMiddle
  89.     (string) Stringa che verrα stampata tra la Value raggiunta e Max
  90.     nella caption se la proprietα Caption Φ vuota e UsePercent Φ Falsa;
  91.     (e.g. the "/" of "200/300");
  92.  
  93.  ╖ UsePercent
  94.     (Boolean) If true, the progress percent will be show;
  95.  
  96.  ╖ Value
  97.     (Long) The value of the progression;
  98.     IMPORTANT : the progressbar's picture will be print only when the
  99.     value property is set;
  100.  
  101. ~~~~~~~
  102. METHODS
  103. ~~~~~~~
  104.  ╖ InitPB (ByVal myPictureBox As Object, Optional myOrientation As SMOrientation)
  105.     Initialize the progressbar object. You must give the picturebox object and the
  106.     orientation (default horizontal).
  107.  
  108.  ╖ GetVersion () As String
  109.     Return the version (Major.Minor.Revision);
  110.  
  111.  ╖ GiveOfficeBorder()
  112.     Give the office border to the progressbar;
  113.  
  114.  ╖ AboutBox()
  115.     Open the About-Box;
  116.  
  117. ~~~~~~
  118. EVENTS
  119. ~~~~~~
  120.  ╖ Progress (Value As Long, Percent As Integer)
  121.     Raised when the "value" property is set (when the picture redraw is terminated).
  122.     It pass the value and the percent of the progressbar;
  123.  
  124. ~~~~
  125. Note (SORRY, ITALIAN ONLY)
  126. ~~~~
  127.  ╖ Il metodo InitPB setta le seguenti proprietα della PictureBox
  128.     passatagli:
  129.     - Picture.AutoRedraw = True;
  130.     - Picture.ScaleMode = vbTwips;
  131.     Si consiglia di non modificare in alcun modo le properietα
  132.     della PictureBox per non ottenere effetti indesiderati;
  133.  ╖ Valori di default:
  134.     - Inizializzazione della classe:
  135.         Caption = ""
  136.         UsePercent = False
  137.         ShowCaption = True
  138.         Min = 0
  139.         Max = 100
  140.         Value = 0
  141.         Percent = 0
  142.     - Metodo InitPB:
  143.         BackColor = RGB(150, 150, 150)
  144.         ProgressColor = RGB(100, 100, 250)
  145.         ForeColor = vbWhite
  146.         Orientation = myOrientation (se non passato vale SMHorizontal - 0)
  147.  
  148. ~~~~~~~~
  149. Utilizzo (SORRY, ITALIAN ONLY)
  150. ~~~~~~~~
  151.  
  152.  Includere SMPB tra i riferimenti del progetto (men∙ progetto>riferimenti).
  153.  Se non si Φ registrata la DLL includerla utilizzando il pulsante "Sfoglia"
  154.  Se necessario registrare la DLL attraverso il comando REGSVR32.
  155.  Ove la progressbar Φ necessaria includere questa dichiarazione (preferibilmente
  156.  creare la variabile globale a livello di maschera - o modulo);
  157.  
  158.  Private WithEvents SMPB1 As smProgressBar
  159.  
  160.  La clausola WithEvents implica che gli eventi siano abilitati.
  161.  Per inizializzare la maschera inserire le seguenti chiamate (preferibilmente
  162.  nel Form_Load)
  163.  
  164.  Set SMPB1 = New smProgressBar
  165.  SMPB1.InitPB PictureBox, SMVertical
  166.  
  167.  Quando la ProgressBar non serve pi∙ (per esempio nel Form_Load) Φ
  168.  consigliabile inserire la seguente chiamata:
  169.  
  170.  Set SMPB1 = Nothing
  171.  
  172.  Pu≥ capitare infatti che il programma possa andare in GPF (Global Protection
  173.  Fail) se si lasciano degli oggetti istanziati in memoria.
  174.  
  175. ~~~~~~~~~~~~~~~~~~~~~
  176. Storia delle Versioni (SORRY, ITALIAN ONLY)
  177. ~~~~~~~~~~~~~~~~~~~~~
  178.  ╖ 1.0.0 : Versione di partenza. 
  179.            Bachi conosciuti: errata rappresentazione della progressione 
  180.             nel caso la proprietα Min sia maggiore di 0;
  181.            [Versione non distribuita]
  182.  ╖ 1.0.1 : Classe iniziale portata in una DLL (SMPB.DLL);
  183.            [Versione non distribuita]
  184.  ╖ 1.0.2 : Risolto il problema con la proprietα Min;
  185.            Bachi conosciuti : la percentuale impazzisce quando la proprietα
  186.             Min Φ maggiore di 0;
  187.            [Versione non distribuita]
  188.  ╖ 1.0.3 : Aggiunto lo scroll verticale;
  189.            Bachi conosciuti : lo scorrimento verticale va dall'alto verso il
  190.             basso e non viceversa; la caption resta orizzontale;
  191.            [Versione non distribuita]
  192.  ╖ 1.0.4 : Corretto l'orientamento dello scroll verticale, aggiunto il
  193.             metodo GetVersion e la proprietα ProgressColor; reimpostati i
  194.             colori di default ed eliminato lo sfarfallio riscontrato
  195.             durante la progressione;
  196.            [Versione non distribuita]
  197.  ╖ 1.0.5 : Aggiunto l'evento Progress; Gestito l'evento Class_Terminate per
  198.             il corretto scarico dalla memoria degli oggetti istanziati;
  199.            [Versione non distribuita]
  200.  ╖ 1.1.0 : Prima versione distribuita.
  201.            Bachi conosciuti : la caption resta orrizzontale anche durante lo
  202.             scorrimento verticale;
  203.            [Versione distribuita]
  204.  ╖ 1.1.1 : Aggiunto il metodo GiveOfficeBorder, che per≥ ha un effetto 
  205.             irreversibile; aggiunto il metodo AboutBox; risolto il problema 
  206.             che sorgeva quando Value corrispondeva a Min (veniva visualizzata 
  207.             comunque una piccola progressione nella PictureBox);
  208.            [Versione non distribuita]
  209.  ╖ 1.1.2 : Aggiunta la possibilitα di visualizzare un'immagine di sfondo nella
  210.             ProgressBar (con la possibilitα di applicare vari effetti alla
  211.             barra di progressione invece del semplice colore impostato; Aggiunta
  212.             la proprietα OldDrawMode per un restore del DrawMode iniziale della
  213.             PictureBox; risolto il problema delle proprietα BackColor, ForeColor, 
  214.             ProgressColor che non si potevano settare per un errore interno;
  215.            [Versione non distribuita]
  216.  ╖ 1.1.3 : Aggiunte le proprietα TextBefore, TextAfter e TextMiddle;
  217.            [Versione distribuita]
  218.