|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
how can I reference this bitmap?????????function!) . Im a beginner so does anyone know how i could reference the bitmap? Private Sub MarkVORToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MarkVORToolStripMenuItem.Click If ContextMenuStrip1.SourceControl.BackgroundImage Is DrawCross() Then msgbox("test") End Sub Friend Function DrawCross() As Bitmap Dim sampleBitmap As New Bitmap(32, 32) Dim g As Graphics = Graphics.FromImage(sampleBitmap) Dim p As New Pen(ProfessionalColors.ButtonPressedBorder) p.Color = Color.Red Try p.Width = 2 g.DrawLine(p, -35, 65, 80, -45) g.DrawLine(p, 200, 200, 0, 0) Finally p.Dispose() End Try Return sampleBitmap End Function "Marc" <marc_cro***@hotmail.com> schrieb: \\\> Guys the below code is not working ( i know i am trying to reference a > function!) . > > Im a beginner so does anyone know how i could reference the bitmap? Private m_Cross As Bitmap Public Sub New() m_Cross = DrawCross() End Sub > Private Sub MarkVORToolStripMenuItem_Click(ByVal sender As Replace the line above with this:> System.Object, ByVal e As System.EventArgs) Handles > MarkVORToolStripMenuItem.Click > If ContextMenuStrip1.SourceControl.BackgroundImage Is > DrawCross() Then \\\ If ContextMenuStrip1.SourceControl.BackgroundImage Is m_Cross Then ... End If /// Show quoteHide quote > End Sub > > Friend Function DrawCross() As Bitmap > Dim sampleBitmap As New Bitmap(32, 32) > [...] -- M S Herfried K. Wagner M V P <URL:http://dotnet.mvps.org/> V B <URL:http://dotnet.mvps.org/dotnet/faqs/> Thanks Herfried....
your a star! Herfried K. Wagner [MVP] wrote: Show quoteHide quote > "Marc" <marc_cro***@hotmail.com> schrieb: > > Guys the below code is not working ( i know i am trying to reference a > > function!) . > > > > Im a beginner so does anyone know how i could reference the bitmap? > > \\\ > Private m_Cross As Bitmap > > Public Sub New() > m_Cross = DrawCross() > End Sub > > > Private Sub MarkVORToolStripMenuItem_Click(ByVal sender As > > System.Object, ByVal e As System.EventArgs) Handles > > MarkVORToolStripMenuItem.Click > > If ContextMenuStrip1.SourceControl.BackgroundImage Is > > DrawCross() Then > > Replace the line above with this: > > \\\ > If ContextMenuStrip1.SourceControl.BackgroundImage Is m_Cross Then > ... > End If > /// > > > End Sub > > > > Friend Function DrawCross() As Bitmap > > Dim sampleBitmap As New Bitmap(32, 32) > > [...] > > -- > M S Herfried K. Wagner > M V P <URL:http://dotnet.mvps.org/> > V B <URL:http://dotnet.mvps.org/dotnet/faqs/> "Marc" <marc_cro***@hotmail.com> schrieb: You are welcome!> Thanks Herfried.... > > your a star! -- M S Herfried K. Wagner M V P <URL:http://dotnet.mvps.org/> V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
Q: DataColumn Expressions
There is already an open DataReader associated with this Connection which must be closed first What is WebBrowser control called now? Manipulating controls created by another thread The below snippet does not work...anyone know how to reference a procedure? Form1.closing in VB2005??? Datagrid problem DateTime Getting an Object Properties value... Q: DataView with Table with large number of rows |
|||||||||||||||||||||||