Click here to Skip to main content
15,914,074 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: Calling C function in VB.net Pin
Guffa1-Feb-06 21:40
Guffa1-Feb-06 21:40 
GeneralRe: Calling C function in VB.net Pin
jpvillemagne1-Feb-06 23:10
jpvillemagne1-Feb-06 23:10 
GeneralRe: Calling C function in VB.net Pin
jpvillemagne1-Feb-06 23:14
jpvillemagne1-Feb-06 23:14 
QuestionUrgently required Pin
Osama12317-Jan-06 21:10
Osama12317-Jan-06 21:10 
AnswerRe: Urgently required Pin
Dave Kreskowiak18-Jan-06 4:13
mveDave Kreskowiak18-Jan-06 4:13 
QuestionHow do I add a custom icon to a WinForms DataGrid header row? Pin
nzmike17-Jan-06 21:09
nzmike17-Jan-06 21:09 
AnswerRe: How do I add a custom icon to a WinForms DataGrid header row? Pin
Dave Kreskowiak18-Jan-06 4:11
mveDave Kreskowiak18-Jan-06 4:11 
GeneralRe: How do I add a custom icon to a WinForms DataGrid header row? Pin
nzmike18-Jan-06 14:50
nzmike18-Jan-06 14:50 
Thanks Dave... that's what I suspected.

Since we don't have time to an "ownerdraw" solution what I've ended up doing is dynamically creating a button control and adding a click event for it which sets the DataGrid.Height property as required. The button is created Ok but the problem I'm having now is that it does not display over the top left hand corner of the DataGrid as I need it to - it's actually getting positioned in the right location but *under* the datagrid... how do I force the new button to display over the top of the DataGrid (ie: at position 0,0 in the caption)? Is there some sort of z-index as there is in HTML forms? (See the code below to see what I'm doing.)

Also, I want to be able to make the scrollbars in the grid non-visible when it collapses then re-show them when it expands - I guess it's the same problem where I'd need to draw/hide the scrollabrs myself by overriding the appropriate method or event in the DataGrid control - any thoughts on this? I don't believe there is any access to DataGrid scrollbars except via a custom DataGrid control but if you (or anyone else) knows how to do this I'd be grateful!

Cheers,

Mike

<br />
...<br />
            'NB: dg1 is my DataGrid<br />
            dg1.DataSource = _dataSet.Tables("customers")<br />
            dg1.CaptionText = "       Customers"  'Allow room for the collapse/expand button in the caption row.<br />
<br />
            'Now add the expand/collapse button dynamically over the left hadn top corner of the DataGrid.<br />
            Dim btnCollapse As New Button<br />
            btnCollapse.Height = 20<br />
            btnCollapse.Width = 20<br />
            btnCollapse.FlatStyle = FlatStyle.Flat<br />
            btnCollapse.Top = dg1.Top<br />
            btnCollapse.Left = dg1.Left<br />
            btnCollapse.Text = "-"<br />
            btnCollapse.BackColor = Color.AliceBlue<br />
            btnCollapse.ForeColor = Color.Navy<br />
            btnCollapse.Name = "btnCollapse"<br />
            btnCollapse.TabIndex = dg1.TabIndex + 1<br />
            AddHandler btnCollapse.Click, AddressOf Me.btnCollapse_Click<br />
            Me.Controls.Add(btnCollapse)<br />
...<br />
End Sub

GeneralRe: How do I add a custom icon to a WinForms DataGrid header row? Pin
Dave Kreskowiak18-Jan-06 15:46
mveDave Kreskowiak18-Jan-06 15:46 
GeneralRe: How do I add a custom icon to a WinForms DataGrid header row? Pin
nzmike18-Jan-06 17:54
nzmike18-Jan-06 17:54 
GeneralRe: How do I add a custom icon to a WinForms DataGrid header row? Pin
Dave Kreskowiak19-Jan-06 9:18
mveDave Kreskowiak19-Jan-06 9:18 
GeneralRe: How do I add a custom icon to a WinForms DataGrid header row? Pin
nzmike19-Jan-06 9:56
nzmike19-Jan-06 9:56 
QuestionCan we have Style Sheet in VB.net Pin
wEb GuRu...17-Jan-06 21:07
wEb GuRu...17-Jan-06 21:07 
AnswerRe: Can we have Style Sheet in VB.net Pin
Colin Angus Mackay17-Jan-06 23:20
Colin Angus Mackay17-Jan-06 23:20 
AnswerRe: Can we have Style Sheet in VB.net Pin
Dave Kreskowiak18-Jan-06 4:06
mveDave Kreskowiak18-Jan-06 4:06 
QuestionTextWidth Method Pin
Joy Anne17-Jan-06 20:43
Joy Anne17-Jan-06 20:43 
AnswerRe: TextWidth Method Pin
Joshua Quick17-Jan-06 21:06
Joshua Quick17-Jan-06 21:06 
GeneralRe: TextWidth Method Pin
Joshua Quick17-Jan-06 21:18
Joshua Quick17-Jan-06 21:18 
Questionmail prgram using VB Pin
Paritos17-Jan-06 19:02
Paritos17-Jan-06 19:02 
AnswerRe: mail prgram using VB Pin
Dave Kreskowiak18-Jan-06 4:03
mveDave Kreskowiak18-Jan-06 4:03 
QuestionSelecting Data From Datagrid On Mouse Click Pin
mayhem_rules17-Jan-06 18:41
mayhem_rules17-Jan-06 18:41 
AnswerRe: Selecting Data From Datagrid On Mouse Click Pin
mayhem_rules18-Jan-06 0:58
mayhem_rules18-Jan-06 0:58 
Questiongram..MAPI control Pin
Paritos17-Jan-06 18:40
Paritos17-Jan-06 18:40 
AnswerRe: gram..MAPI control Pin
Dave Kreskowiak18-Jan-06 3:53
mveDave Kreskowiak18-Jan-06 3:53 
QuestionmciSendString Pin
hmklakmal17-Jan-06 18:26
hmklakmal17-Jan-06 18:26 

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.