CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 13 of 13
  1. #1
    Join Date
    Oct 2012
    Posts
    59

    Finalizing Project

    How to finalizing my vb project that when i press on programs icon twise it runs program without instaling something?

  2. #2
    Join Date
    Jul 2001
    Location
    Sunny South Africa
    Posts
    11,283

    Re: Finalizing Project

    I assume you're talking about compiling your program. You should Click File, Make Exe...

    This will produce your program's executable

  3. #3
    Join Date
    Oct 2012
    Posts
    59

    Re: Finalizing Project

    I cant make exe. file. I highlight problem in the picture, can you know solution?
    (AboutScr. - variable not defined)

    Name:  Untitled.jpg
Views: 1231
Size:  97.8 KB
    Last edited by Halosar7; October 12th, 2012 at 02:52 PM.

  4. #4
    Join Date
    Jul 2001
    Location
    Sunny South Africa
    Posts
    11,283

    Re: Finalizing Project

    That is obviosly a problem with your syntax. You'll have to post your code here please. But as far as I can tell, your AboutScr form doesn't exist

  5. #5
    Join Date
    Oct 2012
    Posts
    59

    Re: Finalizing Project

    Quote Originally Posted by HanneSThEGreaT View Post
    That is obviosly a problem with your syntax. You'll have to post your code here please. But as far as I can tell, your AboutScr form doesn't exist
    Yes you right. i just change my forms name to AboutScr and no more that error, but now is other errors.
    It no use, when i fix one error, apears another. It is another way to save, or convert files (project, form1) to exe file without vb?
    Last edited by Halosar7; October 13th, 2012 at 03:29 PM.

  6. #6
    Join Date
    Jan 2006
    Location
    Fox Lake, IL
    Posts
    15,007

    Re: Finalizing Project

    Nope. Code has to compile BEFORE it can create an .EXE that will be trusted NOT TO CRASH when it runs on any OS. Would you click an exe that gives you a BLUESCREEN? Your code just might do that if it was compiled incorrectly.
    David

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

  7. #7
    Join Date
    Oct 2012
    Posts
    59

    Re: Finalizing Project

    Quote Originally Posted by dglienna View Post
    Nope. Code has to compile BEFORE it can create an .EXE that will be trusted NOT TO CRASH when it runs on any OS. Would you click an exe that gives you a BLUESCREEN? Your code just might do that if it was compiled incorrectly.
    In that case for me is bad news. Program works corecly without any errors, but when i try save to exe.fileapears errors. Can you know - vb6 programing code can be use in visual basic 2010 express?

  8. #8
    Join Date
    Jan 2006
    Location
    Fox Lake, IL
    Posts
    15,007

    Re: Finalizing Project

    Then you probably have a library in use that can't be legally copied...
    David

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

  9. #9
    Join Date
    Jul 2008
    Location
    WV
    Posts
    5,362

    Re: Finalizing Project

    Most likely it is because you are not starting it with full compile when in the IDE.
    When you test your code in VB by default it only compiles code that will be executed as it is about to be executed.
    This means that if you have a module or sub routine that is not being called when you test the program then you will not get an error but when you try to build the exe it checks everything and if there are problems it will stop the compile process and point out the troublesome code.

    You must either fix the problems or remove that part from your project if it is not needed.
    Always use [code][/code] tags when posting code.

  10. #10
    Join Date
    Oct 2012
    Posts
    59

    Re: Finalizing Project

    Quote Originally Posted by DataMiser View Post
    .You must either fix the problems or remove that part from your project if it is not needed.
    I find another solution. In project i add more forms but i rename. It is a blank form with name o prevouslyerror. Lets say if apears "AboutScr" error, i add form with that name and error no more. So i ask you, can this blank form somehow affect my real program?

    Name:  Untitled.jpg
Views: 1212
Size:  100.4 KB

  11. #11
    Join Date
    Jul 2008
    Location
    WV
    Posts
    5,362

    Re: Finalizing Project

    Well it would appear that you are trying to work with code that was written by someone else and are not sure what it needs or doesn't need.
    To answer your question, yes anything you change will have an effect. It the form is not used then it shoudl not be there and the code that relates to it should be removed.
    Yes if the form is referred to in the code somewhere then a form by that name is required before it will compile. likewise if a control in that form is referred to somewhere then that control must exist as well as any subs or functions.

    Using a dummy form with the same name will not really hurt anything if the form is not being called when you run your program but then again as I said if it is not going to be used it should not be there and the code that refers to it should be removed as it is not needed and will only serve to make your code harder to debug and maintain.

    Since we know nothing about your project it is hard to say what you should do beyond what I have pointed out.
    Always use [code][/code] tags when posting code.

  12. #12
    Join Date
    Oct 2012
    Posts
    59

    Re: Finalizing Project

    Quote Originally Posted by DataMiser View Post
    Well it would appear that you are trying to work with code that was written by someone else and are not sure what it needs or doesn't need.
    To answer your question, yes anything you change will have an effect. It the form is not used then it shoudl not be there and the code that relates to it should be removed.
    Yes if the form is referred to in the code somewhere then a form by that name is required before it will compile. likewise if a control in that form is referred to somewhere then that control must exist as well as any subs or functions.

    Using a dummy form with the same name will not really hurt anything if the form is not being called when you run your program but then again as I said if it is not going to be used it should not be there and the code that refers to it should be removed as it is not needed and will only serve to make your code harder to debug and maintain.

    Since we know nothing about your project it is hard to say what you should do beyond what I have pointed out.
    I use tranparent and png code from other sources. I make exe.file and tested program. I dont noticed any errors. Programs works fine and other form not apear in primery form program.

  13. #13
    Join Date
    Jul 2008
    Location
    WV
    Posts
    5,362

    Re: Finalizing Project

    The form you mention would typically be linked to a help about option on the menu
    Always use [code][/code] tags when posting code.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured