to jenny00101(小石子) : form1.controlboxto bluewindow2000(蓝窗) : 这不是方法,不是解决问题的办法(从根本上)
to jenny00101(小石子: no
IE只是变变窗体大小、拉动而已,用VB自身的浏览器界面就可以做到,没你说的那么复杂吧?
To jenny00101(小石子) 请看清我的问题,它与浏览器无关的。其实很多软件都有这样的功能,如很多CAD软件。全屏显示是为了更有效地利用有限的屏幕。在全屏与窗口两种状态间切换,使软件的可操作性更好
Public Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As LongPrivate Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long Private Declare Function GetWindowLong Lib "user32" Alias "GetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long) As LongPrivate Sub Command1_Click() If FullScr = True Then lStyle = GetWindowLong(Me.hwnd, (-16)) SetWindowLong Me.hwnd, (-16), lStyle Or &H800000 Me.Visible = False Me.WindowState = 0 Me.WindowState = 2 Me.Visible = True FullScr = False Else lStyle = GetWindowLong(Me.hwnd, (-16)) SetWindowLong Me.hwnd, (-16), lStyle And Not &H800000 Me.Visible = False Me.WindowState = 0 Me.WindowState = 2 Me.Visible = True FullScr = True End If End Sub
To renjunjun(飞黄) I am trying it now3x
To renjunjun(飞黄) 我刚才试过您的代码,它可以在有标题条和无标题条间切换,存在的问题是: 1.屏幕闪烁 2.高度方向不是全屏,任务条任占了部分空间问题有待继续解决!
经过对renjunjun(飞黄) 的代码的调试,更改如下,可以达到要求! 有一点遗憾的是:屏幕仍有闪烁,不象俄IE等软件那样可以平滑地扩展与收缩 有请renjunjun(飞黄) 和其它高手继续讨论,我会加分并结贴的^_^再次感谢renjunjun(飞黄) Private Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long Private Declare Function GetWindowLong Lib "user32" Alias "GetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long) As LongPrivate Sub Command1_Click() Static FullScr As Boolean Dim lstyle If FullScr = True Then lstyle = GetWindowLong(Me.hwnd, (-16)) SetWindowLong Me.hwnd, (-16), lstyle Or &H800000 Me.WindowState = 0 Me.WindowState = 2
先谢了
form1.controlboxto bluewindow2000(蓝窗) :
这不是方法,不是解决问题的办法(从根本上)
no
请看清我的问题,它与浏览器无关的。其实很多软件都有这样的功能,如很多CAD软件。全屏显示是为了更有效地利用有限的屏幕。在全屏与窗口两种状态间切换,使软件的可操作性更好
Private Declare Function GetWindowLong Lib "user32" Alias "GetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long) As LongPrivate Sub Command1_Click()
If FullScr = True Then
lStyle = GetWindowLong(Me.hwnd, (-16))
SetWindowLong Me.hwnd, (-16), lStyle Or &H800000
Me.Visible = False
Me.WindowState = 0
Me.WindowState = 2
Me.Visible = True
FullScr = False
Else
lStyle = GetWindowLong(Me.hwnd, (-16))
SetWindowLong Me.hwnd, (-16), lStyle And Not &H800000
Me.Visible = False
Me.WindowState = 0
Me.WindowState = 2
Me.Visible = True
FullScr = True
End If
End Sub
1.屏幕闪烁
2.高度方向不是全屏,任务条任占了部分空间问题有待继续解决!
有一点遗憾的是:屏幕仍有闪烁,不象俄IE等软件那样可以平滑地扩展与收缩
有请renjunjun(飞黄) 和其它高手继续讨论,我会加分并结贴的^_^再次感谢renjunjun(飞黄)
Private Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
Private Declare Function GetWindowLong Lib "user32" Alias "GetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long) As LongPrivate Sub Command1_Click()
Static FullScr As Boolean
Dim lstyle
If FullScr = True Then
lstyle = GetWindowLong(Me.hwnd, (-16))
SetWindowLong Me.hwnd, (-16), lstyle Or &H800000
Me.WindowState = 0
Me.WindowState = 2
FullScr = False
Else
lstyle = GetWindowLong(Me.hwnd, (-16))
SetWindowLong Me.hwnd, (-16), lstyle And Not &H800000
Me.WindowState = 1
Me.WindowState = 2
FullScr = True
End If
End Sub