Author Topic: Windows Form Template  (Read 1903 times)

boldive

  • Newbie
  • *
  • Posts: 33
    • View Profile
Windows Form Template
« on: September 30, 2018, 11:55:22 AM »
To reduce development time I want to use one form as a template.
So, Click on Project => Export Template and follow instructions. All referenced components have been selected to be used in template. May be I don't need to select all of them. Template was created. Now time to use it.
Add => Windows Form and select my template. Error message comes:
https://photos.app.goo.gl/j6GqvEzoXoZsMZRx7



Which elements I need to select to create a template to use it in the project?

Thanks

Godra

  • Hero Member
  • *****
  • Posts: 1448
    • View Profile
Re: Windows Form Template
« Reply #1 on: September 30, 2018, 05:22:13 PM »
Maybe it might be simpler to just create a form and then do Copy/Paste/Rename.

boldive

  • Newbie
  • *
  • Posts: 33
    • View Profile
Re: Windows Form Template
« Reply #2 on: October 01, 2018, 08:04:31 PM »
Copy/Paste/Rename.

It was a start point with Copy/Paste/Rename. Doesn't work well in Visual Studio, to many system mistakes needs to be fix. Recommendations from other forums are to make templates and work with them.

Phrog30

  • Guest
Re: Windows Form Template
« Reply #3 on: October 01, 2018, 08:14:47 PM »
Copy/Paste/Rename.

It was a start point with Copy/Paste/Rename. Doesn't work well in Visual Studio, to many system mistakes needs to be fix. Recommendations from other forums are to make templates and work with them.

Too many mistakes??  Here's my two pennies, AHMI isn't a formal HMI package.  You can't compare it to Siemens, AB, Wonderware, etc.  It's WinForms.  There are going to nuances that you must deal with.  However, it works very well.  Copy and pasting a form isn't a big deal at all.  You just must spend the 5 seconds it takes to know what you are doing.  One of the best things about using AHMI is the support.  You don't have to go to a PLC forum, or even use this one.  It's .NET, go to Google and you will see a ton of information.  Here's one:
https://stackoverflow.com/questions/1268591/how-to-easily-duplicate-a-windows-form-in-visual-studio

James

boldive

  • Newbie
  • *
  • Posts: 33
    • View Profile
Re: Windows Form Template
« Reply #4 on: October 03, 2018, 09:10:20 PM »
James, recommendation to use templates was taken from the provided link. Which means I did my homework. I have tried multiply combinations from what people suggested. In Visual Studio 2017 Community edition it doesn't look so simple. I assume I do something wrong but so far nothing works for me.
If you are using VS 2017 in AHMI and know how to do copy/paste forms, I will really appreciate if you will share your knowledge.

I don't blame AHMI, this is a fantastic product. My goal is to understand how to use it. If I will continue to spend days to figure out why form doesn't open with true flag OpenOnStartup without extra coding (part of advertised functionality), or why menu buttons don't change background colors even if code "seems ok" (somehow it works on the provided sample projects where much complex code is inside) then I have only one choice on this forum: ask for support.

Thanks


Phrog30

  • Guest
Re: Windows Form Template
« Reply #5 on: October 04, 2018, 07:26:17 AM »
I've not had any problems like you mentioned, so my recommendation is to make sure you are totally patched/updated on VS, then start with a clean project and try again. This can rule out some things. If you are using Windows 10 I've seen weird things happen if you don't have the latest updates and patches.