Newsgroup: it.comp.lang.visual-basic
Titolo: [API] Disegnare un rettangolo

Qual'e l'API che mi permette di disegnare un rettangolo in un form,
possibilmente sopra altri controlli già presenti? Dai che forse ho trovato
la soluzione per non far vedere il bordo in una listbox. ;)
Oppure...
Si possono utilizzare i componenti "Microsoft Forms 2.0 Object Library" ???
CiaoZ
SebaMix
--
Sebastiano Pallaro
--
Sito lavoro : 
http://www.infotrade.it
Sito personale : 
http://sebamix.supereva.it
Sito Comune del NG it.comp.lang.visual-basic : 
http://www.it-lang-vb.net
Per scrivermi : togliete ".ot" dall'indirizzo di posta elettronica
--


Vuoi dire che disegni un rettangolo del colore dello sfondo della finestra sul
bordo della ListBox, per nasconderlo? O, visto che con un'immagine di sfondo la
cosa si vedrebbe, del colore dello sfondo della ListBox?
Bye by Massimo 8-]

Sě. Sarebbe tosto, visto che quel bordo nero mi da un fastidio che non ti
dico...
Ma i "Microsoft Forms 2.0 Object Library" si possono usare?
CiaoZ
SebaMix


se il tuo obbiettivo è l'eliminazione del bordo da una listbox (o da una
qualunque finestra) puoi usare il codice seguente
Option Explicit
Private Declare Function GetWindowLong _
    Lib "user32" Alias "GetWindowLongA" _
    (ByVal hWnd As Long, ByVal nIndex As Long) As Long
Private Declare Function SetWindowLong _
    Lib "user32" Alias "SetWindowLongA" _
    (ByVal hWnd As Long, ByVal nIndex As Long, _
     ByVal dwNewLong As Long) As Long
Private Const GWL_STYLE = (-16)
Private Const WS_BORDER = &H800000
Private Sub Form_Load()
    Dim dwStyle As Long
    dwStyle = GetWindowLong(List1.hWnd, GWL_STYLE)
    dwStyle = dwStyle And (Not WS_BORDER)
    SetWindowLong List1.hWnd, GWL_STYLE, dwStyle
End Sub
ciao

Grazie! Proprio quello che volevo!
CiaoZ
SebaMix

 Ma i "Microsoft Forms 2.0 Object Library" si possono usare?
http://support.microsoft.com/support/kb/articles/Q224/3/05.ASP
ho sostituito "Microsoft Forms 2" con MF2.
ciao, a.
Q224305 - INFO: Usage and Redistribution of FM20.DLL
The information in this article applies to:
Microsoft Office XP
Microsoft Office 2000 Developer
Microsoft Office 2000
Microsoft Office 97 for Windows
Microsoft PowerPoint 2000
SUMMARY
This article describes the usage and redistribution of the Microsoft
Forms 2.0 Controls, Fm20.dll. Developers who build custom
applications using these controls need to be aware of certain
restrictions.
MORE INFORMATION
If you use any of the following components in your custom
application, then your users must have the Fm20.dll on their system
in order for the following controls to load and function:
MF2.0 CheckBox
MF2.0 ComboBox
MF2.0 CommandButton
MF2.0 Form
MF2.0 Frame
MF2.0 HTML SUBMIT
MF2.0 HTML Hidden
MF2.0 HTML IMAGE
MF2.0 HTML OPTION
MF2.0 HTML Password
MF2.0 HTML RESET
MF2.0 HTML SELECT
MF2.0 HTML CHECKBOX
MF2.0 HTML TEXT
MF2.0 HTML TextAREA
MF2.0 Image
MF2.0 Label
MF2.0 ListBox
MF2.0 MultiPage
MF2.0 OptionButton
MF2.0 ScrollBar
MF2.0 SpinButton
MF2.0 TabStrip
MF2.0 TextBox
MF2.0 ToggleButton
MF2.1 ControlPalette
MF2.1 ControlSelector
MF2.1 DataObject
MF2.1 Font
MF2.1 FontNew
MF2.1 FormPackage
MF2.1 Picture
MF2.1 SubForm95
MF2.1 Toolbox
The Fm20.dll is NOT redistributable. You must have an application
such as Microsoft Office 97 on the target system that installs
Fm20.dll as part of its setup. (Fm20.dll is included with the OSR2
and OSR2.5 releases of Windows 95.) You can also find this file on
the Visual Basic 5.0 CD under the \TOOLS\DataTool\Datatool\Msdesign
folder. This will be installed only if you run the setup for the
Visual Database Tools. In any case, you may not distribute the
Fm20.dll as part of your setup, even if you purchase the Microsoft
Office Developer Edition product.
As an alternative to having your end users install Microsoft Office,
you can have them freely download and install the Microsoft ActiveX
Control Pad, which also installs the Fm20.dll. For more information,
see the following Microsoft Developer Network (MSDN) Web site:
 Microsoft ActiveX Control Pad
 
http://msdn.microsoft.com/workshop/misc/cpad/
NOTE: The use of these Microsoft Forms components in your own
compiled applications, such as those written with Microsoft Visual
C++ and Microsoft Visual Basic, is not recommended or supported.
These controls were designed and tested to work exclusively within
Microsoft Office and its Visual Basic for Applications environment.
REFERENCES
For additional information, click the article numbers below to view
the articles in the Microsoft Knowledge Base:
Q169813 OFF97: Not All Files Can Be Distributed Using Setup Wizard
Q163535 ODE97: List of Files You Can Redistribute with ODE
Run-Time Application
Q243794 INFO: Where to Find Information on the Visual Basic for
Applications (VBA) SDK
Q241245 PRB: 'Error 7 - Out of Memory' Error Message From Visual
Basic Application Using FM20.DLL
For more information on licensing Microsoft Visual Basic for
Applications (VBA), which includes Fm20.dll, see the following MSDN
Web site:
http://msdn.microsoft.com/vba/
Additional query words:
Keywords : kbActiveX kbCtrl kbGrpDSO kbOffice2000
Issue type : kbinfo
Technology :
Last Reviewed: April 13, 2001
© 2001 Microsoft Corporation. All rights reserved. Terms of Use.