|
sandrina wrote: Yes, it is a UNC path. But there must be a way to start a .NET application! How do I do that?
Use Administrative Tools-->Microsoft .NET Framework x.x Configuration (where x.x is the version of the .NET framework your application is written in)
You then set the security on the exe, zone, UNC path or whatever as fits the security policy of your company.
ColinMackay.net
Scottish Developers are looking for speakers for user group sessions over the next few months. Do you want to know more?
|
|
|
|
|
OK, thanx, that's big help. I'll try that.
|
|
|
|
|
Hello
I have a usercontrol(UC) with a number of childControls. My textbox control in the UC's got an EnabledSpecial event, which I wanna run when UC is enabled true / false.
protected override void OnEnabledChanged(System.EventArgs e)<br />
{<br />
if(this.Enabled)<br />
TextBox1.EnabledSpecial = true;<br />
else<br />
TextBox1.EnabledSpecial = false; <br />
}
It looks as if everything is run as intended, but the EnabledSpecial (which I do to make disabled text black instead of grey) doesn't take. Does anyone have an idea wherein the problem may lie?
-- modified at 4:53 Monday 3rd April, 2006
|
|
|
|
|
Looks good at first glance (I hope those extra brackets are only editing issues...).
Have you stepped throught it with the debugger and verified your property gets called? Probably it's just not working the way you expect it...
|
|
|
|
|
Thx for response, and yes, it was editing issues
The problem seems to occur when the Uc.Enabled is set to false... It seems the textbox gets normal .Enabled property set to false eventhough I try to override it.
|
|
|
|
|
protected override void OnEnabledChanged(System.EventArgs e)<br />
{<br />
if(this.Enabled)<br />
tbTextBox.EnabledSpecial = False;
else<br />
tbTextBox.EnabledSpecial = False;
}
|
|
|
|
|
Hi, I would like to create a mini window.form like getright Drop window(it's a small window.form ~100x100px always on top ,where you can Drag & Drop html link.After you drop the link on it , the main window open with the info of the link)
It's easy to create the mini form but I can't manage to call
the mainForm_DragEnter(object sender, DragEventArgs e) from the mini form.
In c++ you could get the parent form that create the mini form and you could use its(parent form)public methods.Is there a way to implement the same behaviour in c#?
I would like to have something like this:
miniForm_DragEnter(object sender, DragEventArgs e)
{
mainform = ??; //get the mainform (in c++ this is a pointer to the mainForm)
mainForm.Visible(true);//Main form Public method
mainForm.mainForm_DragEnter(object sender, DragEventArgs e);//Call the Main form DragEnter method (public)
}
Please help me
Thanks Francy
p.s. Sorry for my bad english
|
|
|
|
|
Use this.Owner and cast it to whatever type your mainform is.
To avoid casting you could also give the owning form in the constructor of the miniform.
|
|
|
|
|
Hi,
I'm trying to read the GPS coördinates from a GPS Device configured as a COM Port.
I've managed to Open the Port and I get some data, but I've no idea how to interpret it.
All I get is some jiberish (I don't know how to spell jiberish, apologies), I've tried to interpret it as a byte array, but even then it's returning nonsense.
Any idea what I might do wrong?
<br />
Ports ports;<br />
SerialPort serialport;<br />
string coor = "";<br />
ports = new Ports();<br />
serialport = ports.OpenSerialPort("COM4");<br />
coor = serialport.ReadLine();<br />
I've also tried the other functions of the SerialPort object.
I hope somebody can help me.
tnx!
Coulda, woulda, shoulda doesn't matter if you don't.
|
|
|
|
|
Have you set the port speed, number of data bits, and parity with the same settings as specified by the GPS device?
If the settings not are correctly set then you may recieve garbarge. Try different settings with a terminal program like windows hyper terminal.
|
|
|
|
|
Hi,
Tnx for your answer. Normally it should work, our core program uses it.
I now wanted to write my own (I don't have the core code of our program), to see and learn a bit for myself, but I only get nonsense.
I also don't know what data to expect really (datetime? string? ... ).
Is there a good article about Ports somewhere? (I found the GPS ones here on CP)
tnx...
Coulda, woulda, shoulda doesn't matter if you don't.
|
|
|
|
|
I am calling a function to which I am passing datetime as
User1.AddUser("abc","","cdf",true,DateTime.Parse("14/04/1983"),"abc@rediff.com","123","abc@gmail.com","123467","","ewq","","","Delhi","Delhi","India","110234");
The Prototype of this function is as
public int AddUser(string FirstName,string MidName,string LastName,bool Gender,DateTime DateOfBirth,string PrimaryEmail,string Password,string SecondaryEmail,string Telephone,string Mobile,string Street1,string Street2,string Street3,string City,string State,string Country,string PinCode)
But while running this function -- I am getting the exception as
An unhandled exception of type 'System.FormatException' occurred in mscorlib.dll
Additional information: String was not recognized as a valid DateTime.
Plz tell me that how can i pass the Datetime type to function when I have only date.
Thanks,
Sandy
|
|
|
|
|
Look into the ToString method of the DateTime Object. I believe you can pass the format there:
Something like:
DateTime.ToString("dd/mm/yyyy")
Good Luck.
Coulda, woulda, shoulda doesn't matter if you don't.
|
|
|
|
|
The CultureInfo for the application doesn't have the same idea as you do about the string format of a date.
Create the DateTime value you want instead of parsing it from a string: new DateTime(1983, 4, 14)
---
b { font-weight: normal; }
|
|
|
|
|
ManagementClass mc = new ManagementClass("Win32_TemperatureProbe");
ManagementObjectCollection moc = mc.GetInstances();
Console.WriteLine(moc.Count);
I am using above code to get temperature of CPU, but moc.Count always returns zero. why i m not getting objects in moc.
Shajeel
-- modified at 3:14 Monday 3rd April, 2006
|
|
|
|
|
Is there a temperature probe in the computer?
|
|
|
|
|
how can i check if it is installed, is it shown in device manager?
|
|
|
|
|
They don't just come with every computer, some motherboards have them and some hardware allowes then to be put in. I don't know how to check to see if there is one but look at the hardware and at the motherboard manual.
|
|
|
|
|
i can see my processor temperature from my bios. so if it shown in there, why i am not finding it through windows management.
|
|
|
|
|
Hello!
I am using a listview in C# with several columns and rows. Incoming data is added to the top row of the listview while the bottom rows are deleted on regular intervalls.
When scrolling down this list, for checking, for example the last index, the list automatically is scrolled back up to the first row on every new incoming data update. This is very annoying cause I do not want any automatic scrolling.
Does anyone know how to avoid this?
|
|
|
|
|
Hi,
//try this
listView1.Scrollable = false;
Thanks.
|
|
|
|
|
But I want it to be possible for the user to scroll throught the list, I just don't want the list to automatically be scrolled back to the top.
|
|
|
|
|
Well okay just block scrolling when you are updating the list view and then re enable it.
i hope this can solve it the you want it.
|
|
|
|
|
cbhkenshin wrote: Well okay just block scrolling when you are updating the list view and then re enable it.
How is this done? I looked for a way to do it, but couldn't find one.
|
|
|
|
|
how to automatically draw grap when the user put a number of data...?thanks
|
|
|
|