|
I have a Combo Box control and during runtime I want to remove some of the Items in it according some conditions. How can I achieve this ?
I wrote the code for this
ComboBox1.Items.Remove(Index)
ComboBox1.Refresh()
But this doesnt works and still the item is there after running the code.
Could anybody please suggest what is the correct code.
Thanks.
|
|
|
|
|
use this property
combobox1.items.clear()
might it work
|
|
|
|
|
Thanks Ravi for your reply.
The code you have supplied clears all the items in the ComboBox. I wanted to remove a particular item depending on the condition i have. I found the correct code for this and it is :
ComboBox1.Items.RemoveAt(index)
Thanks for your response.
Sekhar
|
|
|
|
|
Can you you halp me wiht my assignment???..
1. Create a folder that i
can rename, delete, save and delete images
vashstampede
|
|
|
|
|
System.IO.Directory.CreateDirectory("c:\RTFM")
|
|
|
|
|
Ashfield wrote: System.IO.Directory.CreateDirectory("c:\RTFM")
Read This Fine Message?
Luc Pattyn [Forum Guidelines] [My Articles]
This month's tips:
- before you ask a question here, search CodeProject, then Google;
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get;
- use PRE tags to preserve formatting when showing multi-line code snippets.
|
|
|
|
|
"SOS!" help...... Please give me codes on how to connect an image scanner??
|
|
|
|
|
how can i give the expiration date in my visual studio setup and deployment project which is build in vb.net
|
|
|
|
|
Explain in Detail what you want to do
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sadden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
vuyiswam@tshwane.gov.za
|
|
|
|
|
I have a DataGridView control in a PC Project. I want tooltips to appear in the cells of a specific column...these tooltips will be different for each row. I currently using this code:
dgvMyGrid.ShowCellToolTips = True
dgvMyGrid.Columns("MyColumn").ToolTipText = "Test HeaderCell Tooltip"
For Each dgvr As DataGridViewRow In dgvMyGrid.Rows
dgvr.Cells("MyColumn").ToolTipText = "Test Cell Tooltip " & dgvr.Index
Next
I am able to see the Test HeaderCell Tooltip when I hover over the headercell in the column, but the tooltips in the cells of the grid are not showing up. Is there another setting I'm missing or something? Anyone got any ideas?
|
|
|
|
|
I finally figured out why it's not working. To make my form look nicer, I set my grid's visiblity to false in design, and then set it to true once the entire form has loaded. However, there are certain settings on the grid that just don't seem to take effect if the grid is currently not visible. I guess tooltips is one of those items. (Other ones I've found are fonts/colors/etc.) So I guess I will have to loop through the grid again after I've set the grid's visiblity to true, unless someone else has a workaround for this issue???
|
|
|
|
|
Hello everyone,
I have developed code using Visual Basic in visual studio 2005.
It runs fine when i run it.
Now i want to publish it on the www web.
Could anyone please help me out how to do that?
thank you
|
|
|
|
|
the www web ?
The obvious way is to put it in a zip, and give people a link to the .NET framework.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Christian Graus wrote: www web ?
Hmmmm, that's a new one
"I guess it's what separates the professionals from the drag and drop, girly wirly, namby pamby, wishy washy, can't code for crap types." - Pete O'Hanlon
|
|
|
|
|
I want to put my question in a more appropriate way.
I am really sorry for the way i put my question.
I am really new to the programming world.
So please pardon me.
I want to deploy it on the web and the user have to open it on the browser like explorer. Its basically a game sort of thing. I want the user to play the game directly on the web browser.
Could any one help me out on this?
Thanking you.
|
|
|
|
|
Hi
I need to save an Excel file as (Excel 97-2003)
For the code below, I have a reference to Microsoft Excel 12.0 Object Library, which I assume is for Excel 2007.
When I open a workbook saved as below, I get an error message saying the workbook is not in the expected format.
Previously I used a reference to Excel 10.0 which worked fine, but I cannot find that anymore when adding references.
I guess I have two choices:
a) How do I reference Excel 10.0 Object Library?
or
b) In the code below, what do I replace "FileFormat As Object" with to specify that the file must be saved as an older Version?
Private Sub ExportExcel()<br />
Dim xlApp As New Excel.Application<br />
Dim xlBook As Excel.Workbook<br />
xlBook = xlApp.Workbooks.Add<br />
<br />
'Write stuff to book here...<br />
<br />
xlBook.SaveAs("MyBook.xls", "FileFormat As Object")<br />
xlBook.Close()<br />
xlBook = Nothing<br />
xlApp.Quit()<br />
xlApp = Nothing<br />
GC.Collect()<br />
End Sub
|
|
|
|
|
Found my answer...
Use one of the Interop.Excel.XlFileFormat formats
Interop.Excel.XlFileFormat.xlExcel8 seems to work fine
|
|
|
|
|
Hi,
As the title says, How do I create, use and interact with windows services in VB.NET 2005?
Links, examples, tips , tutorials.. all welcome.
Thanks!
|
|
|
|
|
www.Google.com
This will realy Help
Thanks
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sadden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
vuyiswam@tshwane.gov.za
|
|
|
|
|
Hi,
Let me explain step by step,
First: I have a file which gives details of a user as., FName, MName, LName, Address, TestDate, TestResult etc...
Second: I have to import this file and store it in Data Base. And assiagn a unique number to each user.
I am maintaining a Database where candidate details and test details are stored in separate tables using the unique id i created as the key.
Third: If this user to whom i had already assaigned a unique number, will take another test. And again the data is send in the same format (FName, MName, LName, Address, TestDate, TestResult etc...).
Forth: This file does not have any number or a unique field which can differentiate one user with other.
Fifth: In this case i have to only input the test details and not the candidate details as the user is already holding a unique id.
Question 1: How can i differentiate the users from one to another.
Question 2: How can i check wheather the user candidate data is already in the database or not. As generally different users do have same name and common addresses which are very irrelavent to check.
Jats
modified on Friday, January 18, 2008 6:50:00 AM
|
|
|
|
|
Jats_4ru wrote: As generally different users do have same name and common addresses which are very irrelavent to check.
If different users really have the same name and the same address, then you don't have enough information to determine if a user already exists in the database or not.
Experience is the sum of all the mistakes you have done.
|
|
|
|
|
i created a new class (called clabel), inherited from label and in this class i override the label's-textproperty :
shared MyText as string
public overrides property text() as string
get
mytext
end get
Set(ByVal Value As string)
mytext= value
end set
end property
in my form's load-event i dynamically added now a number of these new custom-labels, like this:
dim i as integer
for i = 0 to 10
mylabel = new clabel
with mylabel
'size, location...
.text = i
end with
me.controls.add(mylabel)
next i
now i would expect to show each label in its text-property a different number, from 0 to 10.
but they all show the same (highest) number, in this case "10".
why?
|
|
|
|
|
It is simply because you are using a shared (static) variable MyText to store and return value of Text property.
Please know that shared (static) variable is a variable which has just one instance which is shared by all instances of objects.
Therefore text property of your all clabel objects will always have same value because they all are pointing to the same MyText variable, and this value will be value last set for MyText, which in this case if 10.
Declare MyText as a Private string variable and your issue will be resolved.
I hope this help .
-Dave.
Dave Traister,
ComponentOne LLC.
www.componentone.com
modified on Friday, January 18, 2008 7:50:10 AM
|
|
|
|
|
I have used a webbrowser control to navigate to a site. I have extracted the HTML source code of the site and filtered the links in it. I want to navigate to the links one by one. But it is using somekind of internal functions to link to everypage and every link has got the same link text.
can anybody tell how can i actually simulate like clicking on every link that is in the page through vb.net 2005 using webbrowser control.
thanks a lot in advance.
|
|
|
|
|
How can i convert an rgb image to an YCrCb image??? is there any builtin function for it in .net?? or any other easy way out?
(Jameel)
|
|
|
|