|
hi ,
i want to read the CPU performance and main memory usage .
I tryed using performance counter component which not give results.so please give me ideas
VERY Argent . Nearly i have to delever my product
Amalarajan
softdeveloper beginer
-- modified at 7:27 Tuesday 18th October, 2005
|
|
|
|
|
hi ,
i am currently doing leasing(bank) project using VB.NET , i like to develope read memory performance such as Memory usage,peformance etc .. ,therefore i used PERFORMANCE COUNTER Component to accomplish my task ,but which have been not worked . So please give idea to fnish my project .
VERY Argent . Nearly i have to delever my product
Amalarajan
softdeveloper beginer
|
|
|
|
|
I have no idea what your question is. You want to check the performance of your application ?
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
sir ,
i want to write code for read the "performance" of CPU(taskmanager -> performance) and "Main Memory" usage.
I tryed using performance counter component but not work.
Please give idea...
very urgent because nearly i have to delever my project
Amal
|
|
|
|
|
|
thank you vey much for your support .The cooding work properly ..... But I have another problem .. if you can please ,please,please Help me
i need to send crystal report through email as the email body (not as Atachment and Not using ASP.net ).
can i access OUTLOOK EXPRESS to do this
thank you
Amalarajan
|
|
|
|
|
I don't know of any way to access outlook express. Is this a web app ? Do you want the user to click somewhere to send the mail ? If so, just use the a mailto anchor ( google mailto html for more info ). If that's not what you want, more detail please
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Hi,
To remove Event Handlers from my all controls in the form, I want to use a generic code as follows.
1) Run through all controls in the Form
2) Run through all Events of a control using Reflection .GetEvents()
3) For each Event, I want to get the Delegate, so that I can remove all using GetInvocationList(). but .NET doesn't provide any property to get delegate for the Event Handler.
Please help. How can I get the Delegate for the Event Handler.
|
|
|
|
|
|
That only gives the Delegate type, but how to actually get the reference to the Delegate?
|
|
|
|
|
How can I show a transparent but 100% visible label( any text) on the screen without showing form so that the user does not get disturbed by th e text. Also same for an image. Thi sneeds to be done in Visual Basic 6.
Accalia
|
|
|
|
|
Hi,
I have created a windows application now i want to create a setup file for that application. The problem is I want to add a key to registry with the current date of the system during installation. Is that possible, if yes please let me know its urgent
Thanks in advance
|
|
|
|
|
The following code shows how to use the registry:
-Make an appform with 2 textboxes: TextBox1 and TextBox2.
-Add two buttons: btnSaveSettings and btnGetSettings.
-code for btnSaveSettings: SaveMyNumber()
-code for btnGetSettings: GetMynumber()
-DONE!
-enter text in TextBox1 > press savesettings
-press get settings and the nuber you entered in TextBox1 should appear in TextBox2!
-if you restart your computer, run the app, press getsettings your saved text will be shown again.
Imports Microsoft.Win32
Dim MyNumber as string
Dim MainKey As RegistryKey = Registry.CurrentUser.OpenSubKey("Software", True)
Dim MyKey As RegistryKey = MainKey.CreateSubKey("MyKey")
Private Sub SaveMyNumber()
If not TextBox1.text = "" then
MyNumber = TextBox1.text
MyKey.SetValue("MyValue", MyNumber)
else
exit sub
end if
End Sub
Private Sub GetMyNumber()
TextBox2.text = MyKey.GetValue("MyValue")
End Sub
Next you can check your value in the registry:
-Start > run > type "regedit" and press enter.
-open HKEY_CURRENTUSER > SoftWare > MyKey and there it is!
You just created this key.
You can delete it (MyKey) by right clicking on MyKey and select Delete, but beware!!! dont delete the wrong keys, it messes up your system!
if you use datetime.today in sub formload, save this in the registry the first time you load the program, the only thing you need to do is figure out how to do this only the first time you load the program. This shouldn't be so difficult.
Hope this helped you,
Cheers.
|
|
|
|
|
Add an Installer class to your setup, assuming you are using VS.NET - you did not specify how you plan to create the setup. Then run Jerry's code shown above in the Installer class.
See the MSDN or Google for a basic tutorial in using Installer classes in .NET.
|
|
|
|
|
Hello All!
I have a listbox in wich I have some data. The length of data is so much that it goes out of view. I dont want to add scrolling. I want that when the user move the mouse over the data in the listbox it will appear in full just like when in Windows you move the mouse on a folder having long names it will show its size and other related information............Got it?
Please help me in this regard
Thanx
_mubashir
|
|
|
|
|
I have created a table in MS Word through VB 6.0. In the last column of the table, the row contains the database table names seperated by Commas. I need to provide hyperlink to each of the table names in the columns so that upon clicking each hyperlink, it goes to the description of the appropriate database table. While creating the hyperlink for the cell in the Word table, the hyperlink is created for the entire cell and am unable to create it for each table names separated by commas. Can anyone provide solution for this?
Thanks in Advance
Padmakumar.G
|
|
|
|
|
I need to print Headings in MS Word Document using VB 6.0, so that I can create table of contents (TOC) easily in the Word Document. can anyone help me out in this?
Thanks in Advance.
Padmakumar.G
|
|
|
|
|
This must be a stupid question, but after an hour of trying it's now intelligent for me to ask.
How would I sync a form's textbox, with the main form's textbox?
When the user, click a button on the main form, another form loads up.
Then when they change the textbox, I want a textbox in the main form to be updated with that string. Simple right!
In the old VB6, this was completely trivial.
It seems that .NET is not as easy, perhaps for protection?
I tried delclaring the form, and texbox, but to no avail.
At a loss,
TT(n)
|
|
|
|
|
pass the textbox byref when you open the form. To do this you can add a sub new to the form:
second form:
private textboxOnMainForm as textbox
Sub New(byref tb as textbox)
textBoxOnMainForm = tb
end sub
Main Form...
sub button1_click(blah blah)
dim f as new secondForm(me.textbox66)
f.show
end sub
This way the second is given the textbox when it is instantiated, as it is passed by ref, changes will stick to the original textbox.
|
|
|
|
|
|
I've got some code to read from a text file (contents will be pasted at the bottom of this message. I've got it reading the file fine, but some of the spacing between say like name and id isn't the same, and I'm lost finding a solution to read all fields. Any tips or suggestions? I know where the code fails is at ar = str.split(cchar(" ")), but every other file I've had to read was separated by a "|" or just had one single space between everything. A program doesn't care if the file looks good or not . Is there a way you could read a "column" per say?
Thanks
Here's the code:
Public Sub LoadStudents(ByVal strFile As String)
Dim fs As New FileStream(strFile, FileMode.Open)
Dim sr As StreamReader
Try
sr = New StreamReader(fs)
Dim str As String
Dim ar As String()
Do While sr.Peek <> -1
str = sr.ReadLine
If str.Trim.Length <> 0 Then
ar = str.Split(CChar(" "))
stud = New Student
With stud
.Number = CType(ar(0), Integer)
.Last = CType(ar(1), String).Substring(0, .Last.Length - 1)
.First = CType(ar(2), String)
.MidI = CType(ar(3), String)
.ID = CType(ar(4), String)
.College = CType(ar(5), String)
.Classification = CType(ar(6), String)
.Email = CType(ar(7), String)
.Major = CType(ar(8), String)
.Paid = CType(ar(9), String)
.Enrolled = CType(ar(10), String)
End With
End If
Loop
Catch ex As Exception
Exception(ex)
Finally
fs.Close()
sr.Close()
End Try
End Sub
Here's the text file:
1 ANSARI, EHSAN B 111-11-111 BT SR CSCI P Enrolled
2 CRAWFORD, BRIAN KEITH 111-11-111 BT SR CSCI P Enrolled
3 ELLIS, RICHARD M 111-11-111 BT SR CSCI P Enrolled
4 GARDNER, JAMES ROBY 111-11-111 BT SR CSCI P Enrolled
5 GNAU, DANIEL C 111-11-111 BT SR CSCI A Enrolled
7 GOULDER, JEFFREY SCOTT 111-11-111 BT SR CSCI P Enrolled
8 LAWSON, BRANDI NICOLE 111-11-111 BT SR CSCI P Enrolled
9 MONROE, JENNIFER M 111-11-111 BT SR CSCI P Enrolled
10 MOORE, MELISSA ANN 111-11-111 BT SR CSCI P Enrolled
11 OVERHOLT, JAMES PATRIC 111-11-111 BT SR CSCI P Enrolled
12 PARKER, BRIAN DOUGLAS 111-11-111 BT SR CSCI P Enrolled
|
|
|
|
|
I realized this line doesn't work, it is fixed:
.Last = CType(ar(1), String).Substring(0, .Last.Length - 1)
I used a variable to hold the array value and did substring from there.
|
|
|
|
|
|
Hello all,
I was very happy that my last problem was solved quickly. I have yet another problem though.
I'm working with quite a bit of For statements, and to be honest, I love them. Now, I need a feature to get VB.NET to ignore the rest of the code in the For/Next statement and do it all again (well, until the conditions are met).
For example, it reads the lines of a rich text box. If the length of the string is a certain length, then it does one thing and goes on to the next line. If it's another length it does something else and then goes to the next line.
Seems like I could do this with just an if statement, right? Well, there are too many things that it's checking for, so it would get really messy really fast.
I also could do this with a variable. Create a new variable at the beginning of the script, just say, called "Doneyet" (boolean). If the conditions are right and doneyet = false, then it does the action and sets doneyet to true. Then, any remaining code will see that doneyet = true and won't execute, and thus VB.NET will loop to the next "line" or whatnot.
Is there a better, cleaner way to do that?
|
|
|
|
|
|