|
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
|
|
|
|
|
hackerz83 wrote: how to automatically draw grap when the user put a number of data...?
Your question is too vague.
What type of graph? line graph, bar chart, pie chart, scatter plot, etc.
What do you mean by a "number of data"? What format is the data in? How does it relate to the graph? Does it supply information for an X & Y axis?
ColinMackay.net
Scottish Developers are looking for speakers for user group sessions over the next few months. Do you want to know more?
|
|
|
|
|
hello
actually i have to import a text file into SQLServer2000 database table. i can do it from Enterprise manager of SQLServer2000 using DTS Import/Export Wizard. But i want to use SQL Server's DTS Import/Export Wizard's functionality thorugh C# application using SQLDMO.
i dont want to go to SQL Server Enterprise manager and import file from there i want to use SQLDMO and perform the same task through C# application without using SQLServer's Enterprise Manager and DTS Import/Export Wizard.
i'll be very thankful if anyone helps me. if u dont have the exact solution but can tell the website or link or any forum then plz do tell me.
if this is not the correct forum then plz guide me to the correct forum there i can get help.
you can send me mail at (adnan.developer@gmail.com).
Best Regards.
Adnan Akram
|
|
|
|
|
Try looking at the SqlBulkCopy class in the System.Data.SqlClient namespace. I've never used it, but should give you the ability to BCP a file into a Sql table. Or if you google SqlBulkCopy .Net it should return you some sites to check out.
Jake
|
|
|
|
|
can anyone help me regarding how to retrieve data from sharepoint SQL Db through any of the sharepoint service.
I am having admin right in my machine but it's not the server where sharepoint has been installed. so can i write a c# application to access sharepoint services.
anvar sadath
|
|
|
|
|
Please don't cross post.
---
b { font-weight: normal; }
|
|
|
|
|
We pick a message from queue to process. The application goes down just as we have completed picking it up from queue. Message will be lost!!!! How can we prevent that.
It's Very Very Very urgent
-- modified at 1:27 Monday 3rd April, 2006
|
|
|
|