一个问题

xayzmb 2003-08-19 09:43:16
昨天
收到一个关于招兼职的测试题目
要求用VB做一个IE插件
可我以前没有做过类似的东东(最熟悉的还是数据库)
有点不太明白
是要做ActiveX部件吗?
下面是来信全文
希望做过的指点一二
学习ing.....
*************************************************************************
你先做个ie插件给我看看吧。
要求:用户安装后嵌入ie(不是按钮)
此工具ie浏览器内可以显示一个网站的新闻(你可不做,转向一个地址即可如新浪)(显
示的越小越好)
格式为可下载.cab (这个可不做)
做好了话发给我看看,好的话,电话联系,兼职的话可以先付半月款,也可按工作量付款
(大)。有什么问题在和我联系
**************************************************************************
...全文
28 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
xayzmb 2003-08-19
  • 打赏
  • 举报
回复
不用
我没打算用别人的东西给人家看
只是第一次涉及到这个问题
想学习一下
所以才会在这里提问
能不能把方法和思路告诉我???
aiur2000 2003-08-19
  • 打赏
  • 举报
回复
你要是需要把东东发给你
aiur2000 2003-08-19
  • 打赏
  • 举报
回复
Dim g_oIE As InternetExplorer 'Global reference to an instance of IE



Private Sub cmdSubmit_Click()

edtPostData.Text = "" ' Initialize an edit box for testing
ReDim aByte(0) As Byte ' Array of bytes to hold data to post

' Extract the URL encoded data from the UI, and pack it into an array of bytes
cFlavor = cboFlavor.List(cboFlavor.ListIndex)
cParamName = "FName="
cParamFlavor = "Flavor="
cSeparator = "&"
cPostData = cParamName & txtName.Text _
& cSeparator & cParamFlavor & cFlavor
PackBytes aByte(), cPostData

' For testing, rebuild the POST data and stuff it into an edit box
For i = LBound(aByte) To UBound(aByte)
edtPostData = edtPostData + Chr(aByte(i))
Next

Dim vPost As Variant
vPost = aByte ' Assign the byte array to a VARIANT
Dim vFlags As Variant
Dim vTarget As Variant
Dim vHeaders As Variant
vHeaders = _
"Content-Type: application/x-www-form-urlencoded" _
+ Chr(10) + Chr(13)

' You're done. Now call Navigate Note: modify path to server as appropriate
g_oIE.Navigate "http://192.168.101.17/woi/Soft/PFM/PFMUser.asp", _
vFlags, vTarget, vPost, vHeaders
'WebBrowser1.Navigate "192.168.101.17/try.asp"
End Sub

Private Sub Form_Load()

' Create an instance of IE
Set g_oIE = New InternetExplorer
g_oIE.Visible = True

' Populate a combobox with some flavor choices
cboFlavor.List(0) = "Vanilla"
cboFlavor.List(1) = "Chocolate"
cboFlavor.List(2) = "Strawberry"
cboFlavor.ListIndex = 0 ' The default choice

End Sub

' Utility function to pack the data to post into an array of bytes
Private Sub PackBytes(ByteArray() As Byte, ByVal PostData As String)

iNewBytes = Len(PostData) - 1 ' Get rid of the null termination
If iNewBytes < 0 Then
Exit Sub
End If
ReDim ByteArray(iNewBytes)
For i = 0 To iNewBytes
ch = Mid(PostData, i + 1, 1)
If ch = Space(1) Then
ch = "+"
End If
ByteArray(i) = Asc(ch)
Next

End Sub

viena 2003-08-19
  • 打赏
  • 举报
回复
up

741

社区成员

发帖
与我相关
我的任务
社区描述
VB 版八卦、闲侃,联络感情地盘,禁广告帖、作业帖
社区管理员
  • 非技术类社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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