
最近發生一件事情,用VisualStudio 2017開發windows form應用程式,
在windows 11環境下執行時會自動閃退,
me1237guy 發表在 痞客邦 留言(0) 人氣(15)

點選新增SQL Server獨立安裝可以指定具名, 或是直接採用預設執行個體參考資料1. Microsoft® SQL Server® 2014 Express
me1237guy 發表在 痞客邦 留言(0) 人氣(42)

Visual Studio 2015 新增了許多功能, 以下為支援開發Win10 通用視窗App的語言1. C# 與 XAML(Extensible Application Markup Language)2. VB與 XAML3. C++與 XAML4. Javascript與HTML5在所有語言中, Visual Studio 都可以結合Blend用於設計精美的使用者介面(UI),依照自己熟悉的語言進行開發^_^(1) 程式進入點(Entry points)C#程式進入點會是在App.xmal.cs寫在OnLaunched事件
me1237guy 發表在 痞客邦 留言(0) 人氣(118)

Common Tool for Visual C++ 2015Win 8.1 SDK and Universal CRT SDKOops, it requires up to 3 GB for update!
me1237guy 發表在 痞客邦 留言(0) 人氣(8)

先確認有安裝IIS
新增移除程式->開啟或關閉Windows功能
勾選Internet Information Services
me1237guy 發表在 痞客邦 留言(0) 人氣(122)

Download Microsoft XNA Game Studio 4.0 ============================================================================Microsoft® Surface® 2.0 SDK and Runtime
me1237guy 發表在 痞客邦 留言(0) 人氣(30)

在之前Visual Studio 2010, 可以找到Windows Form應用程式
但是, 在新版Visual Stuio 2012竟然找不到!
在Visual Studio 2012 選擇CLR Empty Project
me1237guy 發表在 痞客邦 留言(0) 人氣(77)

專案設定Common Language Runtime Support預設值為No Common Language Runtime Support改選擇支援Common Language Runtime(/clr)設定clr完成後編輯程式才會自動出現對應的提示字,否則會不認得namespace System及System::IO
1: // WriteFileDemo4.cpp : Defines the entry point for the console application.
2: //
3:
4: #include "stdafx.h"
5: using namespace System;
6: using namespace System::IO;
7:
8: int _tmain(int argc, _TCHAR* argv[])
9: { 10: // 寫入檔案
11: String^ path = "test.txt";
12: StreamWriter^ sw = File::CreateText(path);
13: String^ line = "我要寫入4";
14: sw->WriteLine(line);
15: sw->Close();
16:
17: // 讀取檔案
18: StreamReader^ sr = File::OpenText(path);
19: String^ s = "";
20: if( s = sr->ReadLine())
21: { 22: Console::WriteLine( s );
23: }
24: Console::ReadLine();
25: return 0;
26: }
me1237guy 發表在 痞客邦 留言(0) 人氣(508)

CRT(C執行時期函式庫)在編譯前須先設定preprocessor, 加入_CRT_SECURE_NO_WARNINGSCRT安全版: 增加參數驗證, 緩衝區大小檢查, 格式化參數驗證功能寫入fprintf_s讀取fscanf_s
1: #include "stdafx.h"
2: #include <cstdio>
3: #include <iostream>
4:
5: int _tmain(int argc, _TCHAR* argv[])
6: { 7: // 寫入檔案
8: char msg[] = "我要寫入3";
9: FILE *fp;
10: printf_s("寫入檔案:\n%s\r\n", msg); 11: fopen_s(&fp, "test.txt", "w");
12: fprintf_s(fp, "%s\n", msg);
13: fclose(fp);
14:
15: // 讀取檔案
16: fopen_s(&fp, "test.txt","r");
17: char line[256];
18: fscanf_s(fp, "%s", line, 256);
19: printf_s("讀取檔案: \n%s\r\n", line); 20: fclose(fp);
21: system("pause"); 22: return 0;
23: }
24:
me1237guy 發表在 痞客邦 留言(0) 人氣(1,389)
me1237guy 發表在 痞客邦 留言(0) 人氣(134)