turbocookie Posted April 7, 2010 Author Share Posted April 7, 2010 i just got a code and it is suppose to make my chatbox transperent, it works but, the text is behind the game for some reason, when you type it flashs then looks like it goes behindhere are the scripts i used```Private Sub Form_Load() AlphaBlendControl (txtChat.hwnd) txtChat.ZOrder 0 Dim I As Long Dim Ending As String For I = 1 To 3 If I = 1 Then Ending = ".gif" If I = 2 Then Ending = ".jpg" If I = 3 Then Ending = ".bmp" If FileExists("GUI\800X600" & Ending) Then frmStable.Picture = LoadPicture(App.Path & "\GUI\800X600" & Ending) End If Next I MapChat.Text = "Map"End Sub```and```Private Const GWL_EXSTYLE = (-20)Private Const WS_EX_TRANSPARENT = &H20&Private Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As LongPublic Sub AlphaBlendControl(hwnd As Long)Dim Result As LongResult = SetWindowLong(hwnd, GWL_EXSTYLE, WS_EX_TRANSPARENT)End Sub```screenshot ingame (cant see much)![](http://www.freemmorpgmaker.com/files/imagehost/pics/b57e8fd404c4e64f44e1f7b3d4125c81.JPG) Link to comment Share on other sites More sharing options...
DFA Posted April 7, 2010 Share Posted April 7, 2010 looks like its to add transparency to the formedit: oh nvm, guess not. Link to comment Share on other sites More sharing options...
Killer123 Posted April 7, 2010 Share Posted April 7, 2010 Where ever you got the script from, did it say where to put it ( At the end of, under, etc… ).Dam Link to comment Share on other sites More sharing options...
turbocookie Posted April 7, 2010 Author Share Posted April 7, 2010 no it didnt, it said to put this script anywhere, so i made a new module, he said it works like that```Private Const GWL_EXSTYLE = (-20)Private Const WS_EX_TRANSPARENT = &H20&Private Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As LongPublic Sub AlphaBlendControl(hwnd As Long)Dim Result As LongResult = SetWindowLong(hwnd, GWL_EXSTYLE, WS_EX_TRANSPARENT)End Sub```and he said to put this into load_form in frmMirage, mine is frmStable (frmMirage)```Private Sub Form_Load() AlphaBlendControl (txtChat.hwnd) txtChat.ZOrder 0 Dim I As Long Dim Ending As String For I = 1 To 3 If I = 1 Then Ending = ".gif" If I = 2 Then Ending = ".jpg" If I = 3 Then Ending = ".bmp" If FileExists("GUI\800X600" & Ending) Then frmStable.Picture = LoadPicture(App.Path & "\GUI\800X600" & Ending) End If Next I MapChat.Text = "Map"End Sub``` Link to comment Share on other sites More sharing options...
balliztik1 Posted April 7, 2010 Share Posted April 7, 2010 Take out the txtChat.zOrder. Z-Order is which order the individual controls are displayed in. In this case, you've set the Z-Order to the absolute lowest, so the chat box is behind everything. I have no idea how that will affect your transparency, but it should at least correct the chat box being behind the main screen. Link to comment Share on other sites More sharing options...
DFA Posted April 7, 2010 Share Posted April 7, 2010 it looks like a bad way to go about it, generally when it comes to this sorta thing…didn't we already address this issue?http://www.touchofdeathforums.com/smf/index.php/topic,59096.msg625217.html#msg625217 Link to comment Share on other sites More sharing options...
turbocookie Posted April 8, 2010 Author Share Posted April 8, 2010 it isnt the order bit, i told the person the problem i have atm and he said to use that. it didnt change anything.DFA sorry if you did adress it but, use all confused me with technical stuff back there.please i just need the writing on the screen without the box there has to be a way :( Link to comment Share on other sites More sharing options...
DFA Posted April 8, 2010 Share Posted April 8, 2010 there is honestly no easy way to do it Link to comment Share on other sites More sharing options...
turbocookie Posted April 8, 2010 Author Share Posted April 8, 2010 no easy way? then give me a complex way, ill give it a try, i need it though so… Link to comment Share on other sites More sharing options...
tommy87 Posted April 8, 2010 Share Posted April 8, 2010 Ahah! :D Turbocookie, you gained +100 points of esteem.I will follow this thread with a lot of attention.Searching online I found a few of tutorials, but they didn't explain really how to get that effect. It's a bit frustrating indeed.I tried with the component "Image". You know, if you use that you can load *.gif\*.png image with an alpha channel. But when I go to compile and execute the Client.. bah.. disaster. "Image(s)" go(es) under [ picScreen ]. Link to comment Share on other sites More sharing options...
turbocookie Posted April 8, 2010 Author Share Posted April 8, 2010 yeah, well let me know if you get anything! ill do the same for you! thanks Link to comment Share on other sites More sharing options...
tommy87 Posted April 8, 2010 Share Posted April 8, 2010 I posted [here](http://www.touchofdeathforums.com/smf/index.php/topic,59096.msg625480.html#msg625480).Maybe that can help you. :DLemme know, please. Link to comment Share on other sites More sharing options...
turbocookie Posted April 8, 2010 Author Share Posted April 8, 2010 i tryed to follow it but, sorry for sounding nooby, no idea where to put the script please explain? Link to comment Share on other sites More sharing options...
Kimimaru Posted April 8, 2010 Share Posted April 8, 2010 It goes behind because you're declaring functions and constant variables as private in another module. You need to put them in **frmMirage** or declare them as public. I'll show you how I did it:In **frmMirage** (**frmStable**) at the very top, add this:```Private Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hWnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As LongPrivate Const TextThing = (-20)Private Const TransparentChatBox = &H20&```Add this to **Private Sub Form_Load()**:```SetWindowLong txtChat.hWnd, TextThing, TransparentChatBox```That should be all. Now, under your chatbox, use the Image tool on VB6 to place an image under the chatbox. Then, on the properties toolbar, select the picture you want for the image. It should work after that. Link to comment Share on other sites More sharing options...
DFA Posted April 8, 2010 Share Posted April 8, 2010 @turbocookie:> no easy way? then give me a complex way, ill give it a try, i need it though so…learn D3Dsample code - http://www.vbforums.com/attachment.php?s=e7482c0e6fad6775b6f123796c5397aa&attachmentid=44517&d=1137559433demonstrates…``` 1\. First Windowed DirectX8 Application 2\. First Fullscreen DirectX8 Application 3\. Windowed & Fullscreen Initialization Together 4\. 2D Polygon Drawing 5\. Vertex Colors 6\. Vertex Buffers 7\. Drawing Text 8\. Triangle Rendering Formats 9\. Scaling Compensation 10\. Texture Mapping 11\. Texture Mapping With Colored Vertices 12\. Transparency 13\. Alphablending 14\. Gamma Correction 15\. Rotation 16\. Animation 17\. Advanced Animation 18\. Time Based Animation 19\. Tile Engine``` Link to comment Share on other sites More sharing options...
Robin Posted April 8, 2010 Share Posted April 8, 2010 @Kimimaru:> It goes behind because you're declaring functions and constant variables as private in another module. You need to put them in **frmMirage** or declare them as public. I'll show you how I did it:> > In **frmMirage** (**frmStable**) at the very top, add this:> > ```> Private Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hWnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long> Private Const TextThing = (-20)> Private Const TransparentChatBox = &H20&> ```> Add this to **Private Sub Form_Load()**:> > ```> SetWindowLong txtChat.hWnd, TextThing, TransparentChatBox> ```> That should be all. Now, under your chatbox, use the Image tool on VB6 to place an image under the chatbox. Then, on the properties toolbar, select the picture you want for the image. It should work after that.This doesn't allow you to show text in front of the game.It seems no one understands how DirectX works. >_>To have something transparent, you need to render it. Link to comment Share on other sites More sharing options...
Kimimaru Posted April 8, 2010 Share Posted April 8, 2010 I thought he just wanted to make his chatbox transparent, because after I implemented my code, it displays all of the text properly. Link to comment Share on other sites More sharing options...
turbocookie Posted April 9, 2010 Author Share Posted April 9, 2010 i dont really have time to learn anymore coding stuff, i have a busy lifestyle and im not on much really. so if anyone can just PLEASE make me a script that shows the TEXT from the chatbox WITHOUT the BACKGROUND, please do. Link to comment Share on other sites More sharing options...
Godlord Posted April 9, 2010 Share Posted April 9, 2010 @turbocookie:> i dont really have time to learn anymore coding stuff, i have a busy lifestyle and im not on much really. so if anyone can just PLEASE make me a script that shows the TEXT from the chatbox WITHOUT the BACKGROUND, please do.I'm sorry to say, but game development requires dedication and a good amount of time. If you don't have that, then game development isn't really suited for you. It's not like you think of what your game should look like and that it just drops out of the blue (sky). If you don't want to bother, then we shouldn't either.Regards, Godlord. Link to comment Share on other sites More sharing options...
ddunit Posted April 9, 2010 Share Posted April 9, 2010 @Sir:> @turbocookie:> > > i dont really have time to learn anymore coding stuff, i have a busy lifestyle and im not on much really. so if anyone can just PLEASE make me a script that shows the TEXT from the chatbox WITHOUT the BACKGROUND, please do.> > I'm sorry to say, but game development requires dedication and a good amount of time. If you don't have that, then game development isn't really suited for you. It's not like you think of what your game should look like and that it just drops out of the blue (sky). If you don't want to bother, then we shouldn't either.> > Regards,> Godlord.Well, I'd love to point out that the actualy game developper doesn't know how to program. He puts up the desing document and such things, it helps alot if he can program, thought.Unless you want to go solo.. Link to comment Share on other sites More sharing options...
Godlord Posted April 9, 2010 Share Posted April 9, 2010 @Ddunit:> @Sir:> > > @turbocookie:> > > > > i dont really have time to learn anymore coding stuff, i have a busy lifestyle and im not on much really. so if anyone can just PLEASE make me a script that shows the TEXT from the chatbox WITHOUT the BACKGROUND, please do.> > > > I'm sorry to say, but game development requires dedication and a good amount of time. If you don't have that, then game development isn't really suited for you. It's not like you think of what your game should look like and that it just drops out of the blue (sky). If you don't want to bother, then we shouldn't either.> > > > Regards,> > Godlord.> > Well, I'd love to point out that the actualy game developper doesn't know how to program. He puts up the desing document and such things, it helps alot if he can program, thought.> > Unless you want to go solo..We aren't talking about companies here and even if we were then he should have hired someone to program it for him. Besides this is a question board, not a request board.Regards, Godlord. Link to comment Share on other sites More sharing options...
turbocookie Posted April 9, 2010 Author Share Posted April 9, 2010 well, im pretty much soloing it atm, with help from these forums, alot of help….once my games going good like iv done a fair bit ill try to hire someone =] Link to comment Share on other sites More sharing options...
Robin Posted April 9, 2010 Share Posted April 9, 2010 If you don't have the time to learn some basics in your 'hectic schedule' then why in God's name should we try and help you? Link to comment Share on other sites More sharing options...
DFA Posted April 9, 2010 Share Posted April 9, 2010 @Robin:> If you don't have the time to learn some basics in your 'hectic schedule' then why in God's name should we try and help you?because its your job as head developer and technical support Link to comment Share on other sites More sharing options...
Robin Posted April 9, 2010 Share Posted April 9, 2010 @DFA:> @Robin:> > > If you don't have the time to learn some basics in your 'hectic schedule' then why in God's name should we try and help you?> > because its your job as head developer and technical supportGo look about your kid. xD Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now