Comments, Sugestions etc
Comments, Sugestions etc
Comments, Sugestions etc
Comments, Sugestions etc
Comments, Sugestions etc
Comments, Sugestions etc Comments, Sugestions etc Comments, Sugestions etc Comments, Sugestions etc Comments, Sugestions etc Comments, Sugestions etc Comments, Sugestions etc Comments, Sugestions etc
Comments, Sugestions etc Comments, Sugestions etc
Comments, Sugestions etc
Go Back  Xtreme Visual Basic Talk > > > Comments, Sugestions etc


Reply
 
Thread Tools Display Modes
  #1  
Old 08-25-2009, 03:00 PM
ident ident is offline
Junior Contributor
 
Join Date: Mar 2005
Posts: 231
Default Comments, Sugestions etc


Spent the last few months building a project for myself. Only new to coding and really loving it. It' seems to relax me after work (im a carpenter) and being only 23 it's either code and relax & my gym after work or go to the pub.

any way....what do you guys/gals think? It has a few bugs that im trying to work threw. One main one what i cant just figure out how to solve it but it does not effect the apps performance in any way.

Comments suggestions ideas FLAMES LOL

http://img341.imageshack.us/img341/9241/43913506.jpg
Reply With Quote
  #2  
Old 08-25-2009, 06:07 PM
Qua's Avatar
QuaComments, Sugestions etc Qua is offline
Impetuous & volatile

* Expert *
 
Join Date: Apr 2005
Posts: 2,177
Default

Judging from the screenshot I'd say that it's an application that hosts images on Imageshack. It looks really nifty. Would love to try it out.
__________________
Reading is the foundation for all knowledge - Unknown.
Reply With Quote
  #3  
Old 08-25-2009, 07:11 PM
AtmaWeapon's Avatar
AtmaWeaponComments, Sugestions etc AtmaWeapon is offline
Fabulous Florist

Forum Leader
* Guru *
 
Join Date: Feb 2004
Location: Austin, TX
Posts: 9,500
Default

Since all I have to go on is screenshots, all I can say is that PNG is generally better for screenshots than JPG. Most people tend to use a lower-quality JPG which produces artifacts; if the screenshots were PNG they'd be the same (if not better) quality in probably 1/10th the size.

If you want critique of the code, then post it
__________________
.NET Resources
My FAQ threads | Tutor's Corner | Code Library
I would bet money 2/3 of .NET questions are already answered in one of these three places.
Reply With Quote
  #4  
Old 08-26-2009, 06:11 AM
darkforcesjedi's Avatar
darkforcesjediComments, Sugestions etc darkforcesjedi is offline
Trust me, I'm an

* Expert *
 
Join Date: Apr 2001
Location: In ur base, pwnin d00dz
Posts: 1,964
Default

I don't see where one logs into imageshack. (Is it not user account based?) I would make several upload / download classes that support multiple services, but that may not support your needs.
__________________
To err is human; to debug, divine.
Reply With Quote
  #5  
Old 08-26-2009, 09:10 AM
AtmaWeapon's Avatar
AtmaWeaponComments, Sugestions etc AtmaWeapon is offline
Fabulous Florist

Forum Leader
* Guru *
 
Join Date: Feb 2004
Location: Austin, TX
Posts: 9,500
Default

From what I remember you don't really need to log in to imageshack. It's generally used for the scenario described by "I want to display an image on a forum, but I don't want to use my own permanent hosting."

There might be some kind of premium account where you get image management services, but the ImageShack I remember didn't. (I quit using it after the admin got in a drama queen battle with the admin of another forum I go to. At some point, IS was only letting users link thumbnail images to force any image view to load the IS site and its ads. The IS admin had a status post on these forums and updated it daily even if the update was "no status today"; this was done to drive more people to his site and his ads. Forum admins complained, IS pitched a hissy fit and blacklisted the forum, the forum blacklisted IS and wrote a script to move any IS hosted images to photobucket, game over.)
__________________
.NET Resources
My FAQ threads | Tutor's Corner | Code Library
I would bet money 2/3 of .NET questions are already answered in one of these three places.
Reply With Quote
  #6  
Old 08-26-2009, 09:24 AM
darkforcesjedi's Avatar
darkforcesjediComments, Sugestions etc darkforcesjedi is offline
Trust me, I'm an

* Expert *
 
Join Date: Apr 2001
Location: In ur base, pwnin d00dz
Posts: 1,964
Default

Sounds like fun! I never used imageshack, flickr, photobucket, tinypic or any of the others. The only forums I've ever needed pictures on either allowed attachments or had user photo galleries.
__________________
To err is human; to debug, divine.
Reply With Quote
  #7  
Old 08-26-2009, 03:57 PM
ident ident is offline
Junior Contributor
 
Join Date: Mar 2005
Posts: 231
Default

Qua: I am just finising a few little bugs then i will host the installer. I'd be most apprecative if you tryed it. it's only beta so all bug reports would be brillient before it's released into the big world of the net.

AtmaWeapon: LOL yeh i do normally always post a .png but didn't this time(why i dont know?) also the code will be hosted the same time as the installer.(tomorrow) but dont expect great things. i am only new so i'm sure you lot will see things and think "WHY HE DONE IT LIKE THAT" even though it works

darkforcesjedi's: There is no need for login details, also it only supports imageshack as thats the only one i know allows automated applications. I could code it for tinypic but it does not allow it. I want to keep this app on the right side so if you know of a good host that allows automated please share.


Overall please be kind . Only been coding 6 months, my first application really. I am really cuffed with my self. Just a hobby being a carpenter.

The main reason i built it is because i do a lot of photoshop and get tired of having to host file apon file. So thats why i added th monitor. Monitors my photoshop dir. as soon as the new image is saved. sorted. i dont need to do any thing

Last edited by ident; 08-26-2009 at 04:12 PM.
Reply With Quote
  #8  
Old 08-26-2009, 04:15 PM
AtmaWeapon's Avatar
AtmaWeaponComments, Sugestions etc AtmaWeapon is offline
Fabulous Florist

Forum Leader
* Guru *
 
Join Date: Feb 2004
Location: Austin, TX
Posts: 9,500
Default

I won't be kind, it's not my nature

Actually what's more accurate is I'm very technical when critiquing code and I usually sound very harsh when my intent was to say "Don't do this, do this instead because..." My choice of words usually amplifies the effect.

I look forward to it; I like digging through apps to see how they work, and if you can learn something from comments on it then everybody wins.
Reply With Quote
  #9  
Old 08-26-2009, 04:23 PM
ident ident is offline
Junior Contributor
 
Join Date: Mar 2005
Posts: 231
Default

it's ok i'm not sensative so do your worse i will fix as many little snags as possible by tomo night. It's pretty much there to be honest. But as you noticed in another thread i have never followed any varible guidelines.

But i'm new, so this is a learning curve that i will make sure i follow next time.

There is one main bug in this app. That maybe you or some one else could spot why. i have spent countles hours trying to solve.

As you can see it has a right click shell ex for right clicking of a image to host. this works fine. But if the application is already running oi know i need the application events which i have the correct code but i cant call my mainform (ClientForm)

ClientForm.txtFilePath.Text = Dir
ClientForm.UploadPicture()

but any way thats hard to follow on here so you can see for your self tomo.
Reply With Quote
  #10  
Old 08-26-2009, 06:25 PM
Qua's Avatar
QuaComments, Sugestions etc Qua is offline
Impetuous & volatile

* Expert *
 
Join Date: Apr 2005
Posts: 2,177
Default

Quote:
Originally Posted by ident View Post
Qua: I am just finising a few little bugs then i will host the installer. I'd be most apprecative if you tryed it. it's only beta so all bug reports would be brillient before it's released into the big world of the net.

AtmaWeapon: LOL yeh i do normally always post a .png but didn't this time(why i dont know?) also the code will be hosted the same time as the installer.(tomorrow) but dont expect great things. i am only new so i'm sure you lot will see things and think "WHY HE DONE IT LIKE THAT" even though it works

darkforcesjedi's: There is no need for login details, also it only supports imageshack as thats the only one i know allows automated applications. I could code it for tinypic but it does not allow it. I want to keep this app on the right side so if you know of a good host that allows automated please share.


Overall please be kind . Only been coding 6 months, my first application really. I am really cuffed with my self. Just a hobby being a carpenter.

The main reason i built it is because i do a lot of photoshop and get tired of having to host file apon file. So thats why i added th monitor. Monitors my photoshop dir. as soon as the new image is saved. sorted. i dont need to do any thing
Sounds like a really cool application/idea. I often myself have to host images that I need for forums, profiles and alike, and every single time I've to google an image hosting site and upload it there, just to copy paste the link to where it's needed.

If I were to use your applications there would beone major point of focus - it would need to be faster than actually going through the process manually. This could be achieved in many ways, one would be a context menu entry when I right clicked a file, that said host after which I would be presented with several different type of links to that file. Some people, including myself, don't like to mess up my standard windows UI, so you could make it possible to drag picture files into your application and then it'd be hosted.
__________________
Reading is the foundation for all knowledge - Unknown.
Reply With Quote
  #11  
Old 08-29-2009, 02:43 PM
ident ident is offline
Junior Contributor
 
Join Date: Mar 2005
Posts: 231
Default

Quote:
Originally Posted by Qua View Post
If I were to use your applications there would beone major point of focus - it would need to be faster than actually going through the process manually. This could be achieved in many ways, one would be a context menu entry when I right clicked a file, that said host after which I would be presented with several different type of links to that file. Some people, including myself, don't like to mess up my standard windows UI, so you could make it possible to drag picture files into your application and then it'd be hosted.

Hello, Firstly it is way faster hosting then Image shacks nomal UI. Loading images to imageshack can take a while where as my application (depending on image size/image shacks current work rate can host a small image in a second(20kb) and 200kb image in 5 seconds. But this is entirly down to image shacks work load.

It provides a context menu for image hosting. BUT my one bug that i have spent HOURS trying to solve is i havent been able to call my textbox and sub in application events.

Code:
            For Each arg As String In e.CommandLine
                'Process the commandline args
                Dim Dir As String = arg
                Dim fi As New System.IO.FileInfo(Dir)
                Dim sTemp As String = fi.Name
                ClientForm.txtFilePath.Text = Dir
                ClientForm.UploadPicture()

            Next
clientform seems to not want to exist. but this is something im hoping some one can spot by hosting my code. Fingers crossed as this is a big downfall. But it works fine if the application is not already running.


I love the idea on dragging and dropping a file. In fact i am going to start cracking away with it right now.

I must stress image shack has been very slow the last few days, sods law that i'm realeasing it. but oh well.

Please remember i only been coding a while and this is just a hobby so dont expect tidy coding and i have now leartn i should follow varible guidelines. But this can be a lesson for the next time.

Here is the installer https://sourceforge.net/projects/simplehost/

and for those of you who would like to maybe lend a hand helping me find the bug that stops me using clientform.txtbox etc then feel free to download the code.

http://www.filedropper.com/imageshackvbnet_1

Please allow 15minutes for sourceforge to update my installer to the newest one

thnaks every 1
Reply With Quote
  #12  
Old 08-29-2009, 08:03 PM
ident ident is offline
Junior Contributor
 
Join Date: Mar 2005
Posts: 231
Default

Now supports drag drop. its a shame i cant drop a file on the system tray icon *
Reply With Quote
  #13  
Old 08-31-2009, 06:49 PM
AtmaWeapon's Avatar
AtmaWeaponComments, Sugestions etc AtmaWeapon is offline
Fabulous Florist

Forum Leader
* Guru *
 
Join Date: Feb 2004
Location: Austin, TX
Posts: 9,500
Default

Is there any reason you are using a random file hoster instead of SourceForge's source control for distributing the source? When I click on your filedropper link it takes me to the main filedropper page, not a download.

If you were using SF's source control, not only would your source be hosted, you'd get change management to go along. This means if your hard drive fails, your code is safe. If you accidentally delete a file, you can restore it. If you make some changes you don't like, you can revert them. Coding without source control is like boating without a life jacket.

That said, I can't offer much help because I can't see your source. It looks like you're using default instances and I hate those with a passion, so I'm blaming the use of the default instance even though a test I did a while ago disproves that.

I'm unaware of a way to make dropping a file onto a notification area icon do anything useful; as far as I know notification icons only get mouse down and mouse up events and do not participate in dragging and dropping. In fact, I've never seen a tool that did so, which leads me to presume it's not possible. Almost every tool I've ever used that wanted me to drop something provided a small always on top window to be the drop target.
__________________
.NET Resources
My FAQ threads | Tutor's Corner | Code Library
I would bet money 2/3 of .NET questions are already answered in one of these three places.
Reply With Quote
  #14  
Old 08-31-2009, 07:40 PM
Cags's Avatar
CagsComments, Sugestions etc Cags is offline
Contributor

* Expert *
 
Join Date: Jul 2003
Location: Leicestershire, England
Posts: 710
Default

It's infinitely possible I'm wrong (especially as I haven't touched VB or .Net in a year or more) but I think a notification icon can respond to a MouseMove event. I'm only theorising here, but might it be possible to make a small ontop window appear when you hover over the icon, then drop the file into that window? Similar to how dragging a file over an item on the taskbar makes the window appear, just repositioned next to the icon?!
__________________
I don't suffer from insanity, I enjoy every minute of it.
http://www.tib-studios.co.uk
Reply With Quote
  #15  
Old 09-01-2009, 02:31 PM
ident ident is offline
Junior Contributor
 
Join Date: Mar 2005
Posts: 231
Default

Quote:
Originally Posted by AtmaWeapon View Post
Is there any reason you are using a random file hoster instead of SourceForge's source control for distributing the source? When I click on your filedropper link it takes me to the main filedropper page, not a download.

That said, I can't offer much help because I can't see your source. It looks like you're using default instances and I hate those with a passion, so I'm blaming the use of the default instance even though a test I did a while ago disproves that.
I dont know what the reason was i guess. I am not sure if i have used there source control but the source is now on my page.

default instances?? can you explain more about this? How else would i call my form?

Before i read your post i had already decided to kill off that idea and make a drop target. Accept i cant call the upload process since i have the same bug being i cant call my main form call clientform.upload()

Installer

Source now 1mb

I appreciate all ur help

Last edited by ident; 09-01-2009 at 05:39 PM.
Reply With Quote
  #16  
Old 09-01-2009, 05:05 PM
AtmaWeapon's Avatar
AtmaWeaponComments, Sugestions etc AtmaWeapon is offline
Fabulous Florist

Forum Leader
* Guru *
 
Join Date: Feb 2004
Location: Austin, TX
Posts: 9,500
Default

This link works (though I have some suggestions I'll discuss in a minute). Default instances, their evils, and the workarounds is a topic I need to write an article about. I've tried to respond to this post with an explanation of default instances and why you shouldn't use them three times now, and each time I give up at 9,000 characters. The main problem is I dislike them *so* much I can't discuss them without listing all of the disadvantages with examples. I'll try and post something brief soon, and if I fail at that at least you can read the longer one I should finish in a week or so. As for the rest of the source, I'll scan over that and post comments when I'm done with the default instances junk.

Some suggestions about the download:
  • Everyone who has Windows XP or better has support for .zip files. Only people who have downloaded extra software has support for .rar files. Use .zip.
  • Delete the "bin" and "obj" directories from each project in the file. Right now your source code RAR is 6.8MB. When I remove all binary files and recompress, the zip file is 1MB. Anyone who knows what to do with the source code can build the binaries, so why distribute them with the source?

*edit* From the filenames, I can make a preliminary guess that a link to the MSDN Class Naming Guidelines is pertinent. Hungarian notation has been argued for ages, but in .NET MS says don't do it.
Reply With Quote
  #17  
Old 09-01-2009, 05:38 PM
ident ident is offline
Junior Contributor
 
Join Date: Mar 2005
Posts: 231
Default

Quote:
Originally Posted by AtmaWeapon View Post


*edit* From the filenames, I can make a preliminary guess that a link to the MSDN Class Naming Guidelines is pertinent. Hungarian notation has been argued for ages, but in .NET MS says don't do it.
I always get nervous once you posted. Always assume im in for a ticking off with my crappy coding,


I have rehosted the source. I'm impressed with how much you notice. Guess that comes with experience.

I will have a read of that msdn link.

Also im looking forward to your post, if it helps me sove my mystery bug il be for ever greatful

thanks for all your doing
Reply With Quote
  #18  
Old 09-01-2009, 07:32 PM
AtmaWeapon's Avatar
AtmaWeaponComments, Sugestions etc AtmaWeapon is offline
Fabulous Florist

Forum Leader
* Guru *
 
Join Date: Feb 2004
Location: Austin, TX
Posts: 9,500
Default

Thanks for fixing up the source distribution; it's a lot easier for me to work with it which is a good thing because I'm dealing with some strange computer behavior right now.

One thing I'd like to ask you up front from a cursory scan. What's with the methods named AnonymousMethod4()? That's not a very good naming practice, and it's not exactly how you'd normally use anonymous methods. It's the kind of thing I'd expect to see if someone either decompiled a program or ran C# through a cruddy C# to VB .NET converter.
Reply With Quote
  #19  
Old 09-02-2009, 05:39 PM
ident ident is offline
Junior Contributor
 
Join Date: Mar 2005
Posts: 231
Default

once again atmaw* my friend trev did the original http requesst. He codes in c#, i was dying to know how htttp was used in vb so i asked him to show me. which i then converfted to vb
Reply With Quote
  #20  
Old 09-05-2009, 01:58 PM
AtmaWeapon's Avatar
AtmaWeaponComments, Sugestions etc AtmaWeapon is offline
Fabulous Florist

Forum Leader
* Guru *
 
Join Date: Feb 2004
Location: Austin, TX
Posts: 9,500
Default

Fair enough; that's one of the "innocent" scenarios I'd dreamed up

I'm now starting to get a clear enough free-time schedule to start looking at the code. I still haven't attempted to reproduce or explain the problems with the single-instance application yet, but that's my first priority because I really want to find out it's default instance's fault. More on that later.

It's going to be hard to make the suggestions all at once here. There's a lot that I have to say, and most of the suggestions constitute lessons for all-around good practices. The planned changes range from simple "don't do this" to relatively advanced "I wish I'd figured this trick out 5 years ago" stuff. My plan is to attack one thing at a time and document what was changed and why it was changed, but this will still be kind of difficult. Zipped projects don't do much to show you *what* was changed, but a forum post is adequate for the *why*. I have a plan.

Ideally, I'd like to join your project and become a source maintainer. What I'd like to do is get the source into the SF source control system, then start tinkering away at things. When I finish the changes for one "lesson", I can then write a post and reference the change numbers to make descriptions of *what* changed easier. I have no idea how to do this in SF, and if you aren't very experienced with it then you probably don't either. So I propose the following. I'll start a project as a "fork" of the Simple Host project and import your source. While I will maintain a "project owner" position, I will make it clear that this project is a deriviative work and all credit belongs to you and your project. The only credit I will take is a small "Thanks to ... for help" on the About dialog. The license will remain the same, which will allow you to import my code verbatim into your project without attributing me if you feel so inclined. I'm in it for the fun, not the glory.

I don't want to do this without your blessing. If you don't like the idea, I'll proceed without using an SF project and use the forums as my soapbox, though it will be harder for you to see what I changed in each lesson. This is going to be a long-term project: I don't see it taking less than two months because I have little free time and usually fill it with other things. Let me know either way.

So that I don't make yet another post without a suggestion, here's a very summarized default instance explanation.

Default Instances are a feature of VB .NET that let you use the class name of a form as a variable that represents some instance of that form. There are some big pitfalls to doing this. For example, let's say these are the first lines of code in your application:
Code:
MainForm.Text = "Hello"
Behind the scenes, here's what the equivalent code looks like if I replace method calls and property getters with their code:
Code:
If My.Application.Forms.MainForm Is Nothing Then
    My.Application.Forms.MainForm = New MainForm()
End If
My.Application.Forms.MainForm.Text = "Hello"
It's convenient, and particularly so if you only ever want there to be one MainForm. But what happens if you make another MainForm is what confuses most people:
Code:
Public Sub ShowMainForm()
    Dim frm As New MainForm()
    frm.Show()
End Sub

Public Sub CloseMainForm()
    MainForm.Close()
End Sub
In the code above, CloseMainForm() does not close the form that ShowMainForm() creates. MainForm is its own variable, and represents a completely different main form. You could solve this by always using the default instance:
Code:
Public Sub ShowMainForm()
    MainForm.Show()
End Sub
This is OK, if you only ever want one MainForm visible at a time. If you need two, you're out of luck. Calling ShowMainForm() twice shows the same form twice, that is, only one form is created and its Show() method is called twice. If you want multiple forms, you have to avoid the default instance altogether:
Code:
Dim _mainForms() As New List(Of MainForm)()

Public Sub ShowMainForm()
    Dim frm As New MainForm()
    _mainForms.Add(frm)
    frm.Show()
End Sub

Public Sub CloseMainForm()
    Dim frm As MainForm = _mainForms(0)
    _mainForms.Remove(frm)
    frm.Close()
End Sub
So in my opinion, default instances are only useful in one scenario: when you want only one instance of a form ever, and you can guarantee that this form is only created by code you control. This is rare.

What I believe is happening that causes your problem is that when you use the default instance of ClientForm, the variable ClientForm is not initialized to the form that is already there. So you end up creating a new form, setting its properties, and using it to upload a picture, but this second form is never displayed. To work around this, you'd need a way to always access the MainForm that is visible. I'd detail some methods to do this, but I haven't verified the cause of the bug yet and I'd hate to waste time on solutions to the wrong problem.

Let me know what you think about me forking a new SF project. Alternatively, if you know how to add me to the project at a level that has write access to the repository, I'll accept that.
__________________
.NET Resources
My FAQ threads | Tutor's Corner | Code Library
I would bet money 2/3 of .NET questions are already answered in one of these three places.
Reply With Quote
Reply


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 Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
Comments, Sugestions etc
Comments, Sugestions etc
Comments, Sugestions etc Comments, Sugestions etc
Comments, Sugestions etc
Comments, Sugestions etc
Comments, Sugestions etc Comments, Sugestions etc Comments, Sugestions etc Comments, Sugestions etc Comments, Sugestions etc Comments, Sugestions etc Comments, Sugestions etc
Comments, Sugestions etc
Comments, Sugestions etc
 
Comments, Sugestions etc
Comments, Sugestions etc
 
-->