Bleedyellow.com is a new place for the Lotus community to congregate. It was just made live (3:54 PM), so I haven't had a chance to explore it yet.
Brought to you by the I-hope-they-never-use-their-powers-for-evil brain trust at Lotus911.
Friday, January 18, 2008
UI redesign: getting rid of the outlines
In my last post I outlined a problem I had when trying to replace an outline with a combination of caption tables, tabbed tables and embedded views. Even using one of the hacks I came up with I still had one problem: tables cannot be made to fit to the screen height, and embedded views in tables do not implement the size to window properties correctly. I found a solution, thanks to SnTT, Don McNally and
Slawek Rogulski. (Follow the link to Don's blog for a more complete write-up of what I'm about to discuss.)
The implementation is pretty trivial. A form can have a header. You put your navigation bits in the header of the form. The remainder of the form contains a computed embedded view. When configured in this way embedded views do implement the size to window properties correctly. If you set the left margin of the embedded view to 0.75" it lines up with the left margin pretty well. Here is what I have come up with so far.

Everything in the top blue section is in the form header. The rest of the form is taken up by the embedded view. The button panel in the top left is for one-click access to creating new records. I'll probably replace that with something like Create new [-----] [GO] and let them select from a list and click the GO button and just leave it at that.
Slawek Rogulski. (Follow the link to Don's blog for a more complete write-up of what I'm about to discuss.)The implementation is pretty trivial. A form can have a header. You put your navigation bits in the header of the form. The remainder of the form contains a computed embedded view. When configured in this way embedded views do implement the size to window properties correctly. If you set the left margin of the embedded view to 0.75" it lines up with the left margin pretty well. Here is what I have come up with so far.

Everything in the top blue section is in the form header. The rest of the form is taken up by the embedded view. The button panel in the top left is for one-click access to creating new records. I'll probably replace that with something like Create new [-----] [GO] and let them select from a list and click the GO button and just leave it at that.
Thursday, January 17, 2008
Embedded view bug
I have an old app that I'm redesigning and consolidating multiple lightly-used databases into one. The old design was a typical three-panel layout. I wanted to do something fresh and easier to understand. I decided that instead of the typical tree hierarchy I'd flip it sideways, with a caption table replacing the top-level tree items, and tabs inside the caption table to represent the lower-level views.

It looked good on paper, but in Domino Designer 8, 7.0.2, and 7.0.3 there is a bug with this configuration. When you...

It's a little hard to tell what's going on here, so let me explain. The caption rows expand and collapse properly. The tabbed table in the previously selected caption row disappears. But the embedded view stays put, covering the newly expanded caption and any others below it. I can't select any other caption row and I can't add anything to the current caption row.
Now for the real kick in the rubber parts: it only does this in Domino Designer. It works perfectly in Notes 8 Basic/Standard, 7.0.2 and 7.0.3. So far I have come up with three workarounds in Domino Designer:

It looked good on paper, but in Domino Designer 8, 7.0.2, and 7.0.3 there is a bug with this configuration. When you...
- Select a tab with an embedded view and
- Select a different row in the caption table
- You get this

It's a little hard to tell what's going on here, so let me explain. The caption rows expand and collapse properly. The tabbed table in the previously selected caption row disappears. But the embedded view stays put, covering the newly expanded caption and any others below it. I can't select any other caption row and I can't add anything to the current caption row.
Now for the real kick in the rubber parts: it only does this in Domino Designer. It works perfectly in Notes 8 Basic/Standard, 7.0.2 and 7.0.3. So far I have come up with three workarounds in Domino Designer:
- Close the form, and save it so the currently expanded caption will be visible when you reopen.
- Use a blank dummy tab at the end, and select that before changing caption rows.
- Scrap this altogether and find another solution.
SnTT: Putting your Lotusphere calendar on your iPod
I remember way back when Alan Lepofsky posted about saving contacts on his iPod. I don't have any contacts to manage so it didn't mean that much to me. But I also recalled someone in the comments mentioning a way to export calendar entries to your iPod. Now that is something I can use! It's actually very, very simple.
A couple of things to know about this process. I use Ben Langhinrichs' Lotusphere sessions database to add sessions I'm interested in to my personal calendar. It has a nifty "Add to my calendar" action you can click and you're done. I don't use Lotusphere Online so I have no idea if it will integrate with your Notes calendar or if you can export your selected sessions. If you use Lotusphere Online you're on your own.
Okay, enough chit chat, let's go!
A couple of things to know about this process. I use Ben Langhinrichs' Lotusphere sessions database to add sessions I'm interested in to my personal calendar. It has a nifty "Add to my calendar" action you can click and you're done. I don't use Lotusphere Online so I have no idea if it will integrate with your Notes calendar or if you can export your selected sessions. If you use Lotusphere Online you're on your own.
Okay, enough chit chat, let's go!
- Select the calendar entries in Notes
- Go to File > Export
- Browse to your iPod (it has to be connected as a hard disk)
- Open the Calendar folder
- Enter a name for the file to be saved
- Change the type from the default Structured Text to Calendar File (.ics)
- Click Export
Wednesday, January 16, 2008
Monday, January 14, 2008
Thursday, January 10, 2008
if you wanted to go to a hands on lab at Lotusphere, forget it
The e-mail for hands-on labs went out at 3:45 PM ET on January 9th (yesterday). Today, January 10th, every single lab is full, except for one about Websphere Portal. Oh, but don't despair!
And yeah, this pissed me off so much I blogged on vacation.
At 5 minutes before session start time, standby and then gallery seating will be admitted. Any pre-registered enrollees arriving less than 5 minutes before start time will forfeit their spot and be seated based on standby availability.Give me a freaking break. They only allow 25 people to sign up for what they call keyboard access, and 25 more as "keyboard helpers". I'm sure someone thought this was a good idea but it's not really solving anything. There are absolutely, positively no repercussions for not showing up. Anyone want to take bets on how many people sign up and don't show? I wouldn't be surprised if there were empty seats since there is now even less chance of getting in. Since you know that every seat is already spoken for how likely are you to stand around hoping for a second-hand scrap?
And yeah, this pissed me off so much I blogged on vacation.
Friday, January 04, 2008
Thursday, January 03, 2008
probably old news for most of you
Here is my Netvibes page with the IBM/Lotus blogs I subscribe to. What do you notice about it?

See the second one from the top on the right? That's right... Damien Katz is back at IBM! I don't know what, if anything, that will mean to Notes developers, but it's definitely not a bad thing.

See the second one from the top on the right? That's right... Damien Katz is back at IBM! I don't know what, if anything, that will mean to Notes developers, but it's definitely not a bad thing.
another year in review post
2007 was one of my oddest years to date. Lotusphere 2007 was one of the highlights of my life, thanks to all of you. Things went all to hell shortly after that. I changed jobs in May and nothing I was promised has come to pass. By now I was supposed to be IT Director but I'm still a code monkey plugging along. The consulting has gone very well. My only client is still my former employer, but we are making progress and I'm doing some really cool things.
I traveled a lot last year and most of my trips had some weird component to them. In February I nearly died in Whistler. Twice. I had to do emergency surgery on my car during my trip back from the Eastern Shore in June. I missed getting together with Stan when I was in Toronto in July. I managed to embarrass the groom during the reception for the October wedding in Boston. And then there was the November trip to Barcelona and the cruise, which were both so disastrous I can't even bring myself to write it all down.
Something was really off for me last year. Here's to 2008 being better. You don't know how much I'm looking forward to Lotusphere again. :-)
I traveled a lot last year and most of my trips had some weird component to them. In February I nearly died in Whistler. Twice. I had to do emergency surgery on my car during my trip back from the Eastern Shore in June. I missed getting together with Stan when I was in Toronto in July. I managed to embarrass the groom during the reception for the October wedding in Boston. And then there was the November trip to Barcelona and the cruise, which were both so disastrous I can't even bring myself to write it all down.
Something was really off for me last year. Here's to 2008 being better. You don't know how much I'm looking forward to Lotusphere again. :-)
Wednesday, January 02, 2008
Barcelona and Oceania Regatta
Barcelona and Oceania Regatta pictures are on Flickr now. Since it's been two months I won't bother doing a writeup. If you have specific questions about my experience in Barcelona or on the Oceania Regatta let me know.
Monday, December 31, 2007
it's coming
I have begun my migration to Blogsphere. Not being a Domino web developer I'm struggling mightily, but it is coming along. I'll be sure to post how I did the migration from Blogspot / Blogger to Blogsphere. It's not going to be easy.
Here is a preview of what I have so far: http://www.cubert.net/. Not much so far. Watch this space for updates, or check the new URL if you want to watch me struggle. :-)
Here is a preview of what I have so far: http://www.cubert.net/. Not much so far. Watch this space for updates, or check the new URL if you want to watch me struggle. :-)
Friday, December 28, 2007
SnTT: Hiding an ActiveX control when you hide its layer
My friend Adam (aka Wombat) is working on an app for doing employee badges. The badges will have the employee photo on them, so the plan is for the HR people to take pictures of employees, crop them down, and print out the badge on a special printer. Adam already has an employee management system built in Notes, but he had never worked with image editing before. I pointed him in the direction of an imaging component. He settled on one, figured out how to make it work in Notes, then started adding it to his employee management system.
The users wanted to just click a button, have something pop up that would let them select the picture and crop it, then they just save it. That was easy enough if he launched a separate document, but that was a little intrusive. His first approach was to put the control on a form and call it using NotesUIWorkspace.DialogBox. However, ActiveX controls won't display at all if you use DialogBox.
The next approach was to use a layer, which worked... mostly. The problem was the control would remain visible after the layer was hidden:

Adam figured out that by adding a call to MessageBox after RefreshHideFormulas the control (the big box with DEMO in the center above) would disappear. He was okay with that solution, but it was another box for the users to click and I knew there had to be something less intrusive.
He sent the app to me and after extensive testing I learned that any change in focus would cause it to render properly. Eventually I stumbled across using Tab, which would consistently make the artifact disappear. Then the great hunt for how to get Tab to work.
Adding SendKeys "{TAB}" after the RefreshHideFormulas call always generated an "Invalid Procedure call" error. I went through everything I could think of short of closing and reopening the document -- which would have cleared the artifact, but was a little too harsh for such a simple thing. No matter what I still got an "Invalid Procedure Call". I finally decided to dig into my API toolkit. And after numerous failed attempts I decided to get medieval and dragged out keybd_event:
Declare Sub keybd_event Lib "user32" (Byval bVk As Byte, Byval bScan As Byte, Byval dwFlags As Long, Byval dwExtraInfo As Long)
Const VK_TAB = &H9
Then to call it:
keybd_event VK_TAB, 1, 0, 0
What it does is it stuffs the keyboard buffer with a Tab, and executes it immediately. That's what SendKeys supposedly does, too, but this works! No more weird artifacts, no errors, it just silently does its job. It isn't cross-platform, but Adam is in a Windows-only environment so this was an acceptable solution for him. He's using an ActiveX control so it's definitely not cross-platform anyway.
You can easily extend Notes with ActiveX controls, but presenting them in a way that makes them easy for users to interact with can be a little tricky. Maybe one day IBM will make controls on DialogBoxes display properly, and perhaps they'll get them to hide when you hide their containing layer. Until then hopefully this tip will help anyone else who has struggled with a similar problem. :-)
The users wanted to just click a button, have something pop up that would let them select the picture and crop it, then they just save it. That was easy enough if he launched a separate document, but that was a little intrusive. His first approach was to put the control on a form and call it using NotesUIWorkspace.DialogBox. However, ActiveX controls won't display at all if you use DialogBox.
The next approach was to use a layer, which worked... mostly. The problem was the control would remain visible after the layer was hidden:

Adam figured out that by adding a call to MessageBox after RefreshHideFormulas the control (the big box with DEMO in the center above) would disappear. He was okay with that solution, but it was another box for the users to click and I knew there had to be something less intrusive.
He sent the app to me and after extensive testing I learned that any change in focus would cause it to render properly. Eventually I stumbled across using Tab, which would consistently make the artifact disappear. Then the great hunt for how to get Tab to work.
Adding SendKeys "{TAB}" after the RefreshHideFormulas call always generated an "Invalid Procedure call" error. I went through everything I could think of short of closing and reopening the document -- which would have cleared the artifact, but was a little too harsh for such a simple thing. No matter what I still got an "Invalid Procedure Call". I finally decided to dig into my API toolkit. And after numerous failed attempts I decided to get medieval and dragged out keybd_event:
Declare Sub keybd_event Lib "user32" (Byval bVk As Byte, Byval bScan As Byte, Byval dwFlags As Long, Byval dwExtraInfo As Long)
Const VK_TAB = &H9
Then to call it:
keybd_event VK_TAB, 1, 0, 0
What it does is it stuffs the keyboard buffer with a Tab, and executes it immediately. That's what SendKeys supposedly does, too, but this works! No more weird artifacts, no errors, it just silently does its job. It isn't cross-platform, but Adam is in a Windows-only environment so this was an acceptable solution for him. He's using an ActiveX control so it's definitely not cross-platform anyway.
You can easily extend Notes with ActiveX controls, but presenting them in a way that makes them easy for users to interact with can be a little tricky. Maybe one day IBM will make controls on DialogBoxes display properly, and perhaps they'll get them to hide when you hide their containing layer. Until then hopefully this tip will help anyone else who has struggled with a similar problem. :-)
Geothermal works!
Our utilities company provides us with a year to year comparison of our gas and electricity usage. The October bill surprised us tremendously, but the November bill has proven that it is a trend.

Our total gas and electric bill for 2006 was nearly $260. This year it is closer to $130. Our heating season is only 3 - 4 months so we won't enjoy this level of savings for long. I'm sure going to enjoy it while it lasts, though.
I have some hunches about the increase in electricity. It is likely a combination of the geothermal pumps that run constantly to circulate the fluid, and us being gone for two weeks during a cold snap and the person house sitting turned on an electric blanket that we found was still on when we got home. I'm going to look at the pumps and see how many KWH they use and calculate how big of an impact they are having.

Our total gas and electric bill for 2006 was nearly $260. This year it is closer to $130. Our heating season is only 3 - 4 months so we won't enjoy this level of savings for long. I'm sure going to enjoy it while it lasts, though.
I have some hunches about the increase in electricity. It is likely a combination of the geothermal pumps that run constantly to circulate the fluid, and us being gone for two weeks during a cold snap and the person house sitting turned on an electric blanket that we found was still on when we got home. I'm going to look at the pumps and see how many KWH they use and calculate how big of an impact they are having.
Wednesday, December 26, 2007
most (un)likely
In Facebook there is a Superlatives app that lets you vote on what your friends are most likely to do or be. One of my friends proposed this:

I think that is more UNlikely. :-)

I think that is more UNlikely. :-)
Wednesday, December 19, 2007
Toolbox for troubleshooting processes and connectivity
I have had a rather nasty issue for the past month or so with a VB6 application I'm rewriting in VB.Net 2005. It uses free threading in VB6, and it's not done very well. It memory leaks like crazy, floods the DB server with connections, and crashes a lot. With the previous author using advanced techniques like "Dim X As Variant" and then assigning it to everything from strings to objects to function addresses -- all in the same procedure -- troubleshooting was exceedingly difficult. In the course of making sense of this madness I amassed a toolbox of free tools and Windows utilities you can use to troubleshoot processes and connectivity.
ipconfig - The first place to check when you're having network issues. Use this to verify the IP address is set, and add the /all switch to make sure you have the correct DNS entries.
route - The second thing to look at when you're having network routing problems. With the print flag it shows you every identified route from your computer.
Process Explorer - This gives you an accurate and complete picture of how memory is allocated and everything a process has loaded. It will even tell you every Registry key a process touches, which can be tremendously handy.
[Side Note: Task Manager has numerous limitations, but two really stand out as truly egregious. First, it doesn't accurately report virtual memory. It actually tells you the private bytes a process has allocated, which is not the VM size. Second, it doesn't tell you external modules (DLL's, spawned applications) a process has loaded. If you see that an app is hanging you don't know if it's a problem in the application or one of the DLL's or applications it calls. Process Explorer plugs both these holes, and a whole lot more.]
Network Monitor - Allows you to capture and analyze TCP/IP packets.
Wireshark - A network protocol analyzer that takes the Network Monitor to new levels. It can be used with everything from TCP/IP to USB and FDDI. This is the ultimate tool, but it does have a steep learning curve.
iperf - This handy utility will measure the bandwidth, delay jitter and datagram loss between hosts. This is most useful in WAN scenarios so you can verify what the bandwidth is between locations, but you can also use it as an indicator of network congestion on a LAN. Note that this is also sometimes called lperf, with a lower case "L" at the beginning. The correct name starts with a lower case "i".
I also want to mention that a great collection of tools is available from Sysinternals. This was a private company making tools (such as Process Explorer and Network Monitor) to plug holes in the base offerings by Microsoft. Microsoft bought them in 2006, but the same people are still working on the tools so the quality is still great. There is a wide range of tools, so you'll probably find something useful. :-)
Stuff built into Windows (XP)
ipconfig - The first place to check when you're having network issues. Use this to verify the IP address is set, and add the /all switch to make sure you have the correct DNS entries.
route - The second thing to look at when you're having network routing problems. With the print flag it shows you every identified route from your computer.
Free tools
Process Explorer - This gives you an accurate and complete picture of how memory is allocated and everything a process has loaded. It will even tell you every Registry key a process touches, which can be tremendously handy.
[Side Note: Task Manager has numerous limitations, but two really stand out as truly egregious. First, it doesn't accurately report virtual memory. It actually tells you the private bytes a process has allocated, which is not the VM size. Second, it doesn't tell you external modules (DLL's, spawned applications) a process has loaded. If you see that an app is hanging you don't know if it's a problem in the application or one of the DLL's or applications it calls. Process Explorer plugs both these holes, and a whole lot more.]
Network Monitor - Allows you to capture and analyze TCP/IP packets.
Wireshark - A network protocol analyzer that takes the Network Monitor to new levels. It can be used with everything from TCP/IP to USB and FDDI. This is the ultimate tool, but it does have a steep learning curve.
iperf - This handy utility will measure the bandwidth, delay jitter and datagram loss between hosts. This is most useful in WAN scenarios so you can verify what the bandwidth is between locations, but you can also use it as an indicator of network congestion on a LAN. Note that this is also sometimes called lperf, with a lower case "L" at the beginning. The correct name starts with a lower case "i".
I also want to mention that a great collection of tools is available from Sysinternals. This was a private company making tools (such as Process Explorer and Network Monitor) to plug holes in the base offerings by Microsoft. Microsoft bought them in 2006, but the same people are still working on the tools so the quality is still great. There is a wide range of tools, so you'll probably find something useful. :-)
8th Annual Lotusphere session database now available
Ben has one again shown his commitment to our community by pulling this together on his own. Get your copy by starting here.
Tuesday, December 18, 2007
Ed Brill: Perception is reality
(the post title is a trackback link)
Karen Demerly (comment #16) makes an extremely compelling argument:
This is exactly where IBM has always failed: IBM has never really marketed to consumers. Lotus never targeted Notes at consumers, either, but the world was different then. Most homes didn't have a computer, they were strictly the purview of business. IBM bought Lotus just as the consumer appeal of the Internet was building, but Notes and Domino continued as business-focused products while the widespread consumer adoption of the Internet passed it by. IBM/Lotus added Internet-oriented features to Notes and Domino and supported a wide array of protocols, but it was always in the context of business use. They never made any attempt to make Notes or Domino sexy or have mass appeal.
While they were ignoring the consumer side altogether IBM didn't count on a company like Microsoft entering the picture. Microsoft wanted a piece of the business pie but couldn't compete solely on technical merit, and had no chance of getting a foothold in large enterprise IT shops. So they started mudslinging and spreading FUD while they flailed about trying to create (or buy) products to compete with IBM's Lotus offerings. They used smaller companies who were less risk averse as their starting point, eventually ending up with some products that are mostly good enough for fairly sizable companies.
The number of these smaller companies that were started in the 80's and 90's and grew to be megacorps dwarfs the number from the previous 40 years. And virtually all of them grew up with Microsoft products. New companies in the new economy were looking for small and agile solutions that were easily integrated and extremely flexible. They didn't care if they had to rip it all out and start over every year, they only had 40 employees. By the time they grew to 400 employees Microsoft was so firmly entrenched that they couldn't back out.
IBM was still lumbering along in the old mindset while the world was changing around it. They had Domino, which with some TLC and attention could meet the growing SMB needs. Instead of responding to this by focusing on Domino they went the Workplace route because it was big, monolithic, and fit traditional business models IBM was comfortable with.
I agree completely that IBM needs to get Lotus products into consumer hands, because those are the products most relevant to consumers. They don't care about autonomic computing but they do care about having a one stop shop for all their needs. I don't think I've ever heard any end user type say "damn I wish I had more applications to open!" No, they want to open one application and have it do everything they need. Notes can do that. Domino could be scaled down and reworked so it could be used as a personal web server and file server.
Until IBM groks in fullness that consumers ultimately drive business IT they're going to be losing market share -- or at least the perception of market share.
Karen Demerly (comment #16) makes an extremely compelling argument:
So what is IBM/Lotus doing to change the perception of IBM/Lotus? I think that's been asked here before. It's obviously not always about price points, or ship dates, or whether the refresh button is F5 or F9.
I think IBM ought to be throwing Lotus products off the parade float - giving it away, putting it in the hands of every youngster in the world. Our kids should grow up on IBM software. Then their perception will be changed, won't it?
This is exactly where IBM has always failed: IBM has never really marketed to consumers. Lotus never targeted Notes at consumers, either, but the world was different then. Most homes didn't have a computer, they were strictly the purview of business. IBM bought Lotus just as the consumer appeal of the Internet was building, but Notes and Domino continued as business-focused products while the widespread consumer adoption of the Internet passed it by. IBM/Lotus added Internet-oriented features to Notes and Domino and supported a wide array of protocols, but it was always in the context of business use. They never made any attempt to make Notes or Domino sexy or have mass appeal.
While they were ignoring the consumer side altogether IBM didn't count on a company like Microsoft entering the picture. Microsoft wanted a piece of the business pie but couldn't compete solely on technical merit, and had no chance of getting a foothold in large enterprise IT shops. So they started mudslinging and spreading FUD while they flailed about trying to create (or buy) products to compete with IBM's Lotus offerings. They used smaller companies who were less risk averse as their starting point, eventually ending up with some products that are mostly good enough for fairly sizable companies.
The number of these smaller companies that were started in the 80's and 90's and grew to be megacorps dwarfs the number from the previous 40 years. And virtually all of them grew up with Microsoft products. New companies in the new economy were looking for small and agile solutions that were easily integrated and extremely flexible. They didn't care if they had to rip it all out and start over every year, they only had 40 employees. By the time they grew to 400 employees Microsoft was so firmly entrenched that they couldn't back out.
IBM was still lumbering along in the old mindset while the world was changing around it. They had Domino, which with some TLC and attention could meet the growing SMB needs. Instead of responding to this by focusing on Domino they went the Workplace route because it was big, monolithic, and fit traditional business models IBM was comfortable with.
I agree completely that IBM needs to get Lotus products into consumer hands, because those are the products most relevant to consumers. They don't care about autonomic computing but they do care about having a one stop shop for all their needs. I don't think I've ever heard any end user type say "damn I wish I had more applications to open!" No, they want to open one application and have it do everything they need. Notes can do that. Domino could be scaled down and reworked so it could be used as a personal web server and file server.
Until IBM groks in fullness that consumers ultimately drive business IT they're going to be losing market share -- or at least the perception of market share.
Monday, December 17, 2007
Is multi-tasking making us dumber?
One of the business blogs I have in my Netvibes is Tim Berry. In a post today he picked up on an article from The Atlantic (via Paul Barsch)which states that neuroscientists have discovered that multitasking actually makes our brains atrophy.
That buzz you get from Twitter-ing, Facebook-ing, RSS-ing and blogging, all while on Skype and rearranging your iTunes playlists is just your brain telling you to slow down. Sometimes being a Luddite geek is a good thing. :-)
Multi-tasking messes with our brains in several ways. At the most basic level, the mental balancing acts that it requires—the constant switching and pivoting—energize regions of the brain that specialize in visual processing and physical coordination and simultaneously appear to shortchange some of the higher areas related to memory and learning.
Certain studies find that multi-tasking boosts the level of stress related hormones such as cortisol and adrenaline and wears down our systems through biochemical friction—prematurely aging us. In the short term, the confusion, fatigue and chaos merely hamper our ability to focus and analyze, but in the long term they cause (our brain) to atrophy.
That buzz you get from Twitter-ing, Facebook-ing, RSS-ing and blogging, all while on Skype and rearranging your iTunes playlists is just your brain telling you to slow down. Sometimes being a Luddite geek is a good thing. :-)
Sunday, December 16, 2007
SnTT: Resolution-specific content (Windows only)
Okay, so it's not Thursday. As part of this application I'm working on I want to maximize visible content by making the UI fit to the whole screen. I'm using embedded views, which can be set to autofit both the height and width of the screen, but the height will get set to 1", which is about 3 - 5 lines. So what do you do?
I did a semi-hack to come up with something that's mostly good enough. It consists of:
The real magic happens in LS.BE.Win32API script library:
The Content form is computed as follows:

When the frameset opens the Header form's QueryOpen grabs the screen resolution, then the content frame pulls that out and uses it to calculate the form to load. What this gives me is a way to create resolution-specific content and dynamically put it into a frame. Unfortunately this is a Windows-only approach, but I'm sure something similar could be done using Java.
This LotusScript was converted to HTML using the ls2html routine,
provided by Julian Robichaux at nsftools.com.
I did a semi-hack to come up with something that's mostly good enough. It consists of:
- A two-frame frameset. The top frame has a header form, the bottom is computed to display a content form.
- Multiple content forms for the resolutions I know users will be using. They are named, for example, Content_1024x768 with an alias that is just the resolution.
- Some Win32 API code to get the current screen resolutions.
- Code in the header form's QueryOpen to get the current resolution.
- An interesting technique I learned from Kevin Pettit via SuperNTF for caching the resolution.
(Options)
Option Declare
Use "LS.BE.Win32API"
Sub Queryopen(Source As Notesuidocument, Mode As Integer, Isnewdoc As Variant, Continue As Variant)
Dim session As New NotesSession
Dim db As NotesDatabase
Dim profile As NotesDocument
Dim resX As Long
Dim resY As Long
Call GetRes(resX, resY) 'LS.BE.Win32API
Set db = session.CurrentDatabase
'Here is the technique I lifted from SuperNTF
' You create a profile doc, but you don't save it
' This creates an in-memory cache but doesn't bloat the database
Set profile = db.GetProfileDocument("ServiceDatabase", Session.UserName)
Call profile.ReplaceItemValue("ScreenResolution", Cstr(resX) & "x" & Cstr(resY))
Set profile = Nothing
Set db = Nothing
Set session = Nothing
End Sub
The real magic happens in LS.BE.Win32API script library:
(Declarations)
Const HORZRES = 8
Const VERTRES = 10
Declare Function GetDesktopWindow Lib "user32" () As Long
Declare Function GetWindowDC Lib "user32" (Byval hwnd As Long) As Long
Declare Function GetDeviceCaps Lib "gdi32" (Byval hdc As Long, Byval nIndex As Long) As Long
Sub GetRes(X As Long, Y As Long)
Dim hDesktop As Long
Dim dcDesktop As Long
'Get the handle to the desktop
hDesktop = GetDesktopWindow
'Now get the device context of the desktop
dcDesktop = GetWindowDC(hDesktop)
'And finally, get the dimensions of the desktop
X = GetDeviceCaps(dcDesktop, HORZRES)
Y = GetDeviceCaps(dcDesktop, VERTRES)
End Sub
The Content form is computed as follows:

When the frameset opens the Header form's QueryOpen grabs the screen resolution, then the content frame pulls that out and uses it to calculate the form to load. What this gives me is a way to create resolution-specific content and dynamically put it into a frame. Unfortunately this is a Windows-only approach, but I'm sure something similar could be done using Java.
provided by Julian Robichaux at nsftools.com.
Subscribe to:
Posts (Atom)
