From the Powerbuilder Help on this method: Converts pixels to PowerBuilder units. Because pixels are not usually square, you also specify whether you are converting the pixels’ horizontal or vertical measurement. Syntax PixelsToUnits ( pixels, type ) Argument Description pixels An integer whose value is the number of pixels you want to convert to PowerBuilder…
You are currently browsing all posts tagged with programming
PowerBuilder – Reading Outlook Items
Here is some code which reads data from Outlook (2007 was tested) into PowerBuilder. You basically need to create a window with a multiline edit and a button on it. Put this into the clicked event of the button. To run it, open Outlook, select something (email message, task, etc.) then click the button on…
PowerBuilder – Grid datawindow object with variable number of columns
Here is a way to build a grid datawindow which contains columns corresponding to an unknown number of data elements. You could use this approach in creating a project schedule, inventory location system, baseball box score, or any number of other examples. My example assumes the minimum number of columns to be four. This create…
PowerBuilder – Selecting and scrolling to an entry in a Listview control
The listview control in PB lacks the capability to scroll to a highlighted item within the native Powerscript. Here is an easy way to do this by simulating key strokes. First declare the following API subroutine. keybd_event( int bVk, int bScan, int dwFlags, int dwExtraInfo) Library "user32.dll" Next create a user event in the listview…
VBA – Processing ICS calendar file attachments
This article brings to conclusion the Outlook VBA macro/script I wrote to process event scheduling attachments (.ICS or ICalendar files). The first article shows how to process emails and remove their associated attachments. The second shows how to open the files and both read the file contents into an array as well as write (append)…
VBA – Reading a file into an array and Appending to a file
Both of these routines can be called from Outlook Macros/Scripts to process files. In my case I am using them to open iCalendar (ICS) files and place the contents into a string array. The calling method then processes the information then flags the file as ‘PROCESSED’ by the second routine. Public Sub icsFileToArray(ByVal FileName As…
VBA – Removing attachments from Outlook email
One very powerful aspect of the Microsoft Office Suite of applications is the ability to create Macros and Scripts to perform various processes. This gives those of us who worked in Visual Basic 6 a chance to dust off our skills since the ‘flavor’ of Visual Basic used in the Microsoft Office applications (aptly called…
Look what I found – Part 3
Found on a Microsoft Answers forum: Hello? Microsoft? your help files are of no help. Does anyone really bother to participate in any of those obnoxious ‘Help us improve’ programs?
Using ICalendar (.ICS) files for Event Scheduling
Here is a very easy way to schedule events from within your application. This assumes you have a way to send emails with attachments. If you are dealing with a high volume situation, you may with to write the data to a table and have the database (or some other process) send them out. The…
PowerBuilder – Folder Selection Dialog Window
Here is an NVO used to envoke a Windows folder selection dialog since PowerBuilder does not have it’s own version. You can change the API calls to ANSI for earlier versions of PB. I’ve had this squirreled away for awhile and I no doubt got it from someone else off the web. Thanks! // window…