Navigacija
Lista poslednjih: 16, 32, 64, 128 poruka.

Ikone na Formi?!?

[es] :: Visual Basic 6 :: Ikone na Formi?!?

[ Pregleda: 3009 | Odgovora: 2 ] > FB > Twit

Postavi temu Odgovori

Autor

Pretraga teme: Traži
Markiranje Štampanje RSS

icobh
Igor Pejašinović
Network Admin
Navigo SC d.o.o.
Banja Luka

Član broj: 18738
Poruke: 1319
*.teol.net

Sajt: www.nsc.ba


+4 Profil

icon Ikone na Formi?!?05.04.2004. u 20:17 - pre 243 meseci
Je li moguće da postavim Windows XP ikone na formu? i još jedno pitanje! kako očitati ikonu iz Shell32.dll i postaviti je na formu?
I ♥ ♀

Ovaj post je zlata vrijedan!
 
Odgovor na temu

mladenovicz
Zeljko Mladenovic
Xoran Technologies, Inc., Ann Arbor, MI,
USA / Software Engineer
Ann Arbor, MI, USA

Član broj: 6598
Poruke: 2065
62.108.109.*

Jabber: mladenovicz@elitesecurity.org
ICQ: 95144142
Sajt: yubc.net/~mz


Profil

icon Re: Ikone na Formi?!?06.04.2004. u 08:53 - pre 243 meseci
Extract Icon

Code:

'This project needs a PictureBox, called 'Picture1'

'In general section
Private Declare Function DrawIcon Lib "user32" _
(ByVal hdc As Long, ByVal x As Long, ByVal y As Long, ByVal hIcon As Long) As Long
Private Declare Function ExtractIcon Lib "shell32.dll" Alias "ExtractIconA" _
(ByVal hInst As Long, ByVal lpszExeFileName As String, ByVal nIconIndex As Long) As Long
Private Declare Function GetWindowsDirectory Lib "kernel32" Alias _
"GetWindowsDirectoryA" (ByVal lpBuffer As String, ByVal nSize As Long) As Long


Private Sub Form_Load()
    Dim Path As String, strSave As String
    'Create a buffer string
    strSave = String(200, Chr$(0))
    'Get the windows directory and append '\REGEdit.exe' to it
    Path = Left$(strSave, GetWindowsDirectory(strSave, Len(strSave))) + "\REGEdit.exe"
    'No pictures
    Picture1.Picture = LoadPicture()
    'Set graphicmode to 'persistent
    Picture1.AutoRedraw = True
    'Extract the icon from REGEdit
    return1& = ExtractIcon(Me.hWnd, Path, 2)
    'Draw the icon on the form
    return2& = DrawIcon(Picture1.hdc, 0, 0, return1&)
End Sub

 
Odgovor na temu

icobh
Igor Pejašinović
Network Admin
Navigo SC d.o.o.
Banja Luka

Član broj: 18738
Poruke: 1319
*.teol.net

Sajt: www.nsc.ba


+4 Profil

icon Re: Ikone na Formi?!?06.04.2004. u 17:40 - pre 243 meseci
Zeljko hvala ti! Radi. Mogu učitavati sve ikone pa čak i 32 bitne.
I ♥ ♀

Ovaj post je zlata vrijedan!
 
Odgovor na temu

[es] :: Visual Basic 6 :: Ikone na Formi?!?

[ Pregleda: 3009 | Odgovora: 2 ] > FB > Twit

Postavi temu Odgovori

Navigacija
Lista poslednjih: 16, 32, 64, 128 poruka.