|
|
|
|
|
#include "stdio.h"
#include "conio.h"
#include "stdlib.h"
void help(void)
{
puts(" DOS(CP866),Windows(CP1251) -8");
puts(" : CONVERT - - ");
puts(" :");
puts("dw - DOSa Windows");
puts("dk - DOSa -8");
puts("wd - Windows DOS");
puts("wk - Windows -8");
puts("kd - -8 DOS");
puts("kw - -8 Windows");
puts(" - ");
puts(" , UNIX DOS(Windows)");
puts("ud - UNIXa DOS");
puts("du - DOSa UNIX");
puts(" - ");
getch();
exit(255);
}
void main(int argc,char *argv[])
{
FILE *in,*out;
long i,t=0,m=0,j;
char dw[]={"L+T+-+LT=+TTLL-++-----###=============#####v-լ?"};
char dk[]={"v+T+-+-T=+-+-嬬----TLL-L+---+-LT֬"};
char wd[]={"??'?\".++%???????|c\"-R?Ii?u\"???"};
char wk[]={"??'?\".-%???????|c\"-R?Ii?u\"???v+T+-+-T=+TLL-L+---+-LT"};
char kd[]={"--L-++T++------v=-㬬LLL---TTT+++"};
char kw[]={"########?-=============榦vL+-+L+-LT=+-TTLT--+-+-"};
char *pointer,mode[80];
if(argc==3)strcpy(mode,argv[2]);
else
{
if(argc==4)strcpy(mode,argv[3]);
else
{
printf("Invalid number of parameters %d\n",argc);
help();
}
}
pointer=NULL;
if(strcmp(mode,"du")==0)m=1;
if(strcmp(mode,"ud")==0)m=2;
if(strcmp(mode,"dw")==0)pointer=dw;
if(strcmp(mode,"dk")==0)pointer=dk;
if(strcmp(mode,"wd")==0)pointer=wd;
if(strcmp(mode,"wk")==0)pointer=wk;
if(strcmp(mode,"kd")==0)pointer=kd;
if(strcmp(mode,"kw")==0)pointer=kw;
if(pointer==NULL&&m==0)
{
printf("Error convertion mode:%s\n",argv[3]);
help();
}
if(m!=0&&argc!=4)
{
printf("Invalid number of parameters %d\n",argc);
help();
}
if((in=fopen(argv[1],"r+b"))==NULL)
{
printf("Can't open file %s\n",argv[1]);
help();
}
if(argc==4)
{
if((out=fopen(argv[2],"wb"))==NULL)
{
printf("Can't open file %s\n",argv[2]);
help();
}
}
else out=in;
i=0;
j=0;
while(feof(in)==0)
{
fseek(in,i,SEEK_SET);
fread(&t,1,1,in);
if(feof(in)==0)
{
fseek(out,j,SEEK_SET);
if(m==0)
{
if(t<128)fprintf(out,"%c",t);
else fprintf(out,"%c",*(pointer+t-128));
}
if(m==1)
{
if(t!=13)fprintf(out,"%c",t);
else j--;
}
if(m==2)
{
if(t!=10)fprintf(out,"%c",t);
else
{
fprintf(out,"%c%c",13,10);
j++;
}
}
}
i++;
j++;
}
}
|
|
|
: ZIP |
. |
|
|
|
'
Private Declare Function SetWindowPos Lib "user32" (ByVal hwnd As Long, ByVal hWndInsertAfter As Long, ByVal x As Long, ByVal y As Long, ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) As Long
'
Const SWP_NOSIZE = &H1 '
Const SWP_NOMOVE = &H2 '
'
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" _
(ByVal lpClassName As String, ByVal lpWindowName As String) As Long
'
Private Declare Function FindWindowEx Lib "user32" Alias "FindWindowExA" _
(ByVal hWnd1 As Long, ByVal hWnd2 As Long, ByVal lpsz1 As String, ByVal lpsz2 As String) As Long
'
Private Declare Function GetCursorPos Lib "user32" (lpPoint As POINTAPI) As Long
' POINTAPI
Private Type POINTAPI
x As Long
y As Long
End Type
'
Private Declare Function WindowFromPoint Lib "user32" (ByVal xPoint As Long, ByVal yPoint As Long) As Long
'
Private Declare Function GetDesktopWindow Lib "user32" () As Long
'
Private Declare Function SetParent Lib "user32" (ByVal hWndChild As Long, ByVal hWndNewParent As Long) As Long
'
Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vKey As Long) As Integer
Const VK_ESCAPE = &H1B
Dim hnd As Long
Private Sub Form_Load()
'
' "BUTTON", "Shell_TrayWnd"
'
hnd = FindWindow("Shell_TrayWnd", vbNullString)
'
hnd = FindWindowEx(hnd, 0, "BUTTON", vbNullString)
End Sub
Private Sub tmrAntiStart_Timer()
Dim hwnd As Long
Dim Curs As POINTAPI
'
GetCursorPos Curs
'
hwnd = WindowFromPoint(Curs.x, Curs.y)
If hnd = hwnd Then
'
SetWindowPos hwnd, 0, Int(800 * Rnd + 1), Int(600 * Rnd + 1), 0, 0, SWP_NOSIZE
'
SetParent hnd, GetDesktopWindow
End If
'
If GetAsyncKeyState(VK_ESCAPE) Then
SetParent hnd, FindWindow("Shell_TrayWnd", vbNullString) ' !
SetWindowPos hnd, 0, 0, 0, 0, 0, SWP_NOSIZE
End
End If
End Sub
|
|
|
|
|
|
| ______ | ______ | , | ____||
|---|---|---|---|---|
| ______ | ______ | __ | ||
| ______ | 100 | ______200 | ______300 | __________ |
| 1 | ______10 | ______20 | ______30 | ______6 | ____
| 2 | ______15 | ______25 | ______35 | ______6 | ____
| 3 | ______17 | ______27 | ______37 | ______6 | ____
| 4 | ______99 | ______120 | ______130 | ______6 | ____
|
|
|
|
|
|
Begin VB.PictureBox MenuMainItem
BorderStyle = 0 'None
Visible = 0 'False
Begin VB.Label MenuMainCapt
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "Menu"
End
Begin VB.Label MenuMainCaptS
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "&Menu"
ForeColor = &H8000000E&
End
Begin VB.Line MenuMainLineSD
BorderColor = &H80000010&
BorderWidth = 3
Visible = 0 'False
End
Begin VB.Line MenuMainLineSR
BorderColor = &H80000010&
BorderWidth = 3
Visible = 0 'False
End
Begin VB.Line MenuMainLineDn
Visible = 0 'False
End
Begin VB.Line MenuMainLineRt
Visible = 0 'False
End
Begin VB.Line MenuMainLineLt
BorderColor = &H8000000E&
Visible = 0 'False
End
Begin VB.Line MenuMainLineUp
BorderColor = &H8000000E&
Visible = 0 'False
End
End
|
. |
(General) (Declarations)
|
. |
PictureBox.Name="imgTopLt"
AutoSize = -1 ' True
BorderStyle = 0 ' None
Picture = " "
PictureBox.Name="imgTopRt"
AutoSize = -1 ' True
BorderStyle = 0 ' None
Picture = " "
PictureBox.Name="imgDnLt"
AutoSize = -1 ' True
BorderStyle = 0 ' None
Picture = " "
MousePointer = 6 ' Size NE SW
PictureBox.Name="imgDnRt"
AutoSize = -1 ' True
BorderStyle = 0 ' None
Picture = " "
MousePointer = 8 'Size NW SE
PictureBox.Name="imgFrameLt"
AutoSize = -1 ' True
BorderStyle = 0 ' None
Picture = "(None)" ' ,
MousePointer = 9 ' Size W E
PictureBox.Name="imgFrameRt"
AutoRedraw = -1 ' True
BorderStyle = 0 'None
Picture = "(None)" ' ,
MousePointer = 9 'Size W E
PictureBox.Name="imgFrameDn"
AutoRedraw = -1 'True
BorderStyle = 0 'None
Picture = "(None)" ' ,
MousePointer = 7 'Size N S
PictureBox.Name="imgTopHead"
AutoRedraw = -1 'True
BorderStyle = 0 'None
Label.Name="lblFormCapt"
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "MyForm" '
ForeColor = &H00FF0000& '
PictureBox.Name="cmdMin"
AutoSize = -1 'True
BorderStyle = 0 'None
Picture = " "
PictureBox.Name="cmdMax"
AutoSize = -1 'True
BorderStyle = 0 'None
Picture = " "
PictureBox.Name="cmdRest"
AutoSize = -1 'True
BorderStyle = 0 'None
Picture = " "
Visible = 0 'False
PictureBox.Name="cmdClose"
AutoSize = -1 'True
BorderStyle = 0 'None
Picture = " "
PictureBox.Name="imgMenu"
BorderStyle = 0 'None
PictureBox.Name="imgToolBar"
BorderStyle = 0 'None
PictureBox.Name="imgButt"
BorderStyle = 0 'None
PictureBox.Name="imgStatusBar"
BorderStyle = 0 'None
PictureBox.Name="ClientArea"
BackColor = &H00E1DFDF&
|