[VB.NET] 간단한 시리얼(RS232) 통신
·
Programming/ETC
VB.NET 에서 간단하게 시리얼값 받아오기 시리얼 통신, RS232 통신Imports System.IO.PortsImports System.Text Public Class Form1 Public Delegate Sub StringSubPointer(ByVal Buffer As String) Dim WithEvents COMPort As New SerialPort Dim Received As StringBuilder Private Sub Display(ByVal Buffer As String) ' 값이 수신되면 이쪽으로 온다. Received.AppendLine(Buffer) End Sub Private Sub Form1_Load(ByV..
[VB.NET] 프로그램 로그 기록하기
·
Programming/ETC
프로젝트에서 사용한 VB.NET 에서 로그 기록하는 간단한 방법을 소개합니다.' 로그 기록 함수Private Sub LogWrite(ByVal log_text As String) ' 로그 기록 폴더 My.Application.Log.DefaultFileLogWriter.CustomLocation = Application.StartupPath & "Log" ' 로그 파일 명(프로그램명_날짜) My.Application.Log.DefaultFileLogWriter.BaseFileName = "프로그램명" + Now().ToString("yyyy-MM-dd") ' 로그 내용 기록 My.Application.Log.WriteEntry(Format(Today, "yyyy-MM-dd") & " " &a..
C++ 처음 배울 때 만든 코드
·
Programming/ETC
성적 구분#include void main(){ int score; cout > score; if (score >= 95) cout = 90 && score = 85 && score = 80 && score = 75 && score = 70 && score 설명기초적인 소스 int 변수 score 선언 cout 로 " input score (0 for stop) : " 화면에 출력하고 cin 로 score 값 받음 if 문으로 갑 비교해서 성적 구분