Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


How do you make an invisible button in VB2008?

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
Oblivious
Grandmaster Cheater Supreme
Reputation: 45

Joined: 12 Mar 2008
Posts: 1732

PostPosted: Wed Jan 14, 2009 6:41 pm    Post subject: How do you make an invisible button in VB2008? Reply with quote

But it has to still function. Button.visible=false won't let it function.
Back to top
View user's profile Send private message
HomerSexual
Grandmaster Cheater Supreme
Reputation: 5

Joined: 03 Feb 2007
Posts: 1657

PostPosted: Wed Jan 14, 2009 7:45 pm    Post subject: Reply with quote

you could do on form1.click (idk VB) and then check the mouse cords on the program to a given rectangle of points.
_________________
Back to top
View user's profile Send private message
Snootae
Grandmaster Cheater
Reputation: 0

Joined: 16 Dec 2006
Posts: 969
Location: --->

PostPosted: Wed Jan 14, 2009 7:48 pm    Post subject: Reply with quote

you could always just put it off the visisble form

explain more what this button does

_________________
Back to top
View user's profile Send private message
FullyAwesome
I post too much
Reputation: 0

Joined: 05 Apr 2007
Posts: 4438
Location: Land Down Under

PostPosted: Wed Jan 14, 2009 7:50 pm    Post subject: Reply with quote

you could cheat and use a label with only spaces, then configure the click event from there. font size increases/decreases the height, and the amount of spaces increases the length. i can't remember what i've done in the past.
_________________
Back to top
View user's profile Send private message MSN Messenger
Oblivious
Grandmaster Cheater Supreme
Reputation: 45

Joined: 12 Mar 2008
Posts: 1732

PostPosted: Wed Jan 14, 2009 9:03 pm    Post subject: Reply with quote

Snootae wrote:
you could always just put it off the visisble form

explain more what this button does

It's on top of a .swf, I use it to make it look like you click the .swf button, using a label didn't work, it was just a big white rectangle.
Back to top
View user's profile Send private message
samuri25404
Grandmaster Cheater
Reputation: 7

Joined: 04 May 2007
Posts: 955
Location: Why do you care?

PostPosted: Wed Jan 14, 2009 9:16 pm    Post subject: Reply with quote

clickflick22 wrote:
Snootae wrote:
you could always just put it off the visisble form

explain more what this button does

It's on top of a .swf, I use it to make it look like you click the .swf button, using a label didn't work, it was just a big white rectangle.


Give it the transparent background color?

Edit:

In the IDE, select the label, find the "BackColor" property, and look in "Web" for "Transparent"

_________________
Wiccaan wrote:

Oh jeez, watchout I'm a bias person! Locked.


Auto Assembly Tuts:
In Depth Tutorial on AA
Extended
Back to top
View user's profile Send private message
Oblivious
Grandmaster Cheater Supreme
Reputation: 45

Joined: 12 Mar 2008
Posts: 1732

PostPosted: Wed Jan 14, 2009 9:48 pm    Post subject: Reply with quote

samuri25404 wrote:
clickflick22 wrote:
Snootae wrote:
you could always just put it off the visisble form

explain more what this button does

It's on top of a .swf, I use it to make it look like you click the .swf button, using a label didn't work, it was just a big white rectangle.


Give it the transparent background color?

Edit:

In the IDE, select the label, find the "BackColor" property, and look in "Web" for "Transparent"

Tried that, didn't work.
Back to top
View user's profile Send private message
samo502
Master Cheater
Reputation: 0

Joined: 14 Mar 2008
Posts: 342
Location: That place.

PostPosted: Thu Jan 15, 2009 3:12 pm    Post subject: Reply with quote

clickflick22 wrote:
samuri25404 wrote:
clickflick22 wrote:
Snootae wrote:
you could always just put it off the visisble form

explain more what this button does

It's on top of a .swf, I use it to make it look like you click the .swf button, using a label didn't work, it was just a big white rectangle.


Give it the transparent background color?

Edit:

In the IDE, select the label, find the "BackColor" property, and look in "Web" for "Transparent"

Tried that, didn't work.
Assuming your using VB8 because I don't know if VB6 has it or not. there should be a value on the form that is like "TransparencyColor" or something like that. Choose a color you won't be using and you will remember, and make the background of the button the color you chose.
Back to top
View user's profile Send private message MSN Messenger
angerist
Grandmaster Cheater Supreme
Reputation: 0

Joined: 18 Jun 2007
Posts: 1011
Location: Australia.

PostPosted: Sat Jan 17, 2009 1:40 am    Post subject: Reply with quote

Its been a long time since I've used vb. But if i can remember correctly VB6 doesn't have a "TransparentColour" setting in properties. Although you can use modules to make your form transparent.

Its quite simple.

Place this in a module
Code:
Private Declare Function GetWindowLong Lib "user32" Alias "GetWindowLongA" (ByVal hWnd As Long, ByVal nIndex As Long) As Long
Private Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hWnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
Private Declare Function SetLayeredWindowAttributes Lib "user32" (ByVal hWnd As Long, ByVal crKey As Long, ByVal bDefaut As Byte, ByVal dwFlags As Long) As Long

Private Const GWL_EXSTYLE  As Long = (-20)
Private Const LWA_COLORKEY  As Long = &H1
Private Const LWA_Defaut  As Long = &H2
Private Const WS_EX_LAYERED  As Long = &H80000

' Public Function Transparency(ByVal hWnd As Long, Optional ByVal Col As Long = vbBlack, Optional ByVal PcTransp As Byte = 255, Optional ByVal TrMode As Boolean = True) As Boolean
' Return : True if there is no error.
' hWnd   : hWnd of the window to make transparent
' Col : Color to make transparent if TrMode=False
' PcTransp  : 0 à 255 >> 0 = transparent  -:- 255 = Opaque
Dim DisplayStyle As Long
    On Error GoTo Exit
    VoirStyle = GetWindowLong(hWnd, GWL_EXSTYLE)
    If DisplayStyle <> (DisplayStyle Or WS_EX_LAYERED) Then
        DisplayStyle = (DisplayStyle Or WS_EX_LAYERED)
        Call SetWindowLong(hWnd, GWL_EXSTYLE, DisplayStyle)
    End If
    Transparency = (SetLayeredWindowAttributes(hWnd, Col, PcTransp, IIf(TrMode, LWA_COLORKEY Or LWA_Defaut, LWA_COLORKEY)) <> 0)
   
Exit:
    If Not Err.Number = 0 Then Err.Clear
End Function

Public Sub ActiveTransparency(M As Form, d As Boolean, F As Boolean, _
     T_Transparency As Integer, Optional Color As Long)
Dim B As Boolean
        If d And F Then
        'Makes color (here the background color of the shape) transparent
        'upon value of T_Transparency
            B = Transparency(M.hWnd, Color, T_Transparency, False)
        ElseIf d Then
            'Makes form, including all components, transparent
            'upon value of T_Transparency
            B = Transparency(M.hWnd, 0, T_Transparency, True)
        Else
            'Restores the form opaque.
            B = Transparency(M.hWnd, , 255, True)
        End If
End Sub



Place this in form


Code:
Private Sub Form_Load()
Dim i As Integer
    'Ex: all transparent at ratio 140/255
    'ActiveTransparency Me, True, False, 140, Me.BackColor
    'Ex: Form transparent, visible component at ratio 140/255
    'ActiveTransparency Me, True, True, 140, Me.BackColor
   
    'Example display the form transparency degradation
    ActiveTransparency Me, True, False, 0
    Me.Show
    For i = 0 To 255 Step 3
        ActiveTransparency Me, True, False, i
        Me.Refresh
    Next i
End Sub


Ohhhhhh I thought you meant transparent form. You can make a transparent command button by using picture boxes. And yes they can have text in them. Here's and example

Download : http://www.freevbcode.com/source/TranspCmdButtons.zip

_________________
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites