Is there any way in visual basic to display any of this information about memory(like in the link below)?
Something like Module Name,Serial Number,Module Type,Memory Speed,Timings etc. ?
As Damien_The_Unbeliever stated your best bet would be to look at the Win32_PhysicalMemory WMI Class. You can experiment around WMI by downloading the WMI Code Creator from Microsoft, it will generate code in C#, VB.Net and VB script which you can run through the program and see what the results are.
I believe what you are asking is how to retrieve information about hardware components (namely main memory) using VB.
Please see this thread on VB forums on some example of accessing hardware information.
You might also be interested in this a bit more as it seems to cater to your needs a bit more.
Good luck.
Related
I need to program something in LibreOffice Basic, but I've never done that before. I just have the basis in python, so it's really new for me.
I didn't find any recent documentation, so I'm reading the basic guide from 2010.
But there is a point I really don't understand, They speak about various interface but I don't succeed to understand their interest and when I should call it.
If you can explain it I would love it.
Thank you !
Don't go deeper, no need. To write working code in Basic, you do not need additional information - you just need to know the list of methods of each object, no more. Which interface provided this method to the object shouldn't bother you.
See chapter 3.6.4. Interfaces in Pitonyak's book. The list of available methods is easy to obtain using the MRI or Xray tool extension. MRI is convenient in that after an in-depth study of the object, you immediately get a piece of code ready for use.
(Unfortunately, this extension works extremely unstable with the latest versions of LibreOffice)
Update Video on YouTube
Python is very good when working with LibreOffice. See http://christopher5106.github.io/office/2015/12/06/openoffice-libreoffice-automate-your-office-tasks-with-python-macros.html.
You'll still need MRI or XrayTool and Pitonyak's book as explained by #JohnSUN. Also you'll want APSO and a reference such as https://wiki.openoffice.org/wiki/Python/Transfer_from_Basic_to_Python.
For a single small project though, Basic may be better as there are more examples available.
My requirement.
Develop a ntfs/fat formatable raw virtual drive in windows - something like truecrypt. I want to know if there is C# implementation for this somewhere.
dokan, callbackfs etc dont exactly fit since the file system itself has to be implemented. filedisk, imdisk etc are in kernel space and the code appears to be complex.
Something like callbackdisk or the one provided by eterlogic is perfect, but unfortunately they are expensive, and I don't want to buy them just for a small project.
Is there any other freely available alternative like the above two. Preferably a simple C# wrapper that provide read()/write() callback functions in userland that I can code.
There is a solution, but you need a folder for that :/
Just look here and see if it fits your desires:
http://dotnet-snippets.de/snippet/erstellung-eines-virtuellen-laufwerks/712
It's in german, but you should see the div w/ the code.
The comments aren't that important.
Hope I helped you. :)
which scripting language/tool is best for automating a task?
I have an exe for which I don't know any of the list of functions used. if I know any of the functions used, then I thought I can try using those functions by referencing the exe/dll to VB or any other scripting language. I know that the exe is developed from Delphi.
Is there any way that I can automate the process.
I'm not sure what your question is here; what are you trying to automate exactly? Are you trying to call functions provided by a DLL, or are you trying to find out what functionality is actually exposed from the DLL. I'm not even sure you have a DLL, you mention a .exe most of the time...
Please refer to the guidelines and try to state your question more clearly, if I'm alone in not understanding your question then I'm sorry and I hope another more helpful SOer comes to your rescue!
EDIT: After helpful comments from OP, this question is, I believe, 'how can I automate interaction with a GUI?'
If this is a Windows GUI, then I would recommend using Python and the pyWinAuto package. This will allow you to accomplish quite a good range of basic to intermediate manipulation of a Windows GUI application. If that's not up your street, then this SO question has numerous other suggestions.
HTH
I wish to get a quick feeling for how much “copy and paste” coding we have, there are many tools for C# / Java to check for this type of thing. Are there any such tools that work well with VB.NET?
(I have seen what looks like lots of repeated code, but wish to get some number to help me make a case for sorting it out)
Update on progress.
I have just tried Simian.
It does not seem to be able to produce a nicely formatted report I can sent by email
It does not cope when the names of local variables, or parameters etc may have been changed, e.g it just matches on lines of text being the same.
Clone Doctor does not support VB.NET (only C# and VB 6 and lot of other)
October 2010: VB.net added to langauges supported by CloneDR
Clone Detective for Visual Studio only supports C#
SolidSDD - Source Code Duplication Detector only supports C, C++, C# and Java
DuplicateFinder is open source, but otherwise looks very match like Simian, e.g it just works on lines of text
ConQAT - Continuous Quality Assessment Toolkit seems to have a clone detector that works for VB.NET (not tried it yet)
Gendarme is a bit like FXCop and has a AvoidCodeDuplicatedInSameClassRule rule, this looks very promising, as it avoids the problem of working at the text level. Just tried it, it is the best solution so far, pity it does not search with a greater scope.
Before claiming that this question is a duplicate, please check that the other question addresses VB.NET, as a lot of tools that work well for C# don't work so well for VB.NET. (However it would not surprise me if this question is a real duplicate)
CodeRush 11.2 introduced a new feature called Duplicate Detection and Consolidation (DDC)
http://community.devexpress.com/blogs/markmiller/archive/2011/11/29/duplicate-detection-and-consolidation-in-coderush-for-visual-studio.aspx
Make sure to check out the options for it as well, as you can have it run when so many lines are changed, certainly time has passed, etc.
They've posted some decent videos on the DevExpress site too.
Simian: http://www.redhillconsulting.com.au/products/simian/
[I'm the author of CloneDR ("Clone Doctor").]
CloneDR is parameterized by a full grammar for the programming language in question. So it doesn't just match lines. Rather, it can find clones which are syntactically well-formed, with variations that are more than just identifier changes, regardless of where they stop or start in a line.
The engine on which CloneDR rests, The DMS Software Reengineering Toolkit" is a tool for analyzing large scale systems in any programming language, and uses language descriptions to drive the analysis. DMS has a wide variety of language front ends already available.
Presently it has VBScript and VB6 (as dialects of "Visual Basic"). It doesn't have VB.net, but that would be pretty straightforward to do given the DMS infrastructure and our experience with lots of other languages.
So, CloneDR could do this just fine, with a small bit of effort on our part.
EDIT October 2010: VB.net added as a language CloneDR can process.
Atomiq supports vb.net amongst other languages, and the results are nicely presented.
JetBrains published console tool set Resharper Console Tools to run duplication analysis. Once installed it allows you to do the same analysis as TeamCity does and generate duplicates report locally and even include duplicates search into custom build process with MSBuild. This tool does exactly what you need. More details you can find here at JetBrains blog post
Try Simian:
Simian (Similarity Analyser) identifies duplication in Java, C#, C, C++, COBOL, Ruby, JSP, ASP, HTML, XML, Visual Basic, Groovy source code and even plain text files.
I once saw an impressive demo of Pattern Insight; its CP Miner may be what you’re looking for: http://patterninsight.com/products/cp-miner.php. It seems to be language-independent, though I couldn’t find anything explicit about languages other than C/C++.
Roll up your sleeves and write your own parser to use it with CPD?
See the question for the tools I found.
I know this will be a difficult question, so I am not necessarily looking for a direct answer but maybe a tutorial or a point in the right direction.
What I am doing is programing a robot that will be controlled by a remote operator. We have a 3D rendering of the robot in SolidWorks. What I am looking to do is get the 3D file into VB (probably using DX9) and be able to manipulate it using code so that the remote operator will have a better idea of what the robot is doing. The operator will also have live video to look at, but that doesn't really matter for this question.
Any help would be greatly appreciated. Thanks!
Sounds like a tough idea to implement. Well, for VB you are stuck with MDX 1.1(Comes with DirectX SDK) or SlimDX (or other 3rd party Managed DirectX wrapper). The latest XNA (replacement for MDX 1.1/2.0b) is only available for C# coder. You can try some workaround but it's not recommended and you won't get much community support. These are the least you need to get your VB to display some 3d stuffs.
If you want to save some trouble, you could use ready made game engine to simplified you job. Try Ogre, and it's managed wrapper MOgre. It was one of the candidate for my project. But I ended up with SlimDX due to Ogre not supporting video very well. But since video is not your requirement, you can really consider it. Most sample would be in C# also, so you need to convert to VB.Net to use. It won't be hard.
Here comes the harder part, you need to export your model exported from SolidWorks to DirectX Format (*.x). I did a quick search in google and only found a few paid tools to do that. You might need to spend a bit on that or spend more time looking for free converter tools.
That's about it. If you have more question, post again. Good Luck
I'm not sure what the real question is but what I suspect that you are trying to do is to be able to manipulate a SW model of a robot with some sort of a manual input. Assuming that this is the correct question, there are two aspects that need to be dwelt with:
1) The Solidworks module: Once the model of the robot is working properly in SW, a program can be written in VB.Net that can manipulate the positional mates for each of the joints. Also using VB, a window can be programmed with slide bars etc. that will allow the operator to be able to "remotely" control the robot. Once this is done, there is a great opportunity to setup a table that could store the sequencial steps. When completed, the VB program could be further developed to allow the robot to "cycle" through a sequence of moves. If any obstacles are also added to the model, this would be a great tool for collission detection and training off line.
2) If the question also includes the incorporation of a physical operator pendent there are a number of potential solutions for this. It would be hoped that the robot software would provide a VB library for communicating and commanding the Robot programatically. If this is the case, then the VB code could then be developed with a "run" mode where the SW robot is controlled by the operator pendent, instead of the controls in the VB window, (as mentioned above). This would then allow the opertor to work "offline" with a virtual robot.
Hope this helps.