Silverfrost Forums

Welcome to our forums

Taskbar icon

17 Apr 2013 7:47 #12082

The application has several windows. For some an icon appears in the taskbar and for others not. An example:

  1. When the about is selected, the window shows the information and no icon appears in the taskbar.

  2. If the Plott mmf is selected, the window displays the graph and an icon appears in the taskbar. This is shown in the screenshot.

Question: How is the icon in the taskbar controlled?

[URL=http://imageshack.us/photo/my-images/600/mmfi.jpg/]http://img600.imageshack.us/img600/4715/mmfi.jpg[/URL]

Uploaded with [URL=http://imageshack.us]ImageShack.us[/URL]

17 Apr 2013 11:07 #12083

I only know that you can prevent the toolbar icon. Some information from cwplus.enh:

A new option, 'toolwindow', has been added to the %sy and %ww format codes. This new option prevents the window from appearing in the windows taskbar with all the other windows, and also hides it from the window that appears when the user presses Alt+Tab.

Regards - Wilfried

17 Apr 2013 11:08 #12084

Are you referring to %mi? What do you mean by 'how is it controlled'? %ww[toolwindow] does not appear on the task bar.

17 Apr 2013 11:36 #12085

Thanks for the advice. I added the following option to the code:

i = winio@('%ww[toolwindow]&')

In doing so the (graphical result) window icon in the taskbar (as shown above) does not appear anymore.

17 Apr 2013 10:47 #12086

You control it by your Clearwin+ codes.

As Paul states, the [toolwindow] option in %ww prevents anything appearing in the taskbar. You should take on board that the expression 'toolwindow' has a specific meaning. A toolwindow is a window containing a toolbar (etc), and it can be closed, but not brought to fullscreen or shrunk to the taskbar. A toolwindow needs a menu item or a button on a different toolbar to get it to show again if it has been closed (or you can't get it back!). I have found [toolwindow] useful in combination with [volatile] - there was a time when popup windows didn't work in combination with %gr - and ordinary popups don't have buttons or the option to enter text or numeric values.

Of course, there is nothing to stop you doing whatever you want in the design of an application, but if you choose to depart too far from Windows standards, you make users find the experience less than intuitive.

The Windows norms are not to use an %mi icon for modal dialogs or Windows. I didn't appreciate this for a long time, and gave such icons to every window. In that blissful ignorance, at least I didn't craft a different icon for every window, but used the application icon. The problem with this is that although you get a nice icon on your window's caption bar, you also get a system menu from which the user can maximise the window, even if you have made various other settings to inhibit such behaviour with the buttons on the right top of the caption bar. (Modal dialogs are windows you have to close before you can get back to your main window).

Your window labelled Slot mmf has its own menu bar. This makes it look like a completely separate application with an entirely independent existence. In such a case it looks to me that it should have a minimise icon (and one that is related to, but recognisably different from, the parent window). This is especially so if you have a %pv on the graphics area so that the window can be maximised or minimised. Also, it isn't a very conventional arrangement. A more conventional arrangement would be to have a special Save graph option in the File menu in the main window, or in effect, to control everything from the main window.

18 Apr 2013 7:13 #12087

Hi Eddie

Thank you for tipps regarding the modal window. This concept was not familiar to me.

You are correct: the plot mmf is a modal window that only gives a graphical view of the calculated results.

I believe that this is a very critical point when developing window applications. A point that I will consider in future versions!

18 Apr 2013 10:47 #12088

Not many of the concepts are familiar to me, either, from a programming perspective as I am an engineer, not a computer scientist. Most of the MSDN information looks like a foreign language to me. But you must know the feeling when you use a Windows application that doesn't behave as you expect - and it is annoying.

Modal windows usually have a close button (perhaps a %bt, or even if you are more adventurous, use %ib - this could also include printing). It will get more complicated if you need to intercept window closure to give the user the a reminder to optionally select Save before closure.

I noticed that your application doesn't have the standard File menu as the first item, nor a Help menu as the last one. I found out a lot about bitmaps and fonts from paying around with something as simple as the Help/About window. However, helpfully for this forum at least, your menus are in English!

There is a good set of documents about the User Experience of using Windows on the MSDN website. Some of the effects are not achievable with Clearwin+, but many are. If you look at this document (you can probably find a German language version) then you will realise some more subtle features. For example, a menu item (not the top level menu) should have ellipsis (...) if the item leads you to need to input anything, or a tick mark if selecting it turns an option on or off, or a triangle arrow if there is a submenu (Clearwin+ gives you this automatically if you have a submenu). Again, I did not understand these conventions when I started, and got it all wrong. There doesn't seem to be a clear explanation in simple language anywhere.

Also, you use the Classic windows appearance. Have you tried adding 1 24 default.manifest to your RESOURCES section?

Eddie

22 Apr 2013 3:25 #12095

Hi Eddie

I have tried the default.manifest as shown below. However, I see no difference when this line is added. The RESOURCES section is the last few lines of the code, i.e. no extra file.

Is this the correct way of adding this particular line?

winapp
  integer :: i,winio@ 
  external cb_help 
  i=winio@('%ww&')
  i=winio@('%mi[PRG_ICON]&')
  i=winio@('%mn[Help]',cb_help)
end 

integer function cb_help() 
  integer i,winio@ 
  i=winio@('%ca[2nd Window]&')
  i=winio@('%mi[ICON2]&')
  i=winio@('%fn[Times New Roman]%ts%bf%cnTutorial&',2.0D0) 
  i=winio@('%2nl%cn%9`bt[OK]') 
  cb_help=1 
  return 
end

RESOURCES
PRG_ICON ICON ICON.ICO
ICON2 ICON ICON2.ICO
1 24 default.manifest
22 Apr 2013 4:00 #12096

Yes, that's correct - unless you are running a very old version of FTN95 when this was only usable in a .RC file separately compiled with the SRC resource compiler to create an .OBJ file and linked in with SLINK.

You should see buttons etc not in Windows 95/98 style but in XP/Vista/7 style, i.e. with rounded corners, and a generally more modern appearance.

If you are using a very old version (e.g. 4.90 like I used for a long time) you can see if this is an issue in the updates file on the support page.

Eddie

Please login to reply.