CAD/CAM discussion forum > CAD > Minize or Dock VBA form

Minize or Dock VBA form

    
  Subscribe Topic

Rank: 1

sathiyanathan

Newbie

posts: 19

Registered: 2011-7-12

Message 1 of 6

 Minize or Dock VBA form
22-10-2012 06:57 . pm   |   View his/her posts only
Is there any options available in ZWCAD to minimize or docking the VBA form?

Please respond as soon as possible.......

Rank: 5Rank: 5

Arphone

posts: 26

Registered: 2012-6-25

Message 2 of 6

23-10-2012 01:57 . pm   |   View his/her posts only
VBA form can not be minimized or docked, but you can hide it when it is not needed at the moment. Please refer to following sample:
sample.rar (4.36 KB)

Rank: 1

sathiyanathan

Newbie

posts: 19

Registered: 2011-7-12

Message 3 of 6

24-10-2012 12:00 . pm   |   View his/her posts only
Post Last Edit by sathiyanathan at 2012-10-24 12:01

Dear Arphone
Thanks for your replay. But I am using ZWCAD 2010, So, I am not able to see source.Please send your code in text format.

Rank: 5Rank: 5

Arphone

posts: 26

Registered: 2012-6-25

Message 4 of 6

24-10-2012 05:37 . pm   |   View his/her posts only
Reply 3# sathiyanathan


Sub test()
Dim form As New UserForm1
form.Show False
End Sub

And in the click event of the button on UserForm1:

Private Sub CommandButton1_Click()
Me.Hide
ThisDrawing.Utility.GetPoint
Me.Show False
End Sub

Rank: 1

sathiyanathan

Newbie

posts: 19

Registered: 2011-7-12

Message 5 of 6

24-10-2012 07:27 . pm   |   View his/her posts only
Thanks Arphone....

Rank: 1

Graham

Newbie

posts: 1

Registered: 2011-9-30

Message 6 of 6

20-11-2012 09:40 . pm   |   View his/her posts only
Reply 5# sathiyanathan

Here's some VBA code that solves the problem. It was originally written for Excel but I have it working in ZWCAD 2011 & 2012.The example form is modeless, sizeable and with or without a caption, icon, maximize, minimize and close buttons.
The Source I found at http://www.oaltd.co.uk/Excel/Default.htm Under the heading "VBA Programming" and it is called FormFun.zip

Regards
Graham
See also
X