|
L D L P wrote:
objWmiDataBlock
This is just a custom structure I created, nothing special about it. It's just a collection of Strings and numeric types that I used to pass a large amount of information back to the function that called this code.
I'm hardly a reference for WMI. The best method to use to learn about this would be to start writing your own sample code to test what your thinking against what is documented.
Treat WMI as an SQL database with lots of tables and things will become a bit clearer.
This[^] little gem from Microsoft is a MUST for exploring and understanding WMI.
The docs for WMI start here[^]. You'll want to pay particular attention to the Scripting portion of the docs. The docs comes with plenty of examples.
You might also want to play with the Scriptomatic tool[^] also.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi Dave,
I already mail to you, but i have a short question.
How can i retrieve current logged user name (and password if possible) of a remote computer?
|
|
|
|
|
You can do this only if the remote machine is Windows XP or Windows 2003. Again, WMI...
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Actually I need Drill Down Crystal Reports.
Ex : 10 Mater Recodes are there.
TEST 1
TEST 2 liket that.
If I click TEST1,It should display another report TEST1 Details.Help me Please!
radha
|
|
|
|
|
Hi, I have an access database which contain one table with 3 fields. The structure below is:
tblPeriod
Name DateHired DateRetired
.... ......... ...........
.... ......... ...........
.... ......... ...........
.... ......... ...........
The ... represent the information of record that user supply the information. My question is: how could I calculate the period for each record (mean the duration that they work for the companay, simple arimathic is DateRetired - DateHired) in form. Which function should I used to calculate it?
A thousand mile of journey, begin with the first step.
APO-CEDC
Save Children Norway-Cambodia Office
|
|
|
|
|
I'm not aware of any function that would automatically do this for you. I think i've seen you post before using vb .net. But for either vb6, vba, vb .net you would have to create your own function that would take this. I use access in my apps, so i know some programming side, Again I don't know of any thing that will automatically take care of that.
|
|
|
|
|
I have check the book Visual Basic 5 Night School by Greg Perry and found the fuction to calculate the time DateDiff() . I think this function might be useful for me to use in access but I did not try yet.
A thousand mile of journey, begin with the first step.
APO-CEDC
Save Children Norway-Cambodia Office
|
|
|
|
|
Hi,
I'm using appforge crossfire to develop games. My code uses dynamic event handling ie Addhandler. The Game compiles fine within VB.NET IDE and it runs perfectly not even a bug. When I try to build it for Nokia deployment I get an error saying that dynamic handling is not supported with Crossfire at the moment. Is their a way to get around this problem and alternative solution that will achieve the same results as addhandler.
|
|
|
|
|
This is not a VB.NET question, rather a technology question on Nokia's. Your post would be better handled in the Emedded/Mobile Forum.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I am looking for two pieces of code. The first is a piece that will check for the presence of a computer by computer name over a network. The other is to compare two files after a copy operation. TIA!!!
|
|
|
|
|
In MSDOS mode type the following command:
net view /network then press enter if you want to output the result to the text file use the following command:
net view /network >ComputerList.txt and press enter.
A thousand mile of journey, begin with the first step.
APO-CEDC
Save Children Norway-Cambodia Office
|
|
|
|
|
1) Look at how to write PING. There are plenty of samples out there.
2) If you just need to know if the files are the same or different, just generate a CRC for each and compare. Once, again, many samples, including on here.
|
|
|
|
|
Hi, I have an Ms access database file which give my user an opportunity to get it file path via OpenDialog control in VB.NET. Then I proceed the connection and SQL string to the table that I have design in Ms access. My Ms access table contain 1 table named tblTest with three field Id, Name and Sex. But sometime the user select difference database from OpenFileDialog control so the structure of database is difference. How could I write the code that check the database the user select have 1 table with 3 fields? Because I want to check the table structure before my application allow my user to continuse his/her work with it.
A thousand mile of journey, begin with the first step.
APO-CEDC
Save Children Norway-Cambodia Office
|
|
|
|
|
If the file names for each file that the each user will be using are the same. I would suggest having the program recognizing that file name, and acting upon that.
|
|
|
|
|
Thank you for your comment, But file name is not importance, the file could change to any valide name (but the extnesion .mdb must not change) but the structure (the number of table, field and relation structure) is the importance point. If user made a change to database structure, it would be problem when my application looking for the specific table to present the data it will have the problem.
A thousand mile of journey, begin with the first step.
APO-CEDC
Save Children Norway-Cambodia Office
|
|
|
|
|
Well then your probably going to have some problems, as if each user as the ability to use Access to change the number,name of the tables then it could change at any point, and you'll be getting a call as to why this is happening. I'm not sure about your situation for this purpose, but i would suggest making it to where they can't change the content, and structure of the database without using your program. Then all you have to worry about doing is recognizing the names of tables and having your program act on that. The current situation, seems like it could be quite problematic if the user can change stuff regarding the database file.
|
|
|
|
|
Thank you very much for your valuable idea, What I have to do are check the structure of database that user select whether it is the right database that I design. The second step is prevent my database from the user if they want to change the structure.
A thousand mile of journey, begin with the first step.
APO-CEDC
Save Children Norway-Cambodia Office
|
|
|
|
|
Hi, I have a question relate to the file operation in VB.NET.
1. In VB6 if I want to .exe file I have to write the code call shell... But in VB.NET I have a button that will open the file (c:\abc.doc or c:\abc.xls or c:\abc.pdf). How could I write the code to open these file?
2. I want to preview the file (*.doc or *.xls or *.pdf) that I supply its location in RichTextBox control, how to I do that?
Please give me some sample to work with it
A thousand mile of journey, begin with the first step.
APO-CEDC
Save Children Norway-Cambodia Office
|
|
|
|
|
Dim ProcID As Integer
' Run Calculator.
ProcID = Shell("C:\Windows\system32\calc.exe", AppWinStyle.NormalFocus)
' The preceding path is for Windows XP;
' The Windows 2000 path is C:\WINNT\system32\calc.exe.
|
|
|
|
|
Thank you very much for your comment, but what I want is open Ms word file from VB.Net.
A thousand mile of journey, begin with the first step.
APO-CEDC
Save Children Norway-Cambodia Office
|
|
|
|
|
|
The man from SCN-CO wrote:
2. I want to preview the file (*.doc or *.xls or *.pdf) that I supply its location in RichTextBox control, how to I do that?
You can't. The RichTextBox control knows nothing of the file formats for Word, Excel, or Acrobat.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
So, what should I do that? Do you have any other solution to recommend to me?
A thousand mile of journey, begin with the first step.
APO-CEDC
Save Children Norway-Cambodia Office
|
|
|
|
|
I don't know of any component that will do this for you. Don't even think of interpreting these file formats yourself. Word and Excel use multiple stream OLE file formats that are extremely difficult to understand and parse, not to mention render on your own. Acrobat uses a simpler, single stream format, but documentation is difficult to find because you have to pay to get at the developer documents from Adobe.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I read Visual Basic .Net Programming author by Harold Davis, ISBN: 81-7656-627-6. In chapter 9 on page 218 I fould that RichTextBox control control could read and display the content of *.rtf file. In my opinion, could I convert Ms word *.doc file to *.rtf file and open it in RichTechBox? Do you have any idea?
A thousand mile of journey, begin with the first step.
APO-CEDC
Save Children Norway-Cambodia Office
|
|
|
|