devflow.kr@:~#

Windows 7 (윈도우 7)에서 비주얼베이직 디자인 버벅, 렉

VB

Windows 7 (윈도우 7)에서 VB 컨트롤 디자인 버벅임에 대한 해결책입니다.

Program Files\Microsoft Visual Studio\VB98 으로 갑니다.


오른쪽. 속성을 누루시고.


'바탕 화면 구성 사용 안 함' 을 체크하시고 확인하시면됩니다.


보통 어플로케이션에서는 Aero기능때문에. 버벅임이 발생합니다.

그럴때 이와같이 호환성체크를 해주시면

됩니다.!


폴더 선택창 띄우기

VB


[일반 선언부]

Private Const BIF_RETURNONLYFSDIRS = 1
Private Const BIF_DONTGOBELOWDOMAIN = 2
Private Const MAX_PATH = 260

Private Declare Function SHBrowseForFolder Lib "shell32" (lpBI As BrowseInfo) As Long

Private Declare Function SHGetPathFromIDList Lib "shell32" (ByVal pidList As Long, ByVal lpBuffer As String) As Long

Private Declare Function lstrcat Lib "kernel32" Alias "lstrcatA" (ByVal lpString1 As String, ByVal lpString2 As String) As Long

Private Type BrowseInfo
   hwndOwner      As Long
   pIDLRoot       As Long
   pszDisplayName As Long
   lpszTitle      As Long
   ulFlags        As Long
   lpfnCallback   As Long
   lParam         As Long
   iImage         As Long
End Type

 


[함수]

Function ReciveFolder() As String

   Dim lpIDList As Long
   Dim sBuffer As String
   Dim szTitle As String
   Dim tBrowseInfo As BrowseInfo

   szTitle = "폴더를 선택하세요."
   With tBrowseInfo
      .hwndOwner = Me.hWnd
      .lpszTitle = lstrcat(szTitle, "")
      .ulFlags = BIF_RETURNONLYFSDIRS + BIF_DONTGOBELOWDOMAIN
   End With

   lpIDList = SHBrowseForFolder(tBrowseInfo)

   If (lpIDList) Then
      sBuffer = Space(MAX_PATH)
      SHGetPathFromIDList lpIDList, sBuffer
      sBuffer = Left(sBuffer, InStr(sBuffer, vbNullChar) - 1)
      ReciveFolder = sBuffer
   End If

End Function

티스토리 툴바