|
hi,
many thanks to reply..
|
|
|
|
|
I just started out in C programming not long ago , and i've been assigned to create a program which requires me to save the data executed when the program is running, into a so called temporary folder.
For example, When i log into my Internet Explorer, cookies would be stored in a temporary folder.
Would be great if some1 could show me how it goes.
Thanks
Ben
|
|
|
|
|
Very broad question.
You can use FileStream from System.IO for a start. System.IO.Path for path manipulation.
Ask a more specific question.
Alex Korchemniy
|
|
|
|
|
The scenerio now would be a program source was created for the automation of a robot to avoid obstacles. In the event , I have to map out an area for the robot to move in.
So by doing that, i thought that i could collect the data( x and y axis ;points and numbers), when the robot is executed to move. By doing that i could actually map out an area using the reference data collected.
|
|
|
|
|
I'd suggest you start reading on the topic of "serialization", the framework has lots of documentation on this topic.
Basically, serialization is a way of writing data to disk, for example, so that it can be loaded (deserialized) fairly easily.
Regards,
mav
|
|
|
|
|
i have a dataset with 2 datatables link with one data relation, i had loaded the datagrid with the parent datatable, it shows the drill down button to the child table, but the problem is it only show a "link" to the childtable, i only can view the data in child table by clicking the "link", is there anyway to show the datarelation on the datagrid without the "link"?any help is greatly appreciated..
|
|
|
|
|
If you mean to show both parent and child data at the same time than it is not possible to do it with the DataGrid. If you need this you will have to do it yourself or look for another component.
|
|
|
|
|
I offer a service which is done using an application. It needs to be run on client machine, is there anyway I can get it through without making client manually downloaded the file first then ran it again manually? I have been looking at ActiveX but can't relly find an article that show me how.. I am really new to ActiveX though.
|
|
|
|
|
Not really. Remotely launching an executable is an extreme security risk, so it is VERY tightly controlled.
More details on your application would be helpful. Is your code coming from a web site?
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
The code is not from the website, however I used the coding for hardware infomation http://www.codeproject.com/csharp/Hardware_Properties_C_.asp as an example. The application I wish to run is used to check for machine hardware infomation which is needed to be ran on client machine in order to get the infomation... is it that right? Is there any other way to do it?
I read something on .cab today? Could it be a possible solution?
http://msdn.microsoft.com/workshop/components/activex/packaging.asp#EXAMPLE
Thank you,
|
|
|
|
|
I have a winform with a panel control. Panel control contain few custom label controls, which can easily move anywhere inside that panel control.
Now i can only move or select one custom label and place anywhere inside the panel. But here i would like to implement group selection or group movement of custom labels.
Please give me some clues which will help me to implement this group selection or movement.
Sreejith Nair
[ My Articles ]
|
|
|
|
|
sreejith ss nair wrote:
Please give me some clues which will help me to implement this group selection or movement.
Uh, you're not talking about doing this in the designer, right?
So, trap the Click event for all the controls and see if the CTRL key is being held down. If it is, add the control to an array of "selected controls". On the MouseMove event for any control, if the CTRL key is still held down, then change the Location of each control in the array based on the mouse movement change.
Marc
MyXaml
Advanced Unit Testing
YAPO
|
|
|
|
|
I'm pretty green at C#, and what I'm trying to do is what is described in C++, my native language, is sending and retriving data from a modeless box. What I have is a main dialog box/form that calls another dialog box/form, and I can't seem to location the method of getting data from the main form to the newly called form.
If someone could point me to a simple app that uses this function or just describe what I'm looking for in the parent call, that would be great.
Thanks
J Guds
Masters Student
Kansas University
|
|
|
|
|
Hi Guds,
1) You can pass the instance of the main form to the child form and can access the values from that object.
2)You can use delegate to access the values of the main form in the child form.
Thanks and Regards
SGS
|
|
|
|
|
It's fairly simple, just pass the reference to the main form to the modeless form. Something like
class MainForm : Form
{
public void ShowForm()
{
ChildForm f = new ChildForm(this);
f.Show();
}
}
class ChildForm : Form
{
MainForm mainForm;
public ChildForm(MainForm f)
{
mainForm = f;
}
void SomeFunc() { int data = mainForm.data; }
}
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
Hello,
I tried to uninstall an application.
However I still get the "The specified service already exists" error when I try to reinstall the
application.
How can I fix the problem?
Thanks in advance.
Regards,
Clifford
|
|
|
|
|
I wrote a plugin to internet explorer that requires internet explorer to be shutdown and restarted. I figured out a way to shut down IE using the MSI and to start it back up using VBScript.
I was wondering if there was a way to remember what webpage each internet explorer process was on and then open up internet explorer windows that open up to the URLs that the user was visiting previously.
Any insights?
|
|
|
|
|
What does your question have to do with C#?
Generally speaking, there is a way and you can do this in C#, but managed custom actions are not recommended because you have no control over runtime binding.
Through script, VB (6.0), managed code, and even native COM client implementation you could keep getting an InternetExplorer.Application object using GetObject in VB, or the Running Object Table (ROT) in other implementations; get its LocationURL property value; then call Quit . Do this until no more InternetExplorer instances are returned.
When you're done upgrading the machine and no reboots are required (don't forget to check that, calling MsiGetMode to check for MSIRUNMODE_REBOOTATEND | MSIRUNMODE_REBOOTNOW ), you should invoke iexplore.exe -nohome <url> for each URL in your list. Do not create new instances of InternetExplorer.Application , because successive calls after the first will most likely return the fist object and you'll just end up causing the last URL to be displayed only instead of all of them.
I would warn against this, however. If one of those instances was the resultant page of an online purchase that haphazardly uses HTTP GET (that would be seriously bad and hopefully no one does that) and you browse to it on the users' behalf, you just ended up forcing them to buy another car or pair of socks or whatever. Just don't do it, IMO.
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Customer Product-lifecycle Experience
Microsoft
[My Articles] [My Blog]
|
|
|
|
|
I agree with Heath. IMHO, you should let the user know that IE needs to be restarted. Let the user take care of opening their websites.
Alex Korchemniy
|
|
|
|
|
gotcha... i'll look into it.
|
|
|
|
|
Hi,
I am trying to get the windowstate of a window based on its process id. I am not exactly able to get the window state as MINIMIZED when the window is minimized .. most times i returns NORMAL. I am unable to find a pattern.
Can anyone explain how the window state is maintained.
Thanks!
|
|
|
|
|
Updating the previous query -
Below is what I used to get the window state ----- what is wrong in this? Am i missing something?
-------------------------------------------------------------------------------------------------
FormWindowState GetWindowState(int processID)
{
FormWindowState formWindowState = FormWindowState.Normal;
WINDOWPLACEMENT windowPlacement = new WINDOWPLACEMENT();
//If there is not proces by this ID, then return Minimized.
uint processHandle = (uint)Process.GetProcessById(processID).Handle;
if ( processHandle.Equals(0) )
{
return FormWindowState.Minimized;
}
bool test = Win32Wrapper.GetWindowPlacement(processHandle,ref windowPlacement);
if ( windowPlacement.showCmd == SHOW_STATE.SW_SHOWMINIMIZED )
{
formWindowState = FormWindowState.Minimized;
}
else if ( windowPlacement.showCmd == SHOW_STATE.SW_SHOWMAXIMIZED )
{
formWindowState = FormWindowState.Maximized;
}
}
|
|
|
|
|
I admit it, I'm a newbie when it comes to regular expressions. I'm hoping one of the experts can give me a hand here. I have 3 regular expression calls and a standard string.Replace call (4 replace calls in all) that I'd like to combine into a single regular expression. Here's my code:
string returnValue = Regex.Replace(plainText, "(\\r\\n)|(\\n)", "<br />");
returnValue = Regex.Replace(plainText, @"\b(http://|https://|https://www.|http://www.|www.)[^\s]+\b", @"<a href=""$0"">$0</a>");
returnValue = Regex.Replace(plainText, "<a href=\"www.", "<a href=\"http://www.");
returnValue = returnValue.Replace("'", "'");
For performance's sake, I'd like to combine all those calls into a single regular expression. Possible?
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: He has a funny face. And he's my son.
Judah Himango
|
|
|
|
|
Hey!
I got a ArrayList that is readed and modified from diffrent methods in a class. Its inportant that there is not more thw one thread working against this arraylist at a time.
I have tryed
<br />
Method1()<br />
{<br />
lock(myArrayList)<br />
{<br />
}<br />
}<br />
Method2()<br />
{<br />
lock(myArrayList)<br />
{<br />
} <br />
}<br />
Method3()<br />
{<br />
lock(myArrayList)<br />
{<br />
} <br />
}<br />
this lock(myArrayList is used in all the methods that are working against the arraylist.
The strange thing is that the program freezes on the lock and cant get past it?
Maby i shold use ArrayList.SyncRoot or ArrayList.Synchronized ???
a exemple would be good
Best Regards
SnowJim
|
|
|
|
|
You should be locking on the object returned by SychRoot. Sychronized is just a property that says if access to the arraylist is synchronized or not.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|