API Call (ViP Specific)
At 19 JAN 1998 01:11:18PM Mike Edkins wrote:
Is there an API call we can use within VIP to add a shortcut to the Start button so that we can create a user setup program.
At 20 JAN 1998 02:31PM John Averell Revelation wrote:
No, sorry.
At 24 JAN 1998 12:42PM George Vaccaro wrote:
John, you gave up too early.
This is not a complete answer, my ViP is a bit rusty, but here is some VB code stolen from their setup Wizard (where did the ViP setup wizard go? I know I wrote one).
Mike, you'll have to mess around a bit with this, but I'm sure you can get it to work. Windows95 is backward compatible with Windows3.1 Program Manager DDE with respect to this particular task so that 16 Bit windows applications can install correctly under it.
Good luck.
George_Vaccaro@lotus.com
Here's the code:
'———————————————————–
' SUB: PerformDDE
'
' Performs a Program Manager DDE operation as specified
' by the intDDE flag and the passed in parameters.
' Possible operations are:
'
' mintDDE_ITEMADD: Add an icon to the active group
' mintDDE_GRPADD: Create a program manager group
'
' IN: frm - form containing a label named 'lblDDE'
' strGroup - name of group to create or insert icon
' strTitle - title of icon or group
' strCmd - command line for icon/item to add
' intDDE - ProgMan DDE action to perform
'———————————————————–
'
Sub PerformDDE(frm As Form, ByVal strGroup As String, ByVal strCmd As String, ByVal strTitle As String, ByVal intDDE As Integer, ByVal fLog As Boolean)
Const strCOMMA$=,"Const strRESTORE$=, 1)]"Const strACTIVATE$=, 5)]"Const strENDCMD$=)]"Const strSHOWGRP$=ShowGroup("Const strADDGRP$=CreateGroup("Const strREPLITEM$=ReplaceItem("Const strADDITEM$=AddItem("Dim intIdx As Integer 'loop variableSetMousePtr gintMOUSE_HOURGLASS''Initialize for DDE Conversation with Windows Program Manager in'manual mode (.LinkMode=2) where destination control is not auto-'matically updated. Set DDE timeout for 10 seconds. The loop around'DoEvents() is to allow time for the DDE Execute to be processsed.'Dim intRetry As IntegerFor intRetry=1 To 20On Error Resume Nextfrm.lblDDE.LinkTopic=PROGMAN|PROGMAN"If Err=0 ThenExit ForEnd IfDoEventsNext intRetryfrm.lblDDE.LinkMode=2For intIdx=1 To 10DoEventsNextfrm.lblDDE.LinkTimeout=100On Error Resume NextIf Err=0 ThenSelect Case intDDECase mintDDE_ITEMADD'' The item will be created in the group titled strGroup'' Write the action to the logfile'If fLog ThenNewAction gstrKEY_PROGMANITEM, """" & strUnQuoteString(strGroup) & """" & ", " & """" & strUnQuoteString(strTitle) & """"End If'' Force the group strGroup to be the active group. Additem only' puts icons in the active group.'#If 0 Thenfrm.lblDDE.LinkExecute strSHOWGRP & strGroup & strACTIVATE#Else' BUG #5-30466,stephwe,10/96: strShowGRP doesn't seem to work if ProgMan is minimized.' : strADDGRP does the trick fine, though, and it doesn't matter if it already exists.frm.lblDDE.LinkExecute strADDGRP & strGroup & strENDCMD#End Iffrm.lblDDE.LinkExecute strREPLITEM & strTitle & strENDCMDErr=0frm.lblDDE.LinkExecute strADDITEM & strCmd & strCOMMA & strTitle & String$(3, strCOMMA) & strENDCMDCase mintDDE_GRPADD'' Write the action to the logfile'If fLog ThenNewAction gstrKEY_PROGMANGROUP, """" & strUnQuoteString(strGroup) & """"End Iffrm.lblDDE.LinkExecute strADDGRP & strGroup & strENDCMDfrm.lblDDE.LinkExecute strSHOWGRP & strGroup & strRESTORE'End CaseEnd SelectEnd If''Disconnect DDE Link'frm.lblDDE.LinkMode=0frm.lblDDE.LinkTopic="SetMousePtr gintMOUSE_DEFAULTIf fLog ThenCommitActionEnd IfErr=0End Sub
At 26 JAN 1998 08:56AM John Averell Revelation wrote:
George,
Thanks for the detailed reply. Good to hear from you.
I suspect this would be considered rather more than a simple API call in ViP! However, if it works for the user, great!