Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Suite Pro
  New Posts New Posts RSS Feed - Using PopupControl as a message box replacement
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Using PopupControl as a message box replacement

 Post Reply Post Reply
Author
Message
eugene_v View Drop Down
Groupie
Groupie
Avatar

Joined: 12 September 2007
Location: Canada
Status: Offline
Points: 14
Post Options Post Options   Thanks (0) Thanks(0)   Quote eugene_v Quote  Post ReplyReply Direct Link To This Post Topic: Using PopupControl as a message box replacement
    Posted: 13 September 2007 at 11:40am

Good day everyone!

Has anyone tried using the PopupControl as a less annoying replacement for a message box under VB6?

PopupControl seems to have .Right property that doesn't allow it to be displayed centered to a form, for example.

Do you think it is possible to display the PopupControl centered to a form?
Eugene V
A happy registered user of Xtreme SuitePro 2007 11.2.0 with VB6
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 13 September 2007 at 12:02pm
Hi,
You know size of Popup, you know Size and position of Form, don't see why you can't calculate Right property to make it centered.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
eugene_v View Drop Down
Groupie
Groupie
Avatar

Joined: 12 September 2007
Location: Canada
Status: Offline
Points: 14
Post Options Post Options   Thanks (0) Thanks(0)   Quote eugene_v Quote  Post ReplyReply Direct Link To This Post Posted: 13 September 2007 at 1:40pm
Originally posted by oleg oleg wrote:

Hi,
You know size of Popup, you know Size and position of Form, don't see why you can't calculate Right property to make it centered.
 
You are correct! It didn't seam to work because VB uses Twips and Popup uses pixes.
 
Here is how to center your popup on a form and
use it as a message box replacement:
 

 
Popup.Right = Me.ScaleX(Me.Left + (Me.Width / 2), vbTwips, vbPixels) + (Popup.Width / 2)
Popup.Bottom = Me.ScaleY(Me.Top + (Me.Height / 2), vbTwips, vbPixels) + (Popup.Height / 2)
 
Eugene V
A happy registered user of Xtreme SuitePro 2007 11.2.0 with VB6
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.188 seconds.