|
as.thakor@ntlworld.com
could i speak to you by email direct ?
it would be greatly appreciated
Thanks
Atul
|
|
|
|
|
Here's a chunk of code I wrote. This class was basically being hosted by remoting (thus the MarshalByRefObject), but it moves the mouse where you want it. It shows how to interop with SendInput (importing the definition and defining a few structures you'll need).
<div style="font-family:Courier New;font-size:10pt;background-color:#FFFFFF" >
<span style="color:#0000FF;">using </span><span style="color:#000000;">System;<br>
</span><span style="color:#0000FF;">using </span><span style="color:#000000;">System.Runtime.InteropServices;<br>
<br>
<br>
[StructLayout(LayoutKind.Explicit, Size=28)]<br>
</span><span style="color:#0000FF;">public struct </span><span style="color:#000000;">Input<br>
{<br>
[FieldOffset (0)]<br>
</span><span style="color:#0000FF;">public uint </span><span style="color:#000000;">type;<br>
[FieldOffset (4)]<br>
</span><span style="color:#0000FF;">public </span><span style="color:#000000;">MouseInput mi;<br>
[FieldOffset (4)]<br>
</span><span style="color:#0000FF;">public </span><span style="color:#000000;">KeyboardInput ki;<br>
[FieldOffset (4)]<br>
</span><span style="color:#0000FF;">public </span><span style="color:#000000;">HardwareInput hi;<br>
<br>
</span><span style="color:#0000FF;">public const uint </span><span style="color:#000000;">INPUT_MOUSE = 0;<br>
</span><span style="color:#0000FF;">public const uint </span><span style="color:#000000;">INPUT_KEYBOARD = 1;<br>
</span><span style="color:#0000FF;">public const uint </span><span style="color:#000000;">INPUT_HARDWARE = 2;<br>
}<br>
<br>
[StructLayout(LayoutKind.Sequential, Size=24)]<br>
</span><span style="color:#0000FF;">public struct </span><span style="color:#000000;">MouseInput<br>
{<br>
</span><span style="color:#0000FF;">public int </span><span style="color:#000000;">dx;<br>
</span><span style="color:#0000FF;">public int </span><span style="color:#000000;">dy;<br>
</span><span style="color:#0000FF;">public uint </span><span style="color:#000000;">mouseData;<br>
</span><span style="color:#0000FF;">public uint </span><span style="color:#000000;">dwFlags;<br>
</span><span style="color:#0000FF;">public uint </span><span style="color:#000000;">time;<br>
</span><span style="color:#0000FF;">public uint </span><span style="color:#000000;">dwExtraInfo;<br>
<br>
</span><span style="color:#0000FF;">public const uint </span><span style="color:#000000;">MOUSEEVENTF_MOVE = 0x0001; </span><span style="color:#008000;"><br>
</span><span style="color:#0000FF;">public const uint </span><span style="color:#000000;">MOUSEEVENTF_LEFTDOWN = 0x0002; </span><span style="color:#008000;"><br>
</span><span style="color:#0000FF;">public const uint </span><span style="color:#000000;">MOUSEEVENTF_LEFTUP = 0x0004; </span><span style="color:#008000;"><br>
</span><span style="color:#0000FF;">public const uint </span><span style="color:#000000;">MOUSEEVENTF_RIGHTDOWN = 0x0008; </span><span style="color:#008000;"><br>
</span><span style="color:#0000FF;">public const uint </span><span style="color:#000000;">MOUSEEVENTF_RIGHTUP = 0x0010; </span><span style="color:#008000;"><br>
</span><span style="color:#0000FF;">public const uint </span><span style="color:#000000;">MOUSEEVENTF_MIDDLEDOWN = 0x0020; </span><span style="color:#008000;"><br>
</span><span style="color:#0000FF;">public const uint </span><span style="color:#000000;">MOUSEEVENTF_MIDDLEUP = 0x0040; </span><span style="color:#008000;"><br>
</span><span style="color:#0000FF;">public const uint </span><span style="color:#000000;">MOUSEEVENTF_XDOWN = 0x0080; </span><span style="color:#008000;"><br>
</span><span style="color:#0000FF;">public const uint </span><span style="color:#000000;">MOUSEEVENTF_XUP = 0x0100; </span><span style="color:#008000;"><br>
</span><span style="color:#0000FF;">public const uint </span><span style="color:#000000;">MOUSEEVENTF_WHEEL = 0x0800; </span><span style="color:#008000;"><br>
</span><span style="color:#0000FF;">public const uint </span><span style="color:#000000;">MOUSEEVENTF_VIRTUALDESK = 0x4000; </span><span style="color:#008000;"><br>
</span><span style="color:#0000FF;">public const uint </span><span style="color:#000000;">MOUSEEVENTF_ABSOLUTE = 0x8000; </span><span style="color:#008000;"><br>
</span><span style="color:#000000;">}<br>
<br>
[StructLayout(LayoutKind.Sequential, Size=24)]<br>
</span><span style="color:#0000FF;">public struct </span><span style="color:#000000;">KeyboardInput<br>
{<br>
</span><span style="color:#0000FF;">public ushort </span><span style="color:#000000;">wVk;<br>
</span><span style="color:#0000FF;">public ushort </span><span style="color:#000000;">wScan;<br>
</span><span style="color:#0000FF;">public uint </span><span style="color:#000000;">dwFlags;<br>
</span><span style="color:#0000FF;">public uint </span><span style="color:#000000;">time;<br>
</span><span style="color:#0000FF;">public uint </span><span style="color:#000000;">dwExtraInfo;<br>
<br>
</span><span style="color:#0000FF;">public const uint </span><span style="color:#000000;">KEYEVENTF_EXTENDEDKEY = 0x0001;<br>
</span><span style="color:#0000FF;">public const uint </span><span style="color:#000000;">KEYEVENTF_KEYUP = 0x0002;<br>
</span><span style="color:#0000FF;">public const uint </span><span style="color:#000000;">KEYEVENTF_UNICODE = 0x0004;<br>
</span><span style="color:#0000FF;">public const uint </span><span style="color:#000000;">KEYEVENTF_SCANCODE = 0x0008;<br>
}<br>
<br>
[StructLayout(LayoutKind.Sequential, Size=24)]<br>
</span><span style="color:#0000FF;">public struct </span><span style="color:#000000;">HardwareInput<br>
{<br>
</span><span style="color:#0000FF;">public uint </span><span style="color:#000000;">uMsg;<br>
</span><span style="color:#0000FF;">public ushort </span><span style="color:#000000;">wParamL;<br>
</span><span style="color:#0000FF;">public ushort </span><span style="color:#000000;">wParamH;<br>
}<br>
<br>
<br>
<br>
</span><span style="color:#0000FF;">namespace </span><span style="color:#000000;">InputSimulation<br>
{<br>
</span><span style="color:#808080;"> </span><span style="color:#808080;"><br>
</span><span style="color:#0000FF;">public class </span><span style="color:#000000;">InputSimulation : MarshalByRefObject<br>
{<br>
<br>
[DllImport("user32.dll")]</span><span style="color:#0000FF;">public static extern uint </span><span style="color:#000000;">SendInput(</span><span style="color:#0000FF;">uint </span><span style="color:#000000;">nInputs, </span><span style="color:#0000FF;">ref </span><span style="color:#000000;">Input inputs, </span><span style="color:#0000FF;">int </span><span style="color:#000000;">sizeofInput);<br>
<br>
</span><span style="color:#0000FF;">public </span><span style="color:#000000;">InputSimulation()<br>
{<br>
}<br>
<br>
</span><span style="color:#0000FF;">public void </span><span style="color:#000000;">MouseMove(</span><span style="color:#0000FF;">ushort </span><span style="color:#000000;">x, </span><span style="color:#0000FF;">ushort </span><span style="color:#000000;">y)<br>
{<br>
Input[] i = {</span><span style="color:#0000FF;">new </span><span style="color:#000000;">Input()};<br>
i[0].type = 0;<br>
i[0].mi.dx = (</span><span style="color:#0000FF;">int</span><span style="color:#000000;">) x;<br>
i[0].mi.dy = (</span><span style="color:#0000FF;">int</span><span style="color:#000000;">) y;<br>
i[0].mi.dwExtraInfo = 0;<br>
i[0].mi.dwFlags = MouseInput.MOUSEEVENTF_ABSOLUTE | MouseInput.MOUSEEVENTF_MOVE | MouseInput.MOUSEEVENTF_VIRTUALDESK;<br>
i[0].mi.mouseData = 0;<br>
i[0].mi.time = 0;<br>
<br>
</span><span style="color:#0000FF;">uint </span><span style="color:#000000;">ret = SendInput(1, </span><span style="color:#0000FF;">ref </span><span style="color:#000000;">i[0], System.Runtime.InteropServices.Marshal.SizeOf(i[0]));<br>
}<br>
<br>
</span><span style="color:#0000FF;">public void </span><span style="color:#000000;">MouseClick()<br>
{<br>
Input[] i = {</span><span style="color:#0000FF;">new </span><span style="color:#000000;">Input(), </span><span style="color:#0000FF;">new </span><span style="color:#000000;">Input()};<br>
<br>
}<br>
}<br>
}<br>
</span>
</div>
I, for one, do not think the problem was that the band was down. I think that the problem may have been that there was a Stonehenge monument on the stage that was in danger of being crushed by a dwarf.
-David St. Hubbins
|
|
|
|
|
|
I have just started playing with the code and read that its possible to make a global hook
http://support.microsoft.com/default.aspx?scid=KB;EN-US;Q319524
|
|
|
|
|
I was wondering how that was going to work (I'm actually not sure the exact purpose of installing a hook that's not global to be honest...I need to read more about that). I knew you had to write a DLL with a specific signature that gets loaded by every application (I wrote one once for a kiosk that disabled and enabled things like CTRL-ALT-DELETE once they typed in a password).
I looks like almost the entire project would have to be a straight Win32 DLL in C/C++ (since the keyboard hook would be calling SendInput). You'd most likely write an application that installs and uninstalls the hook as well (which wouldn't necessarily have to be written in C/C++).
Have you ever done any C++? This DLL wouldn't actually be that big...you just have to get it perfect since everything is calling it . If I get a chance tonight, I'll play around with writing a hook (busy at work at the moment).
I, for one, do not think the problem was that the band was down. I think that the problem may have been that there was a Stonehenge monument on the stage that was in danger of being crushed by a dwarf.
-David St. Hubbins
|
|
|
|
|
i got hold of a dll hook someone used in VB maybe its convertable to be used in .net ?
http://www.allapi.net/php/redirect/redirect.php?action=download&id=372
thats the link to the sample prog and .dll
nope i havent much experience in c++
only the very basics of c but i am willing to learn
|
|
|
|
|
That app uses Visual Basic (not VB.NET) to create a DLL. His DLL might have even been written in C/C++, but in any event you can specify exactly how the DLL should look in any of those languages (some more easier than others)
I could be wrong (wouldn't be the first time), but I don't think you can create a .NET "Win32 Dll" (there might be some third party stuff that lets you do this, but I don't know). That is to say, I don't think you can create something in .NET that's just a DLL (and not a managed assembly). You can create a DLL that exposes COM functionality, but I don't think you can get as specific as you need for this DLL in .NET (either VB.NET or C#).
I think this job would actually require something other than .NET.
I, for one, do not think the problem was that the band was down. I think that the problem may have been that there was a Stonehenge monument on the stage that was in danger of being crushed by a dwarf.
-David St. Hubbins
|
|
|
|
|
http://msdn.microsoft.com/msdnmag/issues/02/10/cuttingedge/default.aspx
Apparently a Global hook.......
doesnt seem to do much though
|
|
|
|
|
Google 2 Win it seems
http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=872&lngWId=10
has the source code for someone who has created something pretty much what i want in vb.net
just gotta translate ye old code to c# now or just use the vb.net stuff
if your still intrested in having a mess about with this project your very welcome
as your input has been extremely value!
|
|
|
|
|
k had a look at the source........
<br />
Private Declare Function GetCursor Lib "user32" () As Int32<br />
Private Declare Function GetCursorPos Lib "user32" Alias "GetCursorPos" (ByRef lpPoint As POINTAPI) As Int32<br />
Private Declare Function WindowFromPoint Lib "user32" (ByVal xPoint As Int32, ByVal yPoint As Int32) As Int32<br />
Private Declare Function GetWindowThreadProcessId Lib "user32" (ByVal hwnd As Int32, ByRef lpdwProcessId As Int32) As Int32<br />
Private Declare Function AttachThreadInput Lib "user32" Alias "AttachThreadInput" (ByVal idAttach As Int32, ByVal idAttachTo As Int32, ByVal fAttach As Int32) As Int32<br />
Private Declare Function GetAsyncKeyState Lib "user32" Alias "GetAsyncKeyState" (ByVal vKey As Int32) As Int16<br />
k i understand GetCursor is the function name and it returns in Integer ....... but "user32" refers to a library and i have no idea how to port that part of the code over to c#
just out of interest is this...... code actually intercepting the events or simply reading them as they fly by as i need to read process and act
|
|
|
|
|
Not sure if that technique would work for DirectX games etc. It might not be low level enough.
I think hooks might be the only way to do it, and doing global hooks seems truly impossible to do entirely in .NET.
It's not too hard to get unmanaged code (C/C++/VB) to talk to managed code via a COM. That might be the easiest way: create a C/C++ hook, create a .NET class that gets wrapped as a COM component, let the hook call the .NET class.
This would allow you to do most of your development in C#, but I think some C/C++ is going to be unavoidable.
I, for one, do not think the problem was that the band was down. I think that the problem may have been that there was a Stonehenge monument on the stage that was in danger of being crushed by a dwarf.
-David St. Hubbins
|
|
|
|
|
http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=1052&lngWId=10
This one is definately low level enough
seems it anyway
Public Class frmMain<br />
Inherits System.Windows.Forms.Form<br />
<br />
Declare Function SetWindowsHookEx Lib "user32" Alias "SetWindowsHookExA" (ByVal idHook As Integer, ByVal lpfn As LowLevelKeyboardProcDelegate, ByVal hMod As Integer, ByVal dwThreadId As Integer) As Integer<br />
Declare Function UnhookWindowsHookEx Lib "user32" Alias "UnhookWindowsHookEx" (ByVal hHook As Integer) As Integer<br />
Delegate Function LowLevelKeyboardProcDelegate(ByVal nCode As Integer, ByVal wParam As Integer, ByRef lParam As KBDLLHOOKSTRUCT) As Integer<br />
Declare Function CallNextHookEx Lib "user32" Alias "CallNextHookEx" (ByVal hHook As Integer, ByVal nCode As Integer, ByVal wParam As Integer, ByRef lParam As KBDLLHOOKSTRUCT) As Integer<br />
<br />
Const WH_KEYBOARD_LL = 13<br />
<br />
Structure KBDLLHOOKSTRUCT<br />
Dim vkCode As Integer<br />
Dim scanCode As Integer<br />
Dim flags As Integer<br />
Dim time As Integer<br />
Dim dwExtraInfo As Integer<br />
End Structure<br />
<br />
Dim intLLKey As Integer<br />
<br />
#Region " Windows Form Designer generated code "<br />
<br />
Public Sub New()<br />
MyBase.New()<br />
<br />
'This call is required by the Windows Form Designer.<br />
InitializeComponent()<br />
<br />
'Add any initialization after the InitializeComponent() call<br />
<br />
End Sub<br />
<br />
'Form overrides dispose to clean up the component list.<br />
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)<br />
If disposing Then<br />
If Not (components Is Nothing) Then<br />
components.Dispose()<br />
End If<br />
End If<br />
MyBase.Dispose(disposing)<br />
End Sub<br />
<br />
'Required by the Windows Form Designer<br />
Private components As System.ComponentModel.IContainer<br />
<br />
'NOTE: The following procedure is required by the Windows Form Designer<br />
'It can be modified using the Windows Form Designer. <br />
'Do not modify it using the code editor.<br />
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()<br />
Me.lblInfo = New System.Windows.Forms.Label()<br />
Me.SuspendLayout()<br />
'<br />
'lblInfo<br />
'<br />
Me.lblInfo.Location = New System.Drawing.Point(16, 16)<br />
Me.lblInfo.Name = "lblInfo"<br />
Me.lblInfo.Size = New System.Drawing.Size(216, 88)<br />
Me.lblInfo.TabIndex = 0<br />
Me.lblInfo.Text = "Alt-Tab, Alt-Esc, Ctrl-Esc, and the Windows key are disabled. Ctrl-Alt-Del and Al" & _<br />
"t-F4 are still enabled. Close the application to reset the keyboard. While this " & _<br />
"program is running, the low-level keyboard effect is global."<br />
'<br />
'frmMain<br />
'<br />
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)<br />
Me.ClientSize = New System.Drawing.Size(248, 118)<br />
Me.Controls.AddRange(New System.Windows.Forms.Control() {Me.lblInfo})<br />
Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog<br />
Me.MaximizeBox = False<br />
Me.MinimizeBox = False<br />
Me.Name = "frmMain"<br />
Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen<br />
Me.Text = "LowLevel Keyboard Hook"<br />
Me.ResumeLayout(False)<br />
<br />
End Sub<br />
<br />
#End Region<br />
<br />
Private Sub frmMain_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load<br />
intLLKey = SetWindowsHookEx(WH_KEYBOARD_LL, AddressOf LowLevelKeyboardProc, System.Runtime.InteropServices.Marshal.GetHINSTANCE(System.Reflection.Assembly.GetExecutingAssembly.GetModules()(0)).ToInt32(), 0)<br />
End Sub<br />
<br />
Private Sub frmMain_Closing(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles MyBase.Closing<br />
UnhookWindowsHookEx(intLLKey)<br />
End Sub<br />
<br />
Private Function LowLevelKeyboardProc(ByVal nCode As Integer, ByVal wParam As Integer, ByRef lParam As KBDLLHOOKSTRUCT) As Integer<br />
Dim blnEat As Boolean = False<br />
<br />
Select Case wParam<br />
Case 256, 257, 260, 261<br />
'Alt+Tab, Alt+Esc, Ctrl+Esc, Windows Key<br />
blnEat = ((lParam.vkCode = 9) AndAlso (lParam.flags = 32)) Or _<br />
((lParam.vkCode = 27) AndAlso (lParam.flags = 32)) Or _<br />
((lParam.vkCode = 27) AndAlso (lParam.flags = 0)) Or _<br />
((lParam.vkCode = 91) AndAlso (lParam.flags = 1)) Or _<br />
((lParam.vkCode = 92) AndAlso (lParam.flags = 1))<br />
End Select<br />
<br />
If blnEat = True Then<br />
Return 1<br />
Else<br />
Return CallNextHookEx(0, nCode, wParam, lParam)<br />
End If<br />
End Function<br />
Friend WithEvents lblInfo As System.Windows.Forms.Label<br />
End Class<br />
|
|
|
|
|
Hello folks,
I am new to windows .NET programing and was wondering how I could open a file with my application from the system context menu (open with...). My intuition told me that the specified file was probably encapsulated in the argument String array from my Main method, but my application craches when I try to do Explorer, right click on file -> Open with...-> MyApp.exe!
To resume: regular executing my exe works fine, opening my exe by open file with... (OS context menu) craches my application.
anybody knows how to do that ???
Thanks
|
|
|
|
|
Explorer passes the complete filename (including path) as the first argument to your entry point. You need to validate that an argument was provided and pass that to your main form when/after you instantiate it:
public class MainForm : Form
{
public static void Main(string[] args)
{
string filename = null;
if (args.Length > 0) filename = args[0];
Application.Run(new MainForm(filename));
}
public MainForm() : this(null)
{
}
private string filename;
public MainForm(string filename)
{
this.filename = filename;
}
public string Filename
{
get { return this.filename; }
set { this.filename = value; }
}
} Alternatively, you can use Environment.GetCommandLineArgs in your application somewhere to essentially do the same thing as was done in the Main entry point method.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
how to draw an X axis by datetime data!
my problem is to deal with the datetime,and the coordinate convert!
Please give me a sample!
|
|
|
|
|
|
I'm needing to be able to pull information off a computer (Computer Name, MAC Address, etc...), and am totally at a loss as to where to start (even to start looking). Could someone possibly point me in the right direction?
<---signature--->
Your kid gets into Duke.
You pay the tuition.
That tuition goes into my checking account.
My money in my checking account goes into beer, porn, and other such fun. Thank you
|
|
|
|
|
You can get some information with the Enviroment class, like Computer Name, OS Version, User, but the MAC Address I don't rememeber.
A example
string OSVersion = Environment.OSVersion.ToString();
----
hxxbin
|
|
|
|
|
Okay, that helps a lot, thank you. One other one while I'm at it: how would I be able to pull that same info off a remote machine, preferably by them accessing the exe themself from the server?
<---signature--->
Your kid gets into Duke.
You pay the tuition.
That tuition goes into my checking account.
My money in my checking account goes into beer, porn, and other such fun. Thank you
|
|
|
|
|
See Daniel's other response about using the Management classes to get remote information. There's several articles here on CodeProject about using those classes to get information from remote machines as well (which you can use to get information from your computer as well).
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
|
For basic info, look at the System.Environment class. If you need more details, look at the System.Management.SelectQuery on the MSDN. With simple queries, you can get information about the machine, both the software and the hardware environment.
Perl combines all the worst aspects of C and Lisp: a billion different sublanguages in one monolithic executable. It combines the power of C with the readability of PostScript. -- Jamie Zawinski
|
|
|
|
|
i am using sharpdevelop ide to develop a c# application. i just want to know how to create a resource file for a cs file. i am able to add a empty resource file. but then i have the burden of entering all the values of the fields in the localized form. what is the easy way to do that. is it possible to convert a cs file into a resouce file or create a new resource file from a existing cs file.
where we need just enter the values not names. ie i have a label in cs file which is named label1 i want to the get the resource file with name label1 where i need only enter the text which should be seen in the place of the label. i think i have explained it more than enough.
Thanks in advance
|
|
|
|
|
Sorry mate I think you need vs.net to do this. C# builder personal does it as well if you want to try that :
http://www.borland.com/products/downloads/download_csharpbuilder.html
Perhaps you could write an add-in for #d but its probably not easy.
The smaller the mind the greater the conceit.
Aesop
|
|
|
|
|
The best place to find this information would be in the documentation (if any) for SharpDeveloper, or at their web site.
Note, resource files (ResX files) really have nothing specifically to do with C# source files (CS files). They are XML files that contain key/value pairs like so:
<?xml version="1.0" encoding="utf-8" ?>
<root>
<xsd:schema id="root" xmlns=""
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string"
minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string"
minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string"
minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string"
use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="ResMimeType">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="Version">
<value>1.0.0.0</value>
</resheader>
<resheader name="Reader">
<value>System.Resources.ResXResourceReader,
System.Windows.Forms, Version=1.0.3102.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="Writer">
<value>System.Resources.ResXResourceWriter,
System.Windows.Forms, Version=1.0.3102.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="Value1">
<value>ValueText1</value>
</data>
<data name="Value2">
<value>ValueText2</value>
</data>
</root> Some designers like VS.NET provide design-time authoring for these file when the ResX file is associated with a component (like a Form ). I don't know if SharpDevelop does this becuase I've never had a need to use it. If it does, you can still author this stuff by hand. If you need to store a type other than a string, you can use the type attribute in the data element to specify the fully- or partly-qualified type (like System.Drawing.Size, System.Drawing ). The type just needs to have a TypeConverter associated with it to convert to and from strings.
For more information, see Resources in Applications[^] in the .NET Framework SDK.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|