473,414 Members | 1,606 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,414 software developers and data experts.

can I manually do this?

Hey all,

I was wondering if I wanted to run the listbox1_SelectedIndexChanged by
calling it in my code(without actually clicking on the screen), how can I do
this?

thanks,
rodchar
Nov 21 '05 #1
6 991
Hi,

ListBox1.SelectedIndex = 3

Ken

----------------------

"rodchar" <ro*****@discussions.microsoft.com> wrote in message
news:88**********************************@microsof t.com...
Hey all,

I was wondering if I wanted to run the listbox1_SelectedIndexChanged by
calling it in my code(without actually clicking on the screen), how can I do
this?

thanks,
rodchar
Nov 21 '05 #2
just call it as a method

Me.ListBox1_SelectedIndexChanged(Me, New EventArgs)

"rodchar" <ro*****@discussions.microsoft.com> wrote in message
news:88**********************************@microsof t.com...
Hey all,

I was wondering if I wanted to run the listbox1_SelectedIndexChanged by
calling it in my code(without actually clicking on the screen), how can I
do
this?

thanks,
rodchar

Nov 21 '05 #3
Thanks for the replies, they helped.

"rodchar" wrote:
Hey all,

I was wondering if I wanted to run the listbox1_SelectedIndexChanged by
calling it in my code(without actually clicking on the screen), how can I do
this?

thanks,
rodchar

Nov 21 '05 #4
Brian,
I would recommend:
Me.ListBox1_SelectedIndexChanged(Me, EventArgs.Empty)
Rather then creating an empty EventArgs each time. This limits the amount of
pressure on the GC, which means it (the GC) does not need to work as hard.
In other words it (New EventArgs) may or may not impact performance.

Hope this helps
Jay

"Brian Henry" <br**********@newsgroups.nospam> wrote in message
news:eT**************@TK2MSFTNGP09.phx.gbl... just call it as a method

Me.ListBox1_SelectedIndexChanged(Me, New EventArgs)

"rodchar" <ro*****@discussions.microsoft.com> wrote in message
news:88**********************************@microsof t.com...
Hey all,

I was wondering if I wanted to run the listbox1_SelectedIndexChanged by
calling it in my code(without actually clicking on the screen), how can I
do
this?

thanks,
rodchar


Nov 21 '05 #5
Two options...

a)
lstFiles_SelectedIndexChanged(nothing, nothing)

b)
Private Sub lstFiles_SelectedIndexChanged(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles lstFiles.SelectedIndexChanged
RealFunction()
End Sub
Sub RealFunction()
'Your code
End Sub

--
Jonathan Allen
"rodchar" <ro*****@discussions.microsoft.com> wrote in message
news:88**********************************@microsof t.com...
Hey all,

I was wondering if I wanted to run the listbox1_SelectedIndexChanged by
calling it in my code(without actually clicking on the screen), how can I do this?

thanks,
rodchar

Nov 21 '05 #6
thanks again.
"Jonathan Allen" wrote:
Two options...

a)
lstFiles_SelectedIndexChanged(nothing, nothing)

b)
Private Sub lstFiles_SelectedIndexChanged(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles lstFiles.SelectedIndexChanged
RealFunction()
End Sub
Sub RealFunction()
'Your code
End Sub

--
Jonathan Allen
"rodchar" <ro*****@discussions.microsoft.com> wrote in message
news:88**********************************@microsof t.com...
Hey all,

I was wondering if I wanted to run the listbox1_SelectedIndexChanged by
calling it in my code(without actually clicking on the screen), how can I

do
this?

thanks,
rodchar


Nov 21 '05 #7

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

Similar topics

2
by: | last post by:
I would like to add a reference to my project manually. Is there somewhere in the IDE where I can see and modify all of this project's references? Thanks, VM
6
by: Karl Hungus | last post by:
Im using an xsl transformation so its not practical to use controls in the usual way, but I would still like to call methods in my codebehind class. usually Id just use onclick="<eventHandler>"...
3
by: darrel | last post by:
I have three tables making a many-to-many relationship: Companies CoID | CoName Link CoID | InsID Insurers InsID | InsName
1
by: Alan Wang | last post by:
Hi there, I have a application to run OpenOffice version 2.0 as background process and I have windows service is running to check if OpenOffice is running or not. If it's not running I will call...
3
by: mayur_hirpara | last post by:
Hi, I am writing a VB.NET application. It is a Windows application at the moment. The application contains a button. the click event of button perform a long running task. It needs to be started...
1
by: Ethender | last post by:
Hi, How to execute Process-flows manually(from SQLPLUS). I tried to execute the process-flows manually by using the following, but no response. sqlplus OWB/OWB@sa...
2
by: questionit | last post by:
Hi I am unable to set resource settings of a device from Device Manager manually - the fields are disbaled by default. The check-box to disbale/enable 'auto resource settings' is also disabled. ...
2
by: ryuujin | last post by:
Hi, sorry about my english. I need to scroll manually the content of a panel when the user click on a button. The user have to interact with my application by a touch screen monitor and I...
3
by: =?Utf-8?B?TmFkYXY=?= | last post by:
Hi, I am trying to manually call a constructor of a template argument, the compiler returns “error C2039: ‘T’ : is not a member...” How can I manually call the constructor of a...
2
by: =?Utf-8?B?UiBSZXllcw==?= | last post by:
Hi, Is there a way to get/set (or override) SqlParameter.SourceColumn values manually? Code example: // create DeleteCommand by SourceColumn strSQL = "DELETE FROM WHERE (ID=@ID)"; using...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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...
0
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...
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
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development projectplanning, coding, testing,...
0
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...

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.