|
-
Dec 31st, 2004, 10:44 AM
#1
Thread Starter
Addicted Member
two questions
1) how do i change the icon of my .exe file in vb
2) i want my program icon to come in taskbar, n on mouse click restore to its original possition
-
Dec 31st, 2004, 11:23 AM
#2
Re: two questions
1. me.icon = loadpicture("MYICON.ICO")
2. that is nomal procedure when an aplication is minimised
rgds peter
-
Dec 31st, 2004, 01:12 PM
#3
Fanatic Member
Re: two questions
Another way is to set the "Icon" property of the form in the properties panel of VB.
You can use the above method, but then you would have to redistribute the icon with your app.
Using the "Icon" property of the form embeds the icon in the form... no distribution of the icon needed.
-
Dec 31st, 2004, 01:27 PM
#4
Thread Starter
Addicted Member
Re: two questions
well one of ma questions is answered, but wat abt the second question that i want the application's icon to display in the taskbar ?
-
Dec 31st, 2004, 01:29 PM
#5
Banned
Re: two questions
search google for "Visual Basic Systray"
-
Dec 31st, 2004, 01:33 PM
#6
Re: two questions
 Originally Posted by hyousuf2
well one of ma questions is answered, but wat abt the second question that i want the application's icon to display in the taskbar ?
The .ICO files that I've had made by my programmers were done in MS Visual C++ IDE. The LARGE ICON (for the IMAGE of the SHORTCUT, let's say) is the "Standard 32x32" image.
The SMALL ICON (that appears in the TASKBAR) is the "Small 16x16" image.
What do you see if you open the .ICO file in C++?
-
Dec 31st, 2004, 01:33 PM
#7
Re: two questions
If form's border is set to 0 (none) but ShowInTaskbar is True - icon will not appear unless you do something like the following:
VB Code:
Option Explicit
Private Const GWL_STYLE = (-16)
Private Const WS_SYSMENU = &H80000
Private Const WS_MINIMIZEBOX = &H20000
Private Declare Function GetWindowLong Lib "user32" _
Alias "GetWindowLongA" _
(ByVal hwnd As Long, ByVal nIndex 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 Sub Form_Load()
Dim lStyle As Long
'ensure taskbar icon visibility
lStyle = GetWindowLong(Me.hwnd, GWL_STYLE) Or WS_SYSMENU Or WS_MINIMIZEBOX
SetWindowLong Me.hwnd, GWL_STYLE, lStyle
End Sub
-
Dec 31st, 2004, 09:04 PM
#8
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|