1. 首页 > 科技

跪求vb.net代码 vb net和vb的代码区别

跪求vb代码vb net和vb的代码区别

求vb 代码

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

Response.Write("this is code of VB.NET")

End Sub

求一段vb代码

Public Class Form1

Private Path As String = CurDir() '本程序目录

Private TP1, TP2, TP3 As String

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

'加载图片

TP1 = Path & "\图片1.jpg"

TP2 = Path & "\图片2.jpg"

TP3 = Path & "\图片3.jpg"

PictureBox1.BackgroundImage = Image.FromFile(TP1)

PictureBox2.BackgroundImage = Image.FromFile(TP2)

PictureBox3.BackgroundImage = Image.FromFile(TP3)

End Sub

Private Sub PictureBox2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PictureBox2.Click

Dim TPZH As String '图片中转

TPZH = TP2

TP2 = TP1

TP1 = TPZH

PictureBox1.BackgroundImage = Image.FromFile(TP1)

PictureBox2.BackgroundImage = Image.FromFile(TP2)

PictureBox3.BackgroundImage = Image.FromFile(TP3)

End Sub

Private Sub PictureBox3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PictureBox3.Click

Dim TPZH As String '图片中转

TPZH = TP3

TP3 = TP1

TP1 = TPZH

PictureBox1.BackgroundImage = Image.FromFile(TP1)

PictureBox2.BackgroundImage = Image.FromFile(TP2)

PictureBox3.BackgroundImage = Image.FromFile(TP3)

End Sub

End Class

求5个很简单的vb编程源码

1,1到100的和。

#include<stdio.h>

int main()

{

int i=1,sum=0;

while(i<=100)

{

sum=sum+i;

i++;

}

printf("sum=%d\n",sum);

return 0;

}

2,100内的偶数和

#include<stdio.h>

int main()

{

int sum=0,i=2,n;

do

{

sum=sum+n/i;

i++;

}

while(i<=100);

printf("sum=%d\n",sum);

return 0;

}

3,1到100的奇数和

#include<stdio.h>

int main()

{

int i,sum=0;

for(i=1;i<=100;i++)

if(i%2==1) sum+=i;

printf("%d\n",sum);

i=1;

sum=0;

while(i<=100)

{

if(i%2==1) sum+=i;

i++;

}

printf("%d\n",sum);

}

4,3的倍数之和

#include<stdio.h>

int main()

{

int sum=0,i=3,n;

do

{

sum=sum+n/i;

i++;

}

while(i<=100);

printf("sum=%d\n",sum);

return 0;

}

5,产生10个100以内的随机正整数,求这10个正整数的最大值和最小值,并显示最大值和最小值

#include <stdio.h>

int main()

{

int i,n=10;

int a[10],min=100,max=0,sum=0;

scanf("输入10个100以内的正整数:");

for(i=0; i<=10; i++)

{

if(a[i]>max)max=a[i];

else if(a[i]<min)min=a[i];

sum+=a[i];

}

for(i=0; i<n;i++)

printf("%4d",a[i]);

printf("\n");

printf("最大值是 : %d\n",max);

printf("最小值是 : %d\n",min);

return 0;

求VB.NET代码!!!!急!!!!

Dim frm As New form1()

frm.show()

Me.hidden()