달력

10

« 2019/10 »

  •  
  •  
  • 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
  •  
  •  
웹페이지를 작성 할때 익스플로러 버전에 따라 다른 작업을 수행해야 할때 밑에 소스로 판단한다.
(IE6, IE7, IE8에서 팝업을 띄우면 제 각기 다른 크기로 열린다.)

if(window.navigator.userAgent.indexOf("MSIE 7") != -1)
ie_ver = 7;
else if(window.navigator.userAgent.indexOf("MSIE 8") != -1)
ie_ver = 8;
 

'Language > JavaScript' 카테고리의 다른 글

unicode 한글 변환 코드  (0) 2011.03.18
unicode 한글 변환  (0) 2011.03.18
Post 방식으로 팝업 창 열기  (0) 2010.05.07
JavaScript로 윈도우 7 확인하기  (0) 2010.05.06
Window 객체  (0) 2010.04.19
인터넷익스플로러 버전 보기  (0) 2010.04.08
Posted by 현자

댓글을 달아 주세요

2010.04.08 13:20

VisualBasic 폼의 투명도 설정하기 Language/VB2010.04.08 13:20

' 선언부
' ### 투명화 관련
Private Declare Function GetWindowLong Lib "user32" Alias "GetWindowLongA" (ByVal hWnd As Long, ByVal nIndex As Long) As Long
Private Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hWnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
Private Declare Function SetLayeredWindowAttributes Lib "user32" (ByVal hWnd As Long, ByVal crKey As Long, ByVal bAlpha As Byte, ByVal dwFlags As Long) As Long

' 사용시
MakeLayeredWnd Me.hWnd
SetLayeredWindowAttributes Me.hWnd, 0, 255 * (투명도), LWA_ALPHA
Posted by 현자

댓글을 달아 주세요

2010.04.08 12:42

VisualBasic 폼을 원으로 만들기 Language/VB2010.04.08 12:42

' 선언부

' ### 폼 원형으로 설정
Private Declare Function CreateEllipticRgn Lib "gdi32.dll" ( _
    ByVal X1 As Long, _
    ByVal Y1 As Long, _
    ByVal X2 As Long, _
    ByVal Y2 As Long _
) As Long
Private Declare Function SetWindowRgn Lib "user32.dll" ( _
    ByVal hWnd As Long, _
    ByVal hRgn As Long, _
    ByVal bRedraw As Boolean _
) As Long
Private Declare Function DeleteObject Lib "gdi32.dll" ( _
    ByVal hObject As Long _
) As Long

' 사용시

' ### 폼을 둥글게 설정한다.
Dim hRgn As Long
hRgn = CreateEllipticRgn(0, 0, ScaleX(Me.Width, vbTwips, vbPixels), ScaleY(Me.Height, vbTwips, vbPixels))
SetWindowRgn hWnd, hRgn, False
DeleteObject hRgn
Posted by 현자

댓글을 달아 주세요

' 선언부

' ### 커서/아이콘 관련
Private Declare Function GetIconInfo Lib "user32.dll" (ByVal hIcon As Long, ByRef piconinfo As ICONINFO) As Long
Private Declare Function GetCursorInfo Lib "user32.dll" (ByRef pci As CURSORINFO) As Long
Private Declare Function DrawIconEx Lib "user32.dll" ( _
    ByVal hdc As Long, _
    ByVal xLeft As Long, _
    ByVal yTop As Long, _
    ByVal hIcon As Long, _
    ByVal cxWidth As Long, _
    ByVal cyWidth As Long, _
    ByVal istepIfAniCur As Long, _
    ByVal hbrFlickerFreeDraw As Long, _
    ByVal diFlags As Long _
) As Long

'사용 시

Dim ci As CURSORINFO, ii As ICONINFO, pt As POINTAPI, rc As RECT, rcForm As RECT, rcIntersect As RECT, cx As Long, cy As Long

ci.cbSize = Len(ci)
GetCursorInfo ci ' ### 마우스 커서 정보를 얻는다.
GetIconInfo ci.hCursor, ii ' ### 마우스 커서의 아이콘 정보를 얻는다.
pt = ci.ptScreenPos
Posted by 현자

댓글을 달아 주세요