资源描述:
《求轴支反力的代码vb》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、PublicdAsStringPubliclAsStringPublicldAsStringPublicfAsStringPublicfxAsStringPublicjxAsStringPubliczd1AsStringPubliczd2AsStringPrivateSubCommandButton1_Click()d=TextBox1.Textl=TextBox3.Textld=TextBox2.Textf=TextBox4.TextListBox1.AddItemd&""&ld&""&l&""&f,ListBox1.ListCountSheet1.Ce
2、lls(ListBox1.ListCount,1)=dSheet1.Cells(ListBox1.ListCount,2)=ldSheet1.Cells(ListBox1.ListCount,3)=lSheet1.Cells(ListBox1.ListCount,4)=fTextBox1.Text=""TextBox2.Text=""TextBox3.Text=""TextBox4.Text=""EndSubPrivateSubCommandButton2_Click()IfListBox1.ListIndex=-1ThenMsgBox("没有可删除的数据
3、!")ElseIfListBox1.ListCount<>0AndListBox1.ListIndex<>ListBox1.ListCount-1ThenListBox1.RemoveItemListBox1.ListIndexSheet1.Rows(ListBox1.ListIndex+1).DeleteElseIfListBox1.ListIndex=ListBox1.ListCount-1ThenListBox1.RemoveItemListBox1.ListIndexSheet1.Rows(ListBox1.ListIndex+2).ClearEn
4、dIfEndSubPrivateSubCommandButton3_Click()ListBox1.ClearSheet1.Cells.ClearTextBox1.Text=""TextBox2.Text=""TextBox3.Text=""TextBox4.Text=""EndSubPrivateSubCommandButton4_Click()TextBox4.Text="支点"EndSubPrivateSubCommandButton5_Click()d=TextBox1.Textl=TextBox3.Textld=TextBox2.Textf=Te
5、xtBox4.TextListBox1.AddItemd&""&ld&""&l&""&f,ListBox1.ListIndex+1TextBox1.Text=""TextBox2.Text=""TextBox3.Text=""TextBox4.Text=""Sheet1.Rows(ListBox1.ListIndex+1).InsertSheet1.Cells(ListBox1.ListIndex+2,1)=dSheet1.Cells(ListBox1.ListIndex+2,2)=ldSheet1.Cells(ListBox1.ListIndex+2,3
6、)=lSheet1.Cells(ListBox1.ListIndex+2,4)=fEndSubPrivateSubCommandButton6_Click()'计算每个点的坐标值并写入sheet1Sheet1.Cells(1,5)=Val(Sheet1.Cells(1,3).Text)'作用点坐标Sheet1.Cells(1,6)=Val(Sheet1.Cells(1,2).Text)'轴肩坐标DimiAsIntegeri=2DoUntilSheet1.Cells(i,1)=nilSheet1.Cells(i,5)=Val(Sheet1.Cells(i-1
7、,6).Text)+Val(Sheet1.Cells(i,3).Text)Sheet1.Cells(i,6)=Val(Sheet1.Cells(i-1,6).Text)+Val(Sheet1.Cells(i,2).Text)i=i+1LoopDimzdAsStringDimi1AsInteger'找出支点位置i1=1DoUntilSheet1.Cells(i1,1)=nilIfSheet1.Cells(i1,4)="支点"Thenzd=zd&i1&","Else:zd=zdEndIfi1=i1+1Loopzd1=Left(zd,Val(InStr(zd,"
8、,"))-1)'得出支点1坐标zd2=Mid(zd,Val(InS