|
VC++ Express Edition is a waste of time. It only does WinForms, and no-one uses C++/CLI to write windows apps.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
I am curious to see how one would do this in Visual Basic 2005, I do not intend to use this but it is just something that sprung to mind when I was creating a small program to read values from the registry, although this may come in handy for the future.
|
|
|
|
|
Sorry. This one's not going to get answered - for obvious reasons.
Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic 2006, 2007
|
|
|
|
|
How do you mean by this exactly?
The question I have asked is feasible, Microsoft is perfectly fine with it, they also have articles of how to do it in .vbs, all I am asking is how would I do this in VB?
|
|
|
|
|
So it is. My bad - please attribute it to cranial-rectal inversion.
The scripts are simple enough. It's just some WMI work. You can't translate the scripts to VB.NET code? All you need is the System.Management namespace classes to do this. Do a search to retrieve the Win32_WindowsProductActivation objects. Then iterate over the returned collection and Invoke the SetProductKey method on each instance.
The catch is you have to determine which version of Windows your running under and change between two different methods of changing the key. XP is different than XP SP1 and above.
Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic 2006, 2007
|
|
|
|
|
Ok, thank you for the reply, I will see what I can do about this, I am still beginning VB so sorry for my lack of knowledge in this matter, I am the type of person who likes to get is hands dirty.
|
|
|
|
|
If you check out the documentation on the System.Management namespace, you'll find a ton of examples for searching and executing methods in WMI.
Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic 2006, 2007
|
|
|
|
|
Dave Kreskowiak wrote: cranial-rectal inversion.
LMAO! Must remember that one.
|
|
|
|
|
I've had that one around for at least 10 years!
Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic 2006, 2007
|
|
|
|
|
Is it possible in VB.NET to change the active scripting settings between enabled and disabled? (Tools>Options>security>custom level is where it can be found manualy)
If not, can the internet settings window be opened (without opening internet explorer)?
Thanks
|
|
|
|
|
It's possible to do, but most assuredly not easy to do or understand. It involves a bunch of COM interop work that, frankly, is not going to be easy to understand or explain. Examples are just about non-existant. This would be a large trial-and-error project.
It's possible to luanch the Internet Settings control panel using the Process class. The command line would look something like this:
rundll32.exe shell32.dll,Control_RunDLL inetcpl.cpl
displays Internet Properties, General Tab
rundll32.exe shell32.dll,Control_RunDLL inetcpl.cpl,,0
displays Internet Properties, General Tab
rundll32.exe shell32.dll,Control_RunDLL inetcpl.cpl,,1
rundll32.exe shell32.dll,Control_RunDLL inetcpl.cpl,,2
.
.
.
Basically, the number at the end displays one of the tabs in the control panel.
-- modified at 16:52 Wednesday 18th April, 2007
Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic 2006, 2007
|
|
|
|
|
If a visual basic project is created in visual studio 2005 professional can it be modified in the standard version?
|
|
|
|
|
If a visual basic project is created in visual studio 2005 professional can it be modified in the standard version?
|
|
|
|
|
Yes.
Trinity: Neo... nobody has ever done this before.
Neo: That's why it's going to work.
|
|
|
|
|
It also depends on what the app is written for. For example, Office development isn't supported on the Standard Edition. Read more of the differences here[^].
Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic 2006, 2007
|
|
|
|
|
|
Hello to everyone!
I have a problem about changing the properties of an object in a Class module. Before in Visual Basic 6 i used this code to change the properties a control
Form1.Label1.Caption="...."
Then how about VB.Net?
Please help me...
Mark Angelus V. Movida
3rd yr. BSCS
St. Dominic Savio College
|
|
|
|
|
Never used vb6, but I believe 'caption' has been replaced with '.text'?
so... form1.label1.text = "...."
|
|
|
|
|
Hello!
Im trying to follow your code but! Theres no object appeared in the pop-up menu. I think theres only two (2) choices: (1) ActiveForm and (2) ControlCollection. But I don't know how to use that two properties.
Thank you for helping me!
Mark Angelus V. Movida
3rd yr. BSCS
St. Dominic Savio College
Philippines
|
|
|
|
|
A class, unless it's the form itself, shouldn't care anything about any controls outside of it. This only worked in VB6 because, due to VERY bad practice, every form was visible to every piece of code in the app as a "global". This is, thankfully, no longer the case in VB.NET due to true OOP support.
Your class should expose a status property that the form code can use to update itself. This class could even expose an event that the form could subscribe to so it get's a notification that the status has changed.
Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic 2006, 2007
|
|
|
|
|
hello every one
I need to create button when the program is running,i wrote the code but the CLICK event is not enable and when i click on button ,no event happen.how is it solved?
|
|
|
|
|
You have to wire up the events you want to handle yourself. If you have to also destroy the button in your code, you have to disconnect the event handler too.
You use AddHandler and RemoveHandler[^] for these purposes.
To wire up the Click event of a button, it's as easy as this:
Dim myButton As New Button
myButton.Location = ....
Me.Controls.Add(myButton)
AddHandler myButton.Click, AddressOf MyButtonHandler
.
.
.
' The method signature must match the normal button click event handler signature!
Private Sub MyButtonHandler(ByVal sender As Object, ByVal e As System.EventArgs)
' Button Click code goes here...
End Sub
Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic 2006, 2007
|
|
|
|
|
How to create a multithreading application?
Mark Angelus V. Movida
Programmer
|
|
|
|
|
Open a new project and start coding??
Really, this is not an answerable question. There are many thousands of possible applications for multi-threading. What you do depends entirely on what your application is doing and the situation for which you need it.
Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic 2006, 2007
|
|
|
|
|
After three days i could'nt find how to handle message. i know it is very simple because i did it in delphi. Found an article in codeproject articles, but that code not true code for me. I just want to send message (with sendmessage api) to my parent window, and handle thats all.
is there anybody experienced this subject ???
|
|
|
|