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
Printable View
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
1. me.icon = loadpicture("MYICON.ICO")
2. that is nomal procedure when an aplication is minimised
rgds peter
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.
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 ?
search google for "Visual Basic Systray"
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.Quote:
Originally Posted by hyousuf2
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++?
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
Another option to change the icon of your exe is to add an icon to a resource file and set the ID of the icon to APPICON :)