Click here to Skip to main content
15,885,032 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: Custom ContextMenu for TextBox doesn't disable items when necessary Pin
Eddy Vluggen19-May-15 0:12
professionalEddy Vluggen19-May-15 0:12 
AnswerRe: Custom ContextMenu for TextBox doesn't disable items when necessary Pin
Richard MacCutchan19-May-15 0:12
mveRichard MacCutchan19-May-15 0:12 
GeneralRe: Custom ContextMenu for TextBox doesn't disable items when necessary Pin
satc19-May-15 6:40
satc19-May-15 6:40 
GeneralRe: Custom ContextMenu for TextBox doesn't disable items when necessary Pin
Richard MacCutchan19-May-15 7:25
mveRichard MacCutchan19-May-15 7:25 
GeneralRe: Custom ContextMenu for TextBox doesn't disable items when necessary Pin
Sascha Lefèvre19-May-15 7:52
professionalSascha Lefèvre19-May-15 7:52 
GeneralRe: Custom ContextMenu for TextBox doesn't disable items when necessary Pin
satc19-May-15 19:03
satc19-May-15 19:03 
GeneralRe: Custom ContextMenu for TextBox doesn't disable items when necessary Pin
Richard Deeming20-May-15 1:11
mveRichard Deeming20-May-15 1:11 
AnswerRe: Custom ContextMenu for TextBox doesn't disable items when necessary Pin
Terry Dieckmann20-May-15 2:20
Terry Dieckmann20-May-15 2:20 
Hey,

I don't know if you mean you want a code example for disabling the buttons in your Context Menu or your code doesn't work.

If your code doesn't work as it suppose to do just try this (after you disabled for example a button in your context menu):
VB
YourControlName.Refresh


If you mean that you don't have a code, I have a good example.

VB
Private Sub EditPaste_Click(sender As Object, e As EventArgs) Handles EditPaste.Click

        Dim iData As IDataObject = Clipboard.GetDataObject()

        If iData.GetDataPresent(DataFormats.Text) Then

            TextEditorBox.SelectedText = CType(iData.GetData(DataFormats.Text), String)
 
        End If

    End Sub

    Private Sub EditCut_Click(sender As Object, e As EventArgs) Handles EditCut.Click

        If TextEditorBox.SelectedText <> "" Then

            Clipboard.SetText(TextEditorBox.SelectedText)

            TextEditorBox.SelectedText = ""

        Else

            MsgBox("Nothing selected")

        End If

    End Sub

    Private Sub EditCopy_Click(sender As Object, e As EventArgs) Handles EditCopy.Click

        If TextEditorBox.SelectedText <> "" Then

            Clipboard.SetText(TextEditorBox.SelectedText)

        Else

            MsgBox("Nothing selected")

        End If

    End Sub


Hopefully your question is awnsered Smile | :)
QuestionVB.net code created by conversion from a working c# code doesn't work Pin
satc18-May-15 23:26
satc18-May-15 23:26 
AnswerRe: VB.net code created by conversion from a working c# code doesn't work Pin
Duncan Edwards Jones18-May-15 23:32
professionalDuncan Edwards Jones18-May-15 23:32 
QuestionCombobox not (re)loading the Datasource Pin
SepPax18-May-15 6:11
SepPax18-May-15 6:11 
QuestionHow to Upload/preview excel sheet file to Datagridview Control Pin
Urassa, Octallon18-May-15 4:00
professionalUrassa, Octallon18-May-15 4:00 
GeneralRe: How to Upload/preview excel sheet file to Datagridview Control Pin
Sascha Lefèvre18-May-15 4:25
professionalSascha Lefèvre18-May-15 4:25 
AnswerRe: How to Upload/preview excel sheet file to Datagridview Control Pin
Richard MacCutchan18-May-15 4:43
mveRichard MacCutchan18-May-15 4:43 
QuestionApplication fail to close when a control created in runtime is used Pin
satc17-May-15 23:53
satc17-May-15 23:53 
GeneralRe: Application fail to close when a control created in runtime is used Pin
Sascha Lefèvre18-May-15 2:22
professionalSascha Lefèvre18-May-15 2:22 
GeneralRe: Application fail to close when a control created in runtime is used Pin
satc18-May-15 7:11
satc18-May-15 7:11 
GeneralRe: Application fail to close when a control created in runtime is used Pin
Sascha Lefèvre18-May-15 7:53
professionalSascha Lefèvre18-May-15 7:53 
GeneralRe: Application fail to close when a control created in runtime is used Pin
satc18-May-15 17:08
satc18-May-15 17:08 
QuestionRe: Application fail to close when a control created in runtime is used Pin
Eddy Vluggen19-May-15 0:08
professionalEddy Vluggen19-May-15 0:08 
AnswerRe: Application fail to close when a control created in runtime is used Pin
satc19-May-15 6:41
satc19-May-15 6:41 
GeneralRe: Application fail to close when a control created in runtime is used Pin
Sascha Lefèvre19-May-15 8:46
professionalSascha Lefèvre19-May-15 8:46 
GeneralRe: Application fail to close when a control created in runtime is used Pin
satc19-May-15 8:55
satc19-May-15 8:55 
Question/ Pin
LA8888817-May-15 7:00
LA8888817-May-15 7:00 
GeneralRe: Asking advice for IO.File.ReadAllLines Pin
PIEBALDconsult17-May-15 7:07
mvePIEBALDconsult17-May-15 7:07 

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.