'VB'에 해당되는 글 5건
- 2020.04.15 :: [VB] 인터넷창 띄우기 (소스)
- 2020.04.15 :: [VB] 랜덤숫자을 출력해보자
- 2020.04.15 :: [VB] 다음 로그인 소스
- 2020.04.15 :: [VB] 스마일파일 로그인 소스
- 2020.04.15 :: [VB] 한글판 패치하기
먼저 폼에 커맨드버튼 1개, 텍스트 박스 1개를 준비한후,
프로젝트▶구성 요소로 들어간다음 잘 찾아보시면
Microsoft Internet controls 가 있습니다. 그것을 체크하신후,
확인을 누르면 도구 탭에 지구(?)가 등록되는 대요,
그걸 클릭하고 폼에 추가 해 줍니다.
커맨드버튼에 무엇을 입력하냐면
Private sub CommandButton1_click()
WebBrowser1.Navigate (Text1)
End sub 가 되겠죠.
그리고 Text1에 주소를 입력하고 커맨드 버튼을 누르면 웹 브라우저에 인터넷이 표시됩니다.
만약 뒤로, 앞으로, 홈으로, 새로고침 을 추가 하고 싶다면,
뒤로는
Private sub CommandButton1_click()
WebBrowser1.GoBack
End sub 이고
앞으로는
Private sub CommandButton1_click()
WebBrowser1.GoForward
End sub 이고
홈으로는
Private sub CommandButton1_click()
WebBrowser1.GoHome
End sub 이고
새로고침은
Private sub CommandButton1_click()
WebBrowser1.Refresh 가 되겠죠.
만약 웹브라우저에서 새로운 창을 추가하면,
Internet Explorer 로 새 창이 나옵니다.
만약 만든 브라우저로 새 창을 열고 싶을때는,
이 코드를 폼에 추가 하면 됩니다.
Private Sub WebBrowser1_NewWindow2(ppDisp As Object, Cancel As Boolean)
Dim frm As Form1
Set frm = New Form1
Set ppDisp = frm.WebBrowser1.Object
frm.Show
End Sud
'VB' 카테고리의 다른 글
[VB] 랜덤숫자을 출력해보자 (0) | 2020.04.15 |
---|---|
[VB] 다음 로그인 소스 (0) | 2020.04.15 |
[VB] 스마일파일 로그인 소스 (0) | 2020.04.15 |
[VB] 한글판 패치하기 (0) | 2020.04.15 |
Private Sub Form_Load()
Timer1.Enabled = True
Timer1.Interval = 1
End Sub
Private Sub Timer1_Timer()
Dim Notice As String
Notice = Int(Rnd * 100000) + 1
Form1.Caption = Notice
End Sub
'VB' 카테고리의 다른 글
[VB] 인터넷창 띄우기 (소스) (0) | 2020.04.15 |
---|---|
[VB] 다음 로그인 소스 (0) | 2020.04.15 |
[VB] 스마일파일 로그인 소스 (0) | 2020.04.15 |
[VB] 한글판 패치하기 (0) | 2020.04.15 |
Function DaumLogin(id As String, Pw As String) As Boolean
winhttp.Open "POST", "https://logins.daum.net/accounts/login.do?slogin=2", True
winhttp.SetRequestHeader "Host", "logins.daum.net"
winhttp.SetRequestHeader "User-Agent", "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:16.0) Gecko/20100101 Firefox/16.0"
winhttp.SetRequestHeader "Accept", "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"
winhttp.SetRequestHeader "Referer", "https://logins.daum.net/accounts/loginform.do"
winhttp.SetRequestHeader "Content-Type", "application/x-www-form-urlencoded"
winhttp.Send "id=" & id & "&pw=" & Pw
winhttp.WaitForResponse
If InStr(winhttp.ResponseText, "Daum 로그인 오류") = 0 Then
Login = True
Else
Login = False
End If
End Function
'VB' 카테고리의 다른 글
[VB] 인터넷창 띄우기 (소스) (0) | 2020.04.15 |
---|---|
[VB] 랜덤숫자을 출력해보자 (0) | 2020.04.15 |
[VB] 스마일파일 로그인 소스 (0) | 2020.04.15 |
[VB] 한글판 패치하기 (0) | 2020.04.15 |
Dim WinHttp As New WinHttp.WinHttpRequest
Private Sub Command1_Click()
WinHttp.Open "POST", "http://smartfile.co.kr/member/loginCheck.php"
WinHttp.SetRequestHeader "Referer", "http://smartfile.co.kr"
WinHttp.SetRequestHeader "Content-Type", "application/x-www-form-urlencoded"
WinHttp.Send "Frame_login=Ok&keep=Y&m_id=" & Text1 & "&m_pwd=" & Text2 & "&idSave=0"
If InStr(StrConv(WinHttp.ResponseBody, vbUnicode), "등록된 회원이 아닙니다.") Then
MsgBox "등록된 회원이 아니당", 16, ""
ElseIf InStr(StrConv(WinHttp.ResponseBody, vbUnicode), "비밀번호") Then
MsgBox "비번이 정확하지않당", 16, ""
Else
MsgBox "로그인성공", 64, ""
End If
End Sub
'VB' 카테고리의 다른 글
[VB] 인터넷창 띄우기 (소스) (0) | 2020.04.15 |
---|---|
[VB] 랜덤숫자을 출력해보자 (0) | 2020.04.15 |
[VB] 다음 로그인 소스 (0) | 2020.04.15 |
[VB] 한글판 패치하기 (0) | 2020.04.15 |
'VB' 카테고리의 다른 글
[VB] 인터넷창 띄우기 (소스) (0) | 2020.04.15 |
---|---|
[VB] 랜덤숫자을 출력해보자 (0) | 2020.04.15 |
[VB] 다음 로그인 소스 (0) | 2020.04.15 |
[VB] 스마일파일 로그인 소스 (0) | 2020.04.15 |