有一个多文挡窗口,一个登陆窗口。登陆窗口设置为多文挡窗口的子窗口,每次运行的时候登陆窗口都躲在多文挡窗口的左上角,我想登陆的时候能够显示在多文挡窗口的中间,设置登陆窗口的什么属性???startupposition属性好象不行。
解决方案 »
- 如何使用ReadFile来读取打印机USB口返回的信息?
- 高分在线急求关闭程序的方法(分不够可以加只要能成为)
- 请各位帮忙,删除 msflexgrid 的某列
- 如何程序代码来控制菜单中的复选项前面的对钩出现!
- 有个网页无法保存,请朋友们帮帮忙。
- 求取
- MSCOMM控件
- sql 选取最大值 及 出现时间
- 关于vb进度条的问题
- 兄弟们,我是说用ADODC.ADDNEW之后,我没有给字段输入值,想移动记录,由于主索引没有值,会报错,我不能用UPDATA,因为没有录入值!帮帮忙
- 急!!!怎样用vb实现sql server数据库备份于恢复?
- 我用data控件连接了数据库,并用datagrid显示出来。当用adodb向数据库插入了几行数据后,此时我将怎样更新data控件的数据呢?并使datagrid
'* 名称:FormSet(formname,mode)
'* 功能:此函数用于初始化窗体的大小和位置
'* 用法:mode 满屏(0),左上(1),右上(2),左下(3),右下(4),居中(5)
'*********************************************************
Public Function FormSet(F As Form, Nu As Integer) As String
Dim BarHeight As Integer '任务条的高度
BarHeight = 27 * 15
If IsNull(Nu) Then
Nu = 0
End If
F.ScaleMode = 3 '将窗体的分辨率设为象素级
Select Case Nu '根据参数设置窗体的大小和位置
Case 0 '默认的窗体效果,最大化
With F
.Top = 0
.Left = 0
.Width = Screen.Width
.Height = Screen.Height - BarHeight
End With
Case 1 '窗体的位置居左上
With F
.Top = 0
.Left = 0
End With
Case 2 '窗体的位置居右上
With F
.Top = 0
.Left = Screen.Width - .Width
End With
Case 3 '窗体的位置居左下
With F
.Top = Screen.Height - .Height - BarHeight
.Left = 0
End With
Case 4 '窗体的位置居右下
With F
.Top = Screen.Height - .Height - BarHeight
.Left = Screen.Width - .Width
End With
Case 5 '窗体的位置居中
With F
.Top = (Screen.Height - .Height) / 2
.Left = (Screen.Width - .Width) / 2
End With
End Select
F.Icon = F_Main.Icon
End Function