NASA's Spaceman
جمعه 16 اسفند 1392, 01:29 صبح
سلام
این تاپیک با بقیه یه فرق داره تو کد نویسی
به زبان VB6
Private Sub Timer1_Timer()'timer1.Interval=70 because it normal move
Text1.Left = Text1.Left - 100
If Text1.Left <= -1000 Then Text1.Left = Form1.Width
End Sub
و حالا اینم ترجمه کد به زبان C#
private void timer1_Tick(object sender, EventArgs e) {
//timer1.Interval=70 because it normal move
textBox1.Left = textBox1.Left - 60;
if (textBox1.Left <= -1000)
{
textBox1.Left = Form1.ActiveForm.Width;
}
}
این تاپیک با بقیه یه فرق داره تو کد نویسی
به زبان VB6
Private Sub Timer1_Timer()'timer1.Interval=70 because it normal move
Text1.Left = Text1.Left - 100
If Text1.Left <= -1000 Then Text1.Left = Form1.Width
End Sub
و حالا اینم ترجمه کد به زبان C#
private void timer1_Tick(object sender, EventArgs e) {
//timer1.Interval=70 because it normal move
textBox1.Left = textBox1.Left - 60;
if (textBox1.Left <= -1000)
{
textBox1.Left = Form1.ActiveForm.Width;
}
}