|
روزنه
|
||
|
مطالب این وبلاگ فقط برای کسانی است که میدانند نمیدانند |
#include <iostream.h>
#include <conio.h>
#include <string.h>
int main()
{
char string[81] ;
int position ;
clrscr();
cout << "Type a string :" ;
cin.get(string, 80) ;
cout << "Enter position for delete character :" ;
cin >> position ;
strcpy(&string[position], &string[position + 1]) ;
cout << "The result string is: " << string ;
getch();
return 0;
}
/***************************************/
/********** WwW.mAnVaIrAn.CoM **********/
/********** nimrah.blogfa.com **********/
/***************************************/
#include<iostream.h>
#include<conio.h>
void findmax(int,int,int);
int main()
{
int x,y,m;
clrscr();
cout << "\nEnter three integer number:";
cin >> x >> y >> m;
findmax(x,y,m);
return 0;
}
//********************
void findmax(int p1,int p2,int p3)
{
int maxp;
maxp=(p1>p2) ? p1:p2;
maxp=(p3>maxp) ? p3:maxp;
cout << "\nMaximum=" << maxp;
getch();
}
|
int main(void) /* initialize graphics and local variables */ /* read result of initialization */ setcolor(getmaxcolor()); /* Main program */ arc(280,390,90,270,10); circle(320,235,3); ellipse(350,157,230,150,10,7); line(290,120,350,120); setfillstyle(1,14); /* clean up */
|
<BODY>
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
today = new Date();
thismonth = today.getMonth()+1;
thisyear = today.getYear();
thisday = today.getDate();
montharray=new Array(31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);
maxdays=montharray[thismonth-1];
if (thismonth==2) {
if ((thisyear/4)!=parseInt(thisyear/4)) maxdays=28;
else maxdays=29;
}
thismonth = "" + thismonth
if (thismonth.length == 1) {
thismonth = "0" + thismonth;
}
document.write("<form>");
document.write("<select name=dates size=1>");
for (var theday = 1; theday <= maxdays; theday++) {
var theday = "" + theday;
if (theday.length == 1) {
theday = "0" + theday;
}
document.write("<option");
if (theday == thisday) document.write(" selected");
document.write(">");
document.write(thismonth + "-" + theday + "-" + thisyear);
}
document.write("</select></form>");
// End -->
</SCRIPT>
<!-- END Script Size: 1.20 KB -->
1. ابتدا از منوی Start گزینه Run را اجرا کنید regedit رو بنویسید و روی OK کلیک کنید تا پنجره ای جدید باز شود.
2. حالا از پنجره باز شده به آدرس زیر برین:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\WPAEvents
3. از قسمت راست پنجره، روی OOBETimer دوبار کلیک کنید تا پنجره ای باز شود.
4. مقدار FF را در مقدار بالا فقط به 00 تغییر دهید. روی دکمه OK کلیک کنید و رجستری را ببندید.
5. منوی Start گزینه Run کلیک کنید و این دستور را بنویسید:
C:\WINDOWS\system32\oobe\msoobe.exe /a
6. پنجره ای باز می شود به نام Activate Windows، گزینه دوم را انتخاب کنید و بعد Next را کلیک کنید.
7. از پنجره جدید بر روی Change Product keyکلیک کنید.
8. در قسمت New key
B7R7P - J63JP - 2J7VH - W3TDJ - PDP7T
و سپس بروی Update کلیک کنید.
حالا ویندوز شما اورجینال شد!
فرم شيشه اي در ويژوال بيسيک ![]()
اطلاعات زير را در يک ماژول قرار دهيد:
Private Declare Function GetWindowLong Lib "user32" Alias "GetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long) As Long
Private Declare Function SetLayeredWindowAttributes Lib "user32" (ByVal hwnd As Long, ByVal crKey As Long, ByVal bAlpha As Byte, ByVal dwFlags As Long) As Long
Private Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
Private Const GWL_EXSTYLE = (-20)
Private Const LWA_ALPHA = &H2
Private Const WS_EX_LAYERED = &H80000
Public Function Trans(ByVal hwnd As Long, Perc As Integer) As Long
Dim Msg As Long
On Error Resume Next
If Perc < 0 Or Perc > 255 Then
Trans = 1
Else
Msg = GetWindowLong(hwnd, GWL_EXSTYLE)
Msg = Msg Or WS_EX_LAYERED
SetWindowLong hwnd, GWL_EXSTYLE, Msg
SetLayeredWindowAttributes hwnd, 0, Perc, LWA_ALPHA
Trans = 0
End If
If Err Then
Trans = 2
End If
End Function
اطلاعات زير را در فرم اصلي قرار دهيد :
Private Sub Form_Load()
VScroll1.Value = 260
End Sub
Private Sub VScroll1_Scroll()
Trans Form1.hwnd, VScroll1.Value
End Sub
نکته : شما در اين برنامه به يک اسکورال نيز نيازمنديد.
گرفتن تمامی لیبل های CD Rom ها ![]()
Private Declare Function GetLogicalDriveStrings Lib "kernel32" Alias "GetLogicalDriveStringsA" (ByValnBufferLength As Long, ByVal lpBuffer As String) As Long
Private Declare Function GetDriveType Lib "kernel32" Alias "GetDriveTypeA" (ByVal nDrive As String) As Long
Private Sub Command1_Click()
allDrives$ = Space$(64)
ret& = GetLogicalDriveStrings(Len(allDrives$), allDrives$)
allDrives$ = Left$(allDrives$, ret&)
Do
pos% = InStr(allDrives$, Chr$(0))
If pos% Then
JustOneDrive$ = Left$(allDrives$, pos% - 1)
allDrives$ = Mid$(allDrives$, pos% + 1, Len(allDrives$))
DriveType& = GetDriveType(JustOneDrive$)
If DriveType& = 5 Then
MsgBox UCase$(JustOneDrive$) & " is a CD Drive "
End If
End If
Loop Until allDrives$ = ""
End Sub
رستار کردن ويندوز
procedure TForm1.Button1Click(Sender: TObject); begin ExitWindowsEx(EWX_REBOOT,0); end;
program wallpapr;
uses
Registry, WinProcs;
procedure SetWallpaper(
sWallpaperBMPPath : String;
bTile : boolean );
var
reg : TRegIniFile;
begin
//
// change registry
//
// HKEY_CURRENT_USER
// Control Panel\Desktop
// TileWallpaper (REG_SZ)
// Wallpaper (REG_SZ)
//
reg := TRegIniFile.Create(
'Control Panel\Desktop' );
with reg do
begin
WriteString( '', 'Wallpaper',
sWallpaperBMPPath );
if( bTile )then
begin
WriteString(
'', 'TileWallpaper', '1' );
end else
begin
WriteString(
'', 'TileWallpaper', '0' );
end;
end;
reg.Free;
//
// let everyone know that we changed
// a system parameter
//
SystemParametersInfo(
SPI_SETDESKWALLPAPER,
0,
Nil,
SPIF_SENDWININICHANGE );
end;
begin
//
// set wallpaper to centered winnt.bmp
//
SetWallpaper(
'c:\winnt\winnt.bmp',
False );
end.
هر کس سورس برنامه ی خاصی رو می خواد نظر بده یا میل بزنه و اون برنامه را به من بگه یا سورس رو براش میل می کنم یا سورس رو توی وبلاگ می ذارم بلاخره سورس گیرتون میاد.
C# , delphi , java , vb ( visual basic) ,c , c++
فقط سورس برنامه های بالا رو لطفا در خواست کنید
بزودی سورس های اچ تی ام ال نیز در وبلاگم قرار می دهم
با آرزوی موفقیت برای شما
اینم لینک دانلود برای یک کتاب توپ از vb انشاالله موفق باشید
http://iranmehr.bizhat.com/BOOK/Visual%20Basic%206%7Biranmehr.bizhat.com%7D.zip
رمز فايل فشرده nimrah.blogfa.com است.
http://rapidshare.de/files/27046942/Nimrah.blogfa.com_Java_.zip.html
رمز فایل فشرده nimrah.blogfa.com است.
http://rapidshare.de/files/27045365/Nimrah.blogfa.com_Delphi_.zip.html
|
|