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 


VB Express: Changing form opacity

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

Joined: 20 Jan 2008
Posts: 758
Location: Under your bed

PostPosted: Fri Oct 09, 2009 8:17 pm    Post subject: VB Express: Changing form opacity Reply with quote

How exactly can I change the opacity using an HScrollBar? I found some code on Google but I couldn't modify it to do what I wanted it to do.
Back to top
View user's profile Send private message MSN Messenger
NoManchesPuto
I post too much
Reputation: 0

Joined: 24 Jan 2009
Posts: 2820

PostPosted: Fri Oct 09, 2009 9:16 pm    Post subject: Reply with quote

Code:
Private Sub hbarOpacity_Scroll(ByVal sender As _System.Object, ByVal e As _System.Windows.Forms.ScrollEventArgs) HandleshbarOpacity.Scroll
    Me.Opacity = 0.1 + hbarOpacity.Value / 100
    Me.Text = Me.Opacity.ToString
End Sub
Back to top
View user's profile Send private message
Dillonz
Grandmaster Cheater
Reputation: 4

Joined: 20 Jan 2008
Posts: 758
Location: Under your bed

PostPosted: Fri Oct 09, 2009 10:36 pm    Post subject: Reply with quote

1 wrote:
Code:
Private Sub hbarOpacity_Scroll(ByVal sender As _System.Object, ByVal e As _System.Windows.Forms.ScrollEventArgs) HandleshbarOpacity.Scroll
    Me.Opacity = 0.1 + hbarOpacity.Value / 100
    Me.Text = Me.Opacity.ToString
End Sub

Getting a bunch of errors.
Back to top
View user's profile Send private message MSN Messenger
Odecey
Master Cheater
Reputation: 1

Joined: 19 Apr 2007
Posts: 259
Location: Scandinavia

PostPosted: Sat Oct 10, 2009 8:05 am    Post subject: Reply with quote

Try this:
Code:
Private Sub hbarOpacity_Scroll(ByVal sender As _System.Object, ByVal e As _System.Windows.Forms.ScrollEventArgs) Handles hbarOpacity.Scroll
' Just set the trackbar value range to 10-100
    Me.Opacity = hbarOpacity.Value / 100
End Sub

If that doesn't do it, check that your trackbar is actually named hbarOpacity.

_________________
Never confuse activity with productivity. You can be busy without a purpose, but what's the point?- Rick Warren
Back to top
View user's profile Send private message MSN Messenger
Dillonz
Grandmaster Cheater
Reputation: 4

Joined: 20 Jan 2008
Posts: 758
Location: Under your bed

PostPosted: Sat Oct 10, 2009 8:30 am    Post subject: Reply with quote

Odecey wrote:
Try this:
Code:
Private Sub hbarOpacity_Scroll(ByVal sender As _System.Object, ByVal e As _System.Windows.Forms.ScrollEventArgs) Handles hbarOpacity.Scroll
' Just set the trackbar value range to 10-100
    Me.Opacity = hbarOpacity.Value / 100
End Sub

If that doesn't do it, check that your trackbar is actually named hbarOpacity.

That works great thanks! Time to make useful VB Express code folder in my documents Very Happy
Back to top
View user's profile Send private message MSN Messenger
NoManchesPuto
I post too much
Reputation: 0

Joined: 24 Jan 2009
Posts: 2820

PostPosted: Sat Oct 10, 2009 5:58 pm    Post subject: Reply with quote

Dillonz wrote:
1 wrote:
Code:
Private Sub hbarOpacity_Scroll(ByVal sender As _System.Object, ByVal e As _System.Windows.Forms.ScrollEventArgs) Handles hbarOpacity.Scroll
    Me.Opacity = 0.1 + hbarOpacity.Value / 100
    Me.Text = Me.Opacity.ToString
End Sub

Getting a bunch of errors.


Things you should have done w/o any help:

Remove the 2nd line of code (don't need it)
Name the items correctly if not done so already
Set the min and max

then you wouldn't have any errors
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