'Programming'에 해당되는 글 1834건

  1. 2021.07.12 winform IsMdiContainer
  2. 2021.07.12 DataGridView
  3. 2021.07.09 fopen exclusivly
  4. 2021.07.08 winform 자동으로 UI 늘리기
  5. 2021.07.08 winform MDI
  6. 2021.07.08 vs2019 sdi , mdi 프로젝트 생성하기
  7. 2021.07.07 winform 첨자(superscript/subscript)
  8. 2021.07.06 nuget RibbonWinForms
  9. 2021.06.14 python op overload magic method
  10. 2021.05.24 ansi escape code
Programming/c# & winform2021. 7. 12. 14:43

'Programming > c# & winform' 카테고리의 다른 글

winform ribbonmenu  (0) 2021.07.18
winform MDI 시도!  (0) 2021.07.12
DataGridView  (0) 2021.07.12
winform 자동으로 UI 늘리기  (0) 2021.07.08
winform MDI  (0) 2021.07.08
Posted by 구차니
Programming/c# & winform2021. 7. 12. 10:52

c#의 기본 컨트롤인데 초기 데이터 생성해서 밀어 넣는게 짜증나는거 제외하면

기본 정렬기능부터 꽤나 쓸만해 보이는 녀석이다.

 

        private void Form1_Load(object sender, EventArgs e)
        {
            //DataSet ds = new System.Data.DataSet();
            DataTable table = new DataTable();
            table.Columns.Add("ID", typeof(string));
            table.Columns.Add("제목", typeof(string));
            table.Columns.Add("구분일", typeof(string));
            table.Columns.Add("생성일", typeof(string));
            table.Columns.Add("수정일", typeof(string));

            table.Rows.Add("ID 1", "제목 1번", "사용중", "2019/03/13", "2019/03.13");
            table.Rows.Add("ID 1", "제목 1번", "사용중", "2019/03/13", "2019/03.13");
            table.Rows.Add("ID 1", "제목 1번", "사용중", "2019/03/13", "2019/03.13");
            table.Rows.Add("ID 1", "제목 1번", "사용중", "2019/03/13", "2019/03.13");
            table.Rows.Add("ID 1", "제목 1번", "사용중", "2019/03/13", "2019/03.13");
            table.Rows.Add("ID 1", "제목 1번", "사용중", "2019/03/13", "2019/03.13");
            table.Rows.Add("ID 1", "제목 1번", "사용중", "2019/03/13", "2019/03.13");
            table.Rows.Add("ID 1", "제목 1번", "사용중", "2019/03/13", "2019/03.13");
            table.Rows.Add("ID 1", "제목 1번", "사용중", "2019/03/13", "2019/03.13");
            table.Rows.Add("ID 1", "제목 1번", "사용중", "2019/03/13", "2019/03.13");

            dataGridView1.DataSource = table;
        }

[링크 : https://kinghell.tistory.com/57]

 

DataSet 이라는 클래스는 DB에서 끌어올때 쓰기 유용한 듯.

그래도 둘다 dataGridView.DataSource에 넣으면 되니 어느것이든 상관없으려나?

[링크 : https://afsdzvcx123.tistory.com/entry/C-윈폼-DataGridView-데이터-조회-추가-삭제하는-방법]

 

+

셀 내의 폰트 크기 조절(전체), 셀 크기는 어떻게 조절하냐 ㅠㅠ

[링크 : https://docs.microsoft.com/ko-kr/dotnet/desktop/winforms/controls/how-to-set-font-and-color-styles-in-the-windows-forms-datagridview-control?view=netframeworkdesktop-4.8]

 

AutoSizeColumnMode / AutoSizeRowsMode를 AllCells로 하면 데이터 내의 모든 값을 보고 적당한 크기로 해주는 듯.

그런데 AllCells 하면 용량이 크면 너무 부하가 걸릴 것 같으니 DisplayedCells가 나을 것 같다.

Column/Rows 에 하나라도 None/Fit이 있으면 작동을 하지 않고

AllCells 혹은 DisplayedCells 등이 조합되서 설정되지 않으면 작동을 안하는 듯.

[링크 : https://docs.microsoft.com/ko-kr/dotnet/desktop/winforms/controls/sizing-options-in-the-windows-forms-datagridview-control?view=netframeworkdesktop-4.8]

 

컬럼 헤더에 숫자 넣기

            foreach (DataGridViewRow row in dataGridView1.Rows)
            {
                row.HeaderCell.Value = "A";
                row.Height = 19;
            }

            dataGridView1.Rows[0].HeaderCell.Value = "A";
            dataGridView1.Rows[1].HeaderCell.Value = "B";
            dataGridView1.Rows[2].HeaderCell.Value = "C";
            dataGridView1.Rows[3].HeaderCell.Value = "D";
            dataGridView1.Rows[4].HeaderCell.Value = "E";

[링크 : https://rocabilly.tistory.com/167]

 

컬럼/로우 헤더 스타일(폰트)

            dataGridView1.DataSource = table;
            dataGridView1.DefaultCellStyle.Font = new Font("Tahoma", 30);
            dataGridView1.ColumnHeadersDefaultCellStyle.Font = new Font("Tahoma", 30);
            dataGridView1.RowHeadersDefaultCellStyle.Font = new Font("Tahoma", 30);

[링크 : https://docs.microsoft.com/ko-kr/dotnet/api/system.windows.forms.datagridview.columnheadersdefaultcellstyle?view=net-5.0]

 

아래의 항목을 설정해주어야 헤더의 폭이 자동으로 설정된다.

ColumnHeadersHeightSizeMode - AutoSize

RowHeadersWidthSizeMode - AutoSizeToAllHeaders

[링크 : https://docs.microsoft.com/ko-kr/dotnet/api/system.windows.forms.datagridview.columnheadersheightsizemode?view=net-5.0]

[링크 : https://docs.microsoft.com/ko-kr/dotnet/api/system.windows.forms.datagridview.rowheaderswidthsizemode?view=net-5.0]

'Programming > c# & winform' 카테고리의 다른 글

winform MDI 시도!  (0) 2021.07.12
winform IsMdiContainer  (0) 2021.07.12
winform 자동으로 UI 늘리기  (0) 2021.07.08
winform MDI  (0) 2021.07.08
winform 첨자(superscript/subscript)  (0) 2021.07.07
Posted by 구차니
Programming/C Win32 MFC2021. 7. 9. 10:35

 

NOTES
   Glibc notes
       The GNU C library allows the following extensions for the string specified in mode:

       c (since glibc 2.3.3)
              Do not make the open operation, or subsequent read and write operations, thread cancellation points.  This flag is ignored for fdopen().

       e (since glibc 2.7)
              Open the file with the O_CLOEXEC flag.  See open(2) for more information.  This flag is ignored for fdopen().

       m (since glibc 2.3)
              Attempt to access the file using mmap(2), rather than I/O system calls (read(2), write(2)).  Currently, use of mmap(2) is attempted only for a file opened for reading.

       x      Open the file exclusively (like the O_EXCL flag of open(2)).  If the file already exists, fopen() fails, and sets errno to EEXIST.  This flag is ignored for fdopen().

[링크 : https://stackoverflow.com/questions/33312900/how-to-forbid-multiple-fopen-of-same-file]

[링크 : https://stackoverflow.com/questions/16806998/is-fopen-a-thread-safe-function-in-linux]

'Programming > C Win32 MFC' 카테고리의 다른 글

MSB / LSB 변환  (0) 2022.08.29
kore - c restful api server  (1) 2022.07.07
vs2019 sdi , mdi 프로젝트 생성하기  (0) 2021.07.08
vkey win32 / linux  (0) 2021.04.30
strptime  (0) 2021.02.17
Posted by 구차니
Programming/c# & winform2021. 7. 8. 13:55

말이 애매한데..

창을 키우면 자동으로 내부 콤포넌트들이 자동으로 키워져 비율에 맞게 작동하는

UI를 제작하고 싶어서 찾아보는 중.

 

Dock을 Fill로 해주면 되는 건가?

[링크 : https://docs.microsoft.com/en-us/dotnet/desktop/winforms/controls/layout?view=netdesktop-5.0]

 

[링크 : https://cwkcw.tistory.com/166]

 

+

paint 함수를 재정의 해서 계산후 적용하는 것도 방법이군..

[링크 : https://stackoverflow.com/questions/40269285/c-sharp-changing-the-size-of-a-button-text]

'Programming > c# & winform' 카테고리의 다른 글

winform IsMdiContainer  (0) 2021.07.12
DataGridView  (0) 2021.07.12
winform MDI  (0) 2021.07.08
winform 첨자(superscript/subscript)  (0) 2021.07.07
nuget RibbonWinForms  (0) 2021.07.06
Posted by 구차니
Programming/c# & winform2021. 7. 8. 13:37

MFC 말고 winform으로는 안되나 찾아보는데 IsMdiContainer 라는게 있대서 찾아보니 있긴하네?

아무튼.. 그렇다면 창 스타일로 지정되고

dialog based로 생성되어도 그 안에 MDI로 구성을 하는 스타일로 격하(?)되었다는 건가?

 

[링크 : https://docs.microsoft.com/.../how-to-create-mdi-parent-forms?view=netframeworkdesktop-4.8]

[링크 : https://docs.microsoft.com/.../how-to-create-mdi-child-forms?view=netframeworkdesktop-4.8]

[링크 : https://docs.microsoft.com/.../multiple-document-interface-mdi-applications?view=netframeworkdesktop-4.8]

 

'Programming > c# & winform' 카테고리의 다른 글

DataGridView  (0) 2021.07.12
winform 자동으로 UI 늘리기  (0) 2021.07.08
winform 첨자(superscript/subscript)  (0) 2021.07.07
nuget RibbonWinForms  (0) 2021.07.06
ansi escape code  (0) 2021.05.24
Posted by 구차니
Programming/C Win32 MFC2021. 7. 8. 11:39

그냥해봤는데 내꺼에 설치된 패키지 중에는 SDI / MDI를 지원하는 패키지가 없었는지

부랴부랴 검색해서 추가중

[링크 : https://yyman.tistory.com/1357]

 

 

와와 이제 뜬다!!!!

 

흐으으으으음?! 컴파일러 뿐만 아니라 MFC 라이브러리가 별도로 필요한가?

이 프로젝트에는 MFC 라이브러리가 필요합니다. 사용되는 모든 도구 세트 및 아키텍처의 경우 Visual Studio 설치 관리자(개별 구성 요소 탭)에서 설치하세요.

[링크 : https://docs.microsoft.com/ko-kr/visualstudio/msbuild/errors/msb8041?view=vs-2019]

 

MFC로 검색해서 두개의 구성요소를 설치해야 한다.

  • 스펙터 완화를 지원하는 최신 v000 빌드 도구용 C++ MFC(x86 및 x64)
  • 최신 v000 빌드 도구용 C++ MFC(x86 및 x64)

 

스펙터는 설치안하고 최신 빌드 도구용만 까니 라이브러리 없다고 실행안되는거 보면.. 스펙터는 핑계고(?)

번역상에 문제로 스펙터 완화를 지원하는... 건 실제로는 runtime library 아닌가 의심된다.

 

아무튼 프로젝트 생성해서 빌드만 겨우 했네 휴..

근데 SDI로 작성하긴 했는데 왜이렇게 데모 프로젝트가 현란해? 무슨 Visual Studio 인 줄 ㄷㄷ

[링크 : https://yyman.tistory.com/1367]

'Programming > C Win32 MFC' 카테고리의 다른 글

kore - c restful api server  (1) 2022.07.07
fopen exclusivly  (0) 2021.07.09
vkey win32 / linux  (0) 2021.04.30
strptime  (0) 2021.02.17
while(-1) 이 될까?  (0) 2019.05.24
Posted by 구차니
Programming/c# & winform2021. 7. 7. 10:32

charmap(문자표)에서 보면

왜 순서대로 0 1 2 3 4 5 6 7 8 9 가 있는게 아닌거냐!!

0~9 순서로 유니코드 정렬하면 다음과 같네

{0x2070, 0x00B9, 0x00B2, 0x00B3, 0x2074, 0x2075, 0x2076, 0x2077, 0x2078, 0x2079}

 

Arial에서는 subscript로 검색하니 숫자는 안나오지만 굴림으로는

2314n에 대한 subscript / superscript가 검색된다. 폰트별로 다르다니.

 

 

 

[링크 : https://www.python2.net/questions-257019.htm] 특수문자 사용

[링크 : https://stackoverflow.com/questions/19682459/superscript-label-or-form-name

 

[링크 : http://csharphelper.com/blog/2016/06/display-subscripts-superscripts-richtextbox-c/]

[링크 : https://icodebroker.tistory.com/5740] richedit offset 조정

'Programming > c# & winform' 카테고리의 다른 글

winform 자동으로 UI 늘리기  (0) 2021.07.08
winform MDI  (0) 2021.07.08
nuget RibbonWinForms  (0) 2021.07.06
ansi escape code  (0) 2021.05.24
c# richtextbox 글씨 색상 입히기  (0) 2021.05.24
Posted by 구차니
Programming/c# & winform2021. 7. 6. 12:04

nuget으로 받아서 사용가능한데 라이선스가 MS-PL(Public license) 이건 좀 검토 필요.

[링크 : https://raw.githubusercontent.com/RibbonWinForms/RibbonWinForms/master/LICENSE]

 

옵션으로 2007 / 2010 / 2010 ext / 2013 을 제공한다.

다시보니.. 2007 보단 그래도 요즘꺼가 선녀같네 -_-

 

[링크 : https://github.com/RibbonWinForms/RibbonWinForms]

   [링크 : https://www.codeproject.com/Articles/364272/Easily-Add-a-Ribbon-into-a-WinForms-Application]

'Programming > c# & winform' 카테고리의 다른 글

winform MDI  (0) 2021.07.08
winform 첨자(superscript/subscript)  (0) 2021.07.07
ansi escape code  (0) 2021.05.24
c# richtextbox 글씨 색상 입히기  (0) 2021.05.24
c# named argument  (0) 2021.01.06
Posted by 구차니

텐서플로우 보다보니 텐서곱으로 * 연산이 새롭게 정의되어 찾아보니

magic method 라는 이름으로 오버로드를 구현한 듯.

 

[링크 : https://velog.io/@hyeseong-dev/Python-magic-method%EB%9E%80]

[링크 : https://stackoverflow.com/questions/3188666/python-operator-overloading-a-specific-type]

'Programming > python(파이썬)' 카테고리의 다른 글

opencv python  (0) 2022.02.25
python / opencv mouse event  (0) 2022.02.25
pythonpath  (0) 2021.04.16
python yield  (0) 2021.04.07
python 공부  (0) 2020.01.14
Posted by 구차니
Programming/c# & winform2021. 5. 24. 18:28

터미널에서 알록달록하게 해주는 그것!

vt 에뮬레이터 결과를 richtextbox로 보낼까.. 아니면 HTML로 보낼까.. 흐음..

 

[링크 : https://en.wikipedia.org/wiki/ANSI_escape_code]

[링크 : https://gist.github.com/fnky/458719343aabd01cfb17a3a4f7296797]

 

'Programming > c# & winform' 카테고리의 다른 글

winform 첨자(superscript/subscript)  (0) 2021.07.07
nuget RibbonWinForms  (0) 2021.07.06
c# richtextbox 글씨 색상 입히기  (0) 2021.05.24
c# named argument  (0) 2021.01.06
아.. 이놈의 인코딩..  (0) 2020.12.03
Posted by 구차니