Visual Basic Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsProgrammingVisual Basic Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old March 15th, 2006, 10:08 PM
asptips asptips is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Feb 2005
Location: asian
Posts: 389 asptips User rank is Sergeant (500 - 2000 Reputation Level)asptips User rank is Sergeant (500 - 2000 Reputation Level)asptips User rank is Sergeant (500 - 2000 Reputation Level)asptips User rank is Sergeant (500 - 2000 Reputation Level)asptips User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 4 Days 1 h 45 m 12 sec
Reputation Power: 16
Commandbutton Graphical Error

Hi,

I got this code that set all my command button to the desired picture I want but I can't get it.
The error message: Can't assign to read-only property



<code>

Private sub Form_Load()

on error resume next '----if I didnt set this a type mismatch error is generatd on the For Each statement why?

Dim x As CommandButton

For Each x In Form1.Controls

x.Picture = LoadPicture(App.Path & "\Picture\arrow.gif")

x.Style = 1 '<----Graphical is set to 1 but this causes the error, (I can set this at design time without flaws but at runtime grrr!)

Next

end sub

</code>

Reply With Quote
  #2  
Old March 16th, 2006, 09:35 AM
Darius Darius is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Sep 2004
Posts: 108 Darius User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 11 h 16 m 54 sec
Reputation Power: 5
" x.Style = 1 '<----Graphical is set to 1 but this causes the error, (I can set this at design time without flaws but at runtime grrr!)"

Maybe I am too sily but... if you can't do it on runtime why not do it in design time and leave the buttons that way.

Reply With Quote
Reply

Viewing: ASP Free ForumsProgrammingVisual Basic Programming > Commandbutton Graphical Error


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway
Stay green...Green IT