|
Your looking for ListBox.SelectedItem
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
StateList is the ListBox with the states...
'Get the state selected in the StateList
Public Function GetSelectedState() As String
'Check if there's something selected
If StateList.SelectedIndex = -1 Then
'There's nothing selected
Return "No State Selected"
Else
'Return the selected state
Return StateList.SelectedItem.ToString
End If
End Function
and the SelectedIndex event is raised when the user selects a different state...
|
|
|
|
|
i'm from indonesia,
i wan't share my problem but my english not good...
my problem now that i can't take the color(with argb) from image in picturebox.image or picturebox.backcolor...
i hope somebody have an idea...
thanks
: : The Experience Is Te Best Teacher : :
Share Your Experience...
Thanks....
|
|
|
|
|
Is this[^] what you need?
<italic>Work hard, Work effectively.
|
|
|
|
|
i have a medical application. once the doctor selects a patient for consultation. there are a list of differnt diagnosis which can be selected multiple for a single patient at a time.Now each diagnosis has differnt findings and surgerys booked for the diagnosis.These findings are 40% common in all diagnosis and rest are differnt. Now there are around 20 diagnosis. my clinet wants to see the selected diagnosis findingson a findings form and surgery information for all selected in surgery form. i cannot make all the controls for differnt findingds on the same form a make visisble true false according to the selected. and making controls at runtime will be cumbersome.can any body tell me the flow to do this. any further information needed will be provided.
Thanks
Monica
|
|
|
|
|
Hope it helps
Dim UserControl As New YourControl
Me.Panel1.Controls.Clear()
UserControl.Location = New System.Drawing.Point(x, x) 'x - Specify your control location
UserControl.Name = "YourControl"
UserControl.Size = New System.Drawing.Size(x, x) 'x - Specify your control size
UserControl.TabIndex = 0
Me.Panel1.Controls.Add(UserControl)
|
|
|
|
|
User Control is only one example name.
Put another name.
First you must reference your control on the form.
In the solution explorer/References/Add references/Select your control
Then you must import your control:
Imports YourControl 'The name of your control
|
|
|
|
|
i know i am reffering my user control not this name(user Control) i have alos added the reference but ist not showing up when i use dim ctrl as new ___ i cannot find that in the list popup. what other way i can refrence. its in my project .
|
|
|
|
|
Verify if your control is Private.
It must be Public if it is a different project
|
|
|
|
|
its in the same project and how can i verify its public or private
|
|
|
|
|
On the first declaration of the class.
Private class YourControl
Change Private to Public
|
|
|
|
|
i may have many usercontrol in a standard exe . its not letting me change the control type to public. if i want to it says change the project to activex control but this is my project with other forms. so dio i have to make my controls in a differnt project. i am not getting it.
pls help
|
|
|
|
|
Now I know what's wrong
The code that I gave you is for Visual Basic .Net.
You must be running VB6.
I can't help you on that.
Sorry!
|
|
|
|
|
Hi,
I'm building a new app (vb6) and I need to open a .txt file and check if in the .txt file it exists a text expression.
How can I do that?
Thanks in advance.
|
|
|
|
|
Private Sub Get24Hours()
Dim strLine, strTmp() As String
Dim lngX As Long
Open App.path & "\REC24-032405120130.txt" For Input As #1
Do While Not EOF(1)
Line Input #1, strLine
strTmp = Split(Trim(strLine), ",")
If strTmp="Your Expression" Then
else
endif
lngX = lngX + 1
Loop
Close #1
Hope this will help
|
|
|
|
|
I am building a deployment project for my Visual Basic application, and I'm having some registry trouble. I'm using the Registry Edition in the IDE to create the registry keys, but a few of my keys include the full path to the application. Since the MSI installer lets to user install wherever they want (I can only recommend an installation location), how can I get full installation location so that I can update my registry keys? Do I have to do a custom action that runs once the installation is finished? Even so, how can I get the full installation path? Thanks.
|
|
|
|
|
You could put in a custom action to put the installation path into the registry.
It would be even easier to change your code to not care about getting that path from the registry. Instead, at runtime, you could use Application.StartupPath to find out where the .EXE was installed to. From there, you could make absolute, or relative, path names to any file that your application needed using the Path class and its .Combine() method.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
What I'm actually doing is installing a right-click explorer extension so that my application has an action when you right click on the relevant file. Not the default action, but just an action that the user can select (along with "Edit this file", "Print", etc.).
To do that, it's my understanding that I need to add a registry key under that extension in the registry. I've gotten that working fine, and my applications does great if it's installed to the default location, but if they change the location during install, then the registry key doesn't point to the correct location anymore. My right-click custom action is still created and displayed, but the user gets an error when they execute the action, since the EXE file can't be found.
Any ideas?
|
|
|
|
|
This problem has a very simple solution. Windows Installer anticipates the need to determine the actual installation folder during the setup execution for a variety of reasons. The msi includes a builtin property named TARGETDIR that evaluates to whatever the application folder is set to at runtime. So if you need to set a registry key to a file's path in the application folder you can substitute the property using a syntax of [TARGETDIR]. At setup runtime the installer will automatically replace any reference to [TARGETDIR] with the target folder path setting.
The syntax is as follows:
Suppose the user selects install path of "C:\Program Files\Your App Target"
If you define a registry key and set the value to:
[TARGETDIR]
the installer will create a key with a value of "C:\Program Files\Your App Target".
If you define a registry key and the set the value to:
[TARGETDIR]\MyApp.exe
the installer will create a key with a value of "C:\Program Files\Your App Target\MyApp.exe".
Robert
|
|
|
|
|
Thanks - this is exactly what I was looking for! I saw the "[Manufacturer]" tags in the Registry Editor, but I didn't even think that there might be other tags that would be replaced when the application was installed.
Is there anywhere that a complete list of these tags (or whatever they're called) can be found? I'd like to know if there are any others that might make my package run a little more smoothly or allow some additional customization during the install process.
Thanks again!
|
|
|
|
|
Ryan McCauley wrote:
Is there anywhere that a complete list of these tags (or whatever they're called) can be found? I'd like to know if there are any others that might make my package run a little more smoothly or allow some additional customization during the install process
Download the Windows Platform SDK. It contains documentation of Windows Installer technologies and various tools that allow you to modify the MSI packages created in VS IDE.
http://www.microsoft.com/downloads/details.aspx?FamilyId=A55B6B43-E24F-4EA3-A93E-40C0EC4F68E5&displaylang=en[^]
Robert
|
|
|
|
|
I have a dataset of user names and I need to search the main DOMAIN to see if that name is still available. If not, then I am to delete that user off my User table (Oracle db).
Note that I don't want to locate the current user's domain information (which I could use the SYSTEM.ENVIRONMENT for), but I want to get domain information about someone else (or in this case many someone elses in a loop).
How can I do this? I would appreciate any help.
Thanks and regards
Sean
|
|
|
|
|
Hi,
I have constructed a Datagrid with 15 columns.
I want the horozontal scrollbar to start from the 6th column.so that 0-5 columns remains static and the rest of the columns [6-15] scrolls upon dragging the scroll bar.
another thing is : i have 3 datagrids. If i drag the horizontal scroll bar of the first grid the other 2 grids columns should also automatically scrolled in proportion of the first grids scrolling.
it will be highly helpful if any one provides me a solution with sample coding.
tu.
tinu anand.
|
|
|
|
|
Hi all,
I'm working on a project that using vb.net.
There is an existing screen name MPN Print in the project that is specially used for batch printing.
However, I need to create a windows service using vb.net that have the same function as MPN Print screen so that the program will run automatically once the computer being start up.
My problem is, I have no idea and confuse to work on the wondows service.
-Do i need to cut the existing codes of MPN Print screen and paste it in the windows service(service.vb)?
-Or maybe there is a way or a specific function that can be used in order to retrieve code's of MPN Print from the service.vb?
Can someone give me guide to find the solution?
besah
|
|
|
|
|
The selectitems is a collection.
How to get the value of a selected item?
Thanks!
|
|
|
|