Go Back   Gaming Gutter > Non-Gaming > Programming


Programming - All general programming discussion in here.

» Site Navigation
» Home
» FAQ
» Log in
User Name:

Password:

Not a member yet?
Register Now!
» Advertisement
» Recent Threads
Go to first new post Let us play pokemon!
Today 03:57 AM
by Kyo
Last post by Fortunato
Today 08:55 AM
7 Replies, 54 Views
Go to first new post Some old Mene stuff for...
Today 08:43 AM
Last post by OldSkool
Today 08:43 AM
0 Replies, 1 Views
Go to first new post Curiousity
09-18-2008 09:27 PM
Last post by Fortunato
Today 08:42 AM
169 Replies, 1,342 Views
Go to first new post PATIENCE IS A FUCKING...
10-02-2008 08:03 PM
Last post by Fortunato
Today 08:29 AM
16 Replies, 311 Views
Go to first new post SlopDog's Flybuyer
Today 08:13 AM
Last post by ragefury
Today 08:13 AM
0 Replies, 5 Views
Reply
 
LinkBack Thread Tools Display Modes

 [VB6] Minimize to tray?
Old 05-26-2008, 08:14 AM   #1 (permalink)
Banned

Male Wilfukguys is offline
 
Join Date: Sep 2006
Location: MWHAHAHHAHA
Age: 18
Posts: 5,289
iTrader: 14 / 100%
Wilfukguys Is a Lord of AwesomenessWilfukguys Is a Lord of AwesomenessWilfukguys Is a Lord of AwesomenessWilfukguys Is a Lord of Awesomeness
Rep Power: 0
[VB6] Minimize to tray?

I have looked at many codes for one to minimize a program to the tray and i still dont see one that works? Unless i am doing something wrong. Anyone care to explain one?
  Reply With Quote

 
Old 05-26-2008, 05:01 PM   #2 (permalink)
Underground

eckkotc203 is offline
 
Join Date: Oct 2007
Posts: 475
iTrader: 0 / 0%
eckkotc203 Is Popular
Rep Power: 4
try this
Visual Basic: Minimize app to tray
or
[tutorial] Visual Basic 6 Minimize To Tray - Minimize to Tray
  Reply With Quote

 
Old 05-29-2008, 11:50 AM   #3 (permalink)
Underground

Male rcadble is offline
 
Join Date: Sep 2006
Posts: 227
iTrader: 0 / 0%
rcadble Is Recognizable
Rep Power: 7
I used to use traywrapper by drew010, but I no longer use vb6. Fortunately, VB.NET has a built in tray system, which most sensible people can figure out how to use.
__________________
Omnipresent Autobuyer, the best free autobuyer.
Version 1.2
Always around, always present.
  Reply With Quote

 
Old 06-01-2008, 07:55 AM   #4 (permalink)
Underground

eckkotc203 is offline
 
Join Date: Oct 2007
Posts: 475
iTrader: 0 / 0%
eckkotc203 Is Popular
Rep Power: 4
i think we should all learn C++. VB isnt a great programming lanuage to learn.
it only teaches bad skills.
__________________



  Reply With Quote

 
Old 06-05-2008, 11:32 AM   #5 (permalink)
Underground

Male rcadble is offline
 
Join Date: Sep 2006
Posts: 227
iTrader: 0 / 0%
rcadble Is Recognizable
Rep Power: 7
Quote:
Originally Posted by eckkotc203 View Post
i think we should all learn C++. VB isnt a great programming lanuage to learn.
it only teaches bad skills.
It's much harder and requires a lot more coding -- it's pretty much impractical to use C++ to make simple programs.
__________________
Omnipresent Autobuyer, the best free autobuyer.
Version 1.2
Always around, always present.
  Reply With Quote

 
Old 06-08-2008, 11:37 AM   #6 (permalink)
Banned

Male Wilfukguys is offline
 
Join Date: Sep 2006
Location: MWHAHAHHAHA
Age: 18
Posts: 5,289
iTrader: 14 / 100%
Wilfukguys Is a Lord of AwesomenessWilfukguys Is a Lord of AwesomenessWilfukguys Is a Lord of AwesomenessWilfukguys Is a Lord of Awesomeness
Rep Power: 0
i know a bit of c++, hence that most of my programs i released were made in VB6.
But their not exactly hacking programs.
  Reply With Quote

 
Old 06-19-2008, 09:47 AM   #7 (permalink)
Banned

aggieman122 is offline
 
Join Date: Jun 2008
Posts: 50
iTrader: 0 / 0%
aggieman122 Is Desperately sucking
Rep Power: 0
why cant people play by the rulez. youre makin it harder on the fair people
  Reply With Quote

 
Old 06-25-2008, 07:20 PM   #8 (permalink)
Site Programmer

Male Violent_J is offline
 
Violent_J's Avatar
 
Join Date: Nov 2006
Location: Sacramento, California
Age: 16
Posts: 903
iTrader: 5 / 100%
Violent_J Is Popular
Rep Power: 8
Quote:
Originally Posted by aggieman122 View Post
why cant people play by the rulez. youre makin it harder on the fair people
Then why the fuck are you on a cheating forum? xD

I made a minimize to tray tut
works for me

Note: This is NOT my source code. I only edited it...
OK, when I was first programming I tried minimize to tray. It didn't work because I kept on getting ambiguous file detected or some shit like that. This means 2 things are declared with the same name I think.
Now, minimize to tray and HTTPwrapper declared the same name.
So I changed the minimize to tray to say 2 for everything and got it to work

here is the tut

First, you will need
1 command button called cmdmin
The module I will give the source to

Now add a new module
Put this in the MODULES source
Code:
Code:
      Public Type NOTIFYICONDATA2
cbSize As Long
hwnd As Long
uId As Long
uFlags As Long
uCallBackMessage As Long
hIcon As Long
szTip As String * 64
End Type
Public Const NIM_ADD2 = &H0
Public Const NIM_MODIFY = &H1
Public Const NIM_DELETE2 = &H2
Public Const WM_MOUSEMOVE2 = &H200
Public Const NIF_MESSAGE2 = &H1
Public Const NIF_ICON2 = &H2
Public Const NIF_TIP2 = &H4
Public Const WM_LBUTTONDBLCLK2 = &H203
Public Const WM_LBUTTONDOWN2 = &H201
Public Const WM_LBUTTONUP2 = &H202
Public Const WM_RBUTTONDBLCLK2 = &H206
Public Const WM_RBUTTONDOWN2 = &H204
Public Const WM_RBUTTONUP2 = &H205
Public Declare Function Shell_NotifyIcon Lib "shell32" Alias "Shell_NotifyIconA" (ByVal dwMessage As Long, pnid As NOTIFYICONDATA2) As Boolean
Then, declare this at the very top of your code
Code:
Code:
      Dim nid As NOTIFYICONDATA2
lol...remember that I changed the code to have 2 so it is not the same name as the wrapper lol
next add this
Code:
Code:
      Sub minimize_to_tray()
Me.Hide
nid.cbSize = Len(nid)
nid.hwnd = Me.hwnd
nid.uId = vbNull
nid.uFlags = NIF_ICON2 Or NIF_TIP2 Or NIF_MESSAGE2
nid.uCallBackMessage = WM_MOUSEMOVE2
nid.hIcon = Me.Icon 
nid.szTip = "Violent_J's alarm Clock" & vbNullChar
Shell_NotifyIcon NIM_ADD2, nid
End Sub
The nidsztip will be showed when you hoverover the Icon. For now, it will say "Violent_J's alarm clock" until you change it to th name of your own program!
Now, add this code
Code:
Code:
      Private Sub Form_MouseMove(Button As Integer, Shift As Integer, x As Single, y As Single)
Dim msg As Long
Dim sFilter As String
msg = x / Screen.TwipsPerPixelX
Select Case msg
Case WM_LBUTTONDOWN2
Me.Show ' show form
Shell_NotifyIcon NIM_DELETE2, nid ' del tray icon
Case WM_LBUTTONUP2
Case WM_LBUTTONDBLCLK2
Case WM_RBUTTONDOWN2
Case WM_RBUTTONUP2
Me.Show
Shell_NotifyIcon NIM_DELETE2, nid
Case WM_RBUTTONDBLCLK2
End Select
End Sub
This is the mouse move and shiz
Now add the command button that will minimize it to tray

Code:
      Private sub cmdmin_click()
minimize_to_tray
end sub
EDIT:

You must also add



Code:
             Shell_NotifyIcon NIM_DELETE, nid
In your form unload cancel as integer code

here is mine for you to use



Code:
           Private Sub Form_Unload(Cancel As Integer)
  Shell_NotifyIcon NIM_DELETE, nid ' del tray icon
    Dim frmTemp As Form
    For Each frmTemp In Forms
        Unload frmTemp
        Set frmTemp = Nothing
    Next
    End
End Sub
Enjoy minimize to tray in your programs
__________________



Current rep: 95
  Reply With Quote
Reply

Bookmarks



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Powered by vBadvanced CMPS v3.0 RC2

All times are GMT -7. The time now is 08:56 AM.


vBulletin skin developed by: eXtremepixels
The contents of this webpage are copyright © 2006-2008 GamingGutter.com. All Rights Reserved.

Page generated in 0.16919589 seconds (100.00% PHP - 0% MySQL) with 19 queries