vb@rchiv
VB Classic
VB.NET
ADO.NET
VBA
C#
Blitzschnelles Erstellen von grafischen Diagrammen!  
 vb@rchiv Quick-Search: Suche startenErweiterte Suche starten   Impressum  | Datenschutz  | vb@rchiv CD Vol.6  | Shop Copyright ©2000-2025
 
zurück

 Sie sind aktuell nicht angemeldet.Funktionen: Einloggen  |  Neu registrieren  |  Suchen

VB.NET - Ein- und Umsteiger
Re: Manipulationen Verhindern! 
Autor: Micka
Datum: 03.02.11 23:02

Hallo Sascha

Habe ich versucht klappt nich.
Hier mal der ganze Code und nun sag mal wo soll ich das > Dim WithEvents NoExplorer As New clsShellWindow < Einfügen?

Danke dir.

Achja hier die Fehlermeldung:
1. Fehler Der Typ "clsShellWindow" ist nicht definiert.


Public Class Form1
 
    Inherits System.Windows.Forms.Form
 
 
 " Vom Windows Form Designer generierter Code "
 
 
    Private Sub PictureBox5_Click(ByVal sender As System.Object, ByVal e As _
      System.EventArgs)
        'Power off Butten'
    End Sub
 
    Private Sub PictureBox6_Click(ByVal sender As System.Object, ByVal e As _
      System.EventArgs)
        'Log out Butten'
    End Sub
 
    Private Sub PictureBox7_Click(ByVal sender As System.Object, ByVal e As _
      System.EventArgs)
        'Neustarten Butten'
    End Sub
 
 
    Protected Overrides ReadOnly Property createparams() As CreateParams
        Get
            Dim myparam As CreateParams = MyBase.CreateParams
            myparam.ClassStyle = myparam.ClassStyle Or &H200
            Return myparam
        End Get
    End Property
    ' benötigte API-Deklarationen
    Private Declare Function GetAsyncKeyState Lib "user32" ( _
      ByVal vKey As Integer) As Short
    Private Declare Sub keybd_event Lib "user32" ( _
      ByVal bVk As Byte, _
      ByVal bScan As Byte, _
      ByVal dwFlags As Integer, _
      ByVal dwExtraInfo As Integer)
 
    Const KEYEVENTF_KEYUP = &H2
    Const VK_ESCAPE = &H1B
    Const VK_LWIN = &H5B
    Const VK_RWIN = &H5C
 
 
    Private Sub Form1_Load(ByVal sender As System.Object, _
      ByVal e As System.EventArgs) Handles MyBase.Load
 
        ' Timer-Intervall einstellen und starten
        Timer1.Interval = 10
        Timer1.Start()
    End Sub
 
    Private Sub Form1_FormClosing(ByVal sender As Object, _
          ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles _
          Me.FormClosing
    End Sub
    Private Sub CreateMyStatusBar()
        ' Create a StatusBar control.
        Dim statusBar1 As New StatusBar()
 
        ' Create two StatusBarPanel objects to display in the StatusBar.
        Dim panel4 As New StatusBarPanel()
        Dim panel5 As New StatusBarPanel()
 
        ' Display the first panel with a sunken border style.
        panel4.BorderStyle = StatusBarPanelBorderStyle.Sunken
 
        ' Initialize the text of the panel.
        panel4.Text = "Ready..."
 
        ' Set the AutoSize property to use all remaining space on the StatusBar.
        panel4.AutoSize = StatusBarPanelAutoSize.Spring
 
        ' Display the second panel with a raised border style.
        panel5.BorderStyle = StatusBarPanelBorderStyle.Raised
 
        ' Create ToolTip text that displays the time the application was 
        ' started.
        panel5.ToolTipText = "Started: " & _
          System.DateTime.Now.ToShortTimeString()
 
        ' Set the text of the panel to the current date.
        panel5.Text = System.DateTime.Today.ToLongDateString()
 
        ' Set the AutoSize property to size the panel to the size of the 
        ' contents.
        panel5.AutoSize = StatusBarPanelAutoSize.Contents
 
        ' Display panels in the StatusBar control.
        statusBar1.ShowPanels = True
 
        ' Add both panels to the StatusBarPanelCollection of the StatusBar.			
        statusBar1.Panels.Add(panel4)
        statusBar1.Panels.Add(panel5)
 
        ' Add the StatusBar to the form.
        Me.Controls.Add(statusBar1)
 
        ' Timer stoppen
        Timer1.Stop()
    End Sub
 
    Private Sub Timer1_Tick(ByVal sender As Object, _
      ByVal e As System.EventArgs) Handles Timer1.Tick
 
        If CBool(GetAsyncKeyState(VK_LWIN) And 1) Or _
          CBool(GetAsyncKeyState(VK_RWIN) And 1) Then
 
            ' Wenn Windowstaste gedrückt, Escapetaste drücken...
            Call keybd_event(VK_ESCAPE, 0, 0, 0)
 
            ' ... und wieder loslassen
            Call keybd_event(VK_ESCAPE, 0, KEYEVENTF_KEYUP, 0)
        End If
 
    End Sub
 
 
 
 
End Class
0

Beitrag wurde zuletzt am 03.02.11 um 23:04:58 editiert.
alle Nachrichten anzeigenGesamtübersicht  |  Zum Thema  |  Suchen

 ThemaViews  AutorDatum
Manipulationen Verhindern!3.589Micka03.02.11 13:11
Re: Manipulationen Verhindern!2.060Manfred X03.02.11 16:04
Re: Manipulationen Verhindern!2.017Micka03.02.11 17:00
Re: Manipulationen Verhindern!2.022svss03.02.11 17:11
Re: Manipulationen Verhindern!2.038Micka03.02.11 18:03
Re: Manipulationen Verhindern!1.989Manfred X03.02.11 19:18
Re: Manipulationen Verhindern!2.104Micka03.02.11 19:40
Re: Manipulationen Verhindern!2.070Manfred X03.02.11 20:04
Re: Manipulationen Verhindern!2.069ModeratorDaveS03.02.11 20:14
Re: Manipulationen Verhindern!2.052Micka03.02.11 22:27
Re: Manipulationen Verhindern!2.158VBExpress03.02.11 20:04
Re: Manipulationen Verhindern!2.121Micka03.02.11 22:21
Re: Manipulationen Verhindern!2.034VBExpress03.02.11 22:32
Re: Manipulationen Verhindern!2.217Micka03.02.11 23:02
Re: Manipulationen Verhindern!2.133VBExpress03.02.11 23:14
Re: Manipulationen Verhindern!2.055Micka04.02.11 13:39
Re: Manipulationen Verhindern!2.064VBExpress04.02.11 15:12
Re: Manipulationen Verhindern!2.118Micka04.02.11 18:58
Re: Manipulationen Verhindern!1.941VBExpress04.02.11 19:25
Re: Manipulationen Verhindern!2.019Micka04.02.11 21:05
Re: Manipulationen Verhindern!2.101VBExpress04.02.11 21:17
Re: Manipulationen Verhindern!2.021Micka04.02.11 21:27
Re: Manipulationen Verhindern!2.014VBExpress04.02.11 21:35
Re: Manipulationen Verhindern!1.925Micka04.02.11 21:42
Re: Manipulationen Verhindern!1.966VBExpress04.02.11 21:44
Re: Manipulationen Verhindern!1.982Micka04.02.11 21:46
Re: Manipulationen Verhindern!2.117VBExpress04.02.11 21:48
Re: Manipulationen Verhindern!1.985Micka04.02.11 21:48
Re: Manipulationen Verhindern!1.934VBExpress04.02.11 21:52

Sie sind nicht angemeldet!
Um auf diesen Beitrag zu antworten oder neue Beiträge schreiben zu können, müssen Sie sich zunächst anmelden.

Einloggen  |  Neu registrieren

Funktionen:  Zum Thema  |  GesamtübersichtSuchen 

nach obenzurück
 
   

Copyright ©2000-2025 vb@rchiv Dieter Otter
Alle Rechte vorbehalten.
Microsoft, Windows und Visual Basic sind entweder eingetragene Marken oder Marken der Microsoft Corporation in den USA und/oder anderen Ländern. Weitere auf dieser Homepage aufgeführten Produkt- und Firmennamen können geschützte Marken ihrer jeweiligen Inhaber sein.

Diese Seiten wurden optimiert für eine Bildschirmauflösung von mind. 1280x1024 Pixel