|
TheMrProgrammer wrote: use the "Sender.ToString"
I can understand that your answer is restricted to vb.net control object, where the sender exist, but I am talking for object that is not a control.
but, let talk about button control.
I have Button1 as control in my form, how I can do something like this
For each Property in button1.properties<br />
debug.print(Property.Name)<br />
debug.print(Property.Value)<br />
Next<br />
TIA
Like car accidents, most hardware problems are due to driver error.
Samir R. Ibrahim
|
|
|
|
|
You have to use Reflection to get at the properties. There's a ton of tutorials out there. All you have to do is search for them[^].
|
|
|
|
|
Thank you for your help.
I found what I am searching for.
I did not know that GetType() is reflection.
My problem is still not solved.
I am trying to get the properties in WMI service with no luck. I will continue testing and when I get stuck I will post my question.
Best Regards
Like car accidents, most hardware problems are due to driver error.
Samir R. Ibrahim
|
|
|
|
|
You never mentioned WMI until now. That changes the question and it's answer immensly. Now, you don't use Reflection to do this. You use the Properties collection of the ManagementObject you're getting back from your WMI query.
For Each prop As PropertyData In wmiObj.Properties
Console.WriteLine("Property Name: " & prop.Name & " Value: " & prop.Value)
Next
|
|
|
|
|
Dave Kreskowiak wrote: You never mentioned WMI until now. That changes the question and it's answer immensly
I feel kinda lost and surprised a little.
Why should I mention that the PEM's is for WMI? is WMI is handled in diff way in vb.net?
I know you are right, since my reflection GetType() does not work with it and I am still trying to work with ManagementObject.
Could you explain please? and is there others kind of object I should take care about?
TIA
Like car accidents, most hardware problems are due to driver error.
Samir R. Ibrahim
|
|
|
|
|
Getting the properties of a .NET object is very different from a WMI object. The .NET object is a native .NET CLR type, whereas a WMI object is backed by a COM object, not native to the CLR.
|
|
|
|
|
Thank you for your explanation.
To much difference I should take care and learn.
In VFP, there is single "object" that handle all kinds of objects
Although there is an object can be accessed by "object.property", and other cannot be accessed unless you use "For Each"
Thank you very much.
Like car accidents, most hardware problems are due to driver error.
Samir R. Ibrahim
|
|
|
|
|
hi all
i am using this function in my app
<DllImport("USER32.DLL", EntryPoint:="SetLayeredWindowAttributes", SetLastError:=True, _
CharSet:=CharSet.Unicode, ExactSpelling:=True, _
CallingConvention:=CallingConvention.StdCall)> _
Public Shared Function _
SetLayeredWindowAttributes(ByVal hwnd As Integer, ByVal crKey As Integer, ByVal bAlpha As Byte, ByVal dwFlags As Integer) As Integer _
End Function
but the function is not working.
any guesses abt what is wrong here????
TheMrProgrammer
|
|
|
|
|
|
At a minimum, the hwnd parameter should be declared as an Intptr, not an Integer.
|
|
|
|
|
At first I should ask if it is possible to serealize (nested)classes in VBA Excel?
In order to access the XMLSerialize object in VB.NET you simply add:
Imports System.Xml.Serialization
Imports System.IO 'to write the XML to a file.
But I need this functionality in Excel VBA. I need to add a reference to access the XMLSerialize object.
What reference should I add?
Are there any issues to take into consideration when (de)serializing nested classes (user class containing user types and collections) in VBA or VB.NET?
Thank you in advance
|
|
|
|
|
IIRC, the .NET XML serializer won't work for serializing an Excel or VBA object. It only works on .NET objects.
|
|
|
|
|
AAAAAAAAAAARRRRRRRRRGGGGGGGGHHHHHHHHHH... Damn VBA
Thanks 4 the quick answer Dave.
|
|
|
|
|
|
Does anyone know how to implement Viseme events in Visual Basic 2005? I have the Microsoft SPAI-5.1 DSK for text-to-speech and voice recognition. What I want to do is create an animated face that moves it's mouth as if speaking while it is reading text-to-speech. This is on a Windows XP system, BTW.
I've read that the way to do that is through viseme events, but I have not seen a good example of how to do that, especially in VB.net. I've also read reconflicting information that says that viseme events may only be possible under Windows Vista.
Has any one used viseme events in VB? Or does anyone know a different way I can make an animated charactor sync mouth movements with spoke text-to-speech words?
Thanks For Reading,
-Justin R. Ratliff
weyoun7ster@gmail.com
|
|
|
|
|
You can probably get some ideas from this article[^] and its sample project.
|
|
|
|
|
Hi all,
I was doing some text parsing and I faced the issue below, I would like some one to explain to me from where the 42 is came.
' Add Text1 , at run time, write 123456
' Button Click
Dim _str1 = Me.Text1.ToString
Dim _str2 = Me.Text1.Text.ToString
Debug.Print(_str1.Length) ' Gives 42
Debug.Print(_str2.Length) ' Gives 6
6 is the length of text "123456"
I have Size = 78,20 : Max Length = 32767 : Margin 3,3,3,3 : Location 64,18 : Maximum Size 0,0 : Minimum Size 0,0
what is 42?
TIA
Like car accidents, most hardware problems are due to driver error.
Samir R. Ibrahim
|
|
|
|
|
Me.Text1.ToString uses the ToString method of TextBox (all objects have a ToString method). The ToString method of a TextBox returns its name, something like 'MyApplication.MyNamespace.textBox1'. If you Debug.Print _str1 you will see exactly what it is.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Henry Minute wrote: Debug.Print _str1
I run debug and see "System.Windows.Forms.TextBox, Text: 928028" , I thought it is debug info not the real value.
Thanks
Like car accidents, most hardware problems are due to driver error.
Samir R. Ibrahim
|
|
|
|
|
A pleasure.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Hi to All,
In order to run my VB.NET application in start UP, Is there any method/code to add it to windows services?
Regards,
HimangsuS
-----------------------------
I am a beginner
|
|
|
|
|
If your application is a service, look up how to add it to the services from the help documentation of visual studio.
If you have a normal windows application (a form with buttons and such), add a setup project to your solution and add the shortcut to be copied to the Start up folder there.
My advice is free, and you may get what you paid for.
|
|
|
|
|
Quit posting the same question in the forums. You got answers on that, use the search bar at the top or Google. **Attempt** to create a fix and then post your new questions.
Any suggestions, ideas, or 'constructive criticism' are always welcome.
"There's no such thing as a stupid question, only stupid people." - Mr. Garrison
|
|
|
|
|
Hi,
You need to create a project, make sure you select a "windows service" template from the list of templates.
there will be certain settings that needs to be set up,
you can google for these options or use msdn.
try google: "create windows service in vb.net" there are alot of help there!
hope this helps
Anoop
|
|
|
|
|
Hi to all,
I am facing this problem for a couple of weeks and not able to solve. Anyone please help me out.
I have 2 table (A and B) which are related with some foreign keys.
Now I want to update a column in table A, with the help of datagrid(since I want to update so many records together). But while showing on the data grid it should show the result of a join operation(because only table A doesnot give all information about the records).
Please tell me, what is the method to do so.
In short "I want to update the table with a querry of Join operation". or "Update multiple table with datagrid"
I am using MS ACCESS database
Thanks in advance
HimangshuS
-----------------------------
I am a beginner
|
|
|
|