.Left = 0 .Top = 0 .BackColor = vbApplicationWorkspace End With 'mnu_product_input.Enabled = False End Sub Private Sub Form_Resize() With Picture1 .Width = Me.ScaleWidth .Height = Me.ScaleHeight End With Me.Refresh End SubPrivate Sub Form_Unload(Cancel As Integer) Dim myForm As Form For Each myForm In Forms Unload myForm Next End SubPrivate Sub mnu_fhjl_sql_Click() SetParent frmsearch_in_warehouse.hwnd, Frmsale.hwnd frmsearch_in_warehouse.Show End Sub 不知道你要的是不是这种效果,如果是的话,自已改下
那 Private Sub mnu_fhjl_sql_Click() SetParent frmsearch_in_warehouse.hwnd, Frmsale.hwnd frmsearch_in_warehouse.Show End Sub 是什么意思啊,frmsearch_in_warehouse是不是我说的窗体2啊,那Frmsale是什么窗体啊,SetParent方法是什么含义啊
With Picture1
.Left = 0
.Top = 0
.BackColor = vbApplicationWorkspace
End With
'mnu_product_input.Enabled = False
End Sub
Private Sub Form_Resize()
With Picture1 .Width = Me.ScaleWidth
.Height = Me.ScaleHeight
End With
Me.Refresh
End SubPrivate Sub Form_Unload(Cancel As Integer)
Dim myForm As Form
For Each myForm In Forms
Unload myForm
Next
End SubPrivate Sub mnu_fhjl_sql_Click()
SetParent frmsearch_in_warehouse.hwnd, Frmsale.hwnd
frmsearch_in_warehouse.Show
End Sub
不知道你要的是不是这种效果,如果是的话,自已改下
resize不行的
不行的,你的意思是不是在生成一个新窗体时,通过resize事件,但是调用picture控件用来干什么的啊,费解啊
就是这个意思了,不知道你明白了没有
窗口移动时触发WM_MOVE消息
参考:http://search.csdn.net/Expert/topic/1120/1120341.xml如何捕作此消息
Private Sub mnu_fhjl_sql_Click()
SetParent frmsearch_in_warehouse.hwnd, Frmsale.hwnd
frmsearch_in_warehouse.Show
End Sub
是什么意思啊,frmsearch_in_warehouse是不是我说的窗体2啊,那Frmsale是什么窗体啊,SetParent方法是什么含义啊
我是问移动窗体,不是说改变窗体大小
resize不行的
=====================================
移动窗体也是要触发resize事件的
form_resize()
d=1
endsub
d=1处设置断点,移动窗体时,不会执行该事件
Form2.Left = Me.Left + Me.Width
Form2.Top = Me.Top
Form2.Show
End Sub