|
After searching through the Registry a bit, I found a key that controls the paths to each Control Panel icon (HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Control Panel\Extended Properties\{305CA226-D286-468e-B848-2B2E8E697B74} 2 ). So I did a bit research to see if I could manually add my own icons my creating a sub key there, but I didn't find much. I did find something though saying you could only use .cpl files, because otherwise the icons would not show. Is this true? Because TweakUI is an application, not a .cpl . And, is it safe to add icons to the Control Panel by creating a a single Registry key?
Thanks a lot!
Trinity: Neo... nobody has ever done this before.
Neo: That's why it's going to work.
|
|
|
|
|
I'm able to use the string.replace function. Now I want to report on how many replacements have been made.
The below code makes the correct replacement, but I want to get a little feedback.
Dim strStartString As String = "To*All*The*Girls*I've*Loved*Before"
Dim strDestString As String = txtDestination.Text
strDestString = strStartString.Replace("*", " ")
txtDestination.Text = strDestString
Thanks!
|
|
|
|
|
All you'd have to do is use a For statement, then read to each "*".
Trinity: Neo... nobody has ever done this before.
Neo: That's why it's going to work.
|
|
|
|
|
Sure, that would work. I'm sure that there is also different function that could search for how many "*" exist.
My first preference is to get the count of replacements by the function.
|
|
|
|
|
MatrixCoder's method is probably the most common technique and I do not think there is a method that is going to give this to you. If you are intent on pursuing a single method call then try this.
Dim Integer counter=strStartString.Split("*").Length-1
I kind of agree with MatrixC's technique since it is very discriptive of what it is doing.
|
|
|
|
|
Can you send to me some example written by VS.NET 2003?
Please send to address mail mrtrung04@yahoo.com or trantrung@imct.com.vn
Thank you very much!
|
|
|
|
|
I am trying to enter values in a text box, which are then checked against the value of a label, then if correct, adding a value of 1 to an integer (10 times over) but i am having to use IF statements to do this so my code is getting hefty. Is there a loop which can be used to reduce the code, it would be a great help.
Cheers
|
|
|
|
|
You could try a For statement.
Trinity: Neo... nobody has ever done this before.
Neo: That's why it's going to work.
|
|
|
|
|
could you give an example please?
|
|
|
|
|
Well, it would help if I could see your current code.
Trinity: Neo... nobody has ever done this before.
Neo: That's why it's going to work.
|
|
|
|
|
Ok, the current code is like this (i know its amateurish, but it was the only way i could get it working!)
Private Sub txtInput1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtInput1.TextChanged
'If statement to check correct inputted value
If txtInput1.Text = lblLetter1.Text Then
'Letter goes green to signify the entry and being correct
lblLetter1.ForeColor = Color.Green
'Adds 1 to the intScoreAll global value
intScoreAll = intScoreAll + 1
'Else statement if incorrect value is inputted
Else
'Letter goes red to signify the entry and being incorrect
lblLetter1.ForeColor = Color.Red
End If
'Disables the input box to stop cheating
txtInput1.Enabled = False
'Selects the next txtInput box for key entry
txtInput2.Select()
End Sub
|
|
|
|
|
You should be able to put a for loop around the if-endIf statement. I forgot the exact syntax for VB.NET but it looks like this in VC#.NET.
<br />
for(int i=0;i<10;i++)<br />
{<br />
if(txtInput1.Text==lblLetter1.Text)<br />
{<br />
lblLetter1.ForeColor=Color.Green;<br />
intScoreAll+=1;<br />
}<br />
else <br />
{<br />
lblLetter1.ForeColor=Color.Red;<br />
}<br />
}<br />
txtInput1.Enabled=false;<br />
txtInput2.Select();<br />
Well that is how you would use a for-loop but it may be better for you if you just set up a global counter that is incremented by 1 whenever this method is used and when the value reaches 10 then exit. The loop for you in this method would not necessarily work becuase it would do the for loop on the same text that is in the textbox at one time without new text being entered for every of the ten times.
Regards,
Thomas Stockwell
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Visit my homepage Oracle Studios[ ^]
|
|
|
|
|
Help Me!!!
Dear Expert,
Hi!
I am very happy to use Crystal Report in my VB.NET project.
Right now I need a little help on how to display JPG file by XML file dynamically.
I mean I put File Path into XML file and then display them on Crystal report.
I know Formula Fields and Database Fields.
I don't know how to set up it for picture to insert into the Crystal Report.
Please tell me how to set up Formula Fields on Crystal Report XI.
like @Command([FileImport];"JPGImage","C:\\mypic\office.jpg"),
however the file path is in XML file. I put them into each row of a Dataset's dataTable.
or @Filepath(XML file)
email: enter2000 at yahoo.com
Thanks so much for the help!
I am looking forward to receiving your reply!
Lena
|
|
|
|
|
How do you store and HIDE information (such as passwords) so nobody can find/edit/delete/view them?
Richard Faulkner
Founder of GallantTechnologies
|
|
|
|
|
_Richard Faulkner wrote: How do you store and HIDE information (such as passwords) so nobody can find/edit/delete/view them?
I don't. If "nobody"* can find/edit/delete/view some piece of information neither can your program.
By allowing your program access you must be open to the possibility that someone may be able to find/edit/delete/view the information. At this point your strategty must turn to minimising the risk of that happening.
In order to do that you need to know what the information is? why it needs to be hidden? What are legitimate reasons to edit it? What are legitimate reasons to delete it? What are legitimate reasons to view (read) it?
Information can be placed in many places: files, the registry, in a database, as an embedded resource in an assembly.
Information can be hidden by many techniques: encryption, steganography (placing it in highly unusual places, e.g. IP packet headers, in a picture or audio stream)
* Which is an empty set
|
|
|
|
|
|
Never store a password - instead store the one-way encrypted version of the password and test any input against that. (RSA or SGK[^] is a good example)
|
|
|
|
|
I want to know how to execute code typed in a text box on a windows form. In other words. How do you make a program that executes vb.net/vb code typed in a textbox on a form when a button is pressed?
Richard Faulkner
Founder of GallantTechnologies
|
|
|
|
|
This can actually be done, and given the nature of the .NET framework, it's not surprising. I am sorry to say, I don't recall how tho ( I've not done it ). What is your intended use ?
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
You're lucky today, there's someone here on the codeproject that wrote an article on NScript. This is a scripting engine that can run some .NET languages like VB.NET in your application. Take a look: http://www.codeproject.com/dotnet/nscript.asp[^]
WM.
What about weapons of mass-construction?
"You can always try to smash it with a wrench to fix that. It might actually work" - WillemM
|
|
|
|
|
I am trying to make a program that "copies" the contents of everything behind the form (like CopyFromScreen). My only problem is that I want it to update itself every 1-75 milliseconds without any flicker. I am trying to do this because, for example, if I add a PNG of, let's say, an apple, it will appear that it will appear to be floating on the desktop. I am trying to mock layered windows, but I am also trying to avoid using them because I want to use controls on the form, too.
Richard Faulkner
Founder of GallantTechnologies
|
|
|
|
|
|
Does anyone know how to make an instant messenger with VB.Net that is similar to AIM?
Richard Faulkner
Founder of GallantTechnologies
|
|
|
|
|
http://www.developersdex.com/gurus/code/555.asp
http://samples.gotdotnet.com/QuickStart/howto/default.aspx
|
|
|
|
|