2011-10-17 3 views
0

저는 Visual Basic Express 2010에서 작은 프로그램을 만들고 있는데, 그 중 일부는 지연된 스크린 샷을 찍는 것입니다.숫자/그래픽을 화면에 직접 그려야합니까?

주요 코드가 작동하고 있는데 Visual Basic에서 System.Threading.Thread.CurrentThread.Sleep (5000)으로 스크린 샷을 지연 시키지만 내가 찾고있는 것은 화면에 직접 남은 시간 (초).

Windows의 디스플레이 등록 정보에서 설정에서 확인을 클릭하면 각 모니터에 큰 숫자가 표시됩니다.

스크린 샷을 찍을 때까지 숫자가 세어지면서 스크린 샷을 위해 필요한 응용 프로그램을 얻으려는 사용자에게 충분한 알림을 제공하면서 다시 작성하려고합니다.

가능합니까? 아니면 많은 코딩 작업을 수행 할 것입니까? 당신이

답변

1

을 제공 할 수있는 모든 도움을

많은 감사는 FormLabel 컨트롤을 만들고 다음을가 투명하게 같은 것을 사용

Me.TransparencyKey = Color.Gray ' or any other color. 
Me.BackColor = TransparencyKey 
Me.FormBorderStyle = FormBorderStyle.None 

이런 식으로 뭔가를 만들 것입니다 :

Screenshot


마우스로 창을 투명하게하려면 PInvoke를 GetWindowLongSetWindowLong :

당신의 Form_Load() 추가 다음에 그 다음
<DllImport("user32.dll", SetLastError:=True)> _ 
Private Shared Function GetWindowLong(_ 
ByVal hWnd As IntPtr, _ 
ByVal nIndex As Integer) As Integer 
End Function 

<DllImport("user32.dll")> _ 
Private Shared Function SetWindowLong(_ 
ByVal hWnd As IntPtr, _ 
ByVal nIndex As Integer, _ 
ByVal dwNewLong As IntPtr) As Integer 
End Function 

:

Dim hwnd As IntPtr = Me.Handle 
Dim extendedStyle As Integer = GetWindowLong(hwnd, GWL_EXSTYLE) 
SetWindowLong(hwnd, GWL_EXSTYLE, extendedStyle Or WS_EX_TRANSPARENT) 

상수 :

Const WS_EX_TRANSPARENT As Integer = &H20 
Const GWL_EXSTYLE As Integer = -20 
+0

것 사용자가 양식 아래에있는 응용 프로그램을 이동할 수있게합니까? 또는 양식에 적극적으로 초점을 맞추겠습니까? – JordanW

+1

Aero가 활성화되어있을 때 양식 아래의 창 이동이 작동하지 않습니다. –

관련 문제