By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,994 Members | 2,073 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,994 IT Pros & Developers. It's quick & easy.

translating to vb 2005 (form.hWnd) using directX 7

P: 19
hello, i am attempting to translate some code from vb6 into vb 2005 that draws sprites from graphics designs. i am having trouble on the form trying to draw to back buffer surface.

'vb6 code

Dim lWindowHandle As Long

Private Sub Form_Load()
Static lStartTime As Long
Static lCounter As Long
Static lNewTime As Long

With Form1
.Width = SCREENWIDTH
.Height = SCREENHEIGHT
.KeyPreview = True
End With

Form1.Show()
*** lWindowHandle = Form1.hWnd***

this is where my error is. it gives me the 'hWnd is not a member of application.form1' error. from what i was told, hWnd is automatically generated. perhaps someone knows where i can find the vb.NET equivalent to this statement?
May 6 '07 #1
Share this Question
Share on Google+
1 Reply


P: 19
i am having trouble on the form trying to draw to back buffer surface.
edit: its actually the primary directdraw object, not the back buffer.
May 6 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.