Mirage Source

Free ORPG making software.
It is currently Sat Apr 27, 2024 7:01 pm

All times are UTC




Post new topic Reply to topic  [ 68 posts ]  Go to page 1, 2, 3  Next
Author Message
PostPosted: Mon May 29, 2006 1:49 pm 
Offline
Community Leader
User avatar

Joined: Mon May 29, 2006 1:00 pm
Posts: 2538
Location: Sweden
Google Talk: johansson_tk@hotmail.com
Difficulty: 1/5

Put this in modDeclares:

Code:
Public Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
Public Const GWL_EXSTYLE = (-20)
Public Const WS_EX_TRANSPARENT = &H20&


And put this in Form_Load in the form that has the rich text box that you want transparent:
Code:
Dim result As Long
result = SetWindowLong(txtChat.hwnd, GWL_EXSTYLE, WS_EX_TRANSPARENT)


txtChat is the name of the rich text box. Done!

_________________
I'm on Facebook!My Youtube Channel Send me an email
Image


Last edited by William on Tue May 30, 2006 7:41 am, edited 1 time in total.

Top
 Profile  
 
 Post subject:
PostPosted: Tue May 30, 2006 2:16 am 
Offline
Persistant Poster
User avatar

Joined: Tue May 30, 2006 2:07 am
Posts: 836
Location: Nashville, Tennessee, USA
Google Talk: rs.ruggles@gmail.com
This just doesn't seem to work :?

First of all, I could only get the code to run by placing

Code:
Private Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long


Into frmMirage code.

After that though, it still didn't work. Are there some sort of specific settings the rich text box needs in order for this to work?


Top
 Profile  
 
 Post subject:
PostPosted: Tue May 30, 2006 4:34 am 
Offline
Pro

Joined: Mon May 29, 2006 2:15 am
Posts: 368
Change

Code:
Private Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long


The Private Part... Just Make it Public so it works with the entire project, not just individual codes. As far as the rest goes... i haven't tested it yet, but i'll try it out later and see what's going on.

_________________
Image
Image
The quality of a man is not measured by how well he treats the knowledgeable and competent, but rather how he treats those less fortunate than himself.


Top
 Profile  
 
 Post subject:
PostPosted: Tue May 30, 2006 7:40 am 
Offline
Community Leader
User avatar

Joined: Mon May 29, 2006 1:00 pm
Posts: 2538
Location: Sweden
Google Talk: johansson_tk@hotmail.com
Ohh, yeah in my source Im using:

Code:
Private Declare Function SetWindowLong
Const GWL_EXSTYLE = (-20)
Const WS_EX_TRANSPARENT = &H20&
'
Because I have that in the same form as the rich text box.

And forgot to make it Public. Tutorial Fixed.

_________________
I'm on Facebook!My Youtube Channel Send me an email
Image


Top
 Profile  
 
 Post subject:
PostPosted: Thu May 17, 2007 2:03 am 
Offline
Knowledgeable

Joined: Tue Apr 17, 2007 10:18 pm
Posts: 148
Location: USA, Texas
This doesnt work :(

_________________
Image
_________________
Image


Top
 Profile  
 
 Post subject:
PostPosted: Thu May 17, 2007 10:57 am 
Yes this does work. Perfectly. Just follow the very first part of the tut, if you don't try to add anything else and do exactly what it says, it works perfectly.


Top
  
 
 Post subject:
PostPosted: Thu May 17, 2007 3:48 pm 
Offline
Community Leader
User avatar

Joined: Mon May 29, 2006 1:00 pm
Posts: 2538
Location: Sweden
Google Talk: johansson_tk@hotmail.com
Of Course it works, its my tut :P

_________________
I'm on Facebook!My Youtube Channel Send me an email
Image


Top
 Profile  
 
 Post subject:
PostPosted: Thu May 17, 2007 11:39 pm 
Offline
Knowledgeable

Joined: Tue Apr 17, 2007 10:18 pm
Posts: 148
Location: USA, Texas
well when i put the chatbox over the game screen and tested it, it only show up when i say something and it'll be on for like .5 seconds... and it wasn't transparent. :(

_________________
Image
_________________
Image


Top
 Profile  
 
 Post subject:
PostPosted: Thu May 17, 2007 11:53 pm 
Offline
Pro
User avatar

Joined: Thu Dec 14, 2006 3:20 am
Posts: 495
Location: California
Google Talk: Rezeyu@Gmail.com
Then you did something wrong.

If it keeps refreshing then the txtbox must be updating over and over, which means you're sending soemthing to that box too often.

Or something.




In any case, it does work, You can look at the screenshots of my transparent boxes in the gallery section.


Top
 Profile  
 
 Post subject:
PostPosted: Fri May 18, 2007 12:33 am 
Offline
Knowledgeable

Joined: Tue Apr 17, 2007 10:18 pm
Posts: 148
Location: USA, Texas
Well doesn't work for me :\

Could be fact that im using elysium debugged tho.. heh

_________________
Image
_________________
Image


Top
 Profile  
 
 Post subject:
PostPosted: Fri May 18, 2007 2:12 am 
Offline
Knowledgeable
User avatar

Joined: Tue Feb 06, 2007 9:50 pm
Posts: 180
Location: Bergenfield, New Jersey, US
Da Undead wrote:
Well doesn't work for me :\

Could be fact that im using elysium debugged tho.. heh


Personally, I don't like Elysium DeBugged. I like an almost completely empty source like Mirage Source because you can customize more things and it makes your game unique. Elysium DeBugged has a lot of features but it doesn't give you the pride of making it.


Top
 Profile  
 
 Post subject:
PostPosted: Fri May 18, 2007 3:03 am 
This won't work directly over a blitted area. You have to blit it to the screen if you want that, instead of doing this. If you try this, over a textured picture box, you will see that it works perfectly.


Top
  
 
 Post subject:
PostPosted: Fri May 18, 2007 12:25 pm 
Offline
Community Leader
User avatar

Joined: Mon May 29, 2006 1:00 pm
Posts: 2538
Location: Sweden
Google Talk: johansson_tk@hotmail.com
Advocate wrote:
This won't work directly over a blitted area. You have to blit it to the screen if you want that, instead of doing this. If you try this, over a textured picture box, you will see that it works perfectly.

Exactly.

_________________
I'm on Facebook!My Youtube Channel Send me an email
Image


Top
 Profile  
 
 Post subject:
PostPosted: Wed May 23, 2007 8:49 pm 
Offline
Regular
User avatar

Joined: Fri Mar 02, 2007 6:19 pm
Posts: 93
Location: Nonya
That explains my problem.
How would one go about blitting this to the screen?

_________________
Image


Top
 Profile  
 
 Post subject:
PostPosted: Wed May 23, 2007 8:51 pm 
Roughly the way the player name is blitted.


Top
  
 
 Post subject:
PostPosted: Wed May 23, 2007 10:57 pm 
Offline
Community Leader
User avatar

Joined: Mon May 29, 2006 1:00 pm
Posts: 2538
Location: Sweden
Google Talk: johansson_tk@hotmail.com
Braydok wrote:
That explains my problem.
How would one go about blitting this to the screen?

Basicly the same way rhe defult text is blitted when you ttýpe.

_________________
I'm on Facebook!My Youtube Channel Send me an email
Image


Top
 Profile  
 
PostPosted: Fri Jun 22, 2007 11:54 pm 
Offline
Knowledgeable

Joined: Tue Apr 17, 2007 10:18 pm
Posts: 148
Location: USA, Texas
I put this on top of frmMirage code

Code:
Private Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
Const GWL_EXSTYLE = (-20)
Const WS_EX_TRANSPARENT = &H20&


And here my form_load sub..

Code:
Private Sub Form_Load()
Dim i As Long
Dim Ending As String
Dim result As Long
result = SetWindowLong(txtChat.hwnd, GWL_EXSTYLE, WS_EX_TRANSPARENT)

    For i = 1 To 3
        If i = 1 Then Ending = ".gif"
        If i = 2 Then Ending = ".jpg"
        If i = 3 Then Ending = ".png"
 
        If FileExist("GUI\Game" & Ending) Then frmMirage.Picture = LoadPicture(App.Path & "\GUI\Game" & Ending)
    Next i
   
    frmMainMenu.Visible = False
End Sub


No work :(

_________________
Image
_________________
Image


Top
 Profile  
 
 Post subject: Re:
PostPosted: Sat Jun 23, 2007 12:53 am 
Offline
Pro
User avatar

Joined: Thu Dec 14, 2006 3:20 am
Posts: 495
Location: California
Google Talk: Rezeyu@Gmail.com
Perfekt wrote:
This won't work directly over a blitted area. You have to blit it to the screen if you want that, instead of doing this. If you try this, over a textured picture box, you will see that it works perfectly.


Top
 Profile  
 
PostPosted: Sat Jun 23, 2007 2:34 am 
Offline
Knowledgeable

Joined: Tue Apr 17, 2007 10:18 pm
Posts: 148
Location: USA, Texas
Im trying to get it transparent over the GUI picture =\.

_________________
Image
_________________
Image


Top
 Profile  
 
PostPosted: Sat Jun 23, 2007 6:53 pm 
Offline
Knowledgeable
User avatar

Joined: Mon May 29, 2006 11:38 am
Posts: 293
Location: Cambridge, UK
Da Undead wrote:
Im trying to get it transparent over the GUI picture =\.


Have you downloaded MSE and seen if it works in there? If it does, its your fault.

_________________
Image
Image


Top
 Profile  
 
PostPosted: Sat Jun 23, 2007 9:28 pm 
Offline
Knowledgeable

Joined: Tue Apr 17, 2007 10:18 pm
Posts: 148
Location: USA, Texas
No, but it should work because its not using variables from elysium....

Could it have to do with the name of it?

Private Sub Form_Load()

?

_________________
Image
_________________
Image


Top
 Profile  
 
PostPosted: Sat Jun 23, 2007 11:25 pm 
Offline
Persistant Poster
User avatar

Joined: Thu Aug 17, 2006 5:27 pm
Posts: 866
Location: United Kingdom
:lol:


Top
 Profile  
 
PostPosted: Sun Jun 24, 2007 12:03 am 
Offline
Knowledgeable

Joined: Tue Apr 17, 2007 10:18 pm
Posts: 148
Location: USA, Texas
I mean like should it be like Public Sub cuz i never learned wat difference was between Private and Public heh..

_________________
Image
_________________
Image


Top
 Profile  
 
PostPosted: Sun Jun 24, 2007 12:13 am 
Offline
Persistant Poster
User avatar

Joined: Thu Aug 17, 2006 5:27 pm
Posts: 866
Location: United Kingdom
Private means its specific to that module or form, no other forms or modules can call it,

public means it can be called from any other form or module

:]


Top
 Profile  
 
PostPosted: Sun Jun 24, 2007 3:55 pm 
Offline
Submit-Happy
User avatar

Joined: Fri Jun 16, 2006 7:01 am
Posts: 2768
Location: Yorkshire, UK
Seen as though the other code is initialised in that sub, it's something else you've done.

_________________
Quote:
Robin:
Why aren't maps and shit loaded up in a dynamic array?
Jacob:
the 4 people that know how are lazy
Robin:
Who are those 4 people?
Jacob:
um
you, me, and 2 others?


Image


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 68 posts ]  Go to page 1, 2, 3  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 31 guests


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 post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group