Information avec apparence xp

Description

c'est un programme qui me sert pour informer les membre de mon site de derniere nouvelle et mise a jour du site. J'ai utilisé un apparence XP pour ce programme.

A cause des 250 Ko il n'y a pas la source sur vbFrance
Mais elle sera bientot dispo sur mon site dans la partie Visual Basic.

Source / Exemple :


'une partie du code source
'------------------------------------------------------------------------------------
'------------------------------------------------------------------------------------

Private Declare Function SendMessage Lib "User32" Alias "SendMessageA" (ByVal hWnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long

Private Declare Sub ReleaseCapture Lib "User32" ()
Const WM_NCLBUTTONDOWN = &HA1
Const HTCAPTION = 2

Private Sub Form_Load()
Timer1.Interval = 1

Label1.Left = 70
Label1.Top = 120
Label2.Left = 105
Label2.Top = 155

Label1.Caption = "Connexion au serveur"
Label2.Caption = Label1.Caption

' Récup. le chemin du fichier
 LePath$ = App.Path
 LeFichier$ = "connexion.swf"
 If Right$(LePath$, 1) <> "\" Then LePath$ = LePath$ + "\"
 
 ' Vérifie que le fichier est là
 If Dir$(LePath$ + LeFichier$) <> "" Then
  
  ' Charge l'animation
  ShockwaveFlash1.Movie = LePath$ + LeFichier$
  ' Démarre le show!
  ShockwaveFlash1.Play
    Else
  ShockwaveFlash1.Visible = False
 End If
 

End Sub

Private Sub Image1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Dim ValRetourLng As Long
    If Button = 1 Then
        Call ReleaseCapture
        ValRetourLng = SendMessage(Form1.hWnd, WM_NCLBUTTONDOWN, HTCAPTION, 0&)
    End If
Image2.Picture = act1.Picture
Image3.Picture = act2.Picture
Image4.Picture = act3.Picture
End Sub

Private Sub Image13_Click()

End Sub

Private Sub Image2_Click()
Me.WindowState = 1

End Sub

Private Sub Image2_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Image2.Picture = ina1.Picture

Image3.Picture = act2.Picture
Image4.Picture = act3.Picture
End Sub

Private Sub Image3_Click()
MsgBox "non actif"

'If Me.Width = Screen.Width Then
'Me.Width = 11055
'Me.Height = 9045
'Me.Top = (Screen.Height / 2) - (Me.Height / 2)
'Me.Left = (Screen.Width / 2) - (Me.Width / 2)
'Timer1.Interval = 1
'Else
'Me.Width = Screen.Width
'Me.Height = Screen.Height - 430
'Me.Top = 0
'Me.Left = 0
'Timer1.Interval = 1
'End If

End Sub

Private Sub Image3_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Image3.Picture = ina2.Picture
Image2.Picture = act1.Picture

Image4.Picture = act3.Picture
End Sub

Private Sub Image4_Click()
End
End Sub

Private Sub Image4_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Image4.Picture = ina3.Picture
Image2.Picture = act1.Picture
Image3.Picture = act2.Picture

End Sub

Private Sub Image9_Click()

End Sub

Private Sub Timer1_Timer()
Image1.Width = Me.Width
Image1.Top = 0
Image1.Left = 0
Image2.Top = 70
Image3.Top = 70
Image4.Top = 70
Image2.Left = 70
Image3.Left = 70
Image4.Left = Me.Width - Image4.Width - 50
Image3.Left = Image4.Left - 50 - Image3.Width
Image2.Left = Image3.Left - 50 - Image2.Width
Image5.Top = Image1.Height
Image5.Left = 0
Image5.Height = Me.Height - Image1.Height
Image6.Top = Image1.Height
Image6.Left = Me.Width - Image6.Width
Image6.Height = Me.Height - Image1.Height
Image7.Width = Me.Width
Image7.Top = Me.Height - Image7.Height
Image7.Left = 0
Timer1.Interval = 0

End Sub

Private Sub Timer2_Timer()
 Form1.Show

 Timer2.Interval = 0
 Timer3.Interval = 1
 
End Sub

Private Sub Timer3_Timer()
If Dir(App.Path & "new.txt") <> vbNullString Then
Form1.Visible = True
Unload Me
End If
End Sub

Private Sub Timer4_Timer()
If IsConnected = True Then
Label3.Caption = "vous êtes connecté"
Else
Label3.Caption = "vous n'êtes pas connecté"
MsgBox "vous devez vous connecter a internet"
End
End If
End Sub

Conclusion :


enregistrer vous aussi.... a la NCHP (NeoCortexHomePage)
Url : www.neocortex.fr.st

Codes Sources

A voir également

Vous n'êtes pas encore membre ?

inscrivez-vous, c'est gratuit et ça prend moins d'une minute !

Les membres obtiennent plus de réponses que les utilisateurs anonymes.

Le fait d'être membre vous permet d'avoir un suivi détaillé de vos demandes et codes sources.

Le fait d'être membre vous permet d'avoir des options supplémentaires.