반응형



#!/bin/bash
# Get external default GW settings
/sbin/ifconfig eth0 down
/sbin/ifconfig eth0 up
MYIP=$(ifconfig eth0 | grep 'inet addr' |tr -d [:]| tr -d [:alpha:] | awk {'print $1'})
/sbin/route add default gw $MYIP

 

반응형

'각종TIPs > LINUX' 카테고리의 다른 글

CENTOS 설치메뉴얼  (0) 2011.05.26
r8111드라이버  (0) 2011.05.23
삼바로 윈도우와 리눅스 공유  (0) 2010.03.11
TCPDUMP  (0) 2010.03.11
sed 에서 "Unterminated `s' command" 에러나올때  (0) 2010.03.11
반응형
Header에  이부분 추가 해야 제대로 컴파일된다!~


#ifdef __cplusplus
#define __STDC_CONSTANT_MACROS
#ifdef _STDINT_H
#undef _STDINT_H
#endif
# include <stdint.h>
#endif
반응형
반응형


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 GetWindowLong Lib "user32" Alias "GetWindowLongA" _
(ByVal hWnd As Long, ByVal nIndex 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
Private Const LWA_COLORKEY = &H1
Private Const LWA_ALPHA = &H2

Private Const GWL_EXSTYLE = (-20)
Private Const WS_EX_LAYERED = &H80000

Private Sub MakeWindowLayered(hWnd As Long)
    Dim ExStyles As Long
   
    ExStyles = GetWindowLong(hWnd, GWL_EXSTYLE)
   
    ExStyles = ExStyles Or WS_EX_LAYERED
   
    SetWindowLong hWnd, GWL_EXSTYLE, ExStyles
End Sub

Public Sub SetOpacity(hWnd As Long, Opacity As Byte)
    SetLayeredWindowAttributes hWnd, 0, Opacity, LWA_ALPHA
End Sub

Private Sub cmdStart_Click()
    'SetOpacit의 Opacity의 값의 범위: 0 ~ 255
    SetOpacity Me.hWnd, CByte(220)
End Sub

Private Sub Command1_Click()
    SetOpacity Me.hWnd, CByte(255)
End Sub

Private Sub Command2_Click()
End
End Sub

Private Sub Form_Load()
    MakeWindowLayered Me.hWnd
    SetOpacity Me.hWnd, 0
    cmdStart_Click
End Sub

Private Sub Form_Unload(Cancel As Integer)
Set frmMain = Nothing
End Sub

반응형

+ Recent posts