//실시간 검색

Private Sub FpS123_EditModeOn(sender As Object, e As EventArgs) Handles FpS123.EditModeOn


        Dim KeyPressHandler As KeyEventHandler = AddressOf FpS123_KeyUp

        AddHandler FpS123.EditingControl.KeyUp, KeyPressHandler



        With FpS123.ActiveSheet

            FpS123.Sheets(0).SetText(0, 1, .GetText(.ActiveRowIndex, .ActiveColumnIndex))

            'MessageBox.Show(.GetText(.ActiveRowIndex, .ActiveColumnIndex))

            ' Call test(.GetText(.ActiveRowIndex, .ActiveColumnIndex))

        End With


    End Sub


    Private Sub FpS123_EditModeOff(sender As Object, e As EventArgs) Handles FpS123.EditModeOff


        Dim edit_text


        Dim KeyPressHandler As KeyEventHandler = AddressOf FpS123_KeyUp

        RemoveHandler FpS123.EditingControl.KeyUp, KeyPressHandler

        edit_text = Split(sender.AccessibleDescription, ",")




        With FpS123.ActiveSheet


            FpS123.Sheets(0).SetText(0, 1, .GetText(.ActiveRowIndex, .ActiveColumnIndex))

            'MessageBox.Show(.GetText(.ActiveRowIndex, .ActiveColumnIndex))

            ' Call test(.GetText(.ActiveRowIndex, .ActiveColumnIndex))

        End With


    End Sub




    Private Sub FpS123_KeyUp(sender As Object, e As KeyEventArgs) Handles FpS123.KeyUp, FpS123.KeyDown


        If sender.ToString = "FarPoint.Win.Spread.CellType.GeneralEditor" Then


            'FarPoint.Win.Spread.CellType.GeneralEditor

            If e.KeyCode = Keys.Escape Then Exit Sub

            If e.KeyCode = Keys.Enter Then Exit Sub


            If e.KeyCode = Keys.Delete Then

                With FpS123.ActiveSheet

                    Select Case MsgBox("선택된 부분을 삭제하시겠습니까?", MsgBoxStyle.YesNo, "caption")

                        Case MsgBoxResult.Yes

                            ' MessageBox.Show("Yes button")

                            FpS123.Sheets(0).Rows.Remove(.ActiveRowIndex, 1)

                            sang_sprR = sang_sprR - 1

                        Case MsgBoxResult.No

                            'MessageBox.Show("NO button")

                    End Select

                End With

                Exit Sub

            End If


            Dim test_text As String

            test_text = sender.FormatText


            FpS123.Sheets(0).SetText(0, 2, test_text)


        End If


    End Sub

'.net' 카테고리의 다른 글

vb 웹 페이지 소스 가져오기  (0) 2016.05.10
vb net 스프레드 크기 조정  (0) 2016.04.18
vb .net 스프레드 시트에서 해당위치 텍스트 가져오기  (0) 2016.03.31
vb .net confirm 박스  (0) 2016.03.31
mysql dll 참조추가시  (0) 2016.03.31
Posted by 몽키 D.루피
,

1. 호출하는 페이지 

<script>

//오늘 하루 이창 열지 않음 을 위한 쿠키값

var cookie = "<?=$_COOKIE['popup_1']?>";


$(document).ready(function() { 

//쿠키값이 done이 아니면 팝업창 엶

if (cookie != "done")

{

popup();

}

});


function popup()

{

var winWidth = 600;

var winHeight = 700;

var winPosLeft = 2300;

var winPosTop = 100;

//팝업창

window.open('popup.html','','scrollbars=yes,width='+winWidth+', height='+winHeight+', top='+winPosTop+', left='+winPosLeft+'');

}

</script>


2. 호출받은 팝업 페이지

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ko" lang="ko">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>
<script language="javascript">
function setCookie(cookieName,cookieValue,expiredays)
var todayDate = new Date();
todayDate.setDate( todayDate.getDate() + expiredays );
document.cookie = cookieName + "=" + escape( cookieValue ) + "; path=/; expires=" + todayDate.toGMTString() + ";" 
}
function win_close(){
setCookie('popup_1','done',1); //setcookie(쿠키이름,쿠키값,시간)
window.close();
}
</script>

//해당 태그는 하단 고정
<div style="position: fixed; top: 680px; width:100%; background-color: gray;padding-left: 340px;">
<input type="checkbox" name="Notice" OnClick="win_close()">오늘은 이창을 다시 열지않음
</div>

<div class="temp">
<div id="popup" class="popup">
<img src="">
</div>
</div>

</html>


' > javascript' 카테고리의 다른 글

이메일 형식 체크  (0) 2017.01.03
앞에 $붙이기 금액 자바스크립트  (0) 2016.11.04
자바스크립트 숫자 콤마찍기  (1) 2016.06.22
리턴된 값이 숫자 인식이 안될경우  (0) 2016.05.25
Posted by 몽키 D.루피
,

Private Sub FpS스프레드이름_EditModeOff(sender As Object, e As EventArgs) Handles FpS스프레드이름.EditModeOff
        With FpS스프레드이름.ActiveSheet
            MessageBox.Show(.GetText(.ActiveRowIndex, .ActiveColumnIndex))
        End With
    End Sub

 

스프레드시트안에 선택된 셀안에 텍스트를 자연스럽게 가져옴 ㅋㅋ

'.net' 카테고리의 다른 글

vb net 스프레드 크기 조정  (0) 2016.04.18
vb net 스프레드 시트 keyup  (0) 2016.04.07
vb .net confirm 박스  (0) 2016.03.31
mysql dll 참조추가시  (0) 2016.03.31
vb .net 스프레드 시트 한줄 삭제 방법  (0) 2016.03.31
Posted by 몽키 D.루피
,

vb .net confirm 박스

.net 2016. 3. 31. 15:13

Case MsgBoxResult.Yes
                        ' MessageBox.Show("Yes button")
                        FpS진료실상병.Sheets(0).Rows.Remove(set_cell, 1)
                        sang_sprR = sang_sprR - 1
                    Case MsgBoxResult.Cancel
                        'MessageBox.Show("Cancel button")
                    Case MsgBoxResult.No
                        'MessageBox.Show("NO button")

Posted by 몽키 D.루피
,

mysql dll 참조추가시

.net 2016. 3. 31. 15:08

mysql 버전 확실히 알아야 한다.

dll버전이 설치된 mysql 버전보다 높으면 로그인 오르

Posted by 몽키 D.루피
,

 With FpSlist.ActiveSheet
            set_cell = ""
            set_cell = .ActiveRowIndex    '해당 로우 인덱스 위치

'Keys.키보드버튼

            If e.KeyCode = Keys.Delete Then
                FpSlist.Sheets(0).Rows.Remove(set_cell, 1)
                sang_sprR = sang_sprR - 1
            End If

        End With

 

한줄 삭제 방법

'.net' 카테고리의 다른 글

vb net 스프레드 크기 조정  (0) 2016.04.18
vb net 스프레드 시트 keyup  (0) 2016.04.07
vb .net 스프레드 시트에서 해당위치 텍스트 가져오기  (0) 2016.03.31
vb .net confirm 박스  (0) 2016.03.31
mysql dll 참조추가시  (0) 2016.03.31
Posted by 몽키 D.루피
,

텍스트 글짜 한정

웹/php 2016. 3. 30. 09:45

$test = substr("abcdefghijklmn", 0, 13) ;
 echo $test."...";

' > php' 카테고리의 다른 글

코드이그나이터 index.php 없애기  (0) 2016.05.23
php 파일 읽기  (0) 2016.04.25
session 유지하는 법  (0) 2016.04.25
php 파일 업로드  (0) 2016.03.30
php curl 사용 예제  (0) 2016.03.30
Posted by 몽키 D.루피
,

<input type="text" id="date">
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js"></script>
<script>window.jQuery || document.write('<script src="js/vendor/jquery-1.10.1.min.js"><\/script>')</script>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.1/jquery-ui.min.js"></script>
<script src="js/vendor/jquery.easing.1.3.js"></script>
<script src="js/main.js"></script>
<script>
$(function() {
 $.datepicker.regional['ko'] = {
  currentText: '오늘',
  monthNames: ['1월','2월','3월','4월','5월','6월',
     '7월','8월','9월','10월','11월','12월'],
  monthNamesShort: ['1월','2월','3월','4월','5월','6월',
      '7월','8월','9월','10월','11월','12월'],
  dayNames: ['일','월','화','수','목','금','토'],
  dayNamesShort: ['일','월','화','수','목','금','토'],
  dayNamesMin: ['일','월','화','수','목','금','토'],
  dateFormat: 'yy/mm/dd',
  firstDay: 0,
  showMonthAfterYear: true,
  yearSuffix: '년',
  closeText: '닫기',
  prevText: '지난달',
  nextText: '다음달'
 };

 $.datepicker.setDefaults($.datepicker.regional['ko']);

 $("#date").datepicker({
  dateFormat: "yy/mm/dd",
  maxDate: "+1m",
  minDate: "-1m",
 });

});
</script>
</script>
</body>
</html>

Posted by 몽키 D.루피
,

php 파일 업로드

웹/php 2016. 3. 30. 09:39

 $dirRoot = $_SERVER["DOCUMENT_ROOT"];
 $file_date_dir = "test";

 $current = date("Y-m-d", time());
 $fmt_time = strtotime($current);

 if(is_dir($dirRoot."/admin/uploads/".$file_date_dir)){
 
 }else{

  @mkdir($dirRoot."/test/uploads/".$file_date_dir, 0777);
 }

 // uploads디렉토리에 파일을 업로드합니다.
  $uploaddir = '../uploads/'.$file_date_dir."/";
  $uploadfile = $uploaddir ."test_". $fmt_time.".jpg";

  if($_POST['MAX_FILE_SIZE'] < $_FILES['brand_img']['size']){
   // echo "업로드 파일이 지정된 파일크기보다 큽니다.\n";
  } else {
   if(($_FILES['brand_img']['error'] > 0) || ($_FILES['brand_img']['size'] <= 0)){
    // echo "파일 업로드에 실패하였습니다.";
   } else {
     // HTTP post로 전송된 것인지 체크합니다.
     if(!is_uploaded_file($_FILES['brand_img']['tmp_name'])) {
     //echo "HTTP로 전송된 파일이 아닙니다.";
     } else {
     // move_uploaded_file은 임시 저장되어 있는 파일을 ./uploads 디렉토리로 이동합니다.
     if (move_uploaded_file($_FILES['brand_img']['tmp_name'], $uploadfile)) {
     //  echo "성공적으로 업로드 되었습니다.\n";
     } else {
      // echo "파일 업로드 실패입니다.\n";
     }
     }
   }
  }

' > php' 카테고리의 다른 글

코드이그나이터 index.php 없애기  (0) 2016.05.23
php 파일 읽기  (0) 2016.04.25
session 유지하는 법  (0) 2016.04.25
텍스트 글짜 한정  (0) 2016.03.30
php curl 사용 예제  (0) 2016.03.30
Posted by 몽키 D.루피
,

php curl 사용 예제

웹/php 2016. 3. 30. 09:36

$db_Name= "데이터베이스";
     $db_User= "유저";
     $db_Pass="비밀번호";
     $sql_ip="xxx.xxx.xxx.xxx";
  
  $connect = mysql_connect($sql_ip, $db_User, $db_Pass);
  $connect2 = mysql_connect($sql_ip, $db_User, $db_Pass);
  
  mysql_select_db("데이터베이스", $connect);

  $gcm_sql = " select * from test"; 
  
  $gcm_result = mysql_query($gcm_sql, $connect);

  $gcm_row = mysql_num_rows($gcm_result);

  while($gcm_row = mysql_fetch_array($gcm_result, MYSQL_ASSOC))
  {

   if ($gcm_row[push_status] ==1)
   {
    $headers = array(
    'Content-Type:application/json',
    'Authorization:key=키값 입력하는 곳'
    );
  
    $arr   = array();
    $arr['data'] = array();
    $arr['data']['msg'] = $img;
    $arr['data']['con_idx'] = $idx;
    $arr['data']['type'] = $type;
    $arr['registration_ids'] = array();
    $arr['registration_ids'][0] = $gcm_row[mem_gcm_id];

    $ch = curl_init();

    curl_setopt($ch, CURLOPT_URL,    'https://android.googleapis.com/gcm/send');
    curl_setopt($ch, CURLOPT_HTTPHEADER,  $headers);
    curl_setopt($ch, CURLOPT_POST,    true);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
    curl_setopt($ch, CURLOPT_POSTFIELDS,json_encode($arr));
    $response = curl_exec($ch);
    
    curl_close($ch);
   }
  
  }

' > php' 카테고리의 다른 글

코드이그나이터 index.php 없애기  (0) 2016.05.23
php 파일 읽기  (0) 2016.04.25
session 유지하는 법  (0) 2016.04.25
텍스트 글짜 한정  (0) 2016.03.30
php 파일 업로드  (0) 2016.03.30
Posted by 몽키 D.루피
,