|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now! |
|
#1
|
|||
|
|||
|
displaying a bitmap in a command button at runtime
Hi,
I am trying to display a bitmap at runtime to dynamic control button but the program complains that it cannot set the style at runtime. I set the style to 1-Graphical and call the LoadPpicture method but VB does allow to set the style at runtime. Is there another way of displaying a bitmap within a command button at runtime. Or is there another way of accomplishing the same thing? Thanks. Last edited by jimmyc : September 23rd, 2003 at 02:29 PM. |
|
#2
|
|||
|
|||
|
The style property of a command button is read-only at runtime, so you'll have to set the style in design mode. I don't know what will happen with dynamically created controls at runtime.
If the style is 1, you should be able to use something like MyCmd.Picture = LoadPicture("myfile.bmp") |
|
#3
|
|||
|
|||
|
or u can use some api to point the picture on the button:http://www.rookscape.com/vbgaming/tutAY.php
|
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > Visual Basic Programming > displaying a bitmap in a command button at runtime |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|