Windows 7 WTH

The place to discuss and announce issues that don't relate directly to ProMatrix, but that are of interest to ProMatrix users. Feel free to use the Chatter forum as you like (as long as your use is in good taste).

Windows 7 WTH

Postby ChuckASI » Thu Jun 28, 2012 12:05 pm

User sent me an email wanting me to expand the size of a message box.
I have a routine built into one of my systems where the user can enter "Important Notes" about a customer. The table is a pretty basic table Customer Code/Date / Note (60 chars) / Note Importance Code (1 char). One of the Note Importance Codes is a "V" for Volatile. Whenever they are in Customer Maintenance and go to pull up a Customers account, the system looks at the Notes for that customer and finds the most recent 10 or less Volatile Notes. I concat these notes together into a long string of text being Date+'-'+Note followed by a carriage return. So I end up with a string of these notes with a Carriage return every 70 characters. NOW. I then pop that up before they can do anything on the customer using a MessageBox(MYTEXT,16,"Important Notes"). It works perfectly on Windows XP machines but on the Windows 7 machines the box is not big enough and cuts the note line off at 56 characters and puts the remaining 14 on the next line, then starts the next note on a new line(as it should) and cuts it off at 56 and puts the remaining on the next line. It's like, it sees the carriage returns and respects them but it's using a different Point size to compute the size of the box and doesn't allow the whole line to fit. We have tried changing the Font for Messagebox in the Aero System, doesn't seem to help, it changes the displayed font, but still cuts it off at 56 characters.

Anybody else see anything like this?
Chuck Prickett
Associated Systems, Inc.
chuckp@associatedsys.com
ChuckASI
 
Posts: 115
Joined: Mon Jun 14, 2010 9:52 am
Location: Wichita, Ks

Re: Windows 7 WTH

Postby DavidLeMesurier » Fri Jun 29, 2012 2:25 am

Have you tried to use _screen.oApp.oMessage.DisplayMesage for this, it might work better

Just have your text as an alternate text
DavidLeMesurier
 
Posts: 82
Joined: Sun Jun 13, 2010 12:43 am
Location: Dubai

Re: Windows 7 WTH

Postby Bob » Fri Jun 29, 2012 6:54 am

I think that's the default behavior for messageboxes... and I see no way to change it, unless you can reformat the data to wrap in fewer than 56 characters, and still make sense, is readable ...

One way I like to present formatted text to users is to use a form with an edtBox on it, then write strings to the value property as needed... as a single preformatted string, or sequentially :

FormName.edtBox.value = FormName.edtBox.value + jcNewString

This gives you control of form and edtBox width, fonts, custom separators between messages, etc .... you can run the form NOSHOW using the NAME option, and update the value property before or after showing the form. A lot of flexibility if some what more complicated.
Bob
 
Posts: 718
Joined: Mon Jun 14, 2010 6:53 am
Location: Near Albany, NY

Re: Windows 7 WTH

Postby cti2 » Fri Jun 29, 2012 7:30 am

Windows 7 "fixed" a lot of things that were not broken with XP, including doing weird things with text. I see it all the time in VFP and dislike it. If I fix text so it works with Win7 then it doesn't work right with XP. Urrgghh !

Anyways for a long time I have used my own type of message box similar to Bob's. I can programatically change the size of the form, the text font & size etc. I can also have the edit box as a real editiable edit box. I use the editable version when I allow editing of MEMO field text from a grid. I display the first 30-40 chars of the memo field in a read-only column of a grid. The user r-clicks the text and the edit box pops up.

Pete Ryder
cti2
 
Posts: 181
Joined: Wed Oct 13, 2010 6:38 am

Re: Windows 7 WTH

Postby ChuckASI » Fri Jun 29, 2012 3:42 pm

Glad, (kind of) to hear that others have encountered this behavior and it wasn't just ME. I had given thought to the idea of just creating my own form and editbox. But hey it was quick and easy to use the messagebox and it worked in XP. I only need the notes to display to bring to the attention of the user any pertinent info about the customer. The only action they have is to cancel the display and go on with their business. I could even just create a Form with 10 70 character disabled text boxes on it and a cancel button and just pass it parameter fields.
Where there's a will, there's a way. Just need to find the one that makes my customer/user happy.

Thanks, People
Chuck Prickett
Associated Systems, Inc.
chuckp@associatedsys.com
ChuckASI
 
Posts: 115
Joined: Mon Jun 14, 2010 9:52 am
Location: Wichita, Ks


Return to Chatter

Who is online

Users browsing this forum: No registered users and 2 guests

cron