|
I would like to calculate a mathematical function like sin, log, exp or something else as an array and than draw a diagram from this array. Someone told me that I would need a Chart Control, but in the toolbox of my version of VB 2005 express I cannot find such a control.
Where can I get such a control and the information how to use it?
|
|
|
|
|
There's no chart control included in the framework. You can draw it yourself, or search the web for a third party component.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
|
Hello guys
I m reading from a text file, and in the same time comparing the read value with predefined values in a DB
From file:
EXTERNAL ALARM
GENERATOR RUNNING KAA
EDL ARSAL FAILURE
Having KAA in my database I want to retrieve the ID of this data
And having ARSAL in my database I want to retrieve the ID of this data
This is a part of my code,
I know that this code sounds erroneous,
Do While Not sr.Peek = -1<br />
checkStr = sr.ReadLine<br />
cmd.CommandText =select ID from table where name like '%" checkstr & "'"<br />
end while<br />
I guess the prob is in “%”,
Thx for your help
Regards
Ramy
|
|
|
|
|
I could be wrong, but this looks like it should read
cmd.CommandText ="select ID from table where name like '%" & checkstr & "'"
Gaming at the GuildofBlades.com is the only way to really experiece the level 99 Soul-Sucking Sword!
|
|
|
|
|
As the lines that you read contains several words, and the data in the database is single words, you should look for the word in the string, instead of the opposite:
cmd.CommandText =select ID from table where '" & checkstr & "' like '%'+name+'%'"
---
b { font-weight: normal; }
|
|
|
|
|
Guffa wrote: cmd.CommandText =select ID from table where '" & checkstr & "' like '%'+name+'%'"
Not
cmd.CommandText = "select ID from table where '" & checkstr & "' like '%'" + name + "'%'" ?
Christian Graus - C++ MVP
|
|
|
|
|
You are right. I missed that the OP missed the starting quote.
Still, that's just syntax. That's not the hard part.
---
b { font-weight: normal; }
|
|
|
|
|
You'd like to think so, I was amazed you did get an 'I got an error' response.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
thx guys
this helped me
i apriciate it
Regards
Ramy
|
|
|
|
|
Hi All,
I got a code module in which the following declaration was found:
Public Declare Function SetupDiGetClassDevs Lib "setupapi.dll" _
Alias "SetupDiGetClassDevsA" ( _
ByRef ClassGuid As SP_GUID, _
ByVal Enumerator As String, _
ByVal hwndParent As Integer, _
ByVal Flags As Integer) As Integer
Can you help me find the exactly how shouid i get this API to be declared as above.In Visual Studio6.0 Tools i seacrhed in API text viewer but the above API was not found at all.
Thank you in advance.
|
|
|
|
|
I have had some trouble with this one.
How can I Display the contents of the Run Registry value in a textbox?
Just incase you are wondering, this key is located in the registry at:
HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Windows/CurrentVersion/Run
|
|
|
|
|
MessageBox.Show.
Reading the registry is also widely documented.
Christian Graus - C++ MVP
|
|
|
|
|
Thanks on the quick reply, how would I use message box.Show to display it? like this?
Messagebox.show ("HKEY_L...") ? sorry I am allmost certain that is wrong as that just displays text.
|
|
|
|
|
My point was that even if you typed the question in to google as you typed it here, you'd probably find heaps of articles on how to read the registry.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
HI, This Code to Reading fro registry
<code>Imports Microsoft.Win32
Registry.LocalMachine.OpenSubKey("SOFTWARE", True).OpenSubKey("Microsoft", True).OpenSubKey("Windows", True).OpenSubKey("CurrentVersion", True).OpenSubKey("run",True).GetValue(OBJECTNAME</i)</code>>
The OBJECTNAME must be replaced by value name in the Key (RUN) e.g. "TkBellExe"
Mohamad A. Flefel
mflefel@hotmail.com
+962 79 5963865
C#.net & VB.net Developer
|
|
|
|
|
Thanks for the code snippit and for Chris, I know how to read and write to the registry AND I also know what messagebox.Show does EXACTLY but how is that gonna help me, my question was How can I display the contents of the RUN registry key in a TEXTBOX (thats already on the form) not a message box, I know how to display registry VALUES in a textbox but I do not know how to display the entire contents of a registry SUBKEY.
|
|
|
|
|
|
Uh, ye thanks... ... lol
Would you recommend a Treeview then? if so I would need to know how as I have never worked with the Tree view control.
thanks
|
|
|
|
|
SLRGrant wrote: Would you recommend a Treeview then?
Yes!
MSDN is your good friend, there are samples about populating TreeViews.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
i think that u want to display the values entire the "RUN" Key if this correct ,try this code
Registry.LocalMachine.OpenSubKey("SOFTWARE", True).OpenSubKey("Microsoft", True).OpenSubKey("Windows", True).OpenSubKey("CurrentVersion", True).OpenSubKey("run", True).GetValueNames()
the GetValueNames() return the names of all values in key then u can read the value by using the getvalue("ObjectName") method then u can display them in any way u like
Mohamad A. Flefel
mflefel@hotmail.com
+962 79 5963865
C#.net & VB.net Developer
|
|
|
|
|
|
yay, thank you for the help guys, I should be fine from here
---------------------------
If I had a £0.01 for the amount of times I have said to people "USE GOOGLE" I would be richer than Bill Gates.
|
|
|
|
|
I am currently enrolled in a VB class and am completely new to the class and this forum so if you need any additional information please let me know. I hope this question makes sense to someone. lol
My current project requires me to do a summary with a running total of the number of deposits, amount of deposit, number of checks, amount of checks etc.
I am able to get the summary up in a new messagebox but it will only show the last transaction. for instance if I make a deposit, then write a check, the summary will only show the check written and the amount of the check. It will not show the deposit I made or the amount of the deposit. How can I get it to show all of the totals from all of the transactions?
If you need any code I can provide it for you.
Thanks,
Ruby
|
|
|
|
|
You need to show the code. The answer is, pass all the info you want to see, into the messagebox.
Christian Graus - C++ MVP
|
|
|
|