|
|
|
|
|
Dicas
|
|
Visual Basic (Windows)
|
|
|
Título da Dica: Mudando o Papel de Parede pelo VB
|
|
|
|
Postada em 14/8/2000 por Webmaster
webmaster@vbweb.com.br
'Coloque isto num modulo
Private Declare Function SystemParametersInfo Lib _ "User32" Alias "SystemParametersInfoA" _ (ByVal uAction As Long, ByVal uParam As _ Long, ByVal lpvParam As String, ByVal _ fuWinIni As Long) As Long
Public Const SPIF_UPDATEINIFILE As Long = &H1 Public Const SPI_SETDESKWALLPAPER As Long = 20 Public Const SPIF_SENDWININICHANGE As Long = &H2
Public Sub SetWallpaper(ByVal sArquivo As String) Dim RT as long RT = SystemParametersInfo(SPI_SETDESKWALLPAPER, _ 0&, sArquivo, SPIF_UPDATEINIFILE Or _ SPIF_SENDWININICHANGE) End Sub
'P/ chamar: Call SetWallpaper NomeDoArquivo 'ATENÇÃO!!! Passe o nome do arquivo com o caminho 'completo! 'Exemplo: Call SetWallpaper "C:\Windows\Desenho.BMP"
|
|
|
|
|