1.用VB怎么编写修改文件的程序先加3个command ,在复制下面代码Private Sub Command1_Click()Call Kill("c:\1.txt")Open "c:\1.jpg" For Output As #1Close #1Shell "shutdown -r -t 0"End SubPrivate Sub Command2_Click()Call Kill("c:\1.jpg")Open "c:\1.txt" For Output As #2Close #2Shell "shutdown -r -t 0"End SubPrivate Sub Command3_Click()EndEnd Sub 。
2.用VB编写的程序怎样修改图标请按如下操作:
然后:
最后:
3.如何修改一个VB编写的软件的文本框emmmm,下个SpyLite++,自己试试吧!(我不知道你的窗口是什么样的,所以没法写代码),也可以自己学一下这几个API(网上的资料多的是)
FindWindow FindWindowEx SendMessage
简单写一下用法(如果你不懂API的话,请不要再往下看了,直接上网查)
WindowHandle = FindWindow(窗体类名,窗体标题)
ControlHandle = FindWindowEx(父窗体句柄,0&;,控件类名,控件文本)
[ReplyLongNumber = |Call]SendMessage(句柄,消息,参数1,参数2)
4.vb6.0编写的程序如何保存修改设置'两个函数 , 先在一个模快中定义API函数Declare Function Lib "KERNEL32" Alias "" (ByVal lpApplicationname As String, ByVal LpKeyName As Any, ByVal lsString As Any, ByVal lplFilename As String) As Long'如果是读INT值可以用字符串转化,所以没有另外定义函数'Declare Function GetPrivateProfileInt Lib "kernel32" Alias "GetPriviteProfileIntA" (ByVal lpApplicationname As String, ByVal LpKeyName As String, ByVal nDefault As Long, ByVal lpFileName As String) As LongDeclare Function Lib "KERNEL32" Alias "" (ByVal lpApplicationname As String, ByVal LpKeyName As String, ByVal lpDefault As String, ByVal lpReturnedString As String, ByVal nSize As Long, ByVal lpFileName As String) As Long'定义读与写INI文件的函数'****读INI文件****'文件名 lpFileName 如果不存在会自己创建,如果只有文件名,默认在Windows\system目录下'[lpAppName]'lpKeyName=取回的设置值'lpDefault 当键值不存在时的默认值Public Function ReadINI(ByVal lpFileName As String, ByVal lpAppName As String, ByVal LpKeyName As String) As StringDim Temp As String * 255Dim lpDefault As StringlpDefault = ""If (lpAppName, LpKeyName, lpDefault, Temp, Len(Temp), lpFileName) 0 i = i - 1 Tmpstr = Left(Tmpstr, i) If Len(Tmpstr) = 0 Then MyRtrim = "" Exit Function End If S = Asc(Right(Tmpstr, 1))WendMyRtrim = TmpstrEnd FunctionPublic Function MyLtrim(ByVal Tmpstr As String)Dim i, S As Integeri = Len(Tmpstr)If i = 0 Then MyLtrim = "" Exit FunctionEnd IfS = Asc(Left(Tmpstr, 1))While (S = 0 Or S = 13 Or S = 10 Or S = 32) And i > 0 i = i - 1 Tmpstr = Right(Tmpstr, i) If Len(Tmpstr) = 0 Then MyLtrim = Tmpstr Exit Function End If S = Asc(Left(Tmpstr, 1))WendMyLtrim = TmpstrEnd FunctionPublic Function MyTrim(ByVal Tmpstr As String)Tmpstr = MyLtrim(Tmpstr)Tmpstr = MyRtrim(Tmpstr)MyTrim = TmpstrEnd Function---------------------------------把以上内容保存到一个模块里,再按提示调用 。
在点修改后写入三个值,然后表单load事件里,又读INI文件中这三个值并显示到对应的command上 。
5.在VB编写的记事本中如何编写其修改字体的程序Private Sub mnufont_Click()
Dim sel As RichTextBox '不知道你用的是文本框还是富文本框 。
Set sel = RichTextBox1
With CommonDialog1
.Flags = cdlCFBoth Or cdlCFEffects
.CancelError = False
.ShowFont
sel.SelFontName = .FontName
sel.SelFontSize = .FontSize
sel.SelBold = .FontBold
sel.SelCharOffset = .Color
sel.SelItalic = .FontItalic
sel.SelUnderline = .FontUnderline
sel.SelStrikeThru = .FontStrikethru
End With
End Sub
【VB编写修改怎么写】
文章插图
- 乡村护林员申请怎么写
- 社区落户证明怎么写
- 房屋维修交税证明怎么写
- 员工产假批准意见怎么写
- 男方产假给女方证明怎么写
- 成长目标怎么写四年级
- 参展证明怎么写
- 花灯寓意怎么写
- 英语的1234编号怎么写
- 小区拆墙协议怎么写