วันอาทิตย์ที่ 3 พฤศจิกายน พ.ศ. 2556

วิธีการสร้างแผ่น System Repair Disc ของ Windows 7

วิธีการทำ 1. ไปที่ Start แล้วตรงช่อง Run พิมพ์คำสั่ง recdisc แล้วกด Enter 2. เลือก ไดร์ CD ที่เราจะทำการเขียนลงไป พร้อมกับเอาแผ่น CD ใส่ลงไป แล้วคลิกปุ่ม Create disc 3. รอจนเสร็จสิ้น เพียงเท่านี้เพื่อนๆก็จะได้แผ่น system Repair disc ไว้ใช้ยามฉุกเฉินแล้วครับ

วันศุกร์ที่ 17 พฤษภาคม พ.ศ. 2556

วิธีการแก้ Hidden Folder ด้วยคำสั่ง DOS มีดังนี้



  1. คลิก start  -->  run
  2. พิมพ์คำสั่ง  cmd  แล้วกด enter หรือคลิก OK
  3. พิมพ์  f:  (เมื่อ Flash Drive เป็นไดร์ f:)
  4. พิมพ์คำสั่ง  attrib -s -h -r /S /D  (สั่งยกเลิกการซ่อน Folder ทั้งหมด) หรือ พิมพ์  attrib -s -h -r /S /D ตามด้วยชื่อ Folder ที่ต้องการยกเลิกการซ่อน (กรณีสั่งยกเลิกทีละ Folder)

วันจันทร์ที่ 22 สิงหาคม พ.ศ. 2554

B12.ฟังก์ชัน scanf()

ฟังก์ชัน scanf()
ฟังก์ชัน scanf() เป็นฟังก์ชันที่ใช้่สำหรับรับค่าข้อมูลจากทางแป้นพิมพ์เพื่อจัดเก็บไว้ในตัวแปร โดยจะมีรูปแบบดังนี้

รูปแบบ
scanf("ข้อความ");

ตัวอย่าง

#include 
int main (void){

printf("Hello World");
system("pause");

}

วันเสาร์ที่ 29 มกราคม พ.ศ. 2554

system("cls")

ฟังก์ชัน system("cls")
คำสั่งให้ โปรแกรมล้างจอภาพใหม่ Clear Screen เหมือนกับการ run โปรแกรมใหม่

ตัวอย่าง นิยมใช้กับการทำงาน Loop ที่ไม่รู้จบ while(1) เพื่อความสวยงามของโปรแกรม

Coding:

#include
int main (void){
int num1;
while(1){
printf("1.Red\n");
printf("2.Green\n");
printf("3.Black\n");
printf("4.Pink\n");
printf("5.Blue\n");
printf("0.Exit\n\n");

printf("Select->Color :");
scanf("%d",&num1);
if(num1==1){
printf("You Color is Red\n");
}
if(num1==2){
printf("You Color is Green\n");
}
if(num1==3){
printf("You Color is Black\n");
}
if(num1==4){
printf("You Color is Pink\n");
}
if(num1==5){
printf("You Color is Blue\n");
}
if(num1==0){
break;
}
system("pause");
system("cls");
}

}


Output:

1.Red
2.Green
3.Black
4.Pink
5.Blue
0.Exit

Select->Color :4
You Color is Pink

system("pause")

system("pause")
คำสั่งให้ computer หยุดรอการกด คีร์บอร์ด ของเราก่อนจะทำง่านต่อไปครับ
ตัวอย่าง

Coding:

#include
int main (void){

printf("Hello World\n");
system("pause");

}


Output:

Hello World
Press any key to continue . . .

gotoxy()

ฟังก์ชัน gotoxy()
เป็นฟังก์ชันที่ใช้สำหรับกำหนดตำแหน่งเคอร์เซอร์บนจอภาพ บนจอภาพแบบเท็กซ์โหมด

รูปแแบ

gotoxy(column,row);


โดยที่

column คือ สดมภ์ซึ่งมีค่าได้ตั้งแต่ 0 ถึง 79
row คือแถว ซึ่งมีค่าได้ตั้งแต่ 0 ถึง 24

ตัวอย่าง

#include
int main (void){
gotoxy(24,1);
printf("This is a message #1");
system("pause");

}



#include
int main (void){
gotoxy(24,10);
printf("This is a message #2");
system("pause");

}



#include
int main (void){
gotoxy(29,11);
printf("The end");
system("pause");

}

วันจันทร์ที่ 24 มกราคม พ.ศ. 2554

Beep code ของไบออส

Beep code ของไบออส AWARD
รหัสเสียง = ความหมาย

ปี๊ปสั้น 1 ครั้ง = เครื่องสามารถเปิดใช้งานได้ตามปกติ
ปี๊ปสั้น 2 ครั้ง = ข้อมูลในไบออสที่ไม่ถูกต้อง
ปี๊ปยาว 1 ครั้ง ปี๊ปสั้น 1 ครั้ง = หน่วยความจำหรือเมนบอร์ดทำงานผิดพลาด
ปี๊ปยาว 1 ครั้ง ปี๊ปสั้น 2 ครั้ง = การ์ดแสดงผลหรือจอภาพทำงานผิดพลาด
ปี๊ปยาว 1 ครั้ง ปี๊ปสั้น 3 ครั้ง = คีย์บอร์ดทำงานผิดพลาด
ปี๊ปยาว 1 ครั้ง ปี๊ปสั้น 9 ครั้ง = ตัวไบออสเองมีความผิดพลาด
ปี๊ปสั้นๆ ไปเรื่อยๆ = หน่วยความจำมีปัญหา

Beep code ของไบออส AMI

ปี๊ปสั้น 1 ครั้ง = เครื่องสามารถเปิดใช้งานได้ตามปกติ
ปี๊ปสั้น 2 ครั้ง = ข้อมูลในไบออสเกิดความผิดพลาด
ปี๊ปยาว 1 ครั้ง ปี๊ปสั้น 1 ครั้ง = แรมหรือเมนบอร์ดทำงานผิดพลาด
ปี๊ปยาว 1 ครั้ง ปี๊ปสั้น 2 ครั้ง = การ์ดแสดงผลหรือจอภาพทำงานผิดพลาด
ปี๊ปยาว 1 ครั้ง ปี๊ปสั้น 3 ครั้ง = คีย์บอร์ดทำงานผิดพลาด
ปี๊ปยาว 1 ครั้ง ปี๊ปสั้น 9 ครั้ง = ตัวไบออสเองมีความผิดพลาด
ปี๊ปสั้นๆ ไปเรื่อยๆ = หน่วยความจำมีปัญหา

ที่มา : http://www.beartai.com/webboard/index.php?topic=54364.0

วันอาทิตย์ที่ 16 มกราคม พ.ศ. 2554

วันอังคารที่ 11 มกราคม พ.ศ. 2554

แปลงหน่วยฟุตเป็นนิ้ว

Coding:

#include
int main (void){
int feet ,inches;
feet=5;
inches=feet*12;
printf("*Height in inches is %d \n",inches);
system("pause");

}

Output:

Height in inches is 60
Press any key to continue . ...

วันพฤหัสบดีที่ 18 พฤศจิกายน พ.ศ. 2553

ควบคุมการแสดงผล * ด้วย \n

1.
Coding:

#include
int main (void){

printf("*\n*\n*\n*\n*\n");
system("pause");

}

Output:

*
*
*
*
Press any key to continue . ...

2.
Coding:

#include
int main (void){

printf("*\n**\n***\n****\n*****\n");
system("pause");

}

Output:

*
**
***
****
*****
Press any key to continue . ...

3.
Coding:

#include
int main (void){

printf(" *\n **\n ***\n ****\n*****\n");
system("pause");

}

Output:

*
**
***
****
*****
Press any key to continue . ...

Popular Posts