|
Used? You mean the maximum memory that was used?
Use the Performance Monitor (perfmon) and watch the following memory counters:
Process:
Pool Paged Bytes
Pool NonPageed Bytes
Virtual Bytes Peak
Working Set Peak
There is no one value that gives you an accurate measure of how much memory your VB app took up.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
thanks! this problem have been solved.
I'm sorry that I am not use the exact word "used".
I mean the memory that application is useing.
|
|
|
|
|
Slightly different word, same exact problem. There is no one counter that can give you that information.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I've seen tons of samples online of using the VB-Addin control for VB6 for using DirectX, more importantly the directdraw portion.
I was able to muster up some Declarations to DDraw.dll (which was hard to find)...
Declare Function DirectDrawCreate Lib "ddraw.dll" (ByRef pGuid As GUID, ByRef lplpDD As DIRECTDRAW, ByVal pUnkOuter As Long ) As Long
Declare Function DirectDrawCreateEx Lib "ddraw.dll" (ByRef lpGuid As GUID, lplpDD As Any, ByVal iid As Long, ByVal pUnkOuter As Long ) As Long
Declare Function DirectDrawCreateClipper Lib "ddraw.dll" (ByVal dwFlags As Long, ByRef lplpDDClipper As DIRECTDRAWCLIPPER, ByVal pUnkOuter As Long ) As Long
Declare Function DirectDrawEnumerate Lib "ddraw.dll" Alias "DirectDrawEnumerateA" (ByRef lpCallback As DDENUMCALLBACKA, lpContext As Any ) As Long
Declare Function DirectDrawEnumerateA Lib "ddraw.dll" (ByRef lpCallback As DDENUMCALLBACKA, lpContext As Any ) As Long
Declare Function DirectDrawEnumerateEx Lib "ddraw.dll" Alias "DirectDrawEnumerateExA" (ByRef lpCallback As DDENUMCALLBACKEXA, lpContext As Any, ByVal dwFlags As Long ) As Long
Declare Function DirectDrawEnumerateExA Lib "ddraw.dll" (ByRef lpCallback As DDENUMCALLBACKEXA, lpContext As Any, ByVal dwFlags As Long ) As Long
GUID CLSID_DirectDraw = "{d7b70ee0-4340-11cf-b063-0020afc2cd35}"
Can someone give me some insight on how to get at the DirectX with these or are there other procedures that I also need before using these WITHOUT the Addin because I only have VB4 not VB6 besides the application I am making I want to make it so that I could port the code into a language like C++ if I could wiht little effort......
|
|
|
|
|
VB4????? There is a reason there is a control for this for VB6. What you're basically doing is rewriting that control. Are you sure all the work is worth it?
You've got a VERY, VERY long way to go to get all the functions, structures, and constants you need defined to get this to work. Your going to write far more code just declaring this stuff than you are using it. On top of that, you'll be completely on your own. There will not be any examples, using the methods your putting together, calling these functions from VB6, let alone VB4.
Besides, everything your doing in VB4, declaring this stuff, is already done in C++. You don't have to do ANY of the work your doing now...
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Essencialy what I'm trying to accomplish is the use of the DirectX to output some MemoryDC's that I have already created to the final output instead of to a form window, or to the desktop window (which has yielded some strange results)
Basically looking for a fast way to BLT the output to a faster surface.
|
|
|
|
|
That's great and and all, but is it really worth the huge amount of work to just get DirectX initialized? After you have the image in memory, what are you going to do with it? I get the feeling your just going to run into the same bottleneck your trying to avoid.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I was looking around to see how to make a media file play in Vb in a form automatically. One of the options in the properties is "ui" and I was wondering what exactly a Ui actually is. And if anyone could tell me how to make a Media file like "sample.wav" play in VB on a click of a button (command button). Thanks alot, my game is due on monday, so im trying to get it all together.
|
|
|
|
|
Sound is a major component of a game. You should've had this integrated into your project a long time ago. Just slapping it in at the end... man...
Boggahutt87 wrote:
One of the options in the properties is "ui"
One of the properties of what? You didn't say what the class was that your looking at.
It is possible to play a wave file, but you'll have to use the Multimedia SDK, or DirectX DirectSound. I seriously doubt you want to use the MediaPlayer COM control to do this. Also, your getting into more complicated audio methods that REQUIRE a sound card to work. Just using the normal PC speaker, like you've been using with Beep, won't work.
Same as before. Declare the API function you want to call first:
Private Declare Function PlaySound Lib "Winmm" Alias "PlaySound" _
(ByVal pszSound As String, ByVal hModule As Long, fdwSound As Long) As Long
Now, when you call this function, you have to supply it with 3 parameters:
1. pszSound will be the filename of the sound you want to play, like "SOUND.WAV". The .WAV file must be in the same directory as your compiled .EXE to work.
2. hModule must be 0.
3. fdwSound must be 0.
You'll call PlaySound like this:
PlaySound "SOUND.WAV", 0, 0
And remember! If you get smacked down by the teacher for using code he didn't tell you about, and therefore you couldn't possibly write , it's not my fault!
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Does anyone know how to get default printer using VB.NET?
I want to print the crystal report directly to the printer, but the problem is i need to specify the default printer inorder to print the report.
|
|
|
|
|
I haven't tried this out but...
You might want to try playing with the PrinterSettings class. You can instantiate a PrinterSettings object and see what its PrinterName property says. It might be the name of the default printer. If it's blank, trying getting the InstalledPrinters property. This will be a collection of String s that represent the printer names. You could then set the PrinterName property of the PrinterSettings object to each one of the printer names returned by InstalledPrinters and check the IsDefault property to see if it is the default printer.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hey! thanks for the reply. How do you get each printer name? Does printersettings give the printer? if so, what is that property name? I could not see any printer name property in the installed printers.
|
|
|
|
|
InstalledPrinters returns an array of Strings. Those are your printer names. You then take each one of those and, one at a time, set the PrinterName property to them, then check the IsDefaultPrinter property to see if the name you set PrinterName to is the default printer. If it is, then you have then printer name you need to send to CrystalReports.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
You might want to try playing with the PrinterSettings class. You can instantiate a PrinterSettings object and see what its PrinterName property says. It might be the name of the default printer. If it's blank, trying getting the InstalledPrinters property. This will be a collection of Strings that represent the printer names. You could then set the PrinterName property of the PrinterSettings object to each one of the printer names returned by InstalledPrinters and check the IsDefault property to see if it is the default printer. Warning: The following code has not been tested and is not guaranteed to even compile! That's what I get for using Notepad...
Dim myPrinterSettings As New PrinterSettings
If myPrinterSettings.PrinterName = "" Then
' The PrinterSettings object doesn't come prepackaged with
' the DefaultPrinter name.
' Start checking the list of InstalledPrinters.
Else
' The PrinterSettings object DID come with the DefaultPrinter!
End If
' InstalledPrinters check
Dim Index As Integer
Dim myPrinterSettings As New PrinterSettings
Dim listInstalledPrinters As String()
Dim DefaultPrinterName As String = ""
listInstalledPrinters = PrinterSettings.InstalledPrinters
For Index = 0 To UBound(listInstalledPrinters, 0)
myPrinterSettings.PrinterName = listInstalledPrinters(Index)
If myPrinterSettings.IsDefaultPrinter Then
' We found the DefaultPrinter!
DefaultPrinterName = listInstalledPrinters(Index)
Exit For
End If
Next
' DefaultPrinterName should now contain the name of the DefaultPrinter.
' If it's empty, then this logic didn't work...
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi,
I am getting the default printers, but do you know how to get the network printer aswell?
Thanks
|
|
|
|
|
The InstalledPrinters list should contain ALL the printers installed, even the network printers...
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
No! its not giving those names. It displays only the installed printers on the local system.
I have personally checked.
|
|
|
|
|
Are you saying that you want the printers that another machine is sharing out, like a File/Print server?
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I am talking about the shared network printer.
BTW, i got the work around solution for this. Instead of showing it in the crystal report viewer, I am exporting to the pdf format.
This solves the problem, as i need not to bother about the printer settings.
Anyways, thanks for your help.
|
|
|
|
|
Good morning.
Maybe i asking for too much. Let's have it like to know every key the user types. Then how can i proceed.
Thank you for your link, but the process is difficult, and they don't have exemple for vb code use.
I don't know what you can do for me
|
|
|
|
|
Please don't post the same question twice. I already responded to you in your other thread.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I've been assigned a project to write a program that will change the EAP type that is set in windows. I then need to alter advanced settings under the changed EAP type but frankly i dont know if anyone here can help with that part ( it's called "SecureW2" http://securew2.com/uk/ ) I can't seem to find anywhere how i can either manipulate this through a windows script or a program.
For further clarification: The pulldown that i need to choose/change an item in is in Network Connections -> Right Click on correct network connection -> Properties -> Authentication Tab -> EAP Type. By default this usually says "Smart Card or other Certificate" and i need to change that to something else.
I've dabbled in the registry a little bit but i can't seem to figure anything out there either. Thanks to any one who can give me help on this.
-Ryan
-------------------
I Am A Closet Geek
|
|
|
|
|
I have no idea on this one. You might want to try the Networking newsgroup on MSDN here[^].
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
v6 LoadPicture method is slow.
I need to load quite a number of bmps onto an array of pictureboxes for an imaging app. Is there a quicker way to load images into picboxes?
instead of:
for i= 1 to totalimages
load picturebox1(i)
picturebox1(i).picture = LoadPicture(Path + cstr(i))
next i
i need to do this faster. pls help
1fm1fu
|
|
|
|
|
There is no way to make it go faster, but you could load your images into an ImageList in Design mode, IIRC, and they will be compiled into your app as resources. You could then get all of your images into your PictureBoxes by fetching them from the ImageList.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|