Click here to Skip to main content
15,900,589 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: Using Directory.GetFiles() WITH multiple extensions AND sort order Pin
Eddy Vluggen2-Sep-13 3:16
professionalEddy Vluggen2-Sep-13 3:16 
QuestionHow to Run charmap.exe with a chosen font? Pin
Alan Burkhart31-Aug-13 1:41
Alan Burkhart31-Aug-13 1:41 
AnswerRe: How to Run charmap.exe with a chosen font? Pin
Dave Kreskowiak31-Aug-13 3:13
mveDave Kreskowiak31-Aug-13 3:13 
GeneralRe: How to Run charmap.exe with a chosen font? Pin
Alan Burkhart31-Aug-13 6:01
Alan Burkhart31-Aug-13 6:01 
GeneralRe: How to Run charmap.exe with a chosen font? Pin
Dave Kreskowiak31-Aug-13 8:27
mveDave Kreskowiak31-Aug-13 8:27 
AnswerRe: How to Run charmap.exe with a chosen font? Pin
TnTinMn2-Sep-13 5:52
TnTinMn2-Sep-13 5:52 
AnswerRe: How to Run charmap.exe with a chosen font? Pin
Marco Bertschi3-Sep-13 4:30
protectorMarco Bertschi3-Sep-13 4:30 
QuestionRandom Generator not Generating Pin
Zyndell29-Aug-13 9:55
Zyndell29-Aug-13 9:55 
I build random character, plot, etc. generators for my fiction writing. I've learned the basics and have been trying to expand. Unable to get a Designer back to Design, I scrapped a major project that I couldn't continue. I than snagged part of the code that worked in that project, in the exact same way, but will not work in the new project. (I would also love to know how to get Designer back to Design as that's eaten multiple projects.)

I click a "Name" button on Form2. Form3 is a pop up with 4 checkbox and a "close" button. The "close button" works. The checkbox to random line selection to Form2 textbox does not work.

Male.txt (which is male names) is in the Debug folder. It has a lengthy name list.

In the original version, I clicked the box, it automatically generated a line from the file which appeared in the appropriate txtbox. In the new version, nothing happens.

VB
Private Sub CheckBox1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox1.CheckedChanged
        If CheckBox1.CheckState = 1 Then

            Male()

        End If
    End Sub
    Sub Male()
        Dim randomnum As New Random()
        Dim RandomNumber As Integer
        Dim lines = IO.File.ReadAllLines("Male.txt")
        RandomNumber = randomnum.Next(0, UBound(lines))

        Form2.TextBox1.Text = (lines(RandomNumber))
    End Sub

        End If
    End Sub

SuggestionRe: Random Generator not Generating Pin
Richard MacCutchan29-Aug-13 21:17
mveRichard MacCutchan29-Aug-13 21:17 
AnswerRe: Random Generator not Generating Pin
Dave Kreskowiak30-Aug-13 2:52
mveDave Kreskowiak30-Aug-13 2:52 
AnswerRe: Random Generator not Generating Pin
Zyndell30-Aug-13 7:48
Zyndell30-Aug-13 7:48 
GeneralRe: Random Generator not Generating Pin
Dave Kreskowiak30-Aug-13 12:45
mveDave Kreskowiak30-Aug-13 12:45 
GeneralRe: Random Generator not Generating Pin
Zyndell30-Aug-13 15:03
Zyndell30-Aug-13 15:03 
AnswerRe: Random Generator not Generating Pin
Zyndell2-Sep-13 15:46
Zyndell2-Sep-13 15:46 
GeneralRe: Random Generator not Generating Pin
Dave Kreskowiak2-Sep-13 16:35
mveDave Kreskowiak2-Sep-13 16:35 
GeneralRe: Random Generator not Generating Pin
GuyThiebaut2-Sep-13 22:13
professionalGuyThiebaut2-Sep-13 22:13 
GeneralRe: Random Generator not Generating Pin
Zyndell3-Sep-13 4:17
Zyndell3-Sep-13 4:17 
GeneralRe: Random Generator not Generating Pin
GuyThiebaut3-Sep-13 4:24
professionalGuyThiebaut3-Sep-13 4:24 
GeneralRe: Random Generator not Generating Pin
Zyndell3-Sep-13 18:42
Zyndell3-Sep-13 18:42 
GeneralRe: Random Generator not Generating Pin
GuyThiebaut3-Sep-13 20:18
professionalGuyThiebaut3-Sep-13 20:18 
QuestionVB6 Datagrid Pin
jayadewa10027-Aug-13 19:52
jayadewa10027-Aug-13 19:52 
AnswerRe: VB6 Datagrid Pin
Richard MacCutchan27-Aug-13 21:01
mveRichard MacCutchan27-Aug-13 21:01 
GeneralRe: VB6 Datagrid Pin
jayadewa10027-Aug-13 21:25
jayadewa10027-Aug-13 21:25 
GeneralRe: VB6 Datagrid Pin
Richard MacCutchan27-Aug-13 21:51
mveRichard MacCutchan27-Aug-13 21:51 
AnswerRe: VB6 Datagrid Pin
Dave Kreskowiak28-Aug-13 2:19
mveDave Kreskowiak28-Aug-13 2:19 

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.