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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

FormMaker 2.0

Status
Not open for further replies.

ts2032

Technical User
Mar 26, 2002
115
0
0
US
I developed a small app to aid in making irregular shaped forms. The app allows you to design the form visually, then view the code necessary to generate the form in Visual Basic. I would like to have the app tested to see what potential it has.

If you would like to test/play around with this app to see if it would be useful to you, send me an email at tjsmith@elp.rr.com

thanks,
ts2032
 
why don't you post some output here on the forum...

It might give everyone some idea of what it does (exactly)...

And you won't be tackled with emails...

It also might help you to perfect the output before you start disributing a program that is not optimized to best perforamce of the output...

just a thought... Sometimes... the BASIC things in life are the best...
cheers.gif

or at least the most fun ;-)
-Josh Stribling
 
looks pretty good...
do you have a feature to auto-recognize the border?
Sometimes... the BASIC things in life are the best...
cheers.gif

or at least the most fun ;-)
-Josh Stribling
 
for example...
this is the code I have been using to auto recognize the border with a given mask color... (a bit slow with the POINT function)...

...Declares...

Code:
Public Const RGN_AND = 1
Public Const RGN_COPY = 5
Public Const RGN_DIFF = 4
Public Const RGN_OR = 2
Public Const RGN_XOR = 3

Public Const ALTERNATE = 1
Public Const WINDING = 2

Public Const WM_NCLBUTTONDOWN = &HA1
Public Const HTCAPTION = 2

Sub AutoSize(Optional mi As Variant)
  Dim X As Integer, Y As Integer, SX As Integer
  Dim Rgn1 As Long, Rgn2 As Long
  Y = 0
  mi.Refresh
  Rgn1 = CreateRectRgn(0, 0, 0, 0)
  Do
    X = 0
    Do
      If mi.Point(X, Y) <> 0 Then
        SX = X
        Do
          X = X + 1
        Loop Until mi.Point(X, Y) = 0 Or X >= mi.ScaleWidth
        Rgn2 = CreateRectRgn(SX, Y, X, Y + 1)
        CombineRgn Rgn1, Rgn1, Rgn2, RGN_OR
        DeleteObject Rgn2
      End If
      X = X + 1
    Loop Until X > mi.ScaleWidth
    Y = Y + 1
  Loop Until Y = mi.ScaleHeight
  
  SetWindowRgn mi.hWnd, Rgn1, True
  DeleteObject Rgn1
End Sub
Sometimes... the BASIC things in life are the best...
cheers.gif

or at least the most fun ;-)
-Josh Stribling
 
here is an example...
It makes a irregular form and an irregular button (picturebox) useing the code posted above...

the &quot;Josh&quot; is a button that moves when you press it...
the blue soccer ball shape is the form that you can drag around... double click the form to close it...

(other than a bit slow) tell me what you think...

feel free to use or modify my code above...

Good Luck Sometimes... the BASIC things in life are the best...
cheers.gif

or at least the most fun ;-)
-Josh Stribling
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top