Author Topic: Start Form  (Read 3626 times)

Cowboy1

  • Jr. Member
  • **
  • Posts: 65
    • View Profile
Start Form
« on: September 07, 2015, 12:21:45 PM »
I know this is probably very basic but I have not been able to find anything in my searches. Is there a way to select which form opens when the project loads?
Another question.
Is there a way to create a project ICON on the desktop to select that would load my project?

I have basically finished my project just doing some clean-up, I'm sure as I get this thing running I will want more bells and whistles but I have a real good starting point.
Thanks for everybody's help.

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: Start Form
« Reply #1 on: September 07, 2015, 01:03:05 PM »
Right click the AdvancedHMI project in Solution Explorer and select Properties
In the Application Tab you will see the setting for Startup Form and the Icon

Cowboy1

  • Jr. Member
  • **
  • Posts: 65
    • View Profile
Re: Start Form
« Reply #2 on: September 07, 2015, 04:17:00 PM »
Well I have a icon on my desktop but can not open the application with the icon or from Visual studio. I don't know what I did wrong but it will not load now. I get a error stating Application can not be started contact application vendor.

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: Start Form
« Reply #3 on: September 07, 2015, 04:27:49 PM »
Try deleting all of your \bin and \obj directories (6 total), then open and Rebuild Solution.

Cowboy1

  • Jr. Member
  • **
  • Posts: 65
    • View Profile
Re: Start Form
« Reply #4 on: September 07, 2015, 04:30:31 PM »
how do I locate them?

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: Start Form
« Reply #5 on: September 07, 2015, 04:35:54 PM »
Using Windows Explorer, browse to the folder with your AdvancedHMI project. Go into each folder:

\AdvancedHMI
\AdvancedHMIControls
\AdvancedHMIDrivers

Cowboy1

  • Jr. Member
  • **
  • Posts: 65
    • View Profile
Re: Start Form
« Reply #6 on: September 07, 2015, 04:38:06 PM »
Ok and delete everything in those folders? I have a lot of files in each folder is that normal?

Noe

  • Full Member
  • ***
  • Posts: 205
    • View Profile
Re: Start Form
« Reply #7 on: September 07, 2015, 04:54:29 PM »
That is normal. And also if you can not delete some folder, just restart your machine and try deleting it again, as it may have been running some file inside.

Noe

  • Full Member
  • ***
  • Posts: 205
    • View Profile
Re: Start Form
« Reply #8 on: September 07, 2015, 04:55:08 PM »
Those folders are generated while compiling your solution, I believe.

Cowboy1

  • Jr. Member
  • **
  • Posts: 65
    • View Profile
Re: Start Form
« Reply #9 on: September 07, 2015, 05:00:33 PM »
I cleared all 6 and still can not run my project from Visual Studio or the desktop icon.

Cowboy1

  • Jr. Member
  • **
  • Posts: 65
    • View Profile
Re: Start Form
« Reply #10 on: September 07, 2015, 05:17:42 PM »
When I select start in Visual Studio it acts like it is trying to start and says something about loading symbols at the bottom of the screen and goes right back into the build screen.

Cowboy1

  • Jr. Member
  • **
  • Posts: 65
    • View Profile
Re: Start Form
« Reply #11 on: September 07, 2015, 05:40:58 PM »
OK after rebooting computer everything is working but not connected to PLC when using the desktop icon. When I use VS to start project it is connected?

Godra

  • Hero Member
  • *****
  • Posts: 1447
    • View Profile
Re: Start Form
« Reply #12 on: September 07, 2015, 10:22:41 PM »
I am not sure of how you created the desktop icon but the basic procedure is to go into your project folder and browse to AdvancedHMI/bin/Debug or Release folder (whichever holds your files) and then right click the AdvancedHMI.exe file, point to "Send To" and select "Desktop (create shortcut)". Just like the attached picture shows.

Whenever you make changes to the project in Visual Studio and they do work in the project, you should rebuild the solution and press F5 or click the green arrow to run the program. After that try using the desktop icon (I would close VS before doing so).

You could also clean Temp folder, if it hasn't been done in a while, by clicking Windows key + R and typing %temp% (if Windows is Vista or 7 or 8 then just type %temp% directly in the search box). Whatever files show in this folder you should be able to delete by clicking CTRL + A and pressing Del button --> then empty the Recycle Bin. Some files, if currently in use by some application, will not allow you to delete them --> deselect each file as it shows by holding CTRL button and clicking the file.

Cowboy1

  • Jr. Member
  • **
  • Posts: 65
    • View Profile
Re: Start Form
« Reply #13 on: September 07, 2015, 11:18:50 PM »
Godra,

I created the desktop icon in the properties section of the project and published the project. I used a beer glass image in ".ico" format. When I select the icon it opens the project, but for some reason the project is not communicating with the PLC. When I open VS and open the project and run it, everything works great.
Thanks

Noe

  • Full Member
  • ***
  • Posts: 205
    • View Profile
Re: Start Form
« Reply #14 on: September 08, 2015, 10:33:18 AM »
For some reason, Archie does not recommend to use "Publish". Just build your project, then go to the project folder and search for BIN folder, you may find two folders: release and debug, depending on what you choose on your project settings. There it will be generated your exe file which you can leave just there and create a direct access to from the desktop for ease of use.