Click here to Skip to main content
15,897,273 members
Home / Discussions / Visual Basic
   

Visual Basic

 
Question[help] vb.net image resizing in picturebox Pin
Member 1169441315-May-15 15:19
Member 1169441315-May-15 15:19 
AnswerRe: [help] vb.net image resizing in picturebox Pin
Eddy Vluggen16-May-15 23:53
professionalEddy Vluggen16-May-15 23:53 
GeneralRe: [help] vb.net image resizing in picturebox Pin
Richard Andrew x6417-May-15 5:29
professionalRichard Andrew x6417-May-15 5:29 
GeneralRe: [help] vb.net image resizing in picturebox Pin
Eddy Vluggen17-May-15 6:36
professionalEddy Vluggen17-May-15 6:36 
QuestionCell painting in datagridview Pin
Helium9913-May-15 16:19
Helium9913-May-15 16:19 
AnswerRe: Cell painting in datagridview Pin
Eddy Vluggen15-May-15 6:26
professionalEddy Vluggen15-May-15 6:26 
GeneralRe: Cell painting in datagridview Pin
Helium9916-May-15 13:17
Helium9916-May-15 13:17 
GeneralRe: Cell painting in datagridview Pin
Eddy Vluggen16-May-15 23:50
professionalEddy Vluggen16-May-15 23:50 
Hi,

The first method only sets up a grid, and hooks up the paint-event. The second method would roughly translate to the code below;
VB
Shared ReadOnly rectSize As New Size(10, 10)

   Private Shared Sub dgv_CellPainting(sender As Object, e As DataGridViewCellPaintingEventArgs)
       e.Handled = False

       If 0 = e.ColumnIndex Then
           If -1 = e.RowIndex Then
               Return
           End If

           e.PaintBackground(e.CellBounds, DataGridViewElementStates.Selected = e.State)

           e.PaintContent(e.ClipBounds)

           e.Graphics.FillRectangle(Brushes.Red, New Rectangle(e.CellBounds.Location, rectSize))

           e.Handled = True
       End If
   End Sub
Bastard Programmer from Hell Suspicious | :suss:
If you can't read my code, try converting it here[^]

GeneralRe: Cell painting in datagridview Pin
Helium9917-May-15 14:03
Helium9917-May-15 14:03 
GeneralRe: Cell painting in datagridview Pin
Eddy Vluggen18-May-15 2:43
professionalEddy Vluggen18-May-15 2:43 
Questiongrouping is not working Pin
hussain54813-May-15 6:30
hussain54813-May-15 6:30 
AnswerRe: grouping is not working Pin
Dave Kreskowiak13-May-15 14:43
mveDave Kreskowiak13-May-15 14:43 
Question[RESOLVED] Can a COM port be reached by it's name or GUID Class ID instead of the COM Port name? Pin
SepPax13-May-15 1:12
SepPax13-May-15 1:12 
AnswerRe: Can a COM port be reached by it's name or GUID Class ID instead of the COM Port name? Pin
Richard Andrew x6413-May-15 5:48
professionalRichard Andrew x6413-May-15 5:48 
GeneralRe: Can a COM port be reached by it's name or GUID Class ID instead of the COM Port name? Pin
SepPax13-May-15 10:28
SepPax13-May-15 10:28 
GeneralRe: Can a COM port be reached by it's name or GUID Class ID instead of the COM Port name? Pin
Tim Carmichael14-May-15 2:34
Tim Carmichael14-May-15 2:34 
Answer[Resolved] Can a COM port be reached by it's name or GUID Class ID instead of the COM Port name? Pin
SepPax16-May-15 5:52
SepPax16-May-15 5:52 
QuestionDataGridView selection and focus Pin
Kenny-A11-May-15 11:34
Kenny-A11-May-15 11:34 
QuestionSerial data receive routing Pin
SepPax11-May-15 7:18
SepPax11-May-15 7:18 
AnswerRe: Serial data receive routing Pin
Richard MacCutchan11-May-15 7:38
mveRichard MacCutchan11-May-15 7:38 
GeneralRe: Serial data receive routing Pin
SepPax11-May-15 10:07
SepPax11-May-15 10:07 
GeneralRe: Serial data receive routing Pin
Sascha Lefèvre11-May-15 10:24
professionalSascha Lefèvre11-May-15 10:24 
GeneralRe: Serial data receive routing Pin
SepPax11-May-15 20:42
SepPax11-May-15 20:42 
GeneralRe: Serial data receive routing Pin
Richard MacCutchan11-May-15 21:12
mveRichard MacCutchan11-May-15 21:12 
GeneralRe: Serial data receive routing Pin
SepPax12-May-15 1:56
SepPax12-May-15 1:56 

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.