Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

AccPac OE2500 (Sales History) customization ?

Status
Not open for further replies.

AccpacSudha

Programmer
Oct 3, 2007
10
GB
Hi

I have customised OE 2500 (sales history in Accpac 5.1).But I have the below problem:

When I maximize and minimize the VB form I want OE 2500 also to maximize and minimize along with the VB form. How do I do this ? Urgent please help
 
Form Level
When you use a UI on a form you'll want to allow the user to resize the form if the UI allows it. You do this in two places: the OnUIAppOpened event and the Form_Resize event. You'll also want to variables to hold the MinimumHeight and MinimumWidth that the UI specifies.

Code:
Option Explicit
Private sMinHeight As Single
Private sMinWidth As Single

Private Sub AccpacUI_OnUIAppOpened()
  With Accpac_UI
    Me.Caption = .UISession.CompanyID & " - " & .UIName
    Set Me.Icon = .UIIcon
    sMinHeight = .MinimumHeight + (Me.Height - Me.ScaleHeight)
    sMinWidth = .MinimumWidth
    Me.Width = .Width
    Me.Height = .Height
  End With
End Sub

Private Sub Form_Resize()
On Error Resume Next

  If Me.Width < sMinWidth Then
    Me.Width = sMinWidth
    Exit Sub
  End If
  If Me.Height < sMinHeight Then
    Me.Height = sMinHeight
    Exit Sub
  End If
  'Set Control Size Identical with Form Size
  With Accpac_UI
    .Height = Me.ScaleHeight - (Me.Height - Me.ScaleHeight)
    .Width = Me.ScaleWidth - (Me.Width - Me.ScaleWidth) '- .UIAppControls(cstrMostLeftButtonName).Left
  End With
End Sub
 
Hi

Thank you very much for your reply. I have solved the issue. I have used the below code and it works fine as I wanted

Private Sub Form_Resize()

Me.AccpacOE2500UICtrl1.Width = ScaleWidth
Me.AccpacOE2500UICtrl1.Height = ScaleHeight

End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top