vb@rchiv
VB Classic
VB.NET
ADO.NET
VBA
C#
NEU! sevCoolbar 3.0 - Professionelle Toolbars im modernen Design!  
 vb@rchiv Quick-Search: Suche startenErweiterte Suche starten   Impressum  | Datenschutz  | vb@rchiv CD Vol.6  | Shop Copyright ©2000-2024
 
zurück

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

VB & Datenbanken
Re: Endlos- Textbox, alle Werte ausgeben 
Autor: Annabelle
Datum: 10.12.04 13:04

Das ist diese Clipboards Funktion die ich benutze.

Option Compare Database
Option Explicit

Declare Function OpenClipboard Lib "user32" (ByVal hWnd As Long) As Long
Declare Function CloseClipboard Lib "user32" () As Long
Declare Function GetClipboardData Lib "user32" (ByVal wFormat As Long) As Long
Declare Function SetClipboardData Lib "user32" (ByVal wFormat As Long, ByVal hMem As Long) As Long
Declare Function EmptyClipboard Lib "user32" () As Long
Declare Function GlobalAlloc Lib "kernel32" (ByVal wFlags&, ByVal dwBytes As Long) As Long
Declare Function GlobalLock Lib "kernel32" (ByVal hMem As Long) As Long
Declare Function GlobalUnlock Lib "kernel32" (ByVal hMem As Long) As Long
Declare Function GlobalSize Lib "kernel32" (ByVal hMem As Long) As Long
Declare Function lstrcpy Lib "kernel32" (ByVal lpString1 As Any, ByVal lpString2 As Any) As Long
Declare Sub keybd_event Lib "user32" (ByVal bVk As Byte, ByVal _
bScan As Byte, ByVal dwFlags As Long, ByVal dwExtraInfo As Long)

Public Const VK_SNAPSHOT = &H2C

Type RECT_Type
Left As Long
Top As Long
Right As Long
Bottom As Long
End Type

Declare Function GetActiveWindow Lib "user32" () As Long
Declare Function GetDesktopWindow Lib "user32" () As Long
Declare Sub GetWindowRect Lib "user32" (ByVal hWnd As Long, lpRect As RECT_Type)
Declare Function GetDC Lib "user32" (ByVal hWnd As Long) As Long
Declare Function CreateCompatibleDC Lib "gdi32" (ByVal hdc As Long) As Long
Declare Function CreateCompatibleBitmap Lib "gdi32" _
(ByVal hdc As Long, ByVal nWidth As Long, ByVal nHeight As Long) As Long
Declare Function SelectObject Lib "gdi32" (ByVal hdc As Long, ByVal hObject As Long) As Long
Declare Function BitBlt Lib "gdi32" (ByVal hDestDC As Long, ByVal X As Long, ByVal Y As Long, ByVal nWidth As Long, _
ByVal nHeight As Long, ByVal hSrcDC As Long, ByVal XSrc As Long, ByVal YSrc As Long, ByVal dwRop As Long) As Long
Declare Function ReleaseDC Lib "user32" (ByVal hWnd As Long, ByVal hdc As Long) As Long
Declare Function DeleteDC Lib "gdi32" (ByVal hdc As Long) As Long

Public Const GHND = &H42
Public Const CF_TEXT = 1
Public Const MAXSIZE = 4096
Global Const SRCCOPY = &HCC0020
Global Const CF_BITMAP = 2
Function ClipBoard_GetData()

Dim hClipMemory As Long
Dim lpClipMemory As Long
Dim MyString As String
Dim retval As Long
If OpenClipboard(0&) = 0 Then
MsgBox "Cannot open Clipboard. Another app. may have it open"
Exit Function
End If
hClipMemory = GetClipboardData(CF_TEXT)
If IsNull(hClipMemory) Then
MsgBox "Could not allocate memory"
GoTo OutOfHere
End If
lpClipMemory = GlobalLock(hClipMemory)
If Not IsNull(lpClipMemory) Then
MyString = Space$(MAXSIZE)
retval = lstrcpy(MyString, lpClipMemory)
retval = GlobalUn
Lock (hClipMemory)
MyString = Mid(MyString, 1, InStr(1, MyString, Chr$(0), 0) - 1)
Else
MsgBox "Could not lock memory to copy string from."
End If
OutOfHere:
retval = CloseClipboard()
ClipBoard_GetData = MyString
End Function
Function ClipBoard_SetData(MyString As String)

Dim hGlobalMemory As Long, lpGlobalMemory As Long
Dim hClipMemory As Long, X As Long
hGlobalMemory = GlobalAlloc(GHND, Len(MyString) + 1)
lpGlobalMemory = GlobalLock(hGlobalMemory)
lpGlobalMemory = lstrcpy(lpGlobalMemory, MyString)
If GlobalUnlock(hGlobalMemory) <> 0 Then
MsgBox "Could not unlock memory location. Copy aborted."
GoTo OutOfHere2
End If
If OpenClipboard(0&) = 0 Then
MsgBox "Could not open the Clipboard. Copy aborted."
Exit Function
End If
X = EmptyClipboard()
hClipMemory = SetClipboardData(CF_TEXT, hGlobalMemory)

OutOfHere2:
If CloseClipboard() = 0 Then
MsgBox "Could not close Clipboard."
End If
End Function

Function ScreenDump()

Dim AccessHwnd As Long, DeskHwnd As Long
Dim hdc As Long
Dim hdcMem As Long
Dim Rect As RECT_Type
Dim junk As Long
Dim fwidth As Long, fheight As Long
Dim hBitmap As Long
DoCmd.Hourglass True
DeskHwnd = GetDesktopWindow()
AccessHwnd = GetActiveWindow()
Call GetWindowRect(AccessHwnd, Rect)
fwidth = Rect.Right - Rect.Left
fheight = Rect.Bottom - Rect.Top
hdc = GetDC(DeskHwnd)
hdcMem = CreateCompatibleDC(hdc)
hBitmap = CreateCompatibleBitmap(hdc, fwidth, fheight)
If hBitmap <> 0 Then
junk = SelectObject(hdcMem, hBitmap)
junk = BitBlt(hdcMem, 0, 0, fwidth, fheight, hdc, Rect.Left, Rect.Top, SRCCOPY)
junk = OpenClipboard(DeskHwnd)
junk = EmptyClipboard()
junk = SetClipboardData(CF_BITMAP, hBitmap)
junk = CloseClipboard()
End If
junk = DeleteDC(hdcMem)
junk = ReleaseDC(DeskHwnd, hdc)
DoCmd.Hourglass False
End Function
Function PrtScn(Alles As Boolean)

If Not Alles Then
keybd_event VK_SNAPSHOT, 0, 0, 0
'bScan einfach auf 1:
Else: keybd_event VK_SNAPSHOT, 1, 0, 0
End If
End Function


Function ClipBoard_Clear()
Call OpenClipboard(0&)
Call EmptyClipboard
Call CloseClipboard
End Function

t?tet keine v?gel, wir v?geln auch keine toten!

alle Nachrichten anzeigenGesamtübersicht  |  Zum Thema  |  Suchen

 ThemaViews  AutorDatum
Endlos- Textbox, alle Werte ausgeben4.217Annabelle08.12.04 11:50
Re: Endlos- Textbox, alle Werte ausgeben3.048Prian081508.12.04 12:56
Re: Endlos- Textbox, alle Werte ausgeben3.170Annabelle08.12.04 13:10
Re: Endlos- Textbox, alle Werte ausgeben3.093Prian081508.12.04 13:31
Re: Endlos- Textbox, alle Werte ausgeben3.084Annabelle08.12.04 13:36
Re: Endlos- Textbox, alle Werte ausgeben3.134Prian081508.12.04 13:48
Re: Endlos- Textbox, alle Werte ausgeben3.054Annabelle08.12.04 13:56
Re: Endlos- Textbox, alle Werte ausgeben3.011Prian081508.12.04 14:28
Re: Endlos- Textbox, alle Werte ausgeben2.983Annabelle08.12.04 14:42
Re: Endlos- Textbox, alle Werte ausgeben3.155Prian081508.12.04 13:59
Re: Endlos- Textbox, alle Werte ausgeben3.012Annabelle08.12.04 14:09
Re: Endlos- Textbox, alle Werte ausgeben2.978Prian081508.12.04 14:42
Re: Endlos- Textbox, alle Werte ausgeben3.036Annabelle08.12.04 14:52
Re: Endlos- Textbox, alle Werte ausgeben3.095Prian081508.12.04 15:07
Re: Endlos- Textbox, alle Werte ausgeben3.085Annabelle08.12.04 13:41
Re: Endlos- Textbox, alle Werte ausgeben3.049Annabelle09.12.04 12:48
Re: Endlos- Textbox, alle Werte ausgeben2.993Prian081509.12.04 13:51
Re: Endlos- Textbox, alle Werte ausgeben3.073Annabelle09.12.04 14:11
Re: Endlos- Textbox, alle Werte ausgeben3.055Prian081509.12.04 15:08
Re: Endlos- Textbox, alle Werte ausgeben3.020Annabelle10.12.04 08:10
Re: Endlos- Textbox, alle Werte ausgeben3.054Annabelle10.12.04 08:53
Re: Endlos- Textbox, alle Werte ausgeben3.054Prian081510.12.04 09:14
Re: Endlos- Textbox, alle Werte ausgeben3.031Annabelle10.12.04 09:32
Re: Endlos- Textbox, alle Werte ausgeben2.980Annabelle10.12.04 09:36
Re: Endlos- Textbox, alle Werte ausgeben2.915Prian081510.12.04 10:06
Re: Endlos- Textbox, alle Werte ausgeben3.003Annabelle10.12.04 10:34
Re: Endlos- Textbox, alle Werte ausgeben2.922Prian081510.12.04 11:14
Re: Endlos- Textbox, alle Werte ausgeben2.993Annabelle10.12.04 11:18
Re: Endlos- Textbox, alle Werte ausgeben3.034Prian081510.12.04 11:42
Re: Endlos- Textbox, alle Werte ausgeben3.029Annabelle10.12.04 11:49
Re: Endlos- Textbox, alle Werte ausgeben3.073Annabelle10.12.04 11:27
Re: Endlos- Textbox, alle Werte ausgeben3.070Prian081510.12.04 12:01
Re: Endlos- Textbox, alle Werte ausgeben2.951Annabelle10.12.04 12:10
Re: Endlos- Textbox, alle Werte ausgeben3.010Prian081510.12.04 12:50
Re: Endlos- Textbox, alle Werte ausgeben3.082Annabelle10.12.04 13:04
Re: Endlos- Textbox, alle Werte ausgeben2.918Prian081510.12.04 13:24
Re: Endlos- Textbox, alle Werte ausgeben2.966Annabelle10.12.04 13:40
Re: Endlos- Textbox, alle Werte ausgeben2.977Annabelle10.12.04 12:15
Re: Endlos- Textbox, alle Werte ausgeben3.008Prian081510.12.04 12:56
Re: Endlos- Textbox, alle Werte ausgeben3.016Annabelle10.12.04 13:10
Re: Endlos- Textbox, alle Werte ausgeben2.959Prian081510.12.04 13:36
Re: Endlos- Textbox, alle Werte ausgeben2.957Annabelle10.12.04 13:43
Re: Endlos- Textbox, alle Werte ausgeben3.019Annabelle10.12.04 13:47
Re: Endlos- Textbox, alle Werte ausgeben2.978Prian081513.12.04 09:05
Re: Endlos- Textbox, alle Werte ausgeben2.974Annabelle13.12.04 09:16
Re: Endlos- Textbox, alle Werte ausgeben2.919Prian081513.12.04 11:13
GESCHAFFT!!!2.995Annabelle13.12.04 09:51
Re: GESCHAFFT!!!2.999Annabelle13.12.04 10:05
Re: GESCHAFFT!!!3.046Prian081513.12.04 11:09
If Anweisung2.973Annabelle13.12.04 11:14
Re: If Anweisung3.173Prian081513.12.04 11:32
Re: If Anweisung2.973Annabelle13.12.04 11:44
Re: If Anweisung2.969Prian081513.12.04 11:58
Re: GESCHAFFT!!!2.978Prian081513.12.04 10:55

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-2024 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