Click here to Skip to main content
15,903,388 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: How to put file in file? [Not Compress] Pin
Colin Angus Mackay23-Apr-09 12:39
Colin Angus Mackay23-Apr-09 12:39 
GeneralRe: How to put file in file? [Not Compress] Pin
Stylus VB23-Apr-09 23:29
Stylus VB23-Apr-09 23:29 
GeneralRe: How to put file in file? [Not Compress] Pin
Johan Hakkesteegt23-Apr-09 23:56
Johan Hakkesteegt23-Apr-09 23:56 
GeneralRe: How to put file in file? [Not Compress] Pin
Stylus VB24-Apr-09 0:46
Stylus VB24-Apr-09 0:46 
GeneralRe: How to put file in file? [Not Compress] Pin
Johan Hakkesteegt24-Apr-09 1:02
Johan Hakkesteegt24-Apr-09 1:02 
QuestionNeeded help on setting withevents property for combobox. Pin
the_amol23-Apr-09 4:54
the_amol23-Apr-09 4:54 
AnswerRe: Needed help on setting withevents property for combobox. Pin
Henry Minute23-Apr-09 12:09
Henry Minute23-Apr-09 12:09 
GeneralRe: Needed help on setting withevents property for combobox. Pin
the_amol23-Apr-09 22:44
the_amol23-Apr-09 22:44 
Thanks henry for your prompt reply...and problem got solved..and the modified code is as followed...
Public Class frmTableDetails
    Dim txtboxTableName As New TextBox()
    Dim chkPrimKey As New CheckBox()
    Dim lblTableName As New Label
    Dim lblNumCol As New Label
    Friend comboNumCol As New ComboBox
    Dim numTable As Integer, i As Integer, vertPosVal As Integer, j As Integer
    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        numTable = frmSchemaSetting.comboxNumTable.Text
        Me.MdiParent = frmMain
        vertPosVal = 25
        For i = 1 To numTable
            lblTableName = New Label
            lblTableName.Name = "lblTableName" & i
            Me.Controls.Add(lblTableName)
            lblTableName.Text = "Table Name " & i
            lblTableName.Location = New Point(20, vertPosVal)

            txtboxTableName = New TextBox
            txtboxTableName.Name = "txtboxTableName" & i
            Me.Controls.Add(txtboxTableName)
            txtboxTableName.Location = New Point(100, vertPosVal)
            txtboxTableName.Height = 20
            txtboxTableName.Width = 197

            lblNumCol = New Label
            lblNumCol.Name = "lblNumCol" & i
            Me.Controls.Add(lblNumCol)
            lblNumCol.Text = "Number of Columns "
            lblNumCol.Location = New Point(305, vertPosVal)

            comboNumCol = New ComboBox
            comboNumCol.Name = "comboNumCol" & i
            AddHandler comboNumCol.SelectedIndexChanged, AddressOf  MyComboBox_SelectedIndexChanged
            Me.Controls.Add(comboNumCol)
            comboNumCol.Location = New Point(405, vertPosVal)
            comboNumCol.DropDownStyle = ComboBoxStyle.DropDownList
            For j = 1 To 30
                comboNumCol.Items.Add(j)
            Next
            vertPosVal = vertPosVal + 25
        Next
    End Sub
    Public Sub MyComboBox_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs)
        MessageBox.Show(CType(sender, ComboBox).SelectedItem)
        frmColumnDetails.Show()
    End Sub
End Class



but now there comes another problem that when in the next form i am trying to read the value selected in combobox, it is giving error and i am stuck.. below is the code...continued from my last code...now "numcolumn = frmTableDetails.comboNumCol.Text" giving error at runtime that string to integr conversion not permitted.. but in my las code which u already read, same code is working fine i.e. "numTable = frmSchemaSetting.comboxNumTable.Text".. i don't know what is the issue, as the selected value from combobox will create further textboxes in my current form dynamically.. please help me..


Public Class frmColumnDetails
    Dim txtboxTableName As New TextBox()
    Dim chkPrimKey As New CheckBox()
    Dim lblTableName As New Label
    Dim vertPosVal As Integer, i As Integer, numcolumn As Integer
    Private Sub frmColumnDetails_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        numcolumn = frmTableDetails.comboNumCol.Text
        MsgBox(numcolumn)
        For i = 1 To numcolumn
            lblTableName = New Label
            lblTableName.Name = "lblTableName" & i
            Me.Controls.Add(lblTableName)
            lblTableName.Text = "Table Name " & i
            lblTableName.Location = New Point(20, vertPosVal)

            txtboxTableName = New TextBox
            txtboxTableName.Name = "txtboxTableName" & i
            Me.Controls.Add(txtboxTableName)
            txtboxTableName.Location = New Point(100, vertPosVal)
            txtboxTableName.Height = 20
            txtboxTableName.Width = 197

            chkPrimKey = New CheckBox
            chkPrimKey.Name = "chkPrimKey" & i
            Me.Controls.Add(chkPrimKey)
            chkPrimKey.Location = New Point(305, vertPosVal)
            chkPrimKey.Text = "Primary Key"
            vertPosVal = vertPosVal + 25
        Next
    End Sub
End Class

QuestionQuerying Access back end database with wildcard Pin
Solo123-Apr-09 4:49
Solo123-Apr-09 4:49 
AnswerRe: Querying Access back end database with wildcard Pin
Eddy Vluggen23-Apr-09 4:58
professionalEddy Vluggen23-Apr-09 4:58 
GeneralRe: Querying Access back end database with wildcard Pin
Alex Tory23-Apr-09 5:57
Alex Tory23-Apr-09 5:57 
GeneralRe: Querying Access back end database with wildcard Pin
Eddy Vluggen23-Apr-09 6:07
professionalEddy Vluggen23-Apr-09 6:07 
GeneralRe: Querying Access back end database with wildcard Pin
Solo123-Apr-09 11:41
Solo123-Apr-09 11:41 
AnswerRe: Querying Access back end database with wildcard Pin
Kschuler23-Apr-09 6:14
Kschuler23-Apr-09 6:14 
GeneralRe: Querying Access back end database with wildcard Pin
Solo123-Apr-09 11:36
Solo123-Apr-09 11:36 
QuestionHow can i use printf() o cout in MFC Pin
johnjitu23-Apr-09 4:33
johnjitu23-Apr-09 4:33 
AnswerRe: How can i use printf() o cout in MFC Pin
Eddy Vluggen23-Apr-09 4:44
professionalEddy Vluggen23-Apr-09 4:44 
AnswerRe: How can i use printf() o cout in MFC Pin
Yusuf23-Apr-09 5:07
Yusuf23-Apr-09 5:07 
AnswerRe: How can i use printf() o cout in MFC Pin
Christian Graus23-Apr-09 10:24
protectorChristian Graus23-Apr-09 10:24 
GeneralRe: How can i use printf() o cout in MFC Pin
Luc Pattyn23-Apr-09 10:47
sitebuilderLuc Pattyn23-Apr-09 10:47 
GeneralRe: How can i use printf() o cout in MFC Pin
Johan Hakkesteegt23-Apr-09 23:04
Johan Hakkesteegt23-Apr-09 23:04 
QuestionPictureBox Imgage Processing Pin
M_Naeem22-Apr-09 19:43
M_Naeem22-Apr-09 19:43 
AnswerRe: PictureBox Imgage Processing Pin
Christian Graus22-Apr-09 23:12
protectorChristian Graus22-Apr-09 23:12 
QuestionHangman Game Pin
elindel22-Apr-09 17:03
elindel22-Apr-09 17:03 
AnswerRe: Hangman Game Pin
Christian Graus22-Apr-09 17:05
protectorChristian Graus22-Apr-09 17:05 

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.