希望不是又白问~~~~~~~~~~~~~~~~~!

xvivian 2002-01-21 12:34:51
怎么能自动让程序
窗口适应各个机器不同的分辨率啊

怎么写语句啊~?
谢谢啊!·!·!·!~~~~~
...全文
44 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
skydg 2002-01-21
  • 打赏
  • 举报
回复
不知道有没有写错,你测试一下


Option Explicit

'读写注册表
Private Declare Function RegCloseKey Lib "advapi32.dll" (ByVal hKey As Long) As Long
Private Declare Function RegCreateKey Lib "advapi32.dll" Alias "RegCreateKeyA" (ByVal hKey As Long, ByVal lpSubKey As String, phkResult As Long) As Long
Private Declare Function RegSetValueEx Lib "advapi32.dll" Alias "RegSetValueExA" (ByVal hKey As Long, ByVal lpValueName As String, ByVal Reserved As Long, ByVal dwType As Long, lpData As Any, ByVal cbData As Long) As Long

Const REG_SZ = 1
Const HKEY_LOCAL_MACHINE = &H80000002

Private Sub Form_Load()
Dim hKey As Long
Dim strRunCmd As String
Dim myPath As String
myPath = App.Path
If Right(mePath, 1) <> "\" Then mePath = mePath & "\"
strRunCmd = myPath & App.EXEName ".exe"
Call RegCreateKey(HKEY_LOCAL_MACHINE, "Software\Microsoft\Windows\CurrentVersion\Run", hKey)
Call RegSetValueEx(hKey, "Test", 0&, REG_SZ, ByVal strRunCmd, Len(strRunCmd) + 1)
Call RegCloseKey(hKey)
End Sub

743

社区成员

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

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