Darwinbots Forum
Code center => Suggestions => Topic started by: PurpleYouko on October 27, 2005, 02:48:16 PM
-
Bots reported.
how about making the "background picture" system defult and save with settings, I am tired of seeing the same annoying darkblue for all my sims I set up from scratch, and I am equaly tierd of reselecting a spesific background for a spesific settings file, simulation file.
When you choose a background picture make it like a messagebox asking if you want it to be the programs defult , then save it into the settings structure (the path I mean)
Great suggestion. I like it a lot.
However it ISN'T a bug. It is a suggested improvement.
-
You have to do it from the GUI part of Form1. You click on the blue bakcground and hit F4. A little window pops up giving you details. Find Background color and modify it ;)
-
There should be a stretch property on the form... I think that's what you need anyway.
-
I dunno that you can do it just like that. I think you have to manually resize it.
-
Yeah [Nums] is right. You have to make the picture the right size before you set it.
-
As to how you actually do that, I have no idea. I bet Bots knows though, or maybe PY.
-
Declare Function StretchBlt Lib "gdi32" Alias "StretchBlt" (ByVal hdc As Long, ByVal x As Long, ByVal y As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal hSrcDC As Long, ByVal xSrc As Long, ByVal ySrc As Long, ByVal nSrcWidth As Long, ByVal nSrcHeight As Long, ByVal dwRop As Long) As Long
StretchBlt
The StretchBlt function copies a bitmap from a source rectangle into a destination rectangle, stretching or compressing the bitmap to fit the dimensions of the destination rectangle, if necessary. The system stretches or compresses the bitmap according to the stretching mode currently set in the destination device context.
BOOL StretchBlt(
HDC hdcDest, // handle to destination device context
int nXOriginDest, // x-coordinate of upper-left corner of dest. rectangle
int nYOriginDest, // y-coordinate of upper-left corner of dest. rectangle
int nWidthDest, // width of destination rectangle
int nHeightDest, // height of destination rectangle
HDC hdcSrc, // handle to source device context
int nXOriginSrc, // x-coordinate of upper-left corner of source rectangle
int nYOriginSrc, // y-coordinate of upper-left corner of source rectangle
int nWidthSrc, // width of source rectangle
int nHeightSrc, // height of source rectangle
DWORD dwRop // raster operation code
);
Parameters
hdcDest
Handle to the destination device context.
nXOriginDest
Specifies the x-coordinate, in logical units, of the upper-left corner of the destination rectangle.
nYOriginDest
Specifies the y-coordinate, in logical units, of the upper-left corner of the destination rectangle.
nWidthDest
Specifies the width, in logical units, of the destination rectangle.
nHeightDest
Specifies the height, in logical units, of the destination rectangle.
hdcSrc
Handle to the source device context.
nXOriginSrc
Specifies the x-coordinate, in logical units, of the upper-left corner of the source rectangle.
nYOriginSrc
Specifies the y-coordinate, in logical units, of the upper-left corner of the source rectangle.
nWidthSrc
Specifies the width, in logical units, of the source rectangle.
nHeightSrc
Specifies the height, in logical units, of the source rectangle.
dwRop
Specifies the raster operation to be performed. Raster operation codes define how the system combines colors in output operations that involve a brush, a source bitmap, and a destination bitmap.
See BitBlt for a list of common raster operation codes.
Return Values
If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero.
See also: device context
Have fun.
-
Yuck, using system functions from VB :lol: