473,396 Members | 2,033 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Listbox

When i create a listbox and run the program the text options that i
entered as strings are not visible but i can still click on the
options as if they were there... what exactly is going on?

Apr 18 '07 #1
5 2112
kerfunkle3,

Three questions:

Have you set the listbox's ForeColor the same as the BackColor?
What version of Visual Basic?
Are you running a McAfee virus checker?

Kerry Moorman
"ke********@gmail.com" wrote:
When i create a listbox and run the program the text options that i
entered as strings are not visible but i can still click on the
options as if they were there... what exactly is going on?

Apr 18 '07 #2
On Apr 18, 12:14 pm, Kerry Moorman
<KerryMoor...@discussions.microsoft.comwrote:
kerfunkle3,

Three questions:

Have you set the listbox's ForeColor the same as the BackColor?
What version of Visual Basic?
Are you running a McAfee virus checker?

Kerry Moorman

"kerfunk...@gmail.com" wrote:
When i create a listbox and run the program the text options that i
entered as strings are not visible but i can still click on the
options as if they were there... what exactly is going on?
no, i'm not sure at the moment, yes i am

Apr 18 '07 #3
kerfunkle3,

If you are running McAfee(R) VirusScan(R) EnterpriseVersion 8.0i, then this
is a known bug.

McAfee has a patch at their site, but I don't have any of the details. I
know that Patch 9 fixed the problem for me a couple of years ago.

Kerry Moorman
"ke********@gmail.com" wrote:
On Apr 18, 12:14 pm, Kerry Moorman
<KerryMoor...@discussions.microsoft.comwrote:
kerfunkle3,

Three questions:

Have you set the listbox's ForeColor the same as the BackColor?
What version of Visual Basic?
Are you running a McAfee virus checker?

Kerry Moorman

"kerfunk...@gmail.com" wrote:
When i create a listbox and run the program the text options that i
entered as strings are not visible but i can still click on the
options as if they were there... what exactly is going on?

no, i'm not sure at the moment, yes i am

Apr 18 '07 #4
<ke********@gmail.comschrieb:
When i create a listbox and run the program the text options that i
entered as strings are not visible but i can still click on the
options as if they were there... what exactly is going on?
Fixing the problem of missing text in controls and message boxes
<URL:http://dotnet.mvps.org/dotnet/faqs/?id=controlsmissingtextbug&lang=en>

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
Apr 18 '07 #5
hi i'm neeraja
i'm new to Dotnet subject nd i'm getting one exception while running
one ASP Pgm
pls rectify the problem and what actually is.... help me out
here is my pgm:
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;
namespace WebApplication2
{
/// <summary>
/// Summary description for WebForm1.
/// </summary>
public class WebForm1 : System.Web.UI.Page
{
protected System.Web.UI.WebControls.TextBox TextBox1;
protected System.Web.UI.WebControls.TextBox TextBox2;
protected System.Web.UI.WebControls.Button Button1;

private void Page_Load(object sender, System.EventArgs e)
{
// Put user code to initialize the page here
}

#region Web Form Designer generated code
override protected void OnInit(EventArgs e)
{
//
// CODEGEN: This call is required by the ASP.NET Web Form Designer.
//
InitializeComponent();
base.OnInit(e);
}

/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.Button1.Click += new System.EventHandler(this.Button1_Click);
this.Load += new System.EventHandler(this.Page_Load);

}
#endregion

private void Button1_Click(object sender, System.EventArgs e)
{
SqlConnection conn=new SqlConnection("uid=sa; pwd=;database=pubs");
SqlCommand comm;
SqlDataReader dr;
comm=new SqlCommand(TextBox1.Text,conn);
conn.Open();
dr=comm.ExecuteReader();
while(dr.Read())
{
for(int i=0; i<dr.FieldCount;i++)
{
TextBox2.Text+=dr[i].ToString();
}
TextBox2.Text+="\n";
}
dr.Close();
conn.Close();

}
}
}

after running this one when i click the button then i'm getting this
error page:........
Server Error in '/WebApplication2' Application.
--------------------------------------------------------------------------------

ExecuteReader: CommandText property has not been initialized
Description: An unhandled exception occurred during the execution of
the current web request. Please review the stack trace for more
information about the error and where it originated in the code.

Exception Details: System.InvalidOperationException: ExecuteReader:
CommandText property has not been initialized

Source Error:

An unhandled exception was generated during the execution of the
current web request. Information regarding the origin and location of
the exception can be identified using the exception stack trace
below.

Stack Trace:
[InvalidOperationException: ExecuteReader: CommandText property has
not been initialized]
System.Data.SqlClient.SqlCommand.ValidateCommand(S tring method,
Boolean executing)
System.Data.SqlClient.SqlCommand.ExecuteReader(Com mandBehavior
cmdBehavior, RunBehavior runBehavior, Boolean returnStream)
System.Data.SqlClient.SqlCommand.ExecuteReader()
WebApplication2.WebForm1.Button1_Click(Object sender, EventArgs e)
System.Web.UI.WebControls.Button.OnClick(EventArgs e)

System.Web.UI.WebControls.Button.System.Web.UI.IPo stBackEventHandler.RaisePostBackEvent(String
eventArgument)
System.Web.UI.Page.RaisePostBackEvent(IPostBackEve ntHandler
sourceControl, String eventArgument)
System.Web.UI.Page.RaisePostBackEvent(NameValueCol lection postData)
System.Web.UI.Page.ProcessRequestMain()


--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:1.1.4322.573;
ASP.NET Version:1.1.4322.573

Apr 19 '07 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

17
by: amber | last post by:
Hello. Can someone tell me what I may be doing wrong here? I'm using the code (lboxRP is a listbox): Dim newRPindex As Integer newRPindex = Me.lboxRP.FindString(RP)...
3
by: Paul T. Rong | last post by:
I have a listbox (of product names) control on my form. I want to pass the selected item (a product name) to a subform, and the product unitprice should apear automatically next to the product name...
8
by: Oddball | last post by:
Ok - I have a ListBox control and I'm ready to write my own DrawItem event handler. What I want to draw as the item is another control. I have created a user control that I would like to list in...
2
by: collie | last post by:
Hi, I have 2 listboxes. The first gets populated from the db as soon as the page loads. The second listbox get populated based on the user's selection from the first listbox. However,...
6
by: Chris Leuty | last post by:
I am populating a multiselect Listbox from a dataset, with the content of the listbox filled by one table, and the selections determined from another table. So far, I have been keeping the dataset...
1
by: yamne | last post by:
I have a problem. When I click in edit datagrid button I show two listbox and two button. I use two button to move data between two listbox. My problem is that I can't call the listbox in the...
7
by: Dave | last post by:
Hi all, After unsuccessfully trying to make my own dual listbox control out of arraylists, I decided to look for a 3rd party control. I've looked for over a week now and can't find anything but...
3
by: Ali Chambers | last post by:
Hi, I have created a listbox called "dtlist1" on my VB.NET form. I call a procedure as follows: Private Sub openfile(flname As String) dtlist1.Items.Clear() etc..
1
by: Sunray | last post by:
I have a form called the sales form and i have 2 sets of listboxes So what happens is. i add items form the bottom set of list boxes which are bound to a data base to the top set of list boxes which...
5
by: Academia | last post by:
(If you've seen this in the drawing NG, sorry. I inadvertently sent it there.) I have a listbox populated with Objects. The Class has a String field that ToString returns. I assume that...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.