Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Trouble with Object Reference
Index -> Programming, Visual Basic and Other Basics -> Visual Basic Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Gooie




PostPosted: Sun Jan 20, 2008 10:35 am   Post subject: Trouble with Object Reference

I'm just trying to figure out how I could easily make a game, with Visual Basic 2008. I was looking at:
code:

System.Windows.Forms.PaintEventArgs.Graphics.FillRectangle(Brushes.Coral, 30, 30, 20, 30)

But to use, System.Windows.Forms.PaintEventArgs, I need an 'Object Reference'. How is this done? And Microsoft has a terrible help menu... Its all Vista ads.
Sponsor
Sponsor
Sponsor
sponsor
Euphoracle




PostPosted: Sun Jan 20, 2008 11:43 am   Post subject: RE:Trouble with Object Reference

You cannot simply "get" a graphics object. They are handed to you when needed. For example, you can get the screen's graphics object and draw directly, or you can overload or hook an event to a form's OnPaint or similar. You do not have direct access to things; that would defeat the purpose.
Display posts from previous:   
   Index -> Programming, Visual Basic and Other Basics -> Visual Basic Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 2 Posts ]
Jump to:   


Style:  
Search: