 |
Cheat Engine The Official Site of Cheat Engine
|
| View previous topic :: View next topic |
| Author |
Message |
Oblivious Grandmaster Cheater Supreme
Reputation: 45
Joined: 12 Mar 2008 Posts: 1732
|
Posted: Wed Jan 14, 2009 6:41 pm Post subject: How do you make an invisible button in VB2008? |
|
|
| But it has to still function. Button.visible=false won't let it function.
|
|
| Back to top |
|
 |
HomerSexual Grandmaster Cheater Supreme
Reputation: 5
Joined: 03 Feb 2007 Posts: 1657
|
Posted: Wed Jan 14, 2009 7:45 pm Post subject: |
|
|
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 |
|
 |
Snootae Grandmaster Cheater
Reputation: 0
Joined: 16 Dec 2006 Posts: 969 Location: --->
|
Posted: Wed Jan 14, 2009 7:48 pm Post subject: |
|
|
you could always just put it off the visisble form
explain more what this button does
_________________
|
|
| Back to top |
|
 |
FullyAwesome I post too much
Reputation: 0
Joined: 05 Apr 2007 Posts: 4438 Location: Land Down Under
|
Posted: Wed Jan 14, 2009 7:50 pm Post subject: |
|
|
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 |
|
 |
Oblivious Grandmaster Cheater Supreme
Reputation: 45
Joined: 12 Mar 2008 Posts: 1732
|
Posted: Wed Jan 14, 2009 9:03 pm Post subject: |
|
|
| 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 |
|
 |
samuri25404 Grandmaster Cheater
Reputation: 7
Joined: 04 May 2007 Posts: 955 Location: Why do you care?
|
Posted: Wed Jan 14, 2009 9:16 pm Post subject: |
|
|
| 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"
_________________
|
|
| Back to top |
|
 |
Oblivious Grandmaster Cheater Supreme
Reputation: 45
Joined: 12 Mar 2008 Posts: 1732
|
Posted: Wed Jan 14, 2009 9:48 pm Post subject: |
|
|
| 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 |
|
 |
samo502 Master Cheater
Reputation: 0
Joined: 14 Mar 2008 Posts: 342 Location: That place.
|
Posted: Thu Jan 15, 2009 3:12 pm Post subject: |
|
|
| 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 |
|
 |
angerist Grandmaster Cheater Supreme
Reputation: 0
Joined: 18 Jun 2007 Posts: 1011 Location: Australia.
|
Posted: Sat Jan 17, 2009 1:40 am Post subject: |
|
|
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 |
|
 |
|
|
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
|
|