Click here to Skip to main content
15,921,279 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: how to close entire system properly? Pin
FeRtoll28-Mar-06 4:55
FeRtoll28-Mar-06 4:55 
GeneralRe: how to close entire system properly? Pin
campbells28-Mar-06 5:54
campbells28-Mar-06 5:54 
GeneralRe: how to close entire system properly? Pin
FeRtoll28-Mar-06 9:31
FeRtoll28-Mar-06 9:31 
QuestionRemove the last "add line" from Datagrid Pin
Izak -28-Mar-06 2:22
Izak -28-Mar-06 2:22 
AnswerRe: Remove the last "add line" from Datagrid Pin
Dean_SF29-Mar-06 4:15
Dean_SF29-Mar-06 4:15 
QuestionMedia File Cutting and Trimming Pin
shreyash_parihar28-Mar-06 2:05
shreyash_parihar28-Mar-06 2:05 
QuestionHotkey Tab Control Pin
paas28-Mar-06 1:14
paas28-Mar-06 1:14 
AnswerRe: Hotkey Tab Control Pin
paas3-Apr-06 1:52
paas3-Apr-06 1:52 
Well, I'm not so embarassed anymore since the solution to my issue is a little trickier than I first imagined. At any rate, in case anyone is ever interested, the class below will create a tab control that can be hot-keyed.

Public Class MnemonicTabControl
Inherits TabControl

Public Sub New()

Me.DrawMode = TabDrawMode.OwnerDrawFixed
End Sub

Protected Overrides Function ProcessMnemonic(ByVal charCode As Char) As Boolean
Dim i As Integer

For i = 0 To TabPages.Count
If (Control.IsMnemonic(charCode, TabPages.Item(i).Text)) Then
Me.SelectedTab = TabPages.Item(i)
Me.Focus()
Return True
End If
Next i
Return False
End Function

Protected Overrides Sub OnDrawItem(ByVal e As DrawItemEventArgs)
MyBase.OnDrawItem(e)
Dim g As Graphics
g = e.Graphics
Dim sf As StringFormat
sf = New StringFormat()
With sf
.HotkeyPrefix = Drawing.Text.HotkeyPrefix.Show
.LineAlignment = StringAlignment.Center
.Alignment = StringAlignment.Center
End With
g.DrawString(Me.TabPages(e.Index).Text, Me.Font, SystemBrushes.WindowText, Me.GetTabRect(e.Index), sf)
End Sub
End Class
QuestionMethod Of Object failed Pin
zubair_ahmed27-Mar-06 21:51
zubair_ahmed27-Mar-06 21:51 
Questionproblem when open image from file Pin
campbells27-Mar-06 21:29
campbells27-Mar-06 21:29 
AnswerRe: problem when open image from file Pin
Swammingo27-Mar-06 22:38
Swammingo27-Mar-06 22:38 
AnswerRe: problem when open image from file Pin
Chatura Dilan27-Mar-06 22:45
Chatura Dilan27-Mar-06 22:45 
GeneralRe: problem when open image from file Pin
campbells28-Mar-06 2:22
campbells28-Mar-06 2:22 
GeneralRe: problem when open image from file Pin
Chatura Dilan28-Mar-06 14:12
Chatura Dilan28-Mar-06 14:12 
Questionhow can i format to DateTime value in Datagrid? Pin
tetra_thlaing27-Mar-06 21:15
tetra_thlaing27-Mar-06 21:15 
AnswerRe: how can i format to DateTime value in Datagrid? Pin
Macky10027-Mar-06 22:40
Macky10027-Mar-06 22:40 
GeneralRe: how can i format to DateTime value in Datagrid? Pin
tetra_thlaing27-Mar-06 23:19
tetra_thlaing27-Mar-06 23:19 
GeneralRe: how can i format to DateTime value in Datagrid? Pin
Macky10028-Mar-06 1:32
Macky10028-Mar-06 1:32 
QuestionERROR LIST Pin
skandaapriya27-Mar-06 20:30
skandaapriya27-Mar-06 20:30 
AnswerRe: ERROR LIST Pin
Guffa27-Mar-06 22:21
Guffa27-Mar-06 22:21 
QuestionCan't assign recordset to datgrid in vb6 Pin
chitradash27-Mar-06 20:07
chitradash27-Mar-06 20:07 
QuestionInstalling window service-2 Pin
nitin_ion27-Mar-06 19:51
nitin_ion27-Mar-06 19:51 
QuestionTo get current week nr? is this wrong? Pin
Snowjim27-Mar-06 19:21
Snowjim27-Mar-06 19:21 
AnswerRe: To get current week nr? is this wrong? Pin
Snowjim27-Mar-06 20:18
Snowjim27-Mar-06 20:18 
AnswerRe: To get current week nr? is this wrong? Pin
Guffa27-Mar-06 21:33
Guffa27-Mar-06 21:33 

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.