长话短说:我正在尝试编写一个将IE历史记录转储到文本文件的应用程序.因为我很懒,所以我去寻找一个预先存在的库,并发现这个美丽的项目来构建:http://www.freevbcode.com/ShowCode.asp?ID = 6702 .只是,我被困了......
我终于得到了程序来转储历史记录,但只有在我放置Module1.vb的MsgBox()第169行时它才有效.我试过放一个,但那不起作用.那里必须有一个消息框,或者只列出今天的历史记录.Thread.Sleep()
我的猜测,因为这是在谈论wininet.dll,这是一个并发的事情. Thread.Sleep()(对于For ... Next循环)停止程序监听; 没有什么能让它在分配值之前退出循环,但是MsgBox()恰到好处.除了MsgBox()之外还有什么东西会产生相同的效果吗?我不想三十次打OK以使程序正常工作.
这是我的分支/版本/衍生作品:http://profnano.org/andy/misc/img/HistList.zip ; 这是一个VS.NET2003项目.
我做了一些搜索,但没有找到这个问题,抱歉.
在一个vb6循环中,我有一个msgbox显示.有没有办法进入调试模式(如使用F8)?我需要这个来改变msgbox的条件.
而不是,我无法重新启动项目因为那样我将丢失更改和阵列所花费的时间(几个小时).
TIA.
我想知道是否有人可以帮助我将下面变成一个msg框.基本上我希望它首先检查下面的任何一个范围是否说CHECK,如果他们这样做,msgbox会出现解释哪个规则被破坏了.我曾试图创建变量,但不确定如何在msgbox中实现它.
Sub ErrorMsgBox()
Dim Error1 As String
If Range("DaisyFreshRule").Value = "CHECK" Then
Error1 = "Daisy Fresh Rule"
Else
End If
Dim Error2 As String
If Range("MigrationRule").Value = "CHECK" Then
Error2 = "Migration Rule"
Else
End If
Dim Error3 As String
If Range("ServiceCreditRule").Value = "CHECK" Then
Error3 = "Service Credit Rule"
Else
End If
End Sub
Run Code Online (Sandbox Code Playgroud) Sub prelim()
MsgboX "Hello World"
End Sub
Sub Main()
Call prelim
End Sub
Run Code Online (Sandbox Code Playgroud)
在上面的代码Sub prelim无法编辑.我想运行msgbox Sub prelim但运行时我Sub Main不希望弹出消息框.怎么做?
我很久以来一直在使用vb.net,但从未遇到过这个问题.由于某种原因,Intellisense没有检测到MsgBox().当我将鼠标悬停在突出显示的红线上时,它表示"'MsgBox'未被声明.由于其保护级别,它可能无法访问",并且在可能的修复中它尝试创建名为MsgBox()的新函数.以下是代码:
Imports System
Imports System.Data.SqlClient
Imports System.Runtime.InteropServices
Imports System.Web.Configuration
Imports Microsoft.Office.Interop.Outlook
Public Class ConferenceRooms
Inherits System.Web.UI.Page
Dim SQLConnection As New
SqlConnection(ConfigurationManager.ConnectionStrings("MyDB").ConnectionString)
Dim SQLcommand As New SqlCommand
Dim SQLAdapter As SqlDataAdapter
Dim SQLDataTable As DataTable
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
'MsgBox(LBTest.Attributes("title"))
'Dim lb As Label = CType(Me.Controls("HR Conference Room"), Label)
If Not IsPostBack Then
Dim Query1 As String
Query1 = "Select Location_ID from LCSConference_Locations where vacant = 1"
RunQuery(Query1)
Dim OrganizerEmail As String = …Run Code Online (Sandbox Code Playgroud) 我有这样的脚本:
rp_1st_name = 1000
rp_last_name = 2000
rp_1st_val = 5555
rp_last_val = 6666
fdh = 200
dif = (rp_1st_val - rp_last_val) - fdh
teor = rp_1st_val - rp_last_val
m1='wysokosc reperu poczatkowego:',rp_1st_val,'mm \n'
m2='wysokosc reperu koncowego:',rp_last_val, 'mm \n'
m3='przwyzszenie na ciagu: \n'
m4='teoretyczne =',teor,'mm \n'
m5='obliczone = ',fdh,'mm \n'
m6='fdh =',dif,'mm \n'
from easygui import *
msgbox((m1, m2, m3, m4, m5, m6),"SUMMARY", ok_button="Exit")
我只是想从一个形状中获取文本并将其显示在其他地方(Textbox,MsgBox ......)
我知道这不正确但希望你能从中掌握这个概念.
msgbox ("Do you want to overwrite " & slide1.slot1.value &, 36, "?")
slot1 = shapename
Run Code Online (Sandbox Code Playgroud)
有任何想法吗?
下面是我的MsgBox代码." 是"按钮正在工作,但是当我单击" 否"或" 取消"时,它仍然会删除数据...
strup = "DELETE FROM student WHERE urno =" & CInt(txtUrn.Text) & ";"
Dim command As New OleDb.OleDbCommand(strup, con)
MsgBox("Do you want to delete record(s)", MsgBoxStyle.YesNoCancel, "Confirm Delete")
command.ExecuteNonQuery()
con.Close()
Run Code Online (Sandbox Code Playgroud)
单击" 否"或" 取消"时如何取消删除操作?
下面的代码是我写的一个宏的片段,用于警告用户他们可能没有足够数量的兼容安装设备.n个缺陷(即,没有兼容安装设备的设备项目的每个实例都保存在元素1到n的yankees()数组中.我想要做的是提示用户输入一个消息框,说明"请检查您的订单以确保你有足够的兼容安装设备 - 我们检测到以下不足之处"
在那之下
在消息框中的单独行中包括yankees(1到n)的所有元素,下面有两个选项"这没关系,我现在将提交订单"和"让我回去,我想修改我的订单".
我该如何创建这样的消息框?
我有:
MsgBox "Please review your order to ensure you have you sufficient compatible installation equipment- we detected the following concerns" & yankee(1), vbOKCancel
Run Code Online (Sandbox Code Playgroud)
目前但这只包括第一次缺口.如何包含yankee()的所有元素并将它们放在自己的行上?
这个问题实际上归结为:"如何在消息框提示符中将数组变量的所有非空元素放在自己的行上"?
Do
If rip(qbert) < k(qbert) Then
yankee(jets) = "Your order for" & s(qbert) & " contains " & k(qbert) - rip(qbert) & " too few " & g(qbert)
jets = jets + 1
qbert = qbert + 1
Else
qbert = qbert + 1
End If
Loop Until qbert …Run Code Online (Sandbox Code Playgroud) 我已经编写了下面的代码来计算大于或等于1的数字的阶乘.
Public Class FactorialApp
Private Function FactorialChecker(myNumber As Integer)
myNumber = Val(FactorialTextBox.Text)
If myNumber < 1 Then
FactorialChecker = 1
Else
FactorialChecker = myNumber * FactorialChecker(myNumber - 1)
End If
End Function
Public Sub ResultButton_Click(sender As Object, e As EventArgs) Handles ResultButton.Click
End Sub
End Class
Run Code Online (Sandbox Code Playgroud)
我希望在一个button_click事件中有一个消息框,其中有一个类似于5的阶乘是点击时应该是5的120myNumber和120的FactorialChecker()函数,但是我不知道如何在VB的MsgBox命令中返回值,我只是习惯了C#的.
我尝试了代码片段
MsgBox("The Factorial of + myNumber "is" + FactorialChecker() "")
Run Code Online (Sandbox Code Playgroud)
但是我被visual studio中的语法错误所困,还有一个错误,即我的myNumber变量未在程序中声明.我该怎么办才能解决这些错误?
我知道如何在 Windows 上制作 VBS msgBox
message = ("HELLO",0,"Title")
Run Code Online (Sandbox Code Playgroud)
但我想用 Powershell 在 Mac 上做到这一点
谢谢你的回答:D
msgbox ×11
vb.net ×4
vba ×4
excel ×2
excel-vba ×2
.net ×1
arrays ×1
debugging ×1
excel-2013 ×1
intellisense ×1
macos ×1
powerpoint ×1
powershell ×1
python ×1
subroutine ×1
vb6 ×1
vbscript ×1
winapi ×1