vb中ingremainvb senddata乱码的用法

如何用vb实现软件使用时间限制_百度知道
如何用vb实现软件使用时间限制
我有更好的答案
您想实现什么?成熟软件可以使用加密狗,厂家带加密壳。不要代码或者自己写系列号,启动时候检测时间
采纳率:45%
来自团队:
一.使用次数限值'===================================================================='窗体名称:frmMain.frm'作者: VeryBeNET'E-Mail:'日期:'公司:青铜剑工作室'功能:程序使用次数限制'====================================================================Option ExplicitPrivate Sub Form_Load()
Dim lngRemainData As Long
lngRemainData = GetSetting(&MyApp&, &set&, &times&, 0)
If lngRemainData &= 30 Then
MsgBox &试用次数已满,如果您觉得本软件不错,请购买正版!&, vbOKOnly, &青铜剑工作室&
MsgBox &现在剩下:& & 30 - lngRemainData & &试用次数,好好珍惜!&
lngRemainData = lngRemainData + 1
SaveSetting &MyApp&, &set&, &times&, lngRemainDataEnd Sub二.使用时间限值(1)'===================================================================='窗体名称:frmMain.frm'作者: VeryBeNET'E-Mail:'日期:'公司:青铜剑工作室'功能:程序使用时间(30天)限制'====================================================================Option ExplicitPrivate Sub Form_Load()
Dim lngRemainDay As Long
lngRemainDay = GetSetting(&MyApp&, &set&, &day&, 0)
If lngRemainDay &= 30 Then
MsgBox &试用期已过,请购买正版!&, vbOKOnly, &青铜剑工作室&
MsgBox &现在剩下:& & 30 - lngRemainDay & &天试用,好好珍惜!&
If Day(Now) - lngRemainDay & 0 Then lngRemainDay = lngRemainDay + 1
SaveSetting &MyApp&, &set&, &times&, lngRemainDayEnd Sub三.使用时间限制(2)Option Explicit'===================================================================='窗体名称:frmMain.frm'作者: VeryBeNET'E-Mail:'日期:'公司:青铜剑工作室'功能:程序使用时间限制'====================================================================Dim dteNextTime As DatePrivate Sub Form_Load()
tmrLimit.Interval = 500
tmrLimit.Enabled = True
dteNextTime = DateAdd(&n&, 1, Now)End SubPrivate Sub tmrLimit_Timer()
If Now &= dteNextTime Then
tmrLimit.Enabled = False
MsgBox &试用时间已到,如果您觉得本软件不错,请购买正版!&, vbOKOnly, &青铜剑工作室&
End IfEnd Sub
为您推荐:
其他类似问题
您可能关注的内容
换一换
回答问题,赢新手礼包
个人、企业类
违法有害信息,请在下方选择后提交
色情、暴力
我们会通过消息、邮箱等方式尽快将举报结果通知您。vb编写的软件如何设置使用时间 我有一个软件想设置使用时间为30天,怎么编写呢_百度知道
vb编写的软件如何设置使用时间 我有一个软件想设置使用时间为30天,怎么编写呢
我有更好的答案
VB写自己试用软件(为你写的软件加上使用期限),使用别人的软件大多都有试用期,试用期已过就不能在使用,除非注册!Vb也可以实现这样滴效果!以下下介绍两种简单易懂的(其实就会这两种)!当然还有其他方法, 像生成配置文件等!方法很多有待尝试!呵呵!现在提供两种方法。都是利用注册表的一种是利用点击的次数。比如一共有30次,点一次少一次。直到0就不能用了另一种是用时间限制的。如30天,每天减少一次代码给出,由于代码不是很难就不做任何解释了!--------------------------------------------------'次数限制(如30次)如下:Private Sub Form_Load()Dim RemainDay As LongRemainDay = GetSetting(&MyApp&, &set&, &times&, 0)If RemainDay = 30 Then
MsgBox &试用次数已满,请注册&
Unload MeEnd IfMsgBox &现在剩下:& & 30 - RemainDay & &试用次数,好好珍惜!&RemainDay = RemainDay + 1SaveSetting &MyApp&, &set&, &times&, RemainDayEnd Sub先测试第一种的--------------------------------------------------'时间限制的(如30天)Private Sub Form_Load()Dim RemainDay As LongRemainDay = GetSetting(&MyApp&, &set&, &day&, 0)If RemainDay = 30 Then
MsgBox &试用期已过,请注册&
Unload MeEnd IfMsgBox &现在剩下:& & 30 - RemainDay & &试用天数,好好珍惜!&if day(now)-remainday&0 then RemainDay = RemainDay + 1SaveSetting &MyApp&, &set&, &times&, RemainDayEnd Sub 代码结束!很简短吧!呵呵!
采纳率:37%
涉及控件text,command,timer各一个属性设置timer\interval\1000通用命令Dim i As Integer钟表命令Private Sub Timer1_Timer()Text1.Text = Date + TimeIf Text1.Text &= & 22:10:00& ThenCommand1.Enabled = FalseEnd IfEnd Sub这个command可以换成你想要的另一个控件,达到使软件不可用就行了。或者使用then form.visible=false达到使整个窗体不可见。
为您推荐:
其他类似问题
换一换
回答问题,赢新手礼包
个人、企业类
违法有害信息,请在下方选择后提交
色情、暴力
我们会通过消息、邮箱等方式尽快将举报结果通知您。Access denied | share.freesion.com used Cloudflare to restrict access
Please enable cookies.
What happened?
The owner of this website (share.freesion.com) has banned your access based on your browser's signature (42fbf2-ua98).VB.Net - Operators
VB.Net - Operators
Advertisements
An operator is a symbol that tells the compiler to perform specific mathematical or logical manipulations. VB.Net is rich in built-in operators and provides following types of commonly used operators:
Arithmetic Operators
Comparison Operators
Logical/Bitwise Operators
Bit Shift Operators
Assignment Operators
Miscellaneous Operators
This tutorial will explain the most commonly used operators.
Arithmetic Operators
Following table shows all the arithmetic operators supported by VB.Net. Assume variable A holds 2 and variable B holds 7, then:
Description
Raises one operand to the power of another
B^A will give 49
Adds two operands
A + B will give 9
Subtracts second operand from the first
A - B will give -5
Multiplies both operands
A * B will give 14
Divides one operand by another and returns a floating point result
B / A will give 3.5
Divides one operand by another and returns an integer result
B \ A will give 3
Modulus Operator and remainder of after an integer division
B MOD A will give 1
Comparison Operators
Following table shows all the comparison operators supported by VB.Net. Assume variable A holds 10 and variable B holds 20, then:
Description
Checks if the values of two opera if yes, then condition becomes true.
(A = B) is not true.
Checks if the values of two opera if values are not equal, then condition becomes true.
B) is true.
Checks if the value of left
operand is greater than the va if yes, then condition becomes true.
(A & B) is not true.
Checks if the value of left
operand is less than the va if yes, then condition becomes true.
(A & B) is true.
Checks if the value of left
operand is greater than or equal to the va if yes, then condition becomes true.
(A &= B) is not true.
Checks if the value of left
operand is less than or equal to the va if yes, then condition becomes true.
(A &= B) is true.
Apart from the above, VB.Net provides three more comparison operators, which we will be using in
however, we give a brief description here.
Is Operator - It compares two object reference variables and determines if two object references refer to the same object without performing value comparisons. If object1 and object2 both refer to the exact same object instance, result is True; otherwise, result is False.
IsNot Operator - It also compares two object reference variables and determines if two object references refer to different objects. If object1 and object2 both refer to the exact same object instance, result is False; otherwise, result is True.
Like Operator - It compares a string against a pattern.
Logical/Bitwise Operators
Following table shows all the logical operators supported by VB.Net. Assume variable A holds Boolean value True and variable B holds Boolean value False, then:
Description
It is the logical as well as bitwise AND operator. If both the operands are true, then condition becomes true. This operator does not perform short-circuiting, i.e., it evaluates both the expressions.
(A And B) is False.
It is the logical as well as bitwise OR operator. If any of the two operands is true, then condition becomes true. This operator does not perform short-circuiting, i.e., it evaluates both the expressions.
(A Or B) is True.
It is the logical as well as bitwise NOT operator. Use to reverses the logical state of its operand. If a condition is true, then Logical NOT operator will make false.
Not(A And B) is True.
It is the logical as well as bitwise Logical Exclusive OR operator. It returns True if both expressions are True or both expressions are F otherwise it returns False. This operator does not perform short-circuiting, it always evaluates both expressions and there is no short-circuiting counterpart of this operator.
A Xor B is True.
It is the logical AND operator. It works only on Boolean data. It performs short-circuiting.
(A AndAlso B) is False.
It is the logical OR operator. It works only on Boolean data. It performs short-circuiting.
(A OrElse B) is True.
It determines whether an expression is False.
It determines whether an expression is True.
Bit Shift Operators
We have already discussed the bitwise operators. The bit shift operators perform the shift operations on binary values. Before coming into the bit shift operators, let us understand the bit operations.
Bitwise operators work on bits and perform bit-by-bit operations. The truth tables for &, |, and ^ are as follows:
Assume if A = 60; and B = 13; now in binary format they will be as follows:
-----------------
We have seen that the Bitwise operators supported by VB.Net are And, Or, Xor and Not. The Bit shift operators are && and && for left shift and right shift, respectively.
Assume that the variable A holds 60 and variable B holds 13, then:
Description
Bitwise AND Operator copies a bit to the result if it exists in both operands.
(A AND B) will give 12, which is
Binary OR Operator copies a bit if it exists in either operand.
(A Or B) will give 61, which is
Binary XOR Operator copies the bit if it is set in one operand but not both.
(A Xor B) will give 49, which is
Binary Ones Complement Operator is unary and has the effect of 'flipping' bits.
(Not A ) will give -61, which is
in 2's complement form due to a signed binary number.
Binary Left Shift Operator. The left operands value is moved left by the number of bits specified by the right operand.
A && 2 will give 240, which is
Binary Right Shift Operator. The left operands value is moved right by the number of bits specified by the right operand.
A && 2 will give 15, which is
Assignment Operators
There are following assignment operators supported by VB.Net:
DescriptionExample
Simple assignment operator, Assigns values from right side operands to left side operand C = A + B will assign value of A + B into C
Add AND assignment operator, It adds right operand to the left operand and assigns the result to left operand
C += A is equivalent to C = C + A
Subtract AND assignment operator, It subtracts right operand from the left operand and assigns the result to left operand
C -= A is equivalent to C = C - A
Multiply AND assignment operator, It multiplies right operand with the left operand and assigns the result to left operand
C *= A is equivalent to C = C * A
Divide AND assignment operator, It divides left operand with the right operand and assigns the result to left operand (floating point division)
C /= A is equivalent to C = C / A
Divide AND assignment operator, It divides left operand with the right operand and assigns the result to left operand (Integer division)
C \= A is equivalent to C = C \A
Exponentiation and assignment operator. It raises the left operand to the power of the right operand and assigns the result to left operand.
C^=A is equivalent to C = C ^ A
Left shift AND assignment operator
C &&= 2 is same as
C = C && 2
Right shift AND assignment operator
C &&= 2 is same as
C = C && 2
Concatenates a String expression to a String variable or property and assigns the result to the variable or property.
Str1 &= Str2 is same as
Str1 = Str1 & Str2
Miscellaneous Operators
There are few other important operators supported by VB.Net.
Description
Returns the address of a procedure.
AddHandler Button1.Click,
AddressOf Button1_Click
It is applied to an operand in an asynchronous method or lambda expression to suspend execution of the method until the awaited task completes.
Dim result As res
= Await AsyncMethodThatReturnsResult()
Await AsyncMethod()
It returns a Type object for the specified type. The Type object provides information about the type such as its properties, methods, and events.
MsgBox(GetType(Integer).ToString())
Function Expression
It declares the parameters and code that define a function lambda expression.
Dim add5 = Function(num As
Integer) num + 5
'prints 10
Console.WriteLine(add5(5))
It uses short-circuit evaluation to conditionally return one of two values. The If operator can be called with three arguments or with two arguments.
Dim num = 5
Console.WriteLine(If(num >= 0,
"Positive", "Negative"))
Operators Precedence in VB.Net
Operator precedence determines the grouping of terms in an expression. This affects how an expression is evaluated. Certain operators have higher pr for example, the multiplication operator has higher precedence than the addition operator:
For example, x = 7 + 3 * 2; here, x is assigned 13, not 20 because operator * has higher precedence than +, so it first gets multiplied with 3*2 and then adds into 7.
Here, operators with the highest precedence appear at the top of the table, those with the lowest appear at the bottom. Within an expression, higher precedence operators will be evaluated first.
Precedence
Exponentiation (^)
Unary identity and negation (+, -)
Multiplication and floating-point division (*, /)
Integer division (\)
Modulus arithmetic (Mod)
Addition and subtraction (+, -)
Arithmetic bit shift (<>)
All comparison operators (=, , <, , >=, Is, IsNot, Like, TypeOf...Is)
Negation (Not)
Conjunction (And, AndAlso)
Inclusive disjunction (Or, OrElse)
Exclusive disjunction (Xor)
& Copyright 2018. All Rights Reserved.remain和keep用法上有区别吗?_百度知道
remain和keep用法上有区别吗?
re.main[rI`m&#1108;n; riˋm&#1108;in]不及物动词1 a. 剩下,残留,残余 [续存] ,活著未死If you take 3 from 7, 4 ~s.七减三余四The ~ing snow began to freeze again.残留的雪又开始结冰b. 被遗留下来[of]Very little ~ed of the original building.原来建筑物的残迹遗留下来的很少Most of what ~s of his laboratory is now in the museum.他实验室遗留下来的大多数实物现放置在博物馆中c. 尚须Much more still ~ to be done.还有更多事要做That ~s to be seen.那件事 (在现阶段) 不得而知 [只能拭目以待]d. 仍须要[由…]&做…&It only ~s for me to say that.?.剩下我所能说的是…2 a. 留下Tom went but his sister ~ed.汤姆走了但他妹妹留下b. 停留,逗留He will ~ here [at the hotel] three more days.他将在这儿 [这旅馆] 多停留三天He ~ed where he was.他停留在原处3 a. 依然,依旧是When everyone else was in a panic, she ~ed calm.当其他人都在惊慌时,她依然镇静They ~ed friends.他们依旧是朋友b. 继续She ~ed standing there.她继续站在那儿名词[~s]1 a. 残余,余物the ~s of a meal剩饭剩菜b. 遗骸; 遗物,遗迹[of]the ~s of ancient Greece古希腊的遗迹c. (古生物等的) 化石fossil ~s化石2 (文语)遗体3 (作家的) 遗稿keep[ ki:p]《源自古英语“看守,守”的意思》(kept[k[ kept])及物动词A1 保留,保有,保存,留下a. 保存,保留&东西& (reserve)K~ the change.不用找钱了She has kept all the letters from him.她把他的来信全保存起来b. 把&东西&保藏,把…存放[在…][in]K~ the film in a dark and cool place.把软片存放在阴凉的地方c. [为…]保存&东西&[for]I&#39;ll ~ this for future use.我要保存这东西为将来用d. 为&人&留&东西&; 留&东西&[给人][for]Will you ~ me this book[~ this book for me]? I&#39;ll come later.请帮我保管这本书好吗?我稍后来 (拿)2 守a. 信守 &诺言、协定等& ; 遵守 [服从] &法律、规则等& (obey)~ a promise [one&#39;s word]守约,守诺言; 守信b. 守 &生活上的时间&→ keep early [late,regular] hoursc. &钟表& (正确地) 维持 [守] &时间&This watch ~s good time.这只表很准d. 举行 &仪式、民俗活动等& ,庆祝,纪念 (celebrate)~ the Sabbath守安息日~ Christmas [one&#39;s birthday]庆祝耶诞节 [生日]e. 守 &秘密&He cannot ~ a secret.他无法守密3 使…停留a. 拘留,拘禁&人&The teacher kept the pupils after school.老师在放学后把学生留下不让回家b. 使&人&停留 &在…的状态&The snow kept them indoors.雪把他们困在屋内I won&#39;t ~ you long.我不会担误你很久The suspect was kept in custody for a week.嫌犯被拘禁一星期c. 妨碍,阻止&人、物&[做…],使&人、物&不能[做…][from]What has kept you from helping her?.你为什么还没有帮助她 [什么事妨碍你帮助她] ?She could not ~ herself from crying.她忍不住便哭了What kept you (from coming)?.什么事使你耽误了[使你不能来] ?d. [对人]隐瞒&事物&[from]You are ~ing something from me.你对我有所隐瞒B 1 保护a. 保护&人&; 守 &球门&~ goal(于足球比赛等) 守球门God ~ you!.愿上帝保?你!请保重!b. 保护&人& [免于危害] [from]~ a person from danger保护某人免于危险2 [替…] 保管&东西&; 收存&钱&; 储存&食品等&[for]Banks ~ money for us.银行为我们保管钱Will you ~this jewel for me ?.请你为我保管这珠宝好吗?They ~ meat by drying.他们使肉保持干燥以便储藏3a. (以良好的状态) 维护 &房屋、庭院等& ,养护,保养This garden is always kept well.这花园经常维护得很好b. 经营 &商店& ,管理 &学校等& (manage)~ a shop经营商店c. [~ oneself]靠自己收入生活,养活自己4 a. 养 &家& ,养活,扶养 (support) &家眷&He ~s a large family.他扶养一个大家庭b. 雇用 &佣人等& c. 蓄 &妾& ,金屋藏 &娇&d. 饲养 &牲口、狗、猫等& ,饲育~ a dog [bees, cows]养狗 [蜂,牛]5 摆[卖]著&商品&,经销That store~s imported cheeses.那家商店出售进口乳酪We don&#39;t ~ silver plate in stock.我们没有银制餐具的现货6a. (持续地) 记 &日记、帐等&~ a diary (习惯地) 写日记~ books记帐→ keep accountsb. 记录&时间&→ keep time7 维持 &某种状态、动作&~ silence保持沉默~ watch监视,警戒8 a. 使…维持&…的状态&I kept myself warm by walking about.我到处走动以保持身体暖和K~ your body [yourself] clean.保持你身体清洁K~ your head down.把你的头低著 (以免危险)They kept the back door locked.他们一直把后门上著锁Let&#39;s ~ it a secret.让我们继续保守这秘密He always ~s his room in order.他经常保持房间整齐b. 使…继续…K~ the stove burning.让暖炉的火继续烧著I&#39;m sorry I have kept you waiting so long.抱歉,让你久等了9a. 留守,不离开,守著Please ~ your seat.请留在座位上 [不要离开座位]b. 一直不偏离地走&道路等&~ one&#39;s way继续走自己的路; 坚守自己的目标c. 闭门不出&房间等&~ one&#39;s room一直留在房间里10 [~ company] 做朋友,结交不及物动词1a. 一直留在 (某地方、位置)~ at home一直在家~ to the right =~right靠右通行The children kept indoors.孩子们一直留在屋里b. 继续前进[进行]K~ straight on.一直向前进K~ along this road for two miles or so.继续沿这条路走二哩左右2 a. 保持&…的状态&,维持 &原状&Please ~ quiet [silent].请保持安静 (◆{比较}→ v.t. B 7)He kept awake.他一直醒著&How are you ~ing?&- &I&#39;m ~ing very well, thank you.&.“你好吗?”“谢谢,我一直很好”We should ~ in touch with scientific advances.我们应该知晓科学进展的情况b. 继续&做…&,一直&做…&The child kept crying.那孩子哭个不停(cf. keep on (6){用法})
采纳率:58%
来自团队:
stay、remain和keep辨析 1.表示“继续呆在某处”时,应该用不及物动词remain或stay,例如: Shall I go or stay? Stay indoors for a few days until
为您推荐:
其他类似问题
&#xe675;换一换
回答问题,赢新手礼包&#xe6b9;
个人、企业类
违法有害信息,请在下方选择后提交
色情、暴力
我们会通过消息、邮箱等方式尽快将举报结果通知您。

我要回帖

更多关于 vb data 的文章

 

随机推荐