DO NOT DEAL WITH THIS MEMBER
Oh please stop the discussion / debate, please only post if it's something to do with my program... Thanks.
--
Cheers, xBoom.
(Apr 9, 2014 04:55 AM)woahxx Wrote: Oh please stop the discussion / debate, please only post if it's something to do with my program... Thanks.
--
Cheers, xBoom. Alright then, I'll give you some feedback:
- Rename your controls! Right now, you have FlatButton1, FlatButton2, and so on...
This gets really complicated when you have a lot of controls. If you simply call them btnStart, txtSubject etc. it will be a lot easier to recognize what they do for yourself and other people reading your code.
- You should use String.Format().
Just to quickly grab a part of your code:
Quote:"&url=" + FlatTextbox3.Text + "&user="
Instead, you should use
Code String.Format("&url={0}&user=", FlatTextbox3.Text)
Refer to this page for documentation regarding the method.
- Use MessageBox.Show() instead of MsgBox(). This is because MsgBox() is an old left-over from VB6. The only reason why it's still here, is for programmers who are used to using it.
As a new programmer, you should be using the modern MessageBox.Show() method.
- Don't use webbrowser components for things like these.
Use a WebClient or HttpWebRequest instead.
- Right now, you are declaring new objects for MailMessage, MailAddress, SmtpClient and NetworkCredential every time your timer's tick event gets fired. This is really unecessary and unefficient.
Simply keep "SMTPServer.Send(Mymailssage)" in the tick event handler, and throw all other code in the button's click event.
Declare SMTPServer and MyMailssage globally in your class, so you can access it from Timer1_Tick.
- It may be preferred to set Timer.Enabled to true or false ove
calling it's start/stop methods. Internally it does exactly the same, so this is really just personal preference.
DO NOT DEAL WITH THIS MEMBER
Apr 9, 2014 08:43 AM
(This post was last modified: Apr 9, 2014 08:43 AM by woahxx.)
(Apr 9, 2014 07:43 AM)Dialog Wrote: Alright then, I'll give you some feedback:
- Rename your controls! Right now, you have FlatButton1, FlatButton2, and so on...
This gets really complicated when you have a lot of controls. If you simply call them btnStart, txtSubject etc. it will be a lot easier to recognize what they do for yourself and other people reading your code.
- You should use String.Format().
Just to quickly grab a part of your code:
Instead, you should use
Code String.Format("&url={0}&user=", FlatTextbox3.Text)
Refer to this page for documentation regarding the method.
- Use MessageBox.Show() instead of MsgBox(). This is because MsgBox() is an old left-over from VB6. The only reason why it's still here, is for programmers who are used to using it.
As a new programmer, you should be using the modern MessageBox.Show() method.
- Don't use webbrowser components for things like these.
Use a WebClient or HttpWebRequest instead.
- Right now, you are declaring new objects for MailMessage, MailAddress, SmtpClient and NetworkCredential every time your timer's tick event gets fired. This is really unecessary and unefficient.
Simply keep "SMTPServer.Send(Mymailssage)" in the tick event handler, and throw all other code in the button's click event.
Declare SMTPServer and MyMailssage globally in your class, so you can access it from Timer1_Tick.
- It may be preferred to set Timer.Enabled to true or false ove
calling it's start/stop methods. Internally it does exactly the same, so this is really just personal preference.
Sorry I dont really understand what you talk about.
(Apr 9, 2014 07:43 AM)Dialog Wrote: Alright then, I'll give you some feedback:
- Rename your controls! Right now, you have FlatButton1, FlatButton2, and so on...
This gets really complicated when you have a lot of controls. If you simply call them btnStart, txtSubject etc. it will be a lot easier to recognize what they do for yourself and other people reading your code.
- You should use String.Format().
Just to quickly grab a part of your code:
Instead, you should use
Code String.Format("&url={0}&user=", FlatTextbox3.Text)
Refer to this page for documentation regarding the method.
- Use MessageBox.Show() instead of MsgBox(). This is because MsgBox() is an old left-over from VB6. The only reason why it's still here, is for programmers who are used to using it.
As a new programmer, you should be using the modern MessageBox.Show() method.
- Don't use webbrowser components for things like these.
Use a WebClient or HttpWebRequest instead.
- Right now, you are declaring new objects for MailMessage, MailAddress, SmtpClient and NetworkCredential every time your timer's tick event gets fired. This is really unecessary and unefficient.
Simply keep "SMTPServer.Send(Mymailssage)" in the tick event handler, and throw all other code in the button's click event.
Declare SMTPServer and MyMailssage globally in your class, so you can access it from Timer1_Tick.
- It may be preferred to set Timer.Enabled to true or false ove
calling it's start/stop methods. Internally it does exactly the same, so this is really just personal preference.
Sorry I dont really understand what you talk about.
(Apr 9, 2014 08:43 AM)woahxx Wrote: Sorry I dont really understand what you talk about.
Sorry I dont really understand what you talk about.
What don't you understand? Be clear so we can assist you.
(Apr 9, 2014 08:43 AM)woahxx Wrote: Sorry I dont really understand what you talk about.
Sorry I dont really understand what you talk about.
This is exactly why you shouldn't try and sell your code, when you can't comprehend even the most basic of things in .net.
DO NOT DEAL WITH THIS MEMBER
I read it again, I understand it now - thanks I will add a amount box!
DO NOT DEAL WITH THIS MEMBER
(Apr 10, 2014 11:29 AM)Mаestro Wrote: Instead of webbrowsers, look into webrequests should make it a lot better. The web requests wont work, untill I found out about HTTP Web Requests.
(Apr 11, 2014 03:29 AM)woahxx Wrote: The web requests wont work, untill I found out about HTTP Web Requests.
I meant either one, I've never tried so I didn't know which one you would need.
Looks good, I like the theme.
As Indebt said, you should work on not using webbrowsers.
So does this work? - Why are people complaining about you using "webbrowser"? is that bad or good? - And is this infected?
(Apr 11, 2014 03:29 AM)woahxx Wrote: The web requests wont work, untill I found out about HTTP Web Requests.
... what, I don't even know what you mean by that
(Apr 13, 2014 03:12 PM)hakenz Wrote: So does this work? - Why are people complaining about you using "webbrowser"? is that bad or good? - And is this infected?
webbrowsers are slow and create much more than is needed, when you don't need visuals OF the page, and just the data on it, aka it's kinda useless and takes a lot longer to do each request.
(Apr 13, 2014 03:18 PM)Dispersia Wrote: ... what, I don't even know what you mean by that
webbrowsers are slow and create much more than is needed, when you don't need visuals OF the page, and just the data on it, aka it's kinda useless and takes a lot longer to do each request. Sooo.. this program is bad? not worth the download?
(Apr 13, 2014 03:24 PM)hakenz Wrote: Sooo.. this program is bad? not worth the download?
I mean if it works, it works. However it could be MUCH better.
DO NOT DEAL WITH THIS MEMBER
So I'm new into VB and my solutions is kinda weird. I know.
|