Visual Basic
Visual Basic
Dim a As Long
Dim b As Long
Dim op As String
Private Sub Command1_Click(Index As Integer)
Text1.Text = Text1.Text + Command1(Index).Caption
End Sub
Private Sub Cmdplus_Click()
a = Val(Text1.Text)
Text1.Text = ""
op = "+"
End Sub
Private Sub Cmdsubt_Click()
a = Val(Text1.Text)
Text1.Text = ""
op = "-"
End Sub
Option Explicit
Dim x As String
Dim y As String
Private Sub Command1_Click()
x = encryptdecrypt(Text1.Text, True)
Text1.Text = x
End Sub
Private Sub Command2_Click()
Text1.Text = ""
Text2.Text = ""
End Sub
#include<afxwin.h>
#include<afxext.h>
{
Create(0," STATUS OF TOGGLE KEY ");
}
int OnCreate(LPCREATESTRUCT l)
{
CFrameWnd::OnCreate(l);
s.Create(this);
indicators[0]=0;
indicators[1]=ID_INDICATOR_CAPS;
indicators[2]=ID_INDICATOR_NUM;
indicators[3]=ID_INDICATOR_SCRL;
s.SetIndicators(indicators,4);
return 0;
}
DECLARE_MESSAGE_MAP()
};
BEGIN_MESSAGE_MAP(myframe,CFrameWnd)
ON_WM_CREATE()
END_MESSAGE_MAP()
class myapp : public CWinApp
{
public:
int InitInstance()
{
myframe *p;
p=new myframe();
p->ShowWindow(1);
m_pMainWnd=p;
return 1;
}
};
myapp a;