Results 1 to 17 of 17

Thread: forms

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Jun 2000
    Location
    East Providence, RI
    Posts
    1,715

    Question

    does anyone know how to make the edges of a form round go here to see my form:

    http://homepages.bubblegumpop.com/co...orld/form1.gif

    the colors are screwed up because I saved it as a low quailty gif (6k)
    NXSupport - Your one-stop source for computer help

  2. #2
    Guest
    You mean on the Title Bar? Just hide it and draw your own with Images.

  3. #3

    Thread Starter
    Frenzied Member
    Join Date
    Jun 2000
    Location
    East Providence, RI
    Posts
    1,715
    what do you mean, I want the top left and right corners of the form to be circular (so they match the title bar)

    by the way, the title bar is my own image

    and to see the form in its right color go here:
    http://homepages.bubblegumpop.com/co...orld/form1.jpg
    NXSupport - Your one-stop source for computer help

  4. #4
    Guest
    Make the original Form transparent and draw your own Form.

  5. #5

    Thread Starter
    Frenzied Member
    Join Date
    Jun 2000
    Location
    East Providence, RI
    Posts
    1,715
    how do I do that?
    NXSupport - Your one-stop source for computer help

  6. #6

  7. #7
    Guest
    play around with the borderstyle of the form until the traditional blue bar vanishes.

    then draw a picture of what you want the top bit to look like, and then write some code to recognise mouse-clicks in the right regions, couldnt be simpler!

  8. #8

    Thread Starter
    Frenzied Member
    Join Date
    Jun 2000
    Location
    East Providence, RI
    Posts
    1,715
    wossname, did you look at the image of my form? I already made my own title bar thing
    NXSupport - Your one-stop source for computer help

  9. #9

    Thread Starter
    Frenzied Member
    Join Date
    Jun 2000
    Location
    East Providence, RI
    Posts
    1,715
    CAn someone please help me make the top edges curved because I am really lost on how to do that (if you want I could e-mail you the form)
    NXSupport - Your one-stop source for computer help

  10. #10
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    I'm sure that's a fake titlebar placed on a titlebarless form, if it isn't you can do one, well let me search, i have done a startrek button control that have rounded corners..
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  11. #11

    Thread Starter
    Frenzied Member
    Join Date
    Jun 2000
    Location
    East Providence, RI
    Posts
    1,715
    it is a fake one, now how do I get the form to be rounded?
    NXSupport - Your one-stop source for computer help

  12. #12
    Guest
    Draw it.

    Here is an article related to it.
    http://www.vb-world.net/articles/shapedforms/

  13. #13

    Thread Starter
    Frenzied Member
    Join Date
    Jun 2000
    Location
    East Providence, RI
    Posts
    1,715
    I tried that, it didn't work for me

    I just need the top 2 corners to be curved, and thats it, isn't there someway to just set that part on transparency?
    NXSupport - Your one-stop source for computer help

  14. #14
    Guest
    Yes, here is a cdoe to make your Form Transparent.

    Code:
    Public Const GWL_EXSTYLE = (-20)
    Public Const WS_EX_TRANSPARENT = &H20&
    Public Const SWP_FRAMECHANGED = &H20
    Public Const SWP_NOMOVE = &H2
    Public Const SWP_NOSIZE = &H1
    Public Const SWP_SHOWME = SWP_FRAMECHANGED Or SWP_NOMOVE Or SWP_NOSIZE
    Public Const HWND_NOTOPMOST = -2
    
    Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
    Declare Function SetWindowPos Lib "user32" (ByVal hwnd As Long, ByVal hWndInsertAfter As Long, ByVal x As Long, ByVal y As Long, ByVal cx As Long, _
    ByVal cy As Long, ByVal wFlags As Long) As Long
    Make a CommandButton on your Form and Put the following code into it. Also, set the BorderStyle property for the Form to None.

    Code:
    Private Sub Command1_Click()
    
        SetWindowLong Me.hwnd, GWL_EXSTYLE, WS_EX_TRANSPARENT
        SetWindowPos Me.hwnd, HWND_NOTOPMOST, 0&, 0&, 0&, 0&, SWP_SHOWME
    
    End Sub

  15. #15
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    I've just sent you the code for a function returning a region of a rounded corner and some code to put in your resize event for using them...
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  16. #16

    Thread Starter
    Frenzied Member
    Join Date
    Jun 2000
    Location
    East Providence, RI
    Posts
    1,715
    I never reciencved it, can you send it to [email protected]
    NXSupport - Your one-stop source for computer help

  17. #17

    Thread Starter
    Frenzied Member
    Join Date
    Jun 2000
    Location
    East Providence, RI
    Posts
    1,715
    IF anyone knows simialr code, can you please post it or e-mail it to me at [email protected]
    NXSupport - Your one-stop source for computer help

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width