Fade out effect in my form...??
-
If you're using VB6, you need to say so. If you're using VB.NET, then do what I said.
Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
-
If you're using VB6, you need to say so. If you're using VB.NET, then do what I said.
Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
-
VB6 or VB.NET?!?
-
OK, I can only assume when you say VB, you mean VB6. VB6 is a dead language, and it sucked to start with. If you have any choice, move to VB.NET. Otherwise, tell people you're using VB6 when you ask questions here.
Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
-
VB6 or VB.NET?!?
-
OK, I can only assume when you say VB, you mean VB6. VB6 is a dead language, and it sucked to start with. If you have any choice, move to VB.NET. Otherwise, tell people you're using VB6 when you ask questions here.
Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
Hi Graus, You said VB6 is a dead language. But nobody have a little experience in working with VB should'nt say like that. They would say it as the most flexible language. We can write a complex coding in other language in a very simple way in VB. By Dileeeeeeeep.
-
Hi Graus, You said VB6 is a dead language. But nobody have a little experience in working with VB should'nt say like that. They would say it as the most flexible language. We can write a complex coding in other language in a very simple way in VB. By Dileeeeeeeep.
It's dead. MS stopped supporting it entirely. It's been replaced, thankfully, with VB.NET. Finally! Real OOP support!
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007 -
In VB.NET this would have been easy. In VB6, I don't think you can do it because VB6 creates its forms differently, without support for Layered Windows, which is required to support opacity.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007 -
Hi Graus, You said VB6 is a dead language. But nobody have a little experience in working with VB should'nt say like that. They would say it as the most flexible language. We can write a complex coding in other language in a very simple way in VB. By Dileeeeeeeep.
1 - it's dead in that it is no longer supported and will not be subject to any updates or service packs 2 - actually, the way this works in VB6 is usually that you write 2 lines of code that call a C++ COM object to do the complex stuff that VB cannot do.
Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
-
hi guys.. when i close my exe, i want it to close with a fade effect.. does anyone know bout it..??
The name is Sandeep
Hi Xandip, I hope the code is useful... Here is the API declaration :
Private Declare Function GetWindowLong Lib "user32" Alias "GetWindowLongA" _ (ByVal hwnd As Long, ByVal nIndex As Long) As Long Private Declare Function SetLayeredWindowAttributes Lib "user32" _ (ByVal hwnd As Long, ByVal crey As Byte, ByVal bAlpha As Byte, ByVal dwFlags As Long) As Long Private Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" _ (ByVal hwnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long) Private Const GWL_EXSTYLE = (-20) Private Const LWA_ALPHA = &H2& Private Const WS_EX_LAYERED = &H80000
Here is the code where you should use :Private Sub Command2_Click() Dim fadeCtr As Integer Call SetWindowLong(Me.hwnd, GWL_EXSTYLE, GetWindowLong(Me.hwnd, GWL_EXSTYLE) Or WS_EX_LAYERED) For fadeCtr = 255 To 0 Step -1 Call SetLayeredWindowAttributes(Me.hwnd, 0, fadeCtr, LWA_ALPHA) DoEvents Call Sleep(5) Next End End Sub
Please dont use this code in Unload event of form - as you observe, I had used DoEvents in the above function. If this is useful, reply me to answer again.