|
|
So far the only means of doing this i have found is if your motherboard have monitor software that comes with it. THen you could call it's dll. However that's not an option for me.
What mb do you have?
/\ |_ E X E GG
|
|
|
|
|
Hi,
You need to use SNMP or WMI in order to get CPU temperature. If you use SNMP, you need knowledge on socket programming.
Regards,
Ahmet Orkun GEDiK
System & Software Support Specialist (SAP R/3)
ASTRON
|
|
|
|
|
|
Are you sure about WMI? The only thing I found in that was Win32_TemperatureProbe and that only gets you information about the "thermometers".
What are you refering to?
And SNMP is a "standard for gathering statistical data about network traffic and the behavior of network components." Will this really get me a CPU temp?
Thank you for your time.
/\ |_ E X E GG
|
|
|
|
|
Yes, you can use SNMP in order to get temperature through MIB, if your OS supports. But, i'm not sure about that Windows supports SNMP.
Regards,
Ahmet Orkun GEDiK
System & Software Support Specialist (SAP R/3)
ASTRON
|
|
|
|
|
How can I remove a field from a report at runtime?
|
|
|
|
|
According to documentation and other questions asked in this forum, the report definition (for Crystal Reports) isn't modifiable (like that; i.e. adding and removing fields) at runtime - at least not from what is exposed to .NET. The most you could do is get the ReportObject and set its Width and Height to 0 so that it doesn't display.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
|
Hi All, I need help on a programme that Retrieves some data from a web site. what I need is for my windows form to have three boxs on it which the user uses to input some info.
the first box = A web site adress.
Second = (string Varible) e.g. "Engineer"
thered = (string Varible) e.g. "Location"
once these have been put into the boxess and a connect button pressed the form is connected to the web site and the infomation sent into the correct boxes on the web site.
On the web site with the boxs there would also be a button that the surfer would normally click. Can I add code to my project that will perform this task automatically.
I have already got the form to connect to the server useing the TcpClient class and used the following code to upload the data.
// data input to the box
Data = Location.Text +CRLF;
szData = System.Text.Encoding.ASCII.GetBytes(Data);
Server.UploadData("http://"+WebURI.Text,szData);
but this doesnt work and all I can download is the Souce code for the web site.
Can anyone Help, I dont want you to do it for me but guide me in the right direction.
|
|
|
|
|
I'm confsed. So, you want to have a form with 3 boxes and a connect button. Then you want to put the web site address in the first box and then I'm confused on what you want to do with the 2 other boxes.... Can you elaborate?
/\ |_ E X E GG
|
|
|
|
|
Hi mate, I thought that it didnt make sence, I will explain. I have a form with 3 boxs on and a connect button. I can connect to a web site by putting in the URI but once I am connected I want the infomation that I have put into the other to boxs to be sent into two boxes that are on the web page and then for the web page button to automaticly click. The web site is a job site and the info that is put into the boxs are things like, " Job title" and in the other "Location". Once the button on the web site is pressesd it then takes these varables and finds the relivent jobs. I want to then download those jobs.
Hope that makes more sence
Thanks
|
|
|
|
|
Kinda like a google toolbar, but this will do it automaticly and click "Submit" for you? Is this correct?
/\ |_ E X E GG
|
|
|
|
|
Thats it. Can you help?.
thanks
|
|
|
|
|
anyways, heres the code to connect to the page and get the code..
static ArrayList download(string address)
{
WebClient client=new WebClient();
StreamReader sr=new StreamReader(client.OpenRead(address));
string line;
ArrayList page=new ArrayList();
while((line=sr.ReadLine())!=null)
{
page.Add(line);
}
return page;
}
/\ |_ E X E GG
|
|
|
|
|
I need list control like the following: each item consists of several fields (such as filename/extension/size/date of creation etc.) with some simple actions like remove/add selected components and drag&drop.
Can anybody help? I'll very thanksfull
|
|
|
|
|
Why don't you use the standard ListView control?
1) In the "properties" box choose "Columns" and add a column for every field.
2) Check e.KeyCode in the "KeyDown" event method to remove items:
<br />
if((e.KeyCode == Keys.Delete)&&(listview.SelectedItems.Count > 0)){<br />
listview.Remove( listview.SelectedItems[0] );<br />
}<br />
3) In the "ItemDrag" event method call listview.DoDragDrop(e.Item, DragDropEffects.Move);
Now you can drag items.
4) To drop items set "AllowDrop" to "true", and fill the event method for "DragEnter" and "DragDrop".
Conclusion: .NET contains all you need (as long as you don't want to sort the items).
|
|
|
|
|
Actually, you can sort the items as well. The ListView does provide for that via the ListView.ListViewItemSorter property. There's several articles about using this and various alternatives for implementing the IComparer here on CodeProject.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
Hello,
I am trying to create a customisable - bordered TextBox control. I draw the border in the overrided method OnPaint, after I have previousely set the UserPaint style bit.
I don't understand why the setting of the UserPaint flag makes the text within the textbox change its font.
My example can be reduced to this :
public class testTextBox : TextBox
{
public testTextBox()
{
//
// TODO: Add constructor logic here
//
this.SetStyle(ControlStyles.UserPaint, true);
}
protected override void OnPaint(PaintEventArgs e)
{
base.OnPaint (e);
SolidBrush sb = new SolidBrush(Color.Red);
Pen pen = new Pen(sb, 1);
e.Graphics.DrawRectangle(pen, 0, 0, 10,10);
sb.Dispose();
pen.Dispose();
}
}
I tried to do the drawing of the string myself, but the font kept changing back.
Can anyone help, please?
|
|
|
|
|
The reason you are having a problem with this is that Windows draws the text of the Textbox and Richtextbox. Thus, when you use the OnPaint override, Windows goes crazy trying to draw the text as you go crazy trying to draw the border. Instead, try taking a screenshot of the textbox into memory, then drawing on to the screenshot. Then, copy the modifed screenshot onto the textbox.
Sorry I can't give you the actual code for this, but you seem to have a decent handle on GDI+.
Aaron Eldreth
TheCollective4.com
My Articles
While much is too strange to be believed,
Nothing is too strange to have happened.
- T. Hardy
|
|
|
|
|
Hi,
I have a datagrid and I want checkboxes along with a text beside it on each column header. How do I do this??
KArteek
|
|
|
|
|
You can add regular checkboxes to the form containing datagrid, and then simulate, that they are part of datagrid: probably you'll need to serve scrolling and column resizing events, to position them properly.
I can send something similar next week if you want.
h.
|
|
|
|
|
Hi,
I want check boxes only in the column header. Not for full column.
Karteek
|
|
|
|
|
|
I have new project, it's name MailMonitorService.
I create new project in Windows Service Application and try to create TcpClient for connect to web.
it' can compile but when i start service it's tell me Type Initialize exception. I dont' know, Why?
Who can tell me ?
Why not create socket under windows service?
And This is my source code.
http://www.buycoms.com/mailmonitor.zip
Thanks everybody.
|
|
|
|