- Mar 25 Mon 2024 10:53
-
如何讓程式永遠以系統管理員身分執行?
- Oct 17 Mon 2016 10:25
-
安裝Microsoft® SQL Server® 2014 Express
- May 30 Mon 2016 09:57
-
Windows 10 通用視窗App

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事件
- May 21 Sat 2016 15:54
-
Installation for missing features of Visual Studio 2015

Common Tool for Visual C++ 2015Win 8.1 SDK and Universal CRT SDKOops, it requires up to 3 GB for update!
- Jul 19 Sat 2014 23:01
-
Writing a Simple WCF Service
- Jul 07 Mon 2014 23:41
-
Microsoft Surface 2.0 SDK

Download Microsoft XNA Game Studio 4.0 ============================================================================Microsoft® Surface® 2.0 SDK and Runtime
- Jan 24 Fri 2014 16:29
-
How to Create a Windows Form Application in Visual Studio 2012

在之前Visual Studio 2010, 可以找到Windows Form應用程式
但是, 在新版Visual Stuio 2012竟然找不到!
在Visual Studio 2012 選擇CLR Empty Project
- Jan 07 Tue 2014 14:56
-
C++/CLI: StreamWriter and StreamReader

專案設定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: }
- Jan 07 Tue 2014 12:48
-
CRT: fprintf_s and fscanf_s

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:
- Jan 07 Tue 2014 11:21
-
C++ Standard Library: ofstream and ifstream
利用ofstream寫入檔案, ifstream讀入檔案
很明顯用標準函式庫比上一篇(Windows API WriteFile and ReadFile)使用Windows API語法簡單易懂多了!!!
很明顯用標準函式庫比上一篇(Windows API WriteFile and ReadFile)使用Windows API語法簡單易懂多了!!!
- Jan 07 Tue 2014 11:06
-
Windows API WriteFile and ReadFile
使用WindowsAPI進行WriteFile 和 ReadFile應用程式 ---> Windows API –—> Windows 作業系統
1: #include "stdafx.h"
2: #include <Windows.h>
3: #include <iostream>
4: 5: using namespace std;
6: 7: int _tmain(int argc, _TCHAR* argv[])
8: {9: // 寫入檔案
10: HANDLE hFile; 11: DWORD nBytes;12: hFile = CreateFile( _T("test.txt"), GENERIC_WRITE, FILE_SHARE_WRITE, NULL, CREATE_ALWAYS, 0, NULL);
13: char msg[] = "我要寫入1";
14: if( hFile != INVALID_HANDLE_VALUE)
15: {16: WriteFile(hFile, msg, sizeof(msg)-1, &nBytes, NULL);
17: CloseHandle(hFile);18: cout << "寫入內容: " << msg << endl;
19: 20: cout << "寫入 " << nBytes << " Bytes" << endl;
21: system("pause");
22: }23: //-------------------------------------------------
24: // 讀取檔案
25: hFile = CreateFile( _T("test.txt"), GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_ALWAYS, 0, NULL);
26: if(hFile != INVALID_HANDLE_VALUE )
27: {28: char line[256] = {0};
29: BOOL bResult;30: bResult = ReadFile(hFile, line, sizeof(line), &nBytes, NULL);
31: if(nBytes!=0)
32: {33: cout << "讀入內容: " << endl;
34: cout << line << endl; 35: } 36: CloseHandle(hFile);37: system("pause");
38: }39: return 0;
40: }
- Jan 03 Fri 2014 22:11
-
Visual Studio 2010環境設定



