Hej!
Jeg mangler syntaksen for Fill.
Det jeg skal bruge er simpelthen at udfylde et område i en Picturebox med en given farve.
(Ligesom i de fleste tegneprogrammer).Området er selvfølgelig omkranset af en anden farve.
Er der een der har de vise sten for det hører jeg gerne.
På forhånd TAK!!
Eksempel:
<pre>
Private Sub Form_MouseDown (Button As Integer, Shift As Integer, X As Single, Y As Single)
FillColor = QBColor(Int(Rnd * 15)) ' Vælget tildfældig FillColor.
FillStyle = Int(Rnd * 8) ' Vælger tildfældig FillStyle.
Circle (X, Y), 250 ' Tegner en cirkel.
End Sub
</pre>
Her er vad MSDN siger (Jeg har copy-.pastet kildekoden til hjælpesiden. Åben den i en browse):
<p>
Returns or sets the color used to fill in shapes; <b>FillColor</b> is also used to fill in circles and boxes created with the <b>Circle</b> and <b>Line</b> <object id=alink_4 type="application/x-oleobject"
classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11">
<PARAM name="Command" value="ALink">
<PARAM name="DefaultTopic" value="_topic_not_found.htm">
<PARAM name="Item1" value="">
<PARAM name="Item2" value="vbdefgraphicsmethod">
</object><a href=JavaScript:alink_4.Click()>graphics methods</a>.</p>
<p class=label>
<b>Syntax</b></p>
<p>
<i>object</i>.<b>FillColor</b> [ = <i>value</i>]</p>
<p>
The <b>FillColor</b> property syntax has these parts:</p>
<table border=1 cellpadding=5 cols=2 frame=below rules=rows>
<tr valign=top>
<td class=label width=29%><b>Part</b></td>
<td class=label width=71%><b>Description</b></td>
</tr>
<tr valign=top>
<td width=29%><i>Object</i></td>
<td width=71%>An <object id=alink_5 type="application/x-oleobject"
classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11">
<PARAM name="Command" value="ALink">
<PARAM name="DefaultTopic" value="_topic_not_found.htm">
<PARAM name="Item1" value="">
<PARAM name="Item2" value="defobjectexpression">
</object><a href=JavaScript:alink_5.Click()>object expression</a> that evaluates to an object in the Applies To list.</td>
</tr>
<tr valign=top>
<td width=29%><i>Value</i></td>
<td width=71%>A value or constant that determines the fill color, as described in Settings.</td>
</tr>
</table><br>
<p class=label>
<b>Settings</b></p>
<p>
The settings for <i>value</i> are:</p>
<table border=1 cellpadding=5 cols=2 frame=below rules=rows>
<tr valign=top>
<td class=label width=29%><b>Setting</b></td>
<td class=label width=71%><b>Description</b></td>
</tr>
<tr valign=top>
<td width=29%>Normal RGB colors</td>
<td width=71%>Colors set with the <b>RGB</b> or <b>QBColor</b> functions in code.</td>
</tr>
<tr valign=top>
<td width=29%>System default colors</td>
<td width=71%>Colors specified with the system color <object id=alink_6 type="application/x-oleobject"
classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11">
<PARAM name="Command" value="ALink">
<PARAM name="DefaultTopic" value="_topic_not_found.htm">
<PARAM name="Item1" value="">
<PARAM name="Item2" value="defconstant">
</object><a href=JavaScript:alink_6.Click()>constants</a> in the Visual Basic (VB) object library in the Object Browser. The Microsoft Windows operating environment substitutes the user's choices, as specified by the user's <object id=alink_7 type="application/x-oleobject"
classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11">
<PARAM name="Command" value="ALink">
<PARAM name="DefaultTopic" value="_topic_not_found.htm">
<PARAM name="Item1" value="">
<PARAM name="Item2" value="defcontrolpanel">
</object><a href=JavaScript:alink_7.Click()>Control Panel</a> settings.</td>
</tr>
</table><br>
<p>
By default, <b>FillColor</b> is set to 0 (Black).</p>
<p class=label>
<b>Remarks</b></p>
<p>
Except for the <b>Form</b> object, when the <b>FillStyle</b> property is set to its default, 1 (Transparent), the <b>FillColor</b> setting is ignored.</p>