Précédent   Forum du club des développeurs et IT Pro > Autres langages > Général Visual Basic 6 et VBScript > VBScript
VBScript Le forum d'entraide sur VBScript. Avant de poster -> La FAQ VBScript
Partagez cette discussion sur d'autres réseaux sociaux : Viadeo Twitter Google Facebook Digg Delicious MySpace Yahoo
Réponse
 
Outils de la discussion
Publicité
'
Vieux 16/12/2012, 15h18   #1
djun1
Débutant
 
Homme
aucun
Inscription : avril 2012
Messages : 100
Détails du profil
Informations personnelles :
Sexe : Homme
Localisation : Canada

Informations professionnelles :
Activité : aucun
Secteur : Arts - Culture

Informations forums :
Inscription : avril 2012
Messages : 100
Points : -9
Points : -9
Par défaut Interdire le resize d'une page HTA

Bonjour,

J'ai cherché sur google comment interdire le resize d'une page à l'aide de vbscript ou de hta. Est-ce qu'un quelqu'un sait comment interdire le resize d'une page hta?
djun1 est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 16/12/2012, 17h37   #2
ProgElecT
Rédacteur/Modérateur
 
Avatar de ProgElecT
 
Homme Francis MILLET
Inscription : décembre 2004
Messages : 3 198
Détails du profil
Informations personnelles :
Nom : Homme Francis MILLET
Âge : 57
Localisation : France, Haute Savoie (Rhône Alpes)

Informations professionnelles :
Secteur : Communication - Médias

Informations forums :
Inscription : décembre 2004
Messages : 3 198
Points : 5 110
Points : 5 110
Envoyer un message via MSN à ProgElecT
Salut
Code :
1
2
3
4
<HTA:APPLICATION
 		MAXIMIZEBUTTON="no"
		SCROLL="no"
>
II. Le Tag HTA:APPLICATION
ProgElecT est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 16/12/2012, 18h04   #3
hackoofr
Expert Confirmé
 
Avatar de hackoofr
 
Homme Mehdi Tounisiano
Enseignant
Inscription : juin 2009
Messages : 1 626
Détails du profil
Informations personnelles :
Nom : Homme Mehdi Tounisiano
Âge : 38
Localisation : Tunisie

Informations professionnelles :
Activité : Enseignant

Informations forums :
Inscription : juin 2009
Messages : 1 626
Points : 3 681
Points : 3 681

Un exemple en HTA :
Code :
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
<html>
<head>
<title></title>
<HTA:APPLICATION 
    ID="CPU%-AutoRefresh"
    APPLICATIONNAME="Usage CPU en %"
    BORDER="dialog"
    BORDERSTYLE="complex"
    CONTEXTMENU="no"
    SYSMENU="no"
    MAXIMIZEBUTTON="no"
    SCROLL="no" 
    ICON="Verifier.exe"
>
</head>
<META HTTP-EQUIV="MSThemeCompatible" CONTENT="YES">
<SCRIPT LANGUAGE="VBScript">
    Sub Window_OnLoad
        CenterWindow 100,100
        Refresh 
        iTimerID = window.setInterval("Refresh", 1000)
    End Sub
 
   Sub CenterWindow(x,y)
        window.resizeTo x, y
        iLeft = window.screen.availWidth/2 - x/2
        itop = window.screen.availHeight/2 - y/2
        window.moveTo ileft, itop
    End Sub
    Sub Refresh
       strHTML = ""
       strComputer = "."
       Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
       Set colProcesses = objWMIService.ExecQuery("Select * from Win32_Processor")
 
       For Each objProcess in colProcesses
       Self.document.title = "Usage CPU "& objProcess.LoadPercentage & " %"
       If objProcess.LoadPercentage < 20 Then
           strHTML ="<center><b><font color='LightGreen' size='6'>"& objProcess.LoadPercentage & " %</font>"
       ElseIf objProcess.LoadPercentage < 70 Then
           strHTML ="<center><b><font color='Orange' size='6'>"& objProcess.LoadPercentage & " %</font>"
        Else
           strHTML ="<center><b><font color='Red' size='6'>"& objProcess.LoadPercentage & " %</font>"
           End if
       Next
       UsageCPU.InnerHTML = strHTML
    End Sub
 
Sub Fermer()
Question = MsgBox("Voulez-vous Fermer cette Application ?",VBYesNO+VbQuestion,"Fermeture de l'application")
If Question = VbYes Then
Window.close
Else
    Exit Sub
End If
End Sub
</SCRIPT>
<body Title="Double-cliquer ici pour fermer cette Application !" ondblclick="Fermer()" STYLE="font:14 pt arial; color:white;filter:progid:DXImageTransform.Microsoft.Gradient
(GradientType=1, StartColorStr='#000033', EndColorStr='#0000FF')"<span id = "UsageCPU"></span></body>
</html>
hackoofr est déconnecté   Envoyer un message privé Réponse avec citation 00
Réponse
Outils de la discussion

Navigation rapide


Fuseau horaire GMT +2. Il est actuellement 21h45.


 
 
 
 
Partenaires

Hébergement Web