<?xml version="1.0" encoding="ISO-8859-1"?>

<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/">
	<channel>
		<title>DevX.com Forums</title>
		<link>http://forums.devx.com</link>
		<description>DevX discussion forum for questions and answers on technical topics for developers.</description>
		<language>en</language>
		<lastBuildDate>Wed, 16 May 2012 20:11:56 GMT</lastBuildDate>
		<generator>vBulletin</generator>
		<ttl>60</ttl>
		<image>
			<url>http://forums.devx.com/images/misc/rss.jpg</url>
			<title>DevX.com Forums</title>
			<link>http://forums.devx.com</link>
		</image>
		<item>
			<title>VS8 trouble with SELECT statement in Access 2007</title>
			<link>http://forums.devx.com/showthread.php?t=176201&amp;goto=newpost</link>
			<pubDate>Mon, 14 May 2012 00:09:00 GMT</pubDate>
			<description><![CDATA[I have tried everything I can to get beyond this error which shows below as &#8216;<<<<< error here.  It is trying to fill a dataset from a data adapter. If I change the SELECT statement to just &#8216;SELECT * FROM xTable&#8217; I get the correct number of records in each table.  But anytime I try with a more complex statement I get the error message shown below which indicates System.Data.Common.DbDataAdapter.Fill(DataSet dataSet.   I&#8217;ve completely erased all data and entered a new set of test data so I know there is no problem with relationships.  Each table has primary key which is foreign key in other table. 
There has to be something wrong with the Imports section or something:

Code:
---------
Imports System

Imports System.Data
Imports System.Data.OleDb
Imports System.Data.SqlClient

Imports System.Drawing
Imports System.Windows.Forms
Imports System.Guid

Imports Infragistics.Win
Imports Infragistics.Win.UltraWinToolTip

Imports Janus.Windows.GridEX
---------
This same code runs in a different program from Visual Studio 8 to an Access 2000 database. This database is Access 2007 Database (Access 2000 file format).   I can not interpret the error message let alone figure out why I can&#8217;t get a relational SELECT statement to work in this format but will work in Access 2000.  What am I not setting properly?  Do I need to define in code a primary key for the relationships.  I thought from TRYING to read MSDN help that the dataadapter automatically generates one if it is missing, but again each table has a primary key.    

Code:
---------
Private Function LoadgriPrices() As Boolean
        ' ******************************************************************************
        ' Description:  Load the GridEx for PRICES  
        ' Created by:        LMarshall
        ' Memo: Can be loaded from several choices made in the grbSearchItem    
        ' &#167;&#167;&#167;&#167;&#167;&#167;&#167;&#167;&#167;&#167;&#167;&#167;&#167;  Copyright (c) 2012 dbf  All Rights Reserved &#167;&#167;&#167;&#167;&#167;&#167;&#167;&#167;&#167;&#167;&#167;&#167;&#167;
        ' ******************************************************************************
        Try
            gblConn = New OleDbConnection(QponConnStr)
            Dim dagexLoad As New OleDbDataAdapter
            Dim dsgexLoad As New DataSet
            Dim recCount As Integer 'Tracks the number of records in the dataset dsgexLoad

            Dim mySelectQuery As String = "SELECT i.ItemsID, c.Category,  s.SubCategory, " _
                & "i.Maker, i.ItemName, i.Measure, i.Size " _
                & "FROM (Categories AS c INNER JOIN SubCategory AS s ON c.CategoriesID=s.CategoriesID) " _
                & "INNER JOIN Items AS i ON s.SubCategoryID=i.SubCategoryID;"

            Dim myConnection As New OleDbConnection(QponConnStr)
            Dim myCommand As New OleDbCommand(mySelectQuery, myConnection)
            myConnection.Open()
            dagexLoad.SelectCommand = myCommand
            dagexLoad.Fill(dsgexLoad) &#8216;<<<<< error here

            If Not dsgexLoad.Tables(0).Rows.Count > 0 Then
MessageBox.Show("There were no results found.", "No Results Found", MessageBoxButtons.OK, MessageBoxIcon.Exclamation)
                Return False
                Exit Function
            Else
                recCount = dsgexLoad.Tables(0).Rows.Count
                griPrices.BoundMode = Janus.Windows.GridEX.BoundMode.Unbound 'allows us to use it in AddItem mode
                griPrices.KeepRowSettings = True 'keeps settings same when row scrolls out of sight
                Dim dstbl As New DataTable
                Dim Row As DataRow
                Dim rowNdx As Integer
                rowNdx = 0 'Set to zero index value for the DataTable tbl
                dagexLoad.Fill(dstbl)
                For Each Row In dstbl.Rows
                    Dim gexRow As GridEXRow
                    gexRow = griPrices.AddItem()
                    gexRow.BeginEdit()
                    If rowNdx = recCount Then
                        Exit For
                    End If
                    gexRow.Cells.Item("ItemsID").Value = dsgexLoad.Tables(0).Rows(rowNdx)("ItemsID").ToString()
                    gexRow.Cells.Item("Category").Value = dsgexLoad.Tables(0).Rows(rowNdx)("Category").ToString()
                    gexRow.Cells.Item("SubCategory").Value = dsgexLoad.Tables(0).Rows(rowNdx)("SubCategory").ToString()
                    gexRow.Cells.Item("Maker").Value = dsgexLoad.Tables(0).Rows(rowNdx)("Maker").ToString()
                    gexRow.Cells.Item("ItemName").Value = dsgexLoad.Tables(0).Rows(rowNdx)("ItemName").ToString()
                    gexRow.Cells.Item("Measure").Value = dsgexLoad.Tables(0).Rows(rowNdx)("Measure").ToString()
                    gexRow.Cells.Item("Size").Value = dsgexLoad.Tables(0).Rows(rowNdx)("Size").ToString()

                    gexRow.EndEdit()
                    rowNdx = rowNdx + 1 'keep track of where we are at
                Next
            End If

        Catch ex As Exception
            'Some kind of error occurred-display on screen. v2 will write to a log file
            MsgBox(ex.ToString)
        End Try
        Return True
    End Function
---------
{"IErrorInfo.GetDescription failed with E_FAIL(0x80004005)."}
    System.Data.OleDb.OleDbException: {"IErrorInfo.GetDescription failed with E_FAIL(0x80004005)."}
    Data: {System.Collections.ListDictionaryInternal}
    HelpLink: Nothing
    InnerException: Nothing
    Message: "IErrorInfo.GetDescription failed with E_FAIL(0x80004005)."
    Source: "System.Data"
    StackTrace: "   at System.Data.OleDb.OleDbCommand.ExecuteCommandTextErrorHandling(OleDbHResult hr)    at System.Data.OleDb.OleDbCommand.ExecuteCommandTextForSingleResult(tagDBPARAMS dbParams, Object& executeResult)    at System.Data.OleDb.OleDbCommand.ExecuteCommandText(Object& executeResult)    at System.Data.OleDb.OleDbCommand.ExecuteCommand(CommandBehavior behavior, Object& executeResult)    at System.Data.OleDb.OleDbCommand.ExecuteReaderInternal(CommandBehavior behavior, String method)    at System.Data.OleDb.OleDbCommand.ExecuteReader(CommandBehavior behavior)    at System.Data.OleDb.OleDbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior)    at System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)    at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behav
ior)    at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet)    at QPon.Pricing.LoadgriPrices() in C:\QPon\QPon\QPon\Pricing.vb:line 129"
    TargetSite: {System.Reflection.RuntimeMethodInfo}

I am sorry for the length of this post but I felt it necessary to show as much as possible.  I appreciate any guidance to where my problem may be.  thank you]]></description>
			<content:encoded><![CDATA[<div>I have tried everything I can to get beyond this error which shows below as <font color="Red">&#8216;&lt;&lt;&lt;&lt;&lt; error here</font>.  It is trying to fill a dataset from a data adapter. If I change the SELECT statement to just &#8216;SELECT * FROM xTable&#8217; I get the correct number of records in each table.  But anytime I try with a more complex statement I get the error message shown below which indicates <font color="Red">System.Data.Common.DbDataAdapter.Fill(DataSet dataSet</font>.   I&#8217;ve completely erased all data and entered a new set of test data so I know there is no problem with relationships.  Each table has primary key which is foreign key in other table. <br />
There has to be something wrong with the Imports section or something:<br />
<div style="margin:20px; margin-top:5px">
	<div class="smallfont" style="margin-bottom:2px">Code:</div>
	<hr /><code style="margin:0px" dir="ltr" style="text-align:left">Imports System<br />
<br />
Imports System.Data<br />
Imports System.Data.OleDb<br />
Imports System.Data.SqlClient<br />
<br />
Imports System.Drawing<br />
Imports System.Windows.Forms<br />
Imports System.Guid<br />
<br />
Imports Infragistics.Win<br />
Imports Infragistics.Win.UltraWinToolTip<br />
<br />
Imports Janus.Windows.GridEX</code><hr />
</div>This same code runs in a different program from Visual Studio 8 to an Access 2000 database. This database is Access 2007 Database (Access 2000 file format).   I can not interpret the error message let alone figure out why I can&#8217;t get a relational SELECT statement to work in this format but will work in Access 2000.  What am I not setting properly?  Do I need to define in code a primary key for the relationships.  I thought from TRYING to read MSDN help that the dataadapter automatically generates one if it is missing, but again each table has a primary key.    <br />
<div style="margin:20px; margin-top:5px">
	<div class="smallfont" style="margin-bottom:2px">Code:</div>
	<hr /><code style="margin:0px" dir="ltr" style="text-align:left">Private Function LoadgriPrices() As Boolean<br />
&nbsp; &nbsp; &nbsp; &nbsp; ' ******************************************************************************<br />
&nbsp; &nbsp; &nbsp; &nbsp; ' Description:&nbsp; Load the GridEx for PRICES&nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; ' Created by:&nbsp; &nbsp; &nbsp; &nbsp; LMarshall<br />
&nbsp; &nbsp; &nbsp; &nbsp; ' Memo: Can be loaded from several choices made in the grbSearchItem&nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; ' &#167;&#167;&#167;&#167;&#167;&#167;&#167;&#167;&#167;&#167;&#167;&#167;&#167;&nbsp; Copyright (c) 2012 dbf&nbsp; All Rights Reserved &#167;&#167;&#167;&#167;&#167;&#167;&#167;&#167;&#167;&#167;&#167;&#167;&#167;<br />
&nbsp; &nbsp; &nbsp; &nbsp; ' ******************************************************************************<br />
&nbsp; &nbsp; &nbsp; &nbsp; Try<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; gblConn = New OleDbConnection(QponConnStr)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Dim dagexLoad As New OleDbDataAdapter<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Dim dsgexLoad As New DataSet<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Dim recCount As Integer 'Tracks the number of records in the dataset dsgexLoad<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Dim mySelectQuery As String = &quot;SELECT i.ItemsID, c.Category,&nbsp; s.SubCategory, &quot; _<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &amp; &quot;i.Maker, i.ItemName, i.Measure, i.Size &quot; _<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &amp; &quot;FROM (Categories AS c INNER JOIN SubCategory AS s ON c.CategoriesID=s.CategoriesID) &quot; _<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &amp; &quot;INNER JOIN Items AS i ON s.SubCategoryID=i.SubCategoryID;&quot;<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Dim myConnection As New OleDbConnection(QponConnStr)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Dim myCommand As New OleDbCommand(mySelectQuery, myConnection)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; myConnection.Open()<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; dagexLoad.SelectCommand = myCommand<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; dagexLoad.Fill(dsgexLoad) <font color="yellow">&#8216;&lt;&lt;&lt;&lt;&lt; error here</font><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; If Not dsgexLoad.Tables(0).Rows.Count &gt; 0 Then<br />
MessageBox.Show(&quot;There were no results found.&quot;, &quot;No Results Found&quot;, MessageBoxButtons.OK, MessageBoxIcon.Exclamation)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Return False<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Exit Function<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Else<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; recCount = dsgexLoad.Tables(0).Rows.Count<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; griPrices.BoundMode = Janus.Windows.GridEX.BoundMode.Unbound 'allows us to use it in AddItem mode<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; griPrices.KeepRowSettings = True 'keeps settings same when row scrolls out of sight<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Dim dstbl As New DataTable<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Dim Row As DataRow<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Dim rowNdx As Integer<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; rowNdx = 0 'Set to zero index value for the DataTable tbl<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; dagexLoad.Fill(dstbl)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; For Each Row In dstbl.Rows<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Dim gexRow As GridEXRow<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; gexRow = griPrices.AddItem()<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; gexRow.BeginEdit()<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; If rowNdx = recCount Then<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Exit For<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; End If<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; gexRow.Cells.Item(&quot;ItemsID&quot;).Value = dsgexLoad.Tables(0).Rows(rowNdx)(&quot;ItemsID&quot;).ToString()<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; gexRow.Cells.Item(&quot;Category&quot;).Value = dsgexLoad.Tables(0).Rows(rowNdx)(&quot;Category&quot;).ToString()<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; gexRow.Cells.Item(&quot;SubCategory&quot;).Value = dsgexLoad.Tables(0).Rows(rowNdx)(&quot;SubCategory&quot;).ToString()<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; gexRow.Cells.Item(&quot;Maker&quot;).Value = dsgexLoad.Tables(0).Rows(rowNdx)(&quot;Maker&quot;).ToString()<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; gexRow.Cells.Item(&quot;ItemName&quot;).Value = dsgexLoad.Tables(0).Rows(rowNdx)(&quot;ItemName&quot;).ToString()<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; gexRow.Cells.Item(&quot;Measure&quot;).Value = dsgexLoad.Tables(0).Rows(rowNdx)(&quot;Measure&quot;).ToString()<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; gexRow.Cells.Item(&quot;Size&quot;).Value = dsgexLoad.Tables(0).Rows(rowNdx)(&quot;Size&quot;).ToString()<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; gexRow.EndEdit()<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; rowNdx = rowNdx + 1 'keep track of where we are at<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Next<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; End If<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; Catch ex As Exception<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 'Some kind of error occurred-display on screen. v2 will write to a log file<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; MsgBox(ex.ToString)<br />
&nbsp; &nbsp; &nbsp; &nbsp; End Try<br />
&nbsp; &nbsp; &nbsp; &nbsp; Return True<br />
&nbsp; &nbsp; End Function</code><hr />
</div>{&quot;IErrorInfo.GetDescription failed with E_FAIL(0x80004005).&quot;}<br />
    System.Data.OleDb.OleDbException: {&quot;IErrorInfo.GetDescription failed with E_FAIL(0x80004005).&quot;}<br />
    Data: {System.Collections.ListDictionaryInternal}<br />
    HelpLink: Nothing<br />
    InnerException: Nothing<br />
    Message: &quot;IErrorInfo.GetDescription failed with E_FAIL(0x80004005).&quot;<br />
    Source: &quot;System.Data&quot;<br />
    StackTrace: &quot;   at System.Data.OleDb.OleDbCommand.ExecuteCommandTextErrorHandling(OleDbHResult hr)    at System.Data.OleDb.OleDbCommand.ExecuteCommandTextForSingleResult(tagDBPARAMS dbParams, Object&amp; executeResult)    at System.Data.OleDb.OleDbCommand.ExecuteCommandText(Object&amp; executeResult)    at System.Data.OleDb.OleDbCommand.ExecuteCommand(CommandBehavior behavior, Object&amp; executeResult)    at System.Data.OleDb.OleDbCommand.ExecuteReaderInternal(CommandBehavior behavior, String method)    at System.Data.OleDb.OleDbCommand.ExecuteReader(CommandBehavior behavior)    at System.Data.OleDb.OleDbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior)    at System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)    at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behav<br />
ior)    at <font color="Red">System.Data.Common.DbDataAdapter.Fill(DataSet dataSet) </font>   at QPon.Pricing.LoadgriPrices() in C:\QPon\QPon\QPon\Pricing.vb:line 129&quot;<br />
    TargetSite: {System.Reflection.RuntimeMethodInfo}<br />
<br />
I am sorry for the length of this post but I felt it necessary to show as much as possible.  I appreciate any guidance to where my problem may be.  thank you</div>

]]></content:encoded>
			<category domain="http://forums.devx.com/forumdisplay.php?f=106">Database</category>
			<dc:creator>LEMarshall</dc:creator>
			<guid isPermaLink="true">http://forums.devx.com/showthread.php?t=176201</guid>
		</item>
		<item>
			<title>Problem in creating numeric textbox (.Net 4.0 - Winforms).</title>
			<link>http://forums.devx.com/showthread.php?t=176200&amp;goto=newpost</link>
			<pubDate>Sat, 12 May 2012 15:48:41 GMT</pubDate>
			<description><![CDATA[Hi,
I'm trying to create my own numeric textbox that will handle decimal as well as whole number values. The concept is, unlike the regular textbox, this one will accept a value of 'Double' data type and show it with proper formatting e.g. Leading Digits, Digit Grouping etc. When the textbox value is called, it returns the actual 'Double' data type value. The entire thing is done through the 'Text' property; wherein the regular 'Text' property is shadowed and one with 'Double' data type is used.
The problem is, in the designer properties window, the Text property always remains readonly and its value says 'Object reference not set to an instance of an object'. What's my mistake?
My code follows:


Code:
---------
Imports System.Windows.Forms
Imports System.ComponentModel
Imports System.Runtime.InteropServices

Public Class NumericTextBox
    Inherits TextBox
    Private _IsDecimal As Boolean

    <System.Diagnostics.DebuggerNonUserCode()> _
    Public Sub New()
        MyBase.New()

        'This call is required by the Component Designer.
        InitializeComponent()
        Me.TextAlign = HorizontalAlignment.Right
    End Sub

    <DefaultValue(False)>
    <ComVisible(True)> _
    Public Property IsDecimal As Boolean
        Get
            Return _IsDecimal
        End Get
        Set(ByVal value As Boolean)
            _IsDecimal = value
        End Set
    End Property

    <DefaultValue(0)>
    <Description("The text associated with the control.")> _
    Public Shadows Property Text As Double
        Get
            Dim ReturnValue As Double
            Double.TryParse(MyBase.Text, ReturnValue)
            Return ReturnValue
        End Get
        Set(ByVal value As Double)
            If Not IsDecimal Then
                MyBase.Text = FormatNumber(value, 0, TriState.True, TriState.False, TriState.True)
            Else
                MyBase.Text = FormatNumber(value, 2, TriState.True, TriState.False, TriState.True)
            End If
        End Set
    End Property

    <DefaultValue(GetType(HorizontalAlignment), "Right")> _
    Public Shadows Property TextAlign As HorizontalAlignment
        Get
            Return MyBase.TextAlign
        End Get
        Set(ByVal value As HorizontalAlignment)
            MyBase.TextAlign = value
        End Set
    End Property

    Protected Overrides Sub OnKeyPress(ByVal e As System.Windows.Forms.KeyPressEventArgs)
        MyBase.OnKeyPress(e)

        If Not IsDecimal Then
            If Not Asc(e.KeyChar) = 8 And "0123456789".IndexOf(e.KeyChar) = -1 Then
                e.Handled = True
                Exit Sub
            End If
        Else
            If Not Asc(e.KeyChar) = 8 And "0123456789.".IndexOf(e.KeyChar) = -1 Then
                e.Handled = True
                Exit Sub
            End If
        End If
    End Sub

    Protected Overrides Sub OnValidating(ByVal e As System.ComponentModel.CancelEventArgs)
        MyBase.OnValidating(e)

        If Trim(MyBase.Text) <> "" And Not IsNumeric(MyBase.Text) Then
            MsgBox("Enter a valid numeric value.", MsgBoxStyle.Exclamation, "Invalid Data")
            e.Cancel = True
        Else
            If Not IsDecimal Then
                MyBase.Text = FormatNumber(Text, 0, TriState.True, TriState.False, TriState.True)
            Else
                MyBase.Text = FormatNumber(Text, 2, TriState.True, TriState.False, TriState.True)
            End If
        End If
    End Sub
End Class
---------
]]></description>
			<content:encoded><![CDATA[<div>Hi,<br />
I'm trying to create my own numeric textbox that will handle decimal as well as whole number values. The concept is, unlike the regular textbox, this one will accept a value of 'Double' data type and show it with proper formatting e.g. Leading Digits, Digit Grouping etc. When the textbox value is called, it returns the actual 'Double' data type value. The entire thing is done through the 'Text' property; wherein the regular 'Text' property is shadowed and one with 'Double' data type is used.<br />
The problem is, in the designer properties window, the Text property always remains readonly and its value says 'Object reference not set to an instance of an object'. What's my mistake?<br />
My code follows:<br />
<br />
<div style="margin:20px; margin-top:5px">
	<div class="smallfont" style="margin-bottom:2px">Code:</div>
	<hr /><code style="margin:0px" dir="ltr" style="text-align:left">Imports System.Windows.Forms<br />
Imports System.ComponentModel<br />
Imports System.Runtime.InteropServices<br />
<br />
Public Class NumericTextBox<br />
&nbsp; &nbsp; Inherits TextBox<br />
&nbsp; &nbsp; Private _IsDecimal As Boolean<br />
<br />
&nbsp; &nbsp; &lt;System.Diagnostics.DebuggerNonUserCode()&gt; _<br />
&nbsp; &nbsp; Public Sub New()<br />
&nbsp; &nbsp; &nbsp; &nbsp; MyBase.New()<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; 'This call is required by the Component Designer.<br />
&nbsp; &nbsp; &nbsp; &nbsp; InitializeComponent()<br />
&nbsp; &nbsp; &nbsp; &nbsp; Me.TextAlign = HorizontalAlignment.Right<br />
&nbsp; &nbsp; End Sub<br />
<br />
&nbsp; &nbsp; &lt;DefaultValue(False)&gt;<br />
&nbsp; &nbsp; &lt;ComVisible(True)&gt; _<br />
&nbsp; &nbsp; Public Property IsDecimal As Boolean<br />
&nbsp; &nbsp; &nbsp; &nbsp; Get<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Return _IsDecimal<br />
&nbsp; &nbsp; &nbsp; &nbsp; End Get<br />
&nbsp; &nbsp; &nbsp; &nbsp; Set(ByVal value As Boolean)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _IsDecimal = value<br />
&nbsp; &nbsp; &nbsp; &nbsp; End Set<br />
&nbsp; &nbsp; End Property<br />
<br />
&nbsp; &nbsp; &lt;DefaultValue(0)&gt;<br />
&nbsp; &nbsp; &lt;Description(&quot;The text associated with the control.&quot;)&gt; _<br />
&nbsp; &nbsp; Public Shadows Property Text As Double<br />
&nbsp; &nbsp; &nbsp; &nbsp; Get<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Dim ReturnValue As Double<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Double.TryParse(MyBase.Text, ReturnValue)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Return ReturnValue<br />
&nbsp; &nbsp; &nbsp; &nbsp; End Get<br />
&nbsp; &nbsp; &nbsp; &nbsp; Set(ByVal value As Double)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; If Not IsDecimal Then<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; MyBase.Text = FormatNumber(value, 0, TriState.True, TriState.False, TriState.True)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Else<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; MyBase.Text = FormatNumber(value, 2, TriState.True, TriState.False, TriState.True)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; End If<br />
&nbsp; &nbsp; &nbsp; &nbsp; End Set<br />
&nbsp; &nbsp; End Property<br />
<br />
&nbsp; &nbsp; &lt;DefaultValue(GetType(HorizontalAlignment), &quot;Right&quot;)&gt; _<br />
&nbsp; &nbsp; Public Shadows Property TextAlign As HorizontalAlignment<br />
&nbsp; &nbsp; &nbsp; &nbsp; Get<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Return MyBase.TextAlign<br />
&nbsp; &nbsp; &nbsp; &nbsp; End Get<br />
&nbsp; &nbsp; &nbsp; &nbsp; Set(ByVal value As HorizontalAlignment)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; MyBase.TextAlign = value<br />
&nbsp; &nbsp; &nbsp; &nbsp; End Set<br />
&nbsp; &nbsp; End Property<br />
<br />
&nbsp; &nbsp; Protected Overrides Sub OnKeyPress(ByVal e As System.Windows.Forms.KeyPressEventArgs)<br />
&nbsp; &nbsp; &nbsp; &nbsp; MyBase.OnKeyPress(e)<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; If Not IsDecimal Then<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; If Not Asc(e.KeyChar) = 8 And &quot;0123456789&quot;.IndexOf(e.KeyChar) = -1 Then<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; e.Handled = True<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Exit Sub<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; End If<br />
&nbsp; &nbsp; &nbsp; &nbsp; Else<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; If Not Asc(e.KeyChar) = 8 And &quot;0123456789.&quot;.IndexOf(e.KeyChar) = -1 Then<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; e.Handled = True<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Exit Sub<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; End If<br />
&nbsp; &nbsp; &nbsp; &nbsp; End If<br />
&nbsp; &nbsp; End Sub<br />
<br />
&nbsp; &nbsp; Protected Overrides Sub OnValidating(ByVal e As System.ComponentModel.CancelEventArgs)<br />
&nbsp; &nbsp; &nbsp; &nbsp; MyBase.OnValidating(e)<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; If Trim(MyBase.Text) &lt;&gt; &quot;&quot; And Not IsNumeric(MyBase.Text) Then<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; MsgBox(&quot;Enter a valid numeric value.&quot;, MsgBoxStyle.Exclamation, &quot;Invalid Data&quot;)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; e.Cancel = True<br />
&nbsp; &nbsp; &nbsp; &nbsp; Else<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; If Not IsDecimal Then<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; MyBase.Text = FormatNumber(Text, 0, TriState.True, TriState.False, TriState.True)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Else<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; MyBase.Text = FormatNumber(Text, 2, TriState.True, TriState.False, TriState.True)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; End If<br />
&nbsp; &nbsp; &nbsp; &nbsp; End If<br />
&nbsp; &nbsp; End Sub<br />
End Class</code><hr />
</div></div>

]]></content:encoded>
			<category domain="http://forums.devx.com/forumdisplay.php?f=120">.NET</category>
			<dc:creator>priyamtheone</dc:creator>
			<guid isPermaLink="true">http://forums.devx.com/showthread.php?t=176200</guid>
		</item>
		<item>
			<title>Question about malloc and new</title>
			<link>http://forums.devx.com/showthread.php?t=176197&amp;goto=newpost</link>
			<pubDate>Fri, 11 May 2012 23:25:44 GMT</pubDate>
			<description>Hello All,
I have a question about the KLU library for LU factorization of sparse matrices.

The KLU library accepts a pointer to a memory allocator function, by default it is malloc().
Then it uses this pointer to allocate the memory required.

I want to extend the library and I now have object of classes. I want to use the operator new instead of malloc to allocate the memory. In the same time I want the new operator to call the constructors of the objects.

Is there a way to do it?

Thank you
Mina</description>
			<content:encoded><![CDATA[<div>Hello All,<br />
I have a question about the KLU library for LU factorization of sparse matrices.<br />
<br />
The KLU library accepts a pointer to a memory allocator function, by default it is malloc().<br />
Then it uses this pointer to allocate the memory required.<br />
<br />
I want to extend the library and I now have object of classes. I want to use the operator new instead of malloc to allocate the memory. In the same time I want the new operator to call the constructors of the objects.<br />
<br />
Is there a way to do it?<br />
<br />
Thank you<br />
Mina</div>

]]></content:encoded>
			<category domain="http://forums.devx.com/forumdisplay.php?f=110">C++</category>
			<dc:creator>zarzor_2010</dc:creator>
			<guid isPermaLink="true">http://forums.devx.com/showthread.php?t=176197</guid>
		</item>
		<item>
			<title>Socket programming</title>
			<link>http://forums.devx.com/showthread.php?t=176196&amp;goto=newpost</link>
			<pubDate>Fri, 11 May 2012 13:18:10 GMT</pubDate>
			<description>Hi,
I am trying to build a socket program to read data from the scales.
I am using VB.NET.
If anyone has had an experience in developing it or have done so pls direct me to some tutorials or books.
Pretty novice on this so will need step by step guide.
Tnx
paps</description>
			<content:encoded><![CDATA[<div>Hi,<br />
I am trying to build a socket program to read data from the scales.<br />
I am using VB.NET.<br />
If anyone has had an experience in developing it or have done so pls direct me to some tutorials or books.<br />
Pretty novice on this so will need step by step guide.<br />
Tnx<br />
paps</div>

]]></content:encoded>
			<category domain="http://forums.devx.com/forumdisplay.php?f=120">.NET</category>
			<dc:creator>Paps</dc:creator>
			<guid isPermaLink="true">http://forums.devx.com/showthread.php?t=176196</guid>
		</item>
		<item>
			<title>Webcrawler</title>
			<link>http://forums.devx.com/showthread.php?t=176195&amp;goto=newpost</link>
			<pubDate>Fri, 11 May 2012 08:10:40 GMT</pubDate>
			<description><![CDATA[Hello guys,

I have to develop a webcrawler that connects to to a website, analyzes one of it's pages and retrieves all the links found on the page (a href=).
The problem is that I couldn't retrieve the links from a webpage that has dynamic URL generation using javascript (or ajax).

Does anybody know how can I do it? If anyone has a piece of code for doing it, I would really appreciate if you could share it with me.

Thank you in advance]]></description>
			<content:encoded><![CDATA[<div>Hello guys,<br />
<br />
I have to develop a webcrawler that connects to to a website, analyzes one of it's pages and retrieves all the links found on the page (a href=).<br />
The problem is that I couldn't retrieve the links from a webpage that has dynamic URL generation using javascript (or ajax).<br />
<br />
Does anybody know how can I do it? If anyone has a piece of code for doing it, I would really appreciate if you could share it with me.<br />
<br />
Thank you in advance</div>

]]></content:encoded>
			<category domain="http://forums.devx.com/forumdisplay.php?f=120">.NET</category>
			<dc:creator>Michael</dc:creator>
			<guid isPermaLink="true">http://forums.devx.com/showthread.php?t=176195</guid>
		</item>
		<item>
			<title>WordML Java API</title>
			<link>http://forums.devx.com/showthread.php?t=176194&amp;goto=newpost</link>
			<pubDate>Thu, 10 May 2012 18:45:47 GMT</pubDate>
			<description>Hi,

I would like to know is there any Java API is available to process the WordML document in the application side.

Basically I am getting an WordML as output from one of the Doc Generation tool. After that I wanted to add some images and tables etc into WordML and then process it for document creation. 

Any ideas/clues will be useful for me to resolve the prblem.

Thanks in Advance.
Arumugam</description>
			<content:encoded><![CDATA[<div>Hi,<br />
<br />
I would like to know is there any Java API is available to process the WordML document in the application side.<br />
<br />
Basically I am getting an WordML as output from one of the Doc Generation tool. After that I wanted to add some images and tables etc into WordML and then process it for document creation. <br />
<br />
Any ideas/clues will be useful for me to resolve the prblem.<br />
<br />
Thanks in Advance.<br />
Arumugam</div>

]]></content:encoded>
			<category domain="http://forums.devx.com/forumdisplay.php?f=104">Java</category>
			<dc:creator>arumugam</dc:creator>
			<guid isPermaLink="true">http://forums.devx.com/showthread.php?t=176194</guid>
		</item>
		<item>
			<title>QR Code in Java</title>
			<link>http://forums.devx.com/showthread.php?t=176190&amp;goto=newpost</link>
			<pubDate>Thu, 10 May 2012 06:11:52 GMT</pubDate>
			<description>Hi, everybody.
Is there anyone who can help me for a project which can read out QR Code and access the detailed information of the products by using it?</description>
			<content:encoded><![CDATA[<div>Hi, everybody.<br />
Is there anyone who can help me for a project which can read out QR Code and access the detailed information of the products by using it?</div>

]]></content:encoded>
			<category domain="http://forums.devx.com/forumdisplay.php?f=104">Java</category>
			<dc:creator>Emma-23</dc:creator>
			<guid isPermaLink="true">http://forums.devx.com/showthread.php?t=176190</guid>
		</item>
		<item>
			<title>Java syntax</title>
			<link>http://forums.devx.com/showthread.php?t=176189&amp;goto=newpost</link>
			<pubDate>Thu, 03 May 2012 07:44:14 GMT</pubDate>
			<description><![CDATA[what does the below java code mean?

private Bag<Integer>[] adj;

someone please reply.

:)]]></description>
			<content:encoded><![CDATA[<div>what does the below java code mean?<br />
<br />
private Bag&lt;Integer&gt;[] adj;<br />
<br />
someone please reply.<br />
<br />
:)</div>

]]></content:encoded>
			<category domain="http://forums.devx.com/forumdisplay.php?f=104">Java</category>
			<dc:creator>kathiravan</dc:creator>
			<guid isPermaLink="true">http://forums.devx.com/showthread.php?t=176189</guid>
		</item>
		<item>
			<title>java3D Questions</title>
			<link>http://forums.devx.com/showthread.php?t=176187&amp;goto=newpost</link>
			<pubDate>Thu, 03 May 2012 06:52:19 GMT</pubDate>
			<description><![CDATA[My Java3D v1.5 questions.

Could someone please give responses with code specific answers?

#A I have a set of points, to be connected as lines, and to be formed into surfaces (limited planes) as defined by my IndexedQuadArray and IndexedTriangleArray.

#1 Does NormalGenerator normalise between each IndexedGeometryArray indicie item, or across all the IndexedGeometryArray items plural in the entire, or present sub copy, of the IndexedGeometryArray submitted?

Apart from introducing more points through (in between) the same extant surface region to define a net result differently, may one alter the (relative) "crease" location? Is this what setNormal does, or not? How may one define and alter curved lines and  generated surfaces existing between points inside a IndexedGeometryArray, ie arbitrarily complex "bezier" curves?  

#2 How may I define a circle or an oval (flat, 2D) in a 3D space?

#3 Is there a way to obtain one object for a Triangular or Square surface generated via a GeometryArray?
What is the Generic class or Interface for this named? I THINK THE IDEA IS TO SUBMIT  A SUB ARRAY OF INDEXGEOMETRYARRAY 3D POINTS TO AN INDIVIDUAL SHAPE3D EACH. IS THIS SO?

May one test if a particular (x,y,z) point lines as on/in this surface, either before normalisation or after it?

#4 How may I adhere a custom texture object onto a particular surface region defined by points inside a GeometryArray? Is there a way to obtain a surface object from surfaces dynamically generated by a IndexedGeometryArray?  Is the idea just to create a Shape3D object
with the texture adhered to an Appearance object?

#5 When using a GeometryArray and NormalGenerator to generate my surfaces, how may I define hole regions on a surface which is not filled in at rendering, but does not effect the generated normalisation shape?
Is there any easier way to do this, or must I just specify multipled fully enclosed regions around a non-defined region to do this?

#6 When using IndexedGeometryArray (s), at run time there is a situation where non-visible regions  of a 3D world objects aren't filled in or rendered as wireframe or points as a memory save (according to a particular issue raised in the pdf tutorial).  However, the priority cull setting is "backwards" by default. Without disabling culling entirely, is there a way to have  the memory save of some non-filling or wireframe drawing happening by allowing rendering of the outward facing polygons only (not the behind faces), or even just the visible ones from the one Viewer perspective?

   Or does use PolygonAttributes to turn off culling entirely, and this optimisation in fact happens by default?
   (I don't have to worry about culling for one Viewer, however it would be more efficient...)   
   
#7 How does one translate a point in the direction of another one, presumably by a 3D vector?  How may this be done in the direction of the other point, one pixel at a time, and not the full distance between
them (easy) ?  How may I automatically get a vector pointing in the direction of a second point from a first point, such that I may automatically translate pixel b towards pixel a by the array (per pixel)?

#8 How do I disable the default shadow of a 3D object via it's lightsource, to do high quality shadowing?  I know that shadowing is typically done per pixel, point.  A shadow is a linear cutoff of the projected lighting region.  Need to know the line from the light source, get a vector, and draw lines to points parrallel to the original line until the next surface.  That's one light source,
With shadow due to multiple light sources, you want the intersection (common) lines only.  ?]]></description>
			<content:encoded><![CDATA[<div>My Java3D v1.5 questions.<br />
<br />
Could someone please give responses with code specific answers?<br />
<br />
#A I have a set of points, to be connected as lines, and to be formed into surfaces (limited planes) as defined by my IndexedQuadArray and IndexedTriangleArray.<br />
<br />
#1 Does NormalGenerator normalise between each IndexedGeometryArray indicie item, or across all the IndexedGeometryArray items plural in the entire, or present sub copy, of the IndexedGeometryArray submitted?<br />
<br />
Apart from introducing more points through (in between) the same extant surface region to define a net result differently, may one alter the (relative) &quot;crease&quot; location? Is this what setNormal does, or not? How may one define and alter curved lines and  generated surfaces existing between points inside a IndexedGeometryArray, ie arbitrarily complex &quot;bezier&quot; curves?  <br />
<br />
#2 How may I define a circle or an oval (flat, 2D) in a 3D space?<br />
<br />
#3 Is there a way to obtain one object for a Triangular or Square surface generated via a GeometryArray?<br />
What is the Generic class or Interface for this named? I THINK THE IDEA IS TO SUBMIT  A SUB ARRAY OF INDEXGEOMETRYARRAY 3D POINTS TO AN INDIVIDUAL SHAPE3D EACH. IS THIS SO?<br />
<br />
May one test if a particular (x,y,z) point lines as on/in this surface, either before normalisation or after it?<br />
<br />
#4 How may I adhere a custom texture object onto a particular surface region defined by points inside a GeometryArray? Is there a way to obtain a surface object from surfaces dynamically generated by a IndexedGeometryArray?  Is the idea just to create a Shape3D object<br />
with the texture adhered to an Appearance object?<br />
<br />
#5 When using a GeometryArray and NormalGenerator to generate my surfaces, how may I define hole regions on a surface which is not filled in at rendering, but does not effect the generated normalisation shape?<br />
Is there any easier way to do this, or must I just specify multipled fully enclosed regions around a non-defined region to do this?<br />
<br />
#6 When using IndexedGeometryArray (s), at run time there is a situation where non-visible regions  of a 3D world objects aren't filled in or rendered as wireframe or points as a memory save (according to a particular issue raised in the pdf tutorial).  However, the priority cull setting is &quot;backwards&quot; by default. Without disabling culling entirely, is there a way to have  the memory save of some non-filling or wireframe drawing happening by allowing rendering of the outward facing polygons only (not the behind faces), or even just the visible ones from the one Viewer perspective?<br />
<br />
   Or does use PolygonAttributes to turn off culling entirely, and this optimisation in fact happens by default?<br />
   (I don't have to worry about culling for one Viewer, however it would be more efficient...)   <br />
   <br />
#7 How does one translate a point in the direction of another one, presumably by a 3D vector?  How may this be done in the direction of the other point, one pixel at a time, and not the full distance between<br />
them (easy) ?  How may I automatically get a vector pointing in the direction of a second point from a first point, such that I may automatically translate pixel b towards pixel a by the array (per pixel)?<br />
<br />
#8 How do I disable the default shadow of a 3D object via it's lightsource, to do high quality shadowing?  I know that shadowing is typically done per pixel, point.  A shadow is a linear cutoff of the projected lighting region.  Need to know the line from the light source, get a vector, and draw lines to points parrallel to the original line until the next surface.  That's one light source,<br />
With shadow due to multiple light sources, you want the intersection (common) lines only.  ?</div>

]]></content:encoded>
			<category domain="http://forums.devx.com/forumdisplay.php?f=104">Java</category>
			<dc:creator>Zachary1234</dc:creator>
			<guid isPermaLink="true">http://forums.devx.com/showthread.php?t=176187</guid>
		</item>
		<item>
			<title>VB Form Designer errors on custom control</title>
			<link>http://forums.devx.com/showthread.php?t=176186&amp;goto=newpost</link>
			<pubDate>Tue, 01 May 2012 22:29:48 GMT</pubDate>
			<description><![CDATA[I have created a class that holds information about an event. 
The date the event triggers, if it is a repeating event, and the repeat interval.

I have created a custom listbox control to display my events. It has a property for getting and setting a list of events to display.  The property has the data type of: List(Of cEvent) where cEvent is my Event Class.

When I add the control to a Form and then build the project, the form editor errors - and will no longer display or allow changes to the forms design.

It seems to be that the designer is trying to set the value of the property, from within the forms designer.vb file. It does this by creating a resource in the forms resource file(.resx) and assigns it to the property. This is unsuccessful because it can't create a resource entry with a proper datatype. The datatype is set to null, which can't be converted to a valid type.

Is there something I can do to keep VB from trying to assign a default value to this property. Or is there something I can do to my class or control to tell the form designer how to handle this?]]></description>
			<content:encoded><![CDATA[<div>I have created a class that holds information about an event. <br />
The date the event triggers, if it is a repeating event, and the repeat interval.<br />
<br />
I have created a custom listbox control to display my events. It has a property for getting and setting a list of events to display.  The property has the data type of: List(Of cEvent) where cEvent is my Event Class.<br />
<br />
When I add the control to a Form and then build the project, the form editor errors - and will no longer display or allow changes to the forms design.<br />
<br />
It seems to be that the designer is trying to set the value of the property, from within the forms designer.vb file. It does this by creating a resource in the forms resource file(.resx) and assigns it to the property. This is unsuccessful because it can't create a resource entry with a proper datatype. The datatype is set to null, which can't be converted to a valid type.<br />
<br />
Is there something I can do to keep VB from trying to assign a default value to this property. Or is there something I can do to my class or control to tell the form designer how to handle this?</div>

]]></content:encoded>
			<category domain="http://forums.devx.com/forumdisplay.php?f=120">.NET</category>
			<dc:creator>Ron Weller</dc:creator>
			<guid isPermaLink="true">http://forums.devx.com/showthread.php?t=176186</guid>
		</item>
		<item>
			<title>rectangle class</title>
			<link>http://forums.devx.com/showthread.php?t=176183&amp;goto=newpost</link>
			<pubDate>Mon, 30 Apr 2012 20:28:33 GMT</pubDate>
			<description><![CDATA[Got real head scratcher here, I have no idea where to begin any help would be greatly appreciated..


Make a class rectangle. The class should have data members length and width of type float, each of which defaults to 1. The class should have member functions that calculate the perimeter() and the area() of the rectangle. It should also have separate set() and get() functions for both the length and width (set_length(), get_length(), set_width(), get_width()).

The set_length() and set_width() functions should require the user to enter length or width data values greater than zero and less than or equal to 20.0. These functions should examine the data entered by the user, and accept the data only if it is in the specified range (0 < data <= 20.0). If the data is not in this range, the user should be reminded of the allowed data range and prompted to enter the data again. This cycle should repeat until the user enters a correct data value. This can be accomplished by using a do while loop in each set() function.

The get() functions should be declared using the const keyword to ensure that these functions can not change private member data of the rectangle class.

Add a draw() function to your rectangle class that draws a solid rectangle of the correct length and width. Since the length and width in are floating point numbers, truncate the length and width values for the purpose of drawing the rectangle (for example, if length = 6.3 and width = 11.5, draw a rectangle that is 6 by 11 characters in size). Use any character you like to draw the rectangle. Here is an example of a rectangle drawn with + signs:

+++++++++++++
+++++++++++++
+++++++++++++
+++++++++++++

Write a short demonstration program that uses the rectangle class you have created. The program should create a rectangle object, then prompt the user to enter new values for the length and width. Use the set() functions and the user’s entries to change the private data of the rectangle object you created. Finally, call the draw() function to display the resulting rectangle.


I dont understand. :(]]></description>
			<content:encoded><![CDATA[<div>Got real head scratcher here, I have no idea where to begin any help would be greatly appreciated..<br />
<br />
<br />
Make a class rectangle. The class should have data members length and width of type float, each of which defaults to 1. The class should have member functions that calculate the perimeter() and the area() of the rectangle. It should also have separate set() and get() functions for both the length and width (set_length(), get_length(), set_width(), get_width()).<br />
<br />
The set_length() and set_width() functions should require the user to enter length or width data values greater than zero and less than or equal to 20.0. These functions should examine the data entered by the user, and accept the data only if it is in the specified range (0 &lt; data &lt;= 20.0). If the data is not in this range, the user should be reminded of the allowed data range and prompted to enter the data again. This cycle should repeat until the user enters a correct data value. This can be accomplished by using a do while loop in each set() function.<br />
<br />
The get() functions should be declared using the const keyword to ensure that these functions can not change private member data of the rectangle class.<br />
<br />
Add a draw() function to your rectangle class that draws a solid rectangle of the correct length and width. Since the length and width in are floating point numbers, truncate the length and width values for the purpose of drawing the rectangle (for example, if length = 6.3 and width = 11.5, draw a rectangle that is 6 by 11 characters in size). Use any character you like to draw the rectangle. Here is an example of a rectangle drawn with + signs:<br />
<br />
+++++++++++++<br />
+++++++++++++<br />
+++++++++++++<br />
+++++++++++++<br />
<br />
Write a short demonstration program that uses the rectangle class you have created. The program should create a rectangle object, then prompt the user to enter new values for the length and width. Use the set() functions and the user’s entries to change the private data of the rectangle object you created. Finally, call the draw() function to display the resulting rectangle.<br />
<br />
<br />
I dont understand. :(</div>

]]></content:encoded>
			<category domain="http://forums.devx.com/forumdisplay.php?f=110">C++</category>
			<dc:creator>wookie222</dc:creator>
			<guid isPermaLink="true">http://forums.devx.com/showthread.php?t=176183</guid>
		</item>
		<item>
			<title>ListView Drag and Drop Com Error</title>
			<link>http://forums.devx.com/showthread.php?t=176182&amp;goto=newpost</link>
			<pubDate>Mon, 30 Apr 2012 20:09:01 GMT</pubDate>
			<description><![CDATA[When trying to do a drag and drop from a list view control to the desktop I get the following error:

This is file drop operation to the desktop.


System.Runtime.InteropServices.COMException crossed a native/managed boundary
  Message=Invalid FORMATETC structure (Exception from HRESULT: 0x80040064 (DV_E_FORMATETC))
  Source=mscorlib
  ErrorCode=-2147221404
  StackTrace:
       at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)
       at System.Windows.Forms.DataObject.System.Runtime.InteropServices.ComTypes.IDataObject.GetDataHere(FORMATETC& formatetc, STGMEDIUM& medium)
       at System.Windows.Forms.DataObject.System.Runtime.InteropServices.ComTypes.IDataObject.GetData(FORMATETC& formatetc, STGMEDIUM& medium)
  InnerException: 






Here is some sample code:

Dim myItem As ListViewItem
            'Create an array of strings. 
            Dim myItems(lvwLocalDir.SelectedItems.Count - 1) As String
            Dim i As Integer = 0

            Dim path1 As String = IO.Directory.GetCurrentDirectory

            If path1.EndsWith("\") = False Then
                path1 += "\"
            End If
            Dim pathReset As String = path1

            'Loop though the SelectedItems collection of the ListView control.
            For Each myItem In lvwLocalDir.SelectedItems
                'Add the Text of the ListViewItem to the array. 
                path1 += myItem.Text
                myItems(i) = path1
                path1 = pathReset

                'myItems(i) = myItem.Text
                i = i + 1
            Next


            ' Creates a data object.
            Dim myDataObject As New DataObject()

            ' Adds the component to the data object.
            myDataObject.SetData(DataFormats.FileDrop, myItems)



            'DoDragDrop begins the drag-and-drop operation.
            'The data to be dragged is the array of strings.
            lvwLocalDir.DoDragDrop(myItems, DragDropEffects.Copy)

            'Catch ex As Exception
            '    Stop
            'End Try





            Dim j As ListViewItem
            For Each j In lvwLocalDir.SelectedItems
                'Remove the ListViewItem from the ListView control.
                lvwLocalDir.Items.Remove(j)
            Next


Do you have any Ideals of how I can fix this problem?

Thanks,
QWERT]]></description>
			<content:encoded><![CDATA[<div>When trying to do a drag and drop from a list view control to the desktop I get the following error:<br />
<br />
This is file drop operation to the desktop.<br />
<br />
<br />
System.Runtime.InteropServices.COMException crossed a native/managed boundary<br />
  Message=Invalid FORMATETC structure (Exception from HRESULT: 0x80040064 (DV_E_FORMATETC))<br />
  Source=mscorlib<br />
  ErrorCode=-2147221404<br />
  StackTrace:<br />
       at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)<br />
       at System.Windows.Forms.DataObject.System.Runtime.InteropServices.ComTypes.IDataObject.GetDat  aHere(FORMATETC&amp; formatetc, STGMEDIUM&amp; medium)<br />
       at System.Windows.Forms.DataObject.System.Runtime.InteropServices.ComTypes.IDataObject.GetDat  a(FORMATETC&amp; formatetc, STGMEDIUM&amp; medium)<br />
  InnerException: <br />
<br />
<br />
<br />
<br />
<br />
<br />
Here is some sample code:<br />
<br />
Dim myItem As ListViewItem<br />
            'Create an array of strings. <br />
            Dim myItems(lvwLocalDir.SelectedItems.Count - 1) As String<br />
            Dim i As Integer = 0<br />
<br />
            Dim path1 As String = IO.Directory.GetCurrentDirectory<br />
<br />
            If path1.EndsWith(&quot;\&quot;) = False Then<br />
                path1 += &quot;\&quot;<br />
            End If<br />
            Dim pathReset As String = path1<br />
<br />
            'Loop though the SelectedItems collection of the ListView control.<br />
            For Each myItem In lvwLocalDir.SelectedItems<br />
                'Add the Text of the ListViewItem to the array. <br />
                path1 += myItem.Text<br />
                myItems(i) = path1<br />
                path1 = pathReset<br />
<br />
                'myItems(i) = myItem.Text<br />
                i = i + 1<br />
            Next<br />
<br />
<br />
            ' Creates a data object.<br />
            Dim myDataObject As New DataObject()<br />
<br />
            ' Adds the component to the data object.<br />
            myDataObject.SetData(DataFormats.FileDrop, myItems)<br />
<br />
<br />
<br />
            'DoDragDrop begins the drag-and-drop operation.<br />
            'The data to be dragged is the array of strings.<br />
            lvwLocalDir.DoDragDrop(myItems, DragDropEffects.Copy)<br />
<br />
            'Catch ex As Exception<br />
            '    Stop<br />
            'End Try<br />
<br />
<br />
<br />
<br />
<br />
            Dim j As ListViewItem<br />
            For Each j In lvwLocalDir.SelectedItems<br />
                'Remove the ListViewItem from the ListView control.<br />
                lvwLocalDir.Items.Remove(j)<br />
            Next<br />
<br />
<br />
Do you have any Ideals of how I can fix this problem?<br />
<br />
Thanks,<br />
QWERT</div>

]]></content:encoded>
			<category domain="http://forums.devx.com/forumdisplay.php?f=120">.NET</category>
			<dc:creator>QWERT</dc:creator>
			<guid isPermaLink="true">http://forums.devx.com/showthread.php?t=176182</guid>
		</item>
		<item>
			<title>implementation of tool tip</title>
			<link>http://forums.devx.com/showthread.php?t=176179&amp;goto=newpost</link>
			<pubDate>Fri, 27 Apr 2012 09:53:15 GMT</pubDate>
			<description>Hi

How much complex to implement tooltip in windows application is?. Is it a one step or I have to do heavy coding. If its complex Can I get some external sources?</description>
			<content:encoded><![CDATA[<div>Hi<br />
<br />
How much complex to implement tooltip in windows application is?. Is it a one step or I have to do heavy coding. If its complex Can I get some external sources?</div>

]]></content:encoded>
			<category domain="http://forums.devx.com/forumdisplay.php?f=120">.NET</category>
			<dc:creator>dmrtn</dc:creator>
			<guid isPermaLink="true">http://forums.devx.com/showthread.php?t=176179</guid>
		</item>
		<item>
			<title>Need Help with this program i found</title>
			<link>http://forums.devx.com/showthread.php?t=176178&amp;goto=newpost</link>
			<pubDate>Thu, 26 Apr 2012 03:03:19 GMT</pubDate>
			<description>Hi, Everyone I need some help with this program. I downloaded it form planet source code.com, I only have the link to the program because its to big to attach a file here so im going to put the link, Now I have tried to e-mail the owner and he as not got back to me yet, and I went to his website and the owner of this program has a website but its gone when I went to it. Please help me with this program. And if you help me I will make a program for you any type of program , I know Visual basic 2010 and c++ 2010 and c# 2010. thanks for looking at my post. here is the link
http://www.mediafire.com/?7k4zrq5c6n7a2hh

:WAVE:</description>
			<content:encoded><![CDATA[<div>Hi, Everyone I need some help with this program. I downloaded it form planet source code.com, I only have the link to the program because its to big to attach a file here so im going to put the link, Now I have tried to e-mail the owner and he as not got back to me yet, and I went to his website and the owner of this program has a website but its gone when I went to it. Please help me with this program. And if you help me I will make a program for you any type of program , I know Visual basic 2010 and c++ 2010 and c# 2010. thanks for looking at my post. here is the link<br />
<a rel="nofollow" href="http://www.mediafire.com/?7k4zrq5c6n7a2hh" target="_blank">http://www.mediafire.com/?7k4zrq5c6n7a2hh</a><br />
<br />
:WAVE:</div>

]]></content:encoded>
			<category domain="http://forums.devx.com/forumdisplay.php?f=105">VB Classic</category>
			<dc:creator>andrewjrmill</dc:creator>
			<guid isPermaLink="true">http://forums.devx.com/showthread.php?t=176178</guid>
		</item>
		<item>
			<title>binding to data sources</title>
			<link>http://forums.devx.com/showthread.php?t=176171&amp;goto=newpost</link>
			<pubDate>Mon, 23 Apr 2012 13:57:03 GMT</pubDate>
			<description>How I can binding to data sources that implement IList, BindingList or IListSource interface via Grid.DataSource property</description>
			<content:encoded><![CDATA[<div>How I can binding to data sources that implement IList, BindingList or IListSource interface via Grid.DataSource property</div>

]]></content:encoded>
			<category domain="http://forums.devx.com/forumdisplay.php?f=120">.NET</category>
			<dc:creator>mrmagd</dc:creator>
			<guid isPermaLink="true">http://forums.devx.com/showthread.php?t=176171</guid>
		</item>
	</channel>
</rss>

