Remove Ad, Sign Up
Register to Remove Ad
Register to Remove Ad
Remove Ad, Sign Up
Register to Remove Ad
Register to Remove Ad
Signup for Free!
-More Features-
-Far Less Ads-
About   Users   Help
Users & Guests Online
On Page: 1
Directory: 2 & 84
Entire Site: 6 & 875
Page Staff: pokemon x, pennylessz, Barathemos, tgags123, alexanyways, supercool22, RavusRat,
04-23-24 11:14 PM

Thread Information

Views
601
Replies
4
Rating
0
Status
CLOSED
Thread
Creator
jack3604
08-01-14 03:43 PM
Last
Post
jack3604
08-02-14 11:03 AM
Additional Thread Details
Views: 313
Today: 0
Users: 0 unique

Thread Actions

Thread Closed
New Thread
New Poll
Order
 

Visual Basic Issues

 

08-01-14 03:43 PM
jack3604 is Offline
| ID: 1061998 | 133 Words

jack3604
Level: 35


POSTS: 86/254
POST EXP: 22119
LVL EXP: 277628
CP: 784.7
VIZ: 20977

Likes: 0  Dislikes: 0
Ok, so I've been trying to fix this "bug" for a few days now and I just have no idea why it isn't working. What I'm trying to do is use SMTP to mail myself a log file when you click the X button to close the program. What happens when you click the X button is this:

here is the code which isn't working: http://pastebin.com/gjEHR8s5

Also I'm trying to make it so that when you click the minimize button (-) that the program goes into the background so it doesn't get in the way when I'm trying to work on other stuff. I'm using the resize event to do this. here is that code: http://pastebin.com/WJnDgzcC

Thanks for the help in advance, I hope someone on here knows what I'm doing wrong.
Ok, so I've been trying to fix this "bug" for a few days now and I just have no idea why it isn't working. What I'm trying to do is use SMTP to mail myself a log file when you click the X button to close the program. What happens when you click the X button is this:

here is the code which isn't working: http://pastebin.com/gjEHR8s5

Also I'm trying to make it so that when you click the minimize button (-) that the program goes into the background so it doesn't get in the way when I'm trying to work on other stuff. I'm using the resize event to do this. here is that code: http://pastebin.com/WJnDgzcC

Thanks for the help in advance, I hope someone on here knows what I'm doing wrong.
Trusted Member
Zander's adopted son


Affected by 'Laziness Syndrome'

Registered: 06-08-11
Location: Florida
Last Post: 3113 days
Last Active: 714 days

08-02-14 01:22 AM
saldek is Offline
| ID: 1062232 | 185 Words

saldek
Level: 54


POSTS: 614/648
POST EXP: 41633
LVL EXP: 1191846
CP: 1328.6
VIZ: 402434

Likes: 0  Dislikes: 0
For the first code: I'm not sure, I could search the net but something tells me this will take a long time to solve.

But I know someone who might be able to help you.

Blubcreator



For the second code: Why would you declare "f = sender, f.WindowState" when you could just type "Me.WindowState" instead?

Also, you did plan to make the application appear right? In case you said no, just add a new tool named "Notify Icon" and put these code:



'When loading the form


Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

          NotifyIcon1.Icon = Me.Icon 'in case you wanted to put the form's icon

          NotifyIcon1.Visible = False 'Not necessary

End Sub



'When re-sizing the form


Private Sub Form1_Resize(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Resize

          If Me.WindowState = FormWindowState.Minimized Then

                Me.Visible = False

                NotifyIcon1.Visible = True 'An icon should appear in the window's toolbar

          End If

End Sub



'When double clicking on the icon


Private Sub NotifyIcon1_MouseDoubleClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles NotifyIcon1.MouseDoubleClick

          Me.Visible = True

          Me.WindowState = FormWindowState.Normal

          NotifyIcon1.Visible = False

    End Sub

For the first code: I'm not sure, I could search the net but something tells me this will take a long time to solve.

But I know someone who might be able to help you.

Blubcreator



For the second code: Why would you declare "f = sender, f.WindowState" when you could just type "Me.WindowState" instead?

Also, you did plan to make the application appear right? In case you said no, just add a new tool named "Notify Icon" and put these code:



'When loading the form


Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

          NotifyIcon1.Icon = Me.Icon 'in case you wanted to put the form's icon

          NotifyIcon1.Visible = False 'Not necessary

End Sub



'When re-sizing the form


Private Sub Form1_Resize(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Resize

          If Me.WindowState = FormWindowState.Minimized Then

                Me.Visible = False

                NotifyIcon1.Visible = True 'An icon should appear in the window's toolbar

          End If

End Sub



'When double clicking on the icon


Private Sub NotifyIcon1_MouseDoubleClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles NotifyIcon1.MouseDoubleClick

          Me.Visible = True

          Me.WindowState = FormWindowState.Normal

          NotifyIcon1.Visible = False

    End Sub

Member

Affected by 'Laziness Syndrome'

Registered: 01-07-10
Last Post: 2946 days
Last Active: 2719 days

(edited by saldek on 08-02-14 01:27 AM)    

08-02-14 10:24 AM
jack3604 is Offline
| ID: 1062370 | 119 Words

jack3604
Level: 35


POSTS: 88/254
POST EXP: 22119
LVL EXP: 277628
CP: 784.7
VIZ: 20977

Likes: 0  Dislikes: 0
saldek : I have actually already contacted Bulbcreator, and I don't think that he was able to help me either. And I like the way that you used to minimize the program and have it not be visible I didn't think of that. But there is still a problem... I guess I've been making so many different forum posts around so many different forums that I forgot to mention here that the program literally works perfectly fine while I compile and run it in Visual Studio, and I have no idea why. But when I just use the normal .exe from the project folder the emailing and the minimizing doesn't work (It minimizes, but it still has the icon visible).
saldek : I have actually already contacted Bulbcreator, and I don't think that he was able to help me either. And I like the way that you used to minimize the program and have it not be visible I didn't think of that. But there is still a problem... I guess I've been making so many different forum posts around so many different forums that I forgot to mention here that the program literally works perfectly fine while I compile and run it in Visual Studio, and I have no idea why. But when I just use the normal .exe from the project folder the emailing and the minimizing doesn't work (It minimizes, but it still has the icon visible).
Trusted Member
Zander's adopted son


Affected by 'Laziness Syndrome'

Registered: 06-08-11
Location: Florida
Last Post: 3113 days
Last Active: 714 days

08-02-14 10:29 AM
saldek is Offline
| ID: 1062373 | 55 Words

saldek
Level: 54


POSTS: 615/648
POST EXP: 41633
LVL EXP: 1191846
CP: 1328.6
VIZ: 402434

Likes: 0  Dislikes: 0
jack3604 :
Must be something related to debug mode, I heard some people say it affects certain aspects.

Also, there are times when I used my game's .exe, it returned an error and I was sure that it worked perfectly fine while debugging, but then when I restarted the program the error didn't appear.....for some reason.
jack3604 :
Must be something related to debug mode, I heard some people say it affects certain aspects.

Also, there are times when I used my game's .exe, it returned an error and I was sure that it worked perfectly fine while debugging, but then when I restarted the program the error didn't appear.....for some reason.
Member

Affected by 'Laziness Syndrome'

Registered: 01-07-10
Last Post: 2946 days
Last Active: 2719 days

08-02-14 11:03 AM
jack3604 is Offline
| ID: 1062389 | 17 Words

jack3604
Level: 35


POSTS: 90/254
POST EXP: 22119
LVL EXP: 277628
CP: 784.7
VIZ: 20977

Likes: 0  Dislikes: 0
saldek : It happens every single time though. I must've restarted the program at least 90000000000 times already.
saldek : It happens every single time though. I must've restarted the program at least 90000000000 times already.
Trusted Member
Zander's adopted son


Affected by 'Laziness Syndrome'

Registered: 06-08-11
Location: Florida
Last Post: 3113 days
Last Active: 714 days

Links

Page Comments


This page has no comments

Adblocker detected!

Vizzed.com is very expensive to keep alive! The Ads pay for the servers.

Vizzed has 3 TB worth of games and 1 TB worth of music.  This site is free to use but the ads barely pay for the monthly server fees.  If too many more people use ad block, the site cannot survive.

We prioritize the community over the site profits.  This is why we avoid using annoying (but high paying) ads like most other sites which include popups, obnoxious sounds and animations, malware, and other forms of intrusiveness.  We'll do our part to never resort to these types of ads, please do your part by helping support this site by adding Vizzed.com to your ad blocking whitelist.

×