|
mughalali wrote:
I want to set and get mouse positions in C#.
Control.MousePosition is another way.
Mazy
"Man is different from animals in that he speculates, a high risk activity." - Edward Hoagland
|
|
|
|
|
I want to get keyboard and mouse control in my app.Please tell me how i get or set keyboard events in my app.
Actually iam doing final year project on remote desktop control. so i need to control keyboard and mouse of remote system.
mughalali
|
|
|
|
|
hello there,
i wonder if anyone has this dll system.storage.schemas.dll , or know link to download it as i need namespace in System.Storage.Explorer
|
|
|
|
|
This namespace and the dll are part of .NET Framework in Windows Codename Longhorn and you cannot get it for other operating systems.
|
|
|
|
|
i want to use the namespace in a program and when i searched for it...i knew that it i in this dll but when i searched for dll over my pc i couldnt find it so tell me what to do to use namespaces in
|
|
|
|
|
What do you want to use the namespace for? It will only work on Longhorn and the WinFS file system...
In order to get the .dll, you need to download the Longhorn SDK from Microsoft's MSDN Subscriber Downloads. You can only do that if your an MSDN Subscriber...
Oh! A minor problem --> You can't install the Longhorn SDK on a machine that has the .NET Framework SDK installed. This means you can't install the SDK on the same machine as any version of Visual Studio.NET.
RageInTheMachine9532
|
|
|
|
|
hi dave,
i want this namespace to get internet explorer history, i know how to get instances runnig from ie but only the window title of ie but not full url as i am using only c# ..i ve code for it in c++..but i dont know how to convert or use functions in it so tell me if u ve solution
|
|
|
|
|
Uhhh...you're not getting it...
THAT.DLL WILL ONLY WORK WITH WINDOWS LONGHORN AND WINFS! THERE IS NO WAY TO GET IT TO WORK WITH ANY OTHER VERSION OF WINDOWS!
On top of that, it has nothing to do with IE, let alone it's history files...
RageInTheMachine9532
|
|
|
|
|
i got code now but i didnt try it...here u r a copy form it
namespace CSharpcenter{
using System;
using Microsoft.Win32;
public class ConsoleApp
{
public static int Main(string[] args)
{
//
// TODO: Add code to start application here
//
//get down to the Typed URL in
//HKCU\\SOFTWARE\\MICROSOFT\\INTERNET EXPLORER\\TYPEDURLS
RegistryKey theCurrentMachine = Registry .CurrentUser ;
RegistryKey theSoftware = theCurrentMachine.OpenSubKey ("SOFTWARE");
RegistryKey theMicrosoft = theSoftware.OpenSubKey ("Microsoft");
RegistryKey theIE = theMicrosoft.OpenSubKey ("Internet Explorer");
RegistryKey theTypedURLS = theIE.OpenSubKey ("TypedURLs");
//Now get all the values in the key...
long lCount = theTypedURLS.ValueCount;
if(lCount <= 0) return 1;
string [] arTypedURL = theTypedURLS.GetValueNames();
Console.WriteLine ("You have typed in following web sites in IE :");
int i = 1;
foreach ( string theURL in arTypedURL)
{
//get the name of the url ...
Console.WriteLine ("[{0}] {1}",i,theTypedURLS.GetValue (theURL));
i++;
}
return 0;
}
}
}
|
|
|
|
|
OK. That's code to get the list of URL's typed into the address bar. It's not the history of URL's that IE has gone to...
All the history URL's are stored ina single file called "index.dat" in the path:
C:\Documents and Settings\<loggedInUserID>\Local Settings\History\History.IE5 for Internet Explorer 5. For version 6 it will end with "\History.IE6"...
There is no API will will let you get at the entires in the index.dat file. You will have to write your own code to open and parse up the file. Some investigating has revealed some site that have dug into the format of the file. Try this[^]...
RageInTheMachine9532
|
|
|
|
|
Hello,
I'm converting some VBS scripts to C# and one of them uses the following lines of code
Set MyDCOM = CreateObject("NODMON.NODCLS")
retval = MyDCOM.addmsg("", "", 1, Now, 0, 3000, Message)
Could someone point me in the right direction for how I should go about converting this? It's mainly the CreateObject statement I'm unsure of!.
Thanks
|
|
|
|
|
Gareth_Hastings wrote:
Set MyDCOM = CreateObject("NODMON.NODCLS")
retval = MyDCOM.addmsg("", "", 1, Now, 0, 3000, Message)
What you are doing here is late binding in VB. While C# does support late-bound object creation (i.e.; look at Activator.CreateInstance ), there are several ways to access what you are doing. One is to generate the appropriate interop assemblies (for example if you are using Visual Studio .NET you can simply use the Add Reference -> COM tab), this will allow you to declare the object and take advantage of early-binding at compile-time or you could use reflection to generate the object at run-time (the Activator class).
- Nick Parker My Blog | My Articles
|
|
|
|
|
>plz,
help me to get active (running)network neighbors in a LAN
and thier IPs.
BELALSOFT
|
|
|
|
|
Maybe this code example can help you. I use it to determine if a specific ip-address is reachable. If not the exeception is thrown.
try
{
System.Net.Dns.GetHostByAddress(ipAddress);
}
catch (System.Net.Sockets.SocketException)
{}
If you build a loop to test all possible lan addresses, you should get the running neighbours. The ipAddress can be specified either as string or as an object of IPAddress class. To get the name of an host according to an running IP address, use the IPHostEntry object returned be the GetHostByAddress method.
This way may be a bit ineffective, but at least it's better than nothing
|
|
|
|
|
I'm trying to get an MDI window that contains a number of sub forms, one of which i would like to be an MDI.
I am looking for an effect similar to the one found in the relationships window of access. Where the Access window is the parent of the relationship window which in turn is the parent of a number of "table view" windows.
However, when i try and enable MDI container on a contained form... it crashes, as it says a MDIContainer cannot be both a child and a parent form.
As another note, the relationship window, while contained in the main Access view, also displays a window icon on the task bar below the table view. I'm not sure how this is implemented.
Are the "table view" windows actualy forms? Or simply objects that seem to behave like forms, but lack a lot of the functionality? In which case, how do i construct a form that handles them like child components, and is a child form itself?
I noticed that the access relationship window does not have the automatic scroll bars that MDI containers use, they are pre-placed, so it's a fixed size canvas and it does not implement MDI because the background colour is not MDI container. So how do the sub objects work?
Are they components? Or panels? Or some other object? I'm trying to figure out how to apply an adjustable border (re-size and move) to a selectable form component. Bit confused.
Cheers
Cata
|
|
|
|
|
The Catalyst wrote:
I'm trying to get an MDI window that contains a number of sub forms, one of which i would like to be an MDI.
Can't do that. An MDI Parent cannot be a child to another MDI Parent.
Access uses what looks like child windows in it's relationships window, but they are really controls that have the appearance and some behaviors of a real window.
RageInTheMachine9532
|
|
|
|
|
I figured that out. The relationship uses other features that a pure MDI window would not allow.
Do you know how to implement these controls? I played with custom controls, but there is no way to set the border on them, so i'm lost.
If i could build the object, i could manage them with an array easy enough, but i really need to find out how to implement the movable and resizable form style border.
Cata
|
|
|
|
|
I m making the add ins for application .Problem is this when i m making a button using following syntex ,Please Give me some help regarding ...
osButton=(_Office.CommandBarButton)oCommandBar.Controls.Add(_Office.MsoControlType.msoControlButton,oMissing,oMissing,oMissing,oMissing);
osButton.FaceId=57;
But when i m running the program button is appearing in addin but the icon is not displaying .if i use caption instead of FaceId it is working mean the caption is displaying but icon is not .what is the problem i m trying to find but still not getting where the problem is bkz no prob with syntex bkz this code is working in another computer .(my os Windows 2000 advance server)
Thanks if u tried to find the solution
|
|
|
|
|
Hey everyone,
I have a problem with seting and expanding nodes in a explorer clone program I am trying to make. The problems comes as when I am trying to open a folder in the right side of the explore bar (the right side is a TreeView and the left is a ListView). I can't find a method that will allow me to change the selected node in a treeView and also expand it.
Please help.
Part of my program's source code is here
private void lv_ItemActivate(object sender, System.EventArgs e)
{
ListView lv = (ListView)sender;
foreach (ListViewItem lvi in lv.SelectedItems)
{
string fullPath = tvw.SelectedNode.FullPath.ToString() + "\\" +lvi.Text.ToString();
MessageBox.Show(lvi.Text);
DirectoryInfo di = new DirectoryInfo(fullPath);
if ((di.Attributes & FileAttributes.Directory)!=0)
{
//here is what I have being attempting but to no avil because the selected node property is read only
tvw.SelectedNode = new TreeNode(lvi.Text);
tvw.SelectedNode.FullPath = fullPath;
tvw.SelectedNode.Expand();
return;
flow
PS: Thanks for the help in advance, I am new to the forum and I hope I can contribute and learn a lot in here.
|
|
|
|
|
The TreeView.SelectedNode property is NOT read-only, but TreeNode.FullPath is (which you're trying to set). All you need to do is recursively find your TreeNode (based on the path if you like) and then set TreeView.SelectedNode to it. If you want to expand it, call the Expand method on your TreeNode .
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
Hey thanks for the help,
I have being thinking of using the Parent property to recurse through the tree node, but I what I don't understand is that after this I am still going to find a full path, and I wondering what to do with that.
Thanks for the help.
|
|
|
|
|
You don't recurse up using the Parent , you recurse through the children using the Nodes property. All children have only one parent, so there's not even a need to use recursion since a simple iterative loop will work just fine. To find a full path, just split the string on the separate character ("\" by default) and look for the TreeNode with the given text like so:
public TreeNode FindPath(string path)
{
if (path == null) throw new ArgumentNullException("path");
string[] names = path.Split(PathSeparator);
return FindPathHelper(Nodes, names, 0);
}
private TreeNode FindPathHelper(TreeNodeCollection nodes,
string[] names, int iteration)
{
if (nodes != null && names != null &&
iteration >= 0 && iteration < names.Length)
{
foreach (TreeNode node in nodes)
{
if (string.Compare(node.Text, names[iteration], true) == 0)
return node;
TreeNode child = FindPathHelper(node.Nodes, names, ++iteration);
if (child != null) return child;
}
}
return null;
}
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
Hello Heath,
I know this thread over 5 years old and I hope you're still subscribing to it. I'm also trying to expand the path to a specific node in a treeview (i.e. a node that has just been added by a user).
I almost understand your code example. However my question is, where did you get the TreeNodeCollection for the "Nodes" parameter in the initial FindPathHelper call (within the FindPath function)? I don't see it declared anywhere.
Thanks,
Sacha
|
|
|
|
|
As mentioned, "you recurse through the children using the Nodes property". The Nodes property is on TreeView class and on the TreeNode class (which is used to recurse into subnodes).
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 designed a form using datagrid to connect to database. It allow user to enter data but i can not validate the data that user provide.
Please help as posible as you can.
Thanks.
Mr Duc Linh Nguyen
|
|
|
|