|
You can start with 70-536 Application Foundation. It's for .Net 2.0.
If you just started C# you should wait and read a few books since this exam covers a lot of things.
|
|
|
|
|
Hey everyone
I can successfully use SendInput to send mouse clicks, but I am having trouble getting it to work with sending keys. Please can someone tell me where I have gone wrong
public struct KEYDBINPUT
{
public Int16 wVk;
public Int16 wScan;
public Int32 dwFlags;
public Int32 time;
public Int32 dwExtraInfo;
public Int32 __filler1;
public Int32 __filler2;
}
public struct INPUT
{
public Int32 type;
public KEYDBINPUT ki;
}
[DllImport("user32")]
public static extern int SendInput(int cInputs, ref INPUT pInputs, int cbSize);
public const int INPUT_KEYBOARD = 1;
public const int KEYEVENTF_KEYUP = 0x0002;
public void sendKey(short key)
{
INPUT inputDown = new INPUT();
inputDown.type = INPUT_KEYBOARD;
inputDown.ki.dwFlags = 0;
INPUT inputUp = new INPUT();
inputUp.type = INPUT_KEYBOARD;
inputUp.ki.dwFlags = KEYEVENTF_KEYUP;
inputDown.ki.wVk = key;
SendInput(1, ref inputDown, Marshal.SizeOf(inputDown));
inputUp.ki.wVk = key;
SendInput(1, ref inputUp, Marshal.SizeOf(inputUp));
}
Thanks a lot
Luke
|
|
|
|
|
* Use the LayoutKind.Sequential structure attribute.
* You should fill the dwExtraInfo member (set it to the value returned by GetMessageExtraInfo ).
* The scan code should be set to the value returned by MapVirtualKey applied to the virtual key code.
* Depending on whether it's an extended key, you should also specify the KEYEVENTF_EXTENDEDKEY flag.
* You should use IntPtr for pointers. Using Int32 will break compatibility of your application with 64-bit operating systems.
I recommend to use the definitions on P/Invoke.net: SendInput[^]
Best regards
Dominik
|
|
|
|
|
hi
i want to create app that give it my table(s) of database (connect to db), and it generate a class as my table's name, with all filed(s) and some method(s) and .... Automatically, but how to do ?
i don't use other autoGeneration tools such as SqlMetal.exe to create entity class automatically, i want to write this tools mySelf.
thanks
|
|
|
|
|
Most developers do this - they sometimes end up as complete frameworks, ironspeed comes to mind.
Think about where you will get you table information (system information views in SQL Server)
Build you DAL for getting to the DB
Build a sample class you want to use as a template (using your DAL).
What is your delivery platform (usually winforms)?
Build your app to get and display the databases and tables (usually in a tree)
Allow drill down to column and then attributes.
Now use string manipulation to build the class based on your template
Decide if you want to copy/paste the class into the IDE or you want to interact directly with the project
Build it - and you will have a MUCH deeper understanding of your database, application and many technologies when you are finished. BTW you will probably never "finish" this project. I'm still tweaking mine which originated in VB5.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
On my form I have a NotifyIcon which has a ContextMenuStrip of ToolStripMenuItem's. Each of the ToolStripMenuItem has a List of ToolStripMenuItem which has two items, like so:
Notify Icon:
-ContextMenuStrip:
--Item1:
---SubItem1:
----Launch
----Remove
---SubItem2:
----Launch
----Remove
--Item2:
---SubItem1:
----Launch
----Remove
When I click on the notify icon, then hover any of the sub items it shows up in the taskbar. Is there some way to not show in the taskbar but still show when I hover over an item?
|
|
|
|
|
|
Hi guys. I'm writing a little program to interact with a device connected to the COM port and I need to assign different commands(from the device) to specific methods. I've created a single delegate
public delegate void Delegate_Name ()
Every device command is assigned to a delegate/event of Delegate_Name type and store inside a Dictionary object. I can serialize to xml a Dictionary, but when I get to saving the events I received the well known and general exception:
[System.InvalidOperationException] = {"There was an error generating the XML document."}
I'm able to store (serialize) all the information to xml files but I'm unable to save the delegates.
Is there a way to do this?
|
|
|
|
|
You can't serialize delegates. Actually you can't save them in any way at all. They are pointers to the memory location of the method, so they only have a meaning while the same program is still running.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
I'm happy to inform you that I managed to serialize a delegate/event using reflection.
|
|
|
|
|
Do you have control to input IP address version 6 ?
|
|
|
|
|
I am not sure whether a control would be available or not.
However, you can easily create one textbox with the validations as required in a 128 bit IP Address.
Best Regards,
Sam Xavier
www.componentone.com
|
|
|
|
|
hi there ,
I am developing windows service using C#, and finally I want to create a setup file for it to be deployed to the users ,
I need to learn that , and also there is some tasks I need it to change somethings or add some informations on the machine it is installed on , how can I use batch file to achieve that and how can do it within the installation process!!!
How can create setup file for the user which should do every thing (including the changes I need)
please help
thanks in advance
There is always something to learn
|
|
|
|
|
|
I have a numeric textbox that is connected to my database (NumberOfPages).
How can I allow the user to leave this field in the form empty?
It should be done automatically, because in my database the row NumberOfPages allows nulls, but if a user leaves it empty on the form, the form "locks" itself (user can click on any button he likes, but they stop working and nothing happens).
What I want is that my textbox accepts empty string. Can it be done, since the data in the textbox is based on the field that is the type of int?
|
|
|
|
|
The most flexible solution is to create a custom control by extending TextBox control. Then you can override its Text property.
EG:
public string Text
{
set{ //.....}
get
{
if (this.Text == "")
return null;
else
return this.Text;
}
}
jayasshc
|
|
|
|
|
How might one be able to login (and at some point) make a new topic on an Invision Power Board v2.3.3?
I only ask as I am making a small Subversion hook, the hook is done but I would just like to add this feature to it.
Thank you very much, I've been trying to do this for a while and I cannot get past the login page.
|
|
|
|
|
You need to use a HttpWebRequest to the start new topic script with a valid post data containing the username, password, topic string, post information string, and what ever else would be posted data to that script.
This other required data would include catchups and other security type devices. Depending on the script there would be referral URL checks to see if the post is coming from a VALID (non expired) url which is allowed to post to that site. Some forum scripts also require an active session with the server to obtain a GUID and other 'check' measures. This can be faked though .NET webrequest by editing the HTTP (or HTTPS if you include SSL support) headers, but such automation wouldn't be trivial if the board scripts have any sort of anti-spammer technology.
A good place to start this would be reading this: http://www.codeproject.com/KB/aspnet/CompressibleHTTP20.aspx[^]
|
|
|
|
|
hi
for example i want a list of windows form name in a combo box ?
thnx
|
|
|
|
|
|
i dont using an MDI form ...!!!
|
|
|
|
|
What would the purpose of said list be? Are you wanting to control the forms such as showing/hiding them or some other type master/slave function between the forms?
Just making a list of winforms wouldn't do much without other interfaces between each form.
That being the case, how many forms are you using that you need a list of them?
If you have so many you need a list then you should in most cases be using a MDI parent...
|
|
|
|
|
i want to create a security pack that select a form name in application and set that a user can view or edit that form ... and save the name of form in database and in load of form with pass name of form to a sp an db find that user canVeiw Or Can Eidt
|
|
|
|
|
Hi,
you can get a list of all open forms from Application.OpenForms Property
you can create a list of all existing forms using reflection;
if you make them all inherit say MyFormBase and put them in a single assembly,
then interrogate that assembly for any type inheriting from MyFormBase.
Hope this helps.
Luc Pattyn [Forum Guidelines] [My Articles]
This month's tips:
- before you ask a question here, search CodeProject, then Google;
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get;
- use PRE tags to preserve formatting when showing multi-line code snippets.
|
|
|
|
|
You need to use reflection and look at each class's base form name (System.Windows.Forms.Form or your subclassed form class name, if any)
|
|
|
|