VB的web上的form表单处理问题

xinhuagong 2003-08-07 03:36:55
有个程序是这样的:
需要客户端通过网络提交form表单,然后form表单响应以后,通过返回一个网页上的数字来回复客户表示提交的表单是否被受理,我如何捕获这个返回网页上的数字呢?
用VB能做吗???
...全文
25 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
Snnywf888 2003-12-09
  • 打赏
  • 举报
回复
给你一个参考吧

写:
For i = 0 To WebRegister.Document.Forms(0).Length - 1
'查找到输入框后填入已注册的信息
Select Case WebRegister.Document.Forms(0)(i).Name
Case "UserKey"
WebRegister.Document.Forms(0)(i).Value = UserKey
Case "UserName"
WebRegister.Document.Forms(0)(i).Value = UserName
Case "UserPhone"
WebRegister.Document.Forms(0)(i).Value = UserPhone
Case "UserAddress"
WebRegister.Document.Forms(0)(i).Value = UserAddress
Case "PostalCode"
WebRegister.Document.Forms(0)(i).Value = PostalCode
Case "Email"
WebRegister.Document.Forms(0)(i).Value = Email
Case "ComputerCode"
WebRegister.Document.Forms(0)(i).Value = ComputerCode
'Case "RegCode"
' WebRegister.Document.Forms(0)(i).Value = RegCode
End Select
Next

读:反过来就可以了
1 , manc-skinex.zip
This is an example of how to add skins to your program.
2 , irregularForms.zip
This is a great example. It takes two images to shape the form, then blits the "face" onto the form also.
3 , noclose.zip
This demonstrates how to remove the "X" located on the top of your form, while keeping the maximize and minimize buttons visible.
4 , dos-menu.zip
This example shows how to change your applications menu apperance as in color and font.
5 , dos-iface.zip
This is an example of how to use skins in your program, and also using BitBlt for a great looking interface.
6 , sg_settings.zip
This demonstrates how to save information about your program in the registry of windows. Much more reliable than using INIs
7 , Menubmp.zip
This demonstrates how to add images to a menu.
8 , 3DBorders.zip
This bas lets you create 3D Borders on your form.
9 , manc-resize.zip
This is an example project I did to go with the Resize module below.
10 , resize.zip
When resizing your form, this bas will let you also resize the controls
11 , invisbas.zip
This is a bas that will make your form transparent but leave all of the controls visible.
12 , FormScroller.zip
This bas will let your form exit in diferant directions.
13 , appbar14.zip
This example demonstrates how to have your Application "merge" with windows like the taskbar does.
14 , winhole.zip
This example demonstrates how to put a hole in the center of a form.
15 , tileform.zip
This will tile a picture on the background of your form.
16 , radiomnu.zip
This demonstrates how to add radio buttons to your menus
17 , mnupics.zip
This will add pictures to a menu. This is an excellent example.
18 , savepos.zip
This will show you how to save and load the last recorded position of your form.
19 , shapeform.zip
This will change the shape of a sample form to pre-selected shapes.
20 , splash.zip
This demonstrates how to create a splash form for your program.
21 , menustat.zip
This shows how to display information about the menu item in a label.
22 , coolbar.zip
This is an example of how to make a toolbar like Office 97 in your VB Applications.
23 , showdrag.zip
This example shows how to show the windows contents while the window is being dragged.
24 , avb-gradient.zip
This bas is composed of 35 Differant Gradient Color Fades. It is meant to inhance Interface Design without spending a lot of time on solely the interface.
25 , avb-addressof.zip
An Example of Using the 'AddressOf' Operater in VB5 to Limit the Size that the User is Permitted to Resize your Form.
26 , windis.zip
This is a straight forward example of how to disable any Win95/98 window..
27 , tk421-api.zip
Demonstrates how to retrieve various information about specific windows
28 , InetPass.zip
This example demonstrates how to get windows' cached passwords.
"This example will show all of the cached passwords on a local system !"
29 , Toolbar1.zip
Label ToolBar. Quick set up, color option, curor change, good for beginners, small projects
30 , OpacityForm.zip
Opacity Form Effect
31 , MoveForm.zip
Moves a form around the screen just by dragging it.
32 , RoolingForm.zip
Creates a "rolling" form using SetWindowRgn API call.
33 , CoolEffectForm.zip
Cool effects form is a true resizable form. It also includes clickable labels that change color with the mouseover event. Fully commented too!
34 , menus.zip
If you wanna make a Menu that suports permissions by user and module with "No Access", "Read Only" and "Full Control" rights, you Found it!! Sory, but the examples are in Portuguese
35 , MDForm.zip
Demonstrates the creation of Master/Detail form using an RDO connection, also helps understand the object oriented programming concepts in VB
36 , DockDemo.zip
A form that docks to the edges of the desktop (and actually works), and takes the taskbar into consideration.
37 , transparentform.zip
Transparent Form with bitmap mask 1 line code for call this DLL
38 , region.zip
This application shows how to "skin a form" to the shape of any bitmap image. The code uses the CreateRectRgn API call to ignore transparent colors and create a form in the shape of the image. This sample uses an image of Homer Simpson
39 , DynaMenu.zip
Program shows how to dynamically create submenu items for both the menu and the popup at run time, and at the same time allowing for free switching between the normal and the columnized menus (and popups), and between menu (and popup) with added bitmaps and without. If the menu (and popup) length goes beyond the predetermined length, the code will automatically sectionalize the menu (and popup) according to the said predetermined length (i.e. as an interval value), and will provide Up and/or Dn graphics to enable navigation between the menu sections.
40 , CoolExplorer2.zip
The new and improved Cool Explorer: Many new functions.
41,JinieScreensaver.zip
A small VB program which is a screensaver using Microsoft Agent. Using the way in which this program works, you can also create a screensaver to run under any version of Windows.
42,wireframe.zip
A computer engineering student from Slovenia has put this together. Its a VB program with all source code and sample for creating a bspline / beziere curve / wireframe generator. Very good and fast code.
43,reaction.zip
A computer engineering student from Slovenia has put this together. Its a reaction-diffusion texture and if you understand all this graphical/mathematical stuff then its very good.
44,filedirector.zip
This is an application I wrote to work in conjunction with the "Windows Explorer / Send To" option. This app helps me to move files quicker that using the copy/paste feature. This project contains some API code from User32 for file moving and API code for registry work.
45,centerform.zip
This is a VB project that shows how to make the form centered on the screen. It also makes the form scroll of the screen and end. I have included A text file with the code for people who cant load vb6 projects and I have also included and .exe of the proj
46,starfield.zip
Two little projects included here. One does a starfield type scrolling - very good, and the second includes two small controls. The first is a hyperlink which will launch the default browser with a URL when click on (it looks just like a hyperlink
47,filesearch.zip
The find option off the Start menu in Windows allows you to amongst other things, find files on your computer that match particular patterns, or were created on/after a certain date. This project mimics this Windows function and searches directories look
48,gradientfill.zip
This little sample contains a routine that allows a picture box to be flood filled with a gradient and from a specified colour value. A box can be filled from left to right or from top to bottom. A very simple bit of code, but useful - if not used to exc
49,cmovemousecursor.zip
This little demo shows how you can move the mouse pointer to a different place on the screen, e.g. command button or other control. It uses a Windows API call but is really simple to understand. Enjoy!
50,ctray.zip
Another cracker by Jonathon. He described it as "to help anyone trying to progress to the next level of VB programming". The sample application includes how to use the Windows API for doing file operations, putting an application into the system tray
51,cwindowontop.zip
This little routine will, if included on the Form_Load event of a form, keep the form/window on top of all other on the desktop. It uses an API call, but the example has been put tidily into a subroutine. It would be essential bit of code for those appl
52,NewForm.zip
If you're bored with standard forms, u can try this one.
53,KrustyTime.zip
Krusty the Clown tells time, and months, and weeks, and days etc. A simple program that you can use for your desktop.
54,msgblast.zip
MsgBlaster.bas is standard VB6 module, which implements a generic framework for window subclassing. The main advantage of using MsgBlaster.bas (as opposed to third-party subclassing controls) is that it does not impose any additional runtime requirements.
55,spider.zip
See a spider is crawling on your form,enjoy it !
56,Dither2.zip
This application shows how to create a form with a fade out background.
57,LockOut.zip
This shows how to use the form keypress to record keystrokes. This program won't let you exit until you type "zx" in a row at any point. It must be in a sequence. There are many possible upgrades so you cannot Alt+Tab out etc.
58,rotate.zip
This example shows you how to create a circular form, and also track the mouse around the screen
59,tilebackground.zip
Tile a picture on the BG of a form.
60,GCBDemo.zip
Graphic control box demo with code. Demonstrates creating a control box using image controls, dragging a window using the API, pop-up menus, limiting form resize, centering controls and other good stuff.
61,Tabasic.zip
It`s a simple program in which you can write a Text, change its color and its font.
62,splitter.zip
This application demonstrates how to implement a splitter bar in a Visual Basic Project.
63,Tabasic_V1.0.1.zip
You can create a Text, change its color and its font, just like the fisrt Version of Tabasic. But now you can Save or Load the Text you have created.
64,formsize.zip
Application which sets form size restrictions. You can set Mix, Man, and fixed form sizes.
65,ProgressBar.zip
This program shows the progress of an action!!
66,TipOfDay.zip
Tip Of Day. It`s name speaks for itself.
67,msgbox.zip
This is a program that will allow to create message boxes easily and fast. it has an auto preview so when you type the text or whatnot it shows you.
68,FormShaper.zip
This is a DLL that make shaping your VB forms as esy as pie. Just call a few methods and that's it. You can have rectangles, rounded rectangles, ellipse, polygons and any combination of them.

69,EllipticForm.zip
An Elliptic form.
70,fancy.zip
Create a fancy colored form.
71,transperant.zip
Makes forms transperant.
72,FormEffect.zip
To illustrate some form effects: transparency and shapes. This code allows for free switching between normal and transparent states of the same form (and free toggling between transparency with frame and without frame), and shows shaped forms as well (rectangular form with rounded corners, oval form and round form).
73,radar.zip
Radar form.
74,click_game.zip
This is a simple program with some simple logics.check it out and rate it.I will be waiting for your responce through e-mail.
75,progressbar2.zip
A progressbar with a difference !
76,RoundSplash.zip
Splash Screen with an animated ROUND FORM.
77,resize2.zip
You know... Real resize function needs some information about what to do. It cannot be done without information. The program even doesn't know what I want until I give it!!!
78,oledesktop.zip
Ole Drag and Drop Example.
79,clsTDBGrid.zip
Are you using True DBgrid for your application? this class improve your speed of programming, with right-click feature, its all user-define style.
80,f_165.zip
How to create a directory tree like in Explorer(19KB)
81,f_183.zip
A program demonstrating the ListView control(7KB)
82,f_162.zip
An example program using the MS Comm control(14KB)
83,f_164.zip
An example program using the Toolbar control(3KB)
84,f_115.zip
A simple web browser built using the Web Browser control(2KB)
85,f_163.zip
How to enumerate the windows using the EnumWindows API(28KB)
86,f_159.zip
A simple example of exchanging data across a network using the WinSock control(4KB)
87,f_160.zip
A basic example on how to transfer files across the network using the WinSock Control(18KB)
由本人第一次尝试制作的录像视频教程,由于电脑速度较慢,播放时间较慢,请谅解。 本录像讲解最基础的VB封装ASP代码生成DLL的制作教程,适合初级学习者参考。也是本人学习VB制作ASP组件的第一个尝试,录像基本成功。 用vb编写asp组件(dll)示例 下面,将演示如何使用vb制作asp的dll组件... 1. 启动你的vb,选择activex dll图标,然后在点击菜单的工程>>引用,接 着在弹出的"引用"窗口从中选择 microsoft active server pages object library. 2. 给工程和类重命名,在asp中调用时,就全靠它了^_^!我们的工程名改 为aspdll,类名为demo.在asp中调用的方法是: set objreference = server.createobject("工程名.类名") 本例调用的相应代码如下: set objreference = server.createobject("aspdll.demo") 调用的方法和一般常见的,比如fso等组件的方法一模一样. 心动了吧,呵呵,下面我们继续.... 3. 接着,我们开始编写代码,打开我们刚才新建工程类窗口,第一步,先声 明我们要用到的变量.主要是在vb声明替代asp几大对象的变量名,定义这 asp的几大对象后,我们就可以像在asp环境中调用类似request,server等 这样的几大对象了.(声明的变量名完全可以和asp对象名一样)代码如下: '********************************************** private mys criptingcontext as s criptingcontext private myapplication as application private myrequest as request private myresponse as response private myserver as server private mysession as session '********************************************** 4. 声明完变量后,我们必须在类中写onstartpage子函数.本函数的作用是 当用户访问一个带有本组件的asp文件时,iis就会把s criptingcontext传 送给我们vb组件对象.这个s criptingcontext包括了全部的asp方法和属性 .这样,就使得我们有能力访问所有asp的对象.代码如下: '***************************************************************** public sub onstartpage(passeds criptingcontext as s criptingcontext) set mys criptingcontext = passeds criptingcontext set myapplication = mys criptingcontext.application set myrequest = mys criptingcontext.request set myresponse = mys criptingcontext.response set myserver = mys criptingcontext.server set mysession = mys criptingcontext.session end sub '***************************************************************** 通过上面的函数,我们在asp中调用本组件后,上面的几大对象就完全可以 像平时我们在asp使用一样了,举个例子: 在asp中实现接收提交的表单值并输出屏幕: <% formvalue=request.form("username") response.write ("你提交的用户名是"&myformvalue&",欢迎您!") %> 在vb中实现方法是: formvalue=myrequest.form("username") myresponse.write ("你提交的用户名是"&myformvalue&",欢迎您!") 5. 相对应于onstartpage函数,我们还要编写一个关闭onstartpage中对象 的onendpage函数,代码如下: '********************************* public sub onendpage() set mys criptingcontext = nothing set myapplication = nothing set myrequest = nothing set myresponse = nothing set myserver = nothing set mysession = nothing end sub '******************************** 6.通过编写上面的代码,我们在vb中编写asp组件实例的环境已经具备了, 下面,我就尝试写两个与asp中基本相类似的函数,也就是说,关键部位就在 这里了,你完全可以把你所有的asp源码封装在这里... 先写个最简单的输出屏幕信息函数: '******************************************** public sub welcomeinfo() myresponse.write ("阿里西西_web开发,欢迎访www.alixixi.com!") end sub '******************************************** 再写个带参数传递及显示now()现在时间的函数: '********************************** public sub setinfo(content as string) myresponse.write content & "
" myresponse.write "现在的时间是:" & now() end sub '********************************** 通过上面的asp代码实例,你会发现其实这和asp源码基本没有区别^_^ 7. 好了,整个类就编写完了,我们开始打包封装成dll.我们先保存工程, 这里我们保存到e:\vbdll,接着选择菜单上的文件>>生成aspdll.dll,很 快的dll组件就封装并生成完毕了. 8. 生成dll文件后,我们开始调试和使用.在系统运行栏输入cmd,进入dos 命令行状态,我们要注册刚才生成的dll组件,注册方法是可以直接输入 regsvr32 e:\vbdll\aspdll.dll ,为了安装方便,你同时可以写个批处理 文件,这里不一一举例了...好,注册成功! 9.注册完dll组件后,我们针对刚才的组件,按照上面介绍过的方法编写一 个asp文件来调试.代码如下: <% set redll = server.createobject("aspdll.demo") redll.welcomeinfo response.write "
" redll.setinfo("传递参数到服务器组件,并返回值及当前日期now()!") response.write "
" set redll = nothing %> 在iis中打开此文件,屏幕显示:

1,502

社区成员

发帖
与我相关
我的任务
社区描述
VB 网络编程
社区管理员
  • 网络编程
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧