abhi2011 Posted October 13, 2012 Author Share Posted October 13, 2012 Hey guysI need help trying to blt something on the screen with a picbox and a pic. I have written the code properly but for some reason won't blt. I have tried both bltToDC as well as bltFast. But none of them wants to blt a 127X73 bmp file. Link to comment Share on other sites More sharing options...
Growlith1223 Posted October 13, 2012 Share Posted October 13, 2012 are you calling the function? Link to comment Share on other sites More sharing options...
abhi2011 Posted October 13, 2012 Author Share Posted October 13, 2012 Ofc lol. But not sure if I am doing it properly. The calling works the rendering doesn't all code fllwing the call works 2\. And all that does is make the picbox appear Link to comment Share on other sites More sharing options...
Growlith1223 Posted October 13, 2012 Share Posted October 13, 2012 could you post the rendering code that you have? it would help to fix this…Try calling it in Render_Graphics to see if it renders then if ur not calling it there. Link to comment Share on other sites More sharing options...
abhi2011 Posted October 13, 2012 Author Share Posted October 13, 2012 There is a Render_Graphics? ![:blink:](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/blink.png) ![:o](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/ohmy.png) And I just want it to blt at certain times under certain conditions Link to comment Share on other sites More sharing options...
Growlith1223 Posted October 13, 2012 Share Posted October 13, 2012 you can make a check in the sub to see if the picBox is visible then if it is, it renders whatever the hell ur wanting lol Link to comment Share on other sites More sharing options...
abhi2011 Posted October 13, 2012 Author Share Posted October 13, 2012 Wait the picBox has 2 be visible and only then Can i render it? Oh lol that I didn't no. Link to comment Share on other sites More sharing options...
Growlith1223 Posted October 13, 2012 Share Posted October 13, 2012 lawl….it does have to be visible in order to render anything Link to comment Share on other sites More sharing options...
abhi2011 Posted October 13, 2012 Author Share Posted October 13, 2012 Thought It would load it into memory. ![:wacko:](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/wacko.png) Link to comment Share on other sites More sharing options...
Growlith1223 Posted October 13, 2012 Share Posted October 13, 2012 nope, the only thing you can load into memory as far as i know is graphics and maybe maps. Link to comment Share on other sites More sharing options...
abhi2011 Posted October 13, 2012 Author Share Posted October 13, 2012 maps are rendered instantlly. Unlike onto pic boxes. Graphics are just shown. Link to comment Share on other sites More sharing options...
ghost1 Posted October 13, 2012 Share Posted October 13, 2012 Make sure the picturebox's AutoRedraw property is set to true. Link to comment Share on other sites More sharing options...
abhi2011 Posted October 13, 2012 Author Share Posted October 13, 2012 Thx for that tip. Link to comment Share on other sites More sharing options...
ghost1 Posted October 13, 2012 Share Posted October 13, 2012 Although it would be more helpful if you posted the code. Link to comment Share on other sites More sharing options...
abhi2011 Posted October 13, 2012 Author Share Posted October 13, 2012 Writing the code ![:D](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/biggrin.png) if it doesn't work I will give it 2 u. Link to comment Share on other sites More sharing options...
abhi2011 Posted October 13, 2012 Author Share Posted October 13, 2012 Yes It worked ![:D](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/biggrin.png) My first blt worked ![:D](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/biggrin.png)Thank you Ghostly the auto-redraw needed to be set. If you still need the code here it is```Public Sub bltMenu()Dim sRect As RECT, dRect As RECTIf DDS_Menu Is Nothing ThenCall InitDDSurf("MouseMenu", DDSD_Menu, DDS_Menu)End IfWith sRect .top = 0 .Bottom = 127 .Left = 0 .Right = 63End WithdRect = sRectCall Engine_BltToDC(DDS_Menu, sRect, dRect, frmMain.picMenu)End Sub```Going to lock topic in next 10mins. 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