Click here to Skip to main content
15,886,724 members
Home / Discussions / Visual Basic
   

Visual Basic

 
Questionhow to deal with this error Pin
Member 145002187-Jul-19 22:09
Member 145002187-Jul-19 22:09 
NewsRe: how to deal with this error Pin
CHill608-Jul-19 1:45
mveCHill608-Jul-19 1:45 
AnswerRe: how to deal with this error Pin
Dave Kreskowiak8-Jul-19 2:11
mveDave Kreskowiak8-Jul-19 2:11 
Questionemail a attached file vb.net Pin
Member 145002187-Jul-19 21:00
Member 145002187-Jul-19 21:00 
AnswerRe: email a attached file vb.net Pin
Chris Quinn8-Jul-19 0:58
Chris Quinn8-Jul-19 0:58 
GeneralRe: email a attached file vb.net Pin
Member 145002188-Jul-19 23:15
Member 145002188-Jul-19 23:15 
AnswerRe: email a attached file vb.net Pin
Dave Kreskowiak8-Jul-19 2:12
mveDave Kreskowiak8-Jul-19 2:12 
QuestionUsing a custom renderer for toolstrip, but only first button is properly painted Pin
Alan Burkhart5-Jul-19 5:53
Alan Burkhart5-Jul-19 5:53 
I'm using ToolStripProfessionalRenderer to customize a toolstrip. The toolstrip buttons are generated programmatically as needed. The program starts with three buttons. I'm using a LinearGradientBrush to paint the ToolStripButtons, but only the first one (left) gets the gradient. Using the renderer is new to me, so I'm probably missing something obvious.

VB
Private Sub menuRndr_RenderButtonBackground _
		(sender As Object, e As ToolStripItemRenderEventArgs) _
		Handles Me.RenderButtonBackground
		Try
			If e.ToolStrip.Equals(main.tabs) Then
				Dim p As New Pen(Brushes.Black, 1)

				Dim lgb As New LinearGradientBrush(e.Item.Bounds,
												   Color.SteelBlue,
												   Color.WhiteSmoke,
												   LinearGradientMode.Vertical)

				e.Graphics.FillRectangle(lgb, e.Item.Bounds)

				e.Graphics.DrawRectangle(p,
										 New Rectangle(New Point(e.Item.Bounds.Left, e.Item.Bounds.Top),
													   New Size(e.Item.Bounds.Width, e.Item.Bounds.Height)))
			End If
			MyBase.OnRenderItemBackground(e)
		Catch ex As Exception
			MsgBox(ex.ToString)
		End Try
	End Sub

Sometimes the true reward for completing a task is not the money, but instead the satisfaction of a job well done. But it's usually the money.

QuestionMDI Child form background transparent Pin
smdoss2-Jul-19 4:01
smdoss2-Jul-19 4:01 
SuggestionRe: MDI Child form background transparent Pin
Maciej Los2-Jul-19 5:37
mveMaciej Los2-Jul-19 5:37 
RantRe: MDI Child form background transparent Pin
Richard Deeming2-Jul-19 5:38
mveRichard Deeming2-Jul-19 5:38 
QuestionInput string was not in a correct format. error message Pin
IC0D330-Jun-19 7:47
IC0D330-Jun-19 7:47 
AnswerRe: Input string was not in a correct format. error message Pin
Dave Kreskowiak30-Jun-19 8:03
mveDave Kreskowiak30-Jun-19 8:03 
AnswerRe: Input string was not in a correct format. error message Pin
Maciej Los30-Jun-19 9:54
mveMaciej Los30-Jun-19 9:54 
QuestionUsing static library in Visual Basic Pin
Member 1451037923-Jun-19 23:05
Member 1451037923-Jun-19 23:05 
AnswerRe: Using static library in Visual Basic Pin
Dave Kreskowiak24-Jun-19 12:18
mveDave Kreskowiak24-Jun-19 12:18 
Questionretrieval of XML information & Copy to excel Files Pin Pin
Member 1450608920-Jun-19 13:29
Member 1450608920-Jun-19 13:29 
AnswerRe: retrieval of XML information & Copy to excel Files Pin Pin
Richard Deeming21-Jun-19 1:07
mveRichard Deeming21-Jun-19 1:07 
QuestionProblem cropping an image. SOLVED Pin
mo14928-Jun-19 6:07
mo14928-Jun-19 6:07 
AnswerRe: Problem cropping an image. more info Pin
mo14928-Jun-19 9:46
mo14928-Jun-19 9:46 
GeneralRe: Problem cropping an image. more info Pin
Dave Kreskowiak8-Jun-19 16:29
mveDave Kreskowiak8-Jun-19 16:29 
GeneralRe: Problem cropping an image. more info Pin
mo14928-Jun-19 23:34
mo14928-Jun-19 23:34 
AnswerRe: Problem cropping an image. Pin
Gerry Schmitz8-Jun-19 12:05
mveGerry Schmitz8-Jun-19 12:05 
QuestionHow using reflection invoke when method wants a specific object type Pin
Member 85736427-Jun-19 4:45
Member 85736427-Jun-19 4:45 
AnswerRe: How using reflection invoke when method wants a specific object type Pin
Richard Deeming7-Jun-19 4:53
mveRichard Deeming7-Jun-19 4:53 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.