473,804 Members | 3,675 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Code broken when moving from VS 2002 to VS 2003

I have an inherited comboBox that I'm using to try to make an intellisense type box in VS 2003 .Net.

It works okay when compiled in VS.Net 2002. It doesn't work when compiled in VS.Net 2003. In 2003, it compiles fine with no error or warnings, but doesn't do what its supposed to. I've done some
tweaking here and there, and nothing I do seems to work. Anybody got any ideas on this?

the difference between 2002 and 2003 is that the value typed into the combobox is not getting updated in the OnKeyPress method. So the combobox.Text is still set to what was in it PRIOR to the
OnKeyPress method getting called.

Here is a snippet of my code. The Application.DoE vents() funcs are just so I can see what's going on at various spots.

private void OnKeyPress(obje ct sender, System.Windows. Forms.KeyPressE ventArgs e) {
string _cmbText;
int selectionStart;
int selectionLength ;
AutoComboBox _cmb = (AutoComboBox) sender;

if (_cmb.DropDownS tyle == System.Windows. Forms.ComboBoxS tyle.DropDown ||
_cmb.DropDownSt yle == System.Windows. Forms.ComboBoxS tyle.Simple) {

_cmbText = SearchList(_cmb ); //this returns the Text at the index of the combobox from the FindText(string ) func
if (_cmbText != String.Empty) {

selectionStart = _cmb.Text.Lengt h;
selectionLength = _cmbText.Length - _cmb.Text.Lengt h;

_cmb.SelectedIn dex = _cmb.FindString (_cmbText);

_cmb.SelectionS tart = selectionStart;
_cmb.SelectionL ength = selectionLength ;

e.Handled = true;
}
}
}
Nov 16 '05 #1
0 1056

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

Similar topics

2
5796
by: Joe Koziatek | last post by:
My IE6 runs Javascript1.3 but not Javascript1.2 My Windows Version is: Version 5.1 (Build 2600.xpsp_sp2_rtm 040803-2158 My IE6 Version is: Version 6.0.2900.2180.xpsp-sp2_rtm 040803-2158 In the following html, if I change the 1.2 to 1.3 it works ( I get the popup hello..) -------------------------------
8
5465
by: | last post by:
Wel, I am rebuilding the VC# 2002 project that I have deployment problems with the 2003 version, hoping this solves the problems, but now I encounter this wierd bug??? If I have the project, and do not compile with "Allow Unsafe Code Blocks=false" set to true, then the project compiles and no problems. BUT if I compile with "Allow Unsafe Code Blocks=true" then I het the error below. With unsafe {} of unsave{} removed it dos not solve the...
17
1266
by: Tom Leylan | last post by:
Does anybody have any idea why my version of VS.Net doesn't accept the following syntax? For Each f As FileInfo In d.GetFiles() sz += f.Length Next f I always have to explicitly declare the variable as follows: Dim f As FileInfo
0
859
by: Howard Kaikow | last post by:
On a multiboot system, I have VS .NET 2002 installed in the OS on the G drive, and VS .NET 2003 installed in the OS on the J drive. Whilst booted to the OS on the G drive, I create a project using VB .NET 2002. I then boot to the OS on the J drive and upgrade the project to VB .NET 2003. I have noticed that the project's "Start External Program" and "Working Directory", and maybe other things, still point to the G drive even tho the
3
2841
by: BradC | last post by:
I have a big VS 2002/2003 annoyance, and wondering if there is a way to turn it off: Put your cursor at the start of an indented line of code inside a function. (right before the first character, not at the left margin) Now press Enter. It does insert a blank line, but it also moves your cursor 6 characters to the right, so that it is no longer at the beginning of the statement. If you press Enter again, you've now busted apart the...
4
3096
by: tt40 | last post by:
Anyone know how to prevent Access 2002 from automatically breaking all the incorrect joins in a query and then automatically saving the broken query? This is what I would call stupid design behaviour...Access takes your 'broken' query and auto saves it as what I call a 'corrupt' query... 1. Rename some BE tables and attributes 2. Open your FE 3. Open a query in design view that you know to now have broken names
4
2767
by: georges the man | last post by:
hey guys, i ve been posting for the last week trying to understand some stuff about c and reading but unfortunaly i couldnt do this. i have to write the following code. this will be the last time i ask for an entire code or u can give me the outine of what to do and i ll do it by myself. the description is the following: the program will read a text file that contains historical price of a stock. The program will allow users to query...
2
5825
by: ivrguru | last post by:
All, Since upgrading to Access 2003 from 2002, I've noticed that all of the linked table subdatasheets I had set up in 2002 with simple relationships are now not working in 2003. Since the majority of what I do with Access is simple inserts and edits, having to bounce around multiple tables and "find" the rows based on the previous table's PK in a list of thousands, makes 2003 completely unusable. Any suggestions on how to fix this? Thanks!
53
4763
by: Hexman | last post by:
Hello All, I'd like your comments on the code below. The sub does exactly what I want it to do but I don't feel that it is solid as all. It seems like I'm using some VB6 code, .Net2003 code, and .Net2005 code. I'm developing in vb.net 2005. This test sub just reads an input text file, writing out records to another text file, eliminating records that have a '99' in them (it is similar to a CSV file). Some of my concerns are:
0
9707
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9585
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10338
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10323
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7622
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6856
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5658
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3823
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2997
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.