|
I want to develop a program that would permit me to sign on a computer at the logon screen. I assume that a windows service running with system permissions would be running in time to actually execute this, but I have no idea what I should research to interact with the logon screen.
All help would be appreciated!
Did I post well? Rate it! Did I post badly? Rate that too!
|
|
|
|
|
Esmo2000 wrote: I have no idea what I should research to interact with the logon screen.
I'm not entirely sure if this is what you want, but allow me to introduce you to my friend GINA[^], the Graphical Identification and Authentication component. Crappy acronym, I know.
Share and enjoy.
Sean
|
|
|
|
|
Scenario:
Computer A has an instance of a windows form it wants to send to ComputerB. Computer A and B are running the same application and are on the same physical and logical network.
How might I best go about achieving this?
Thanks in advance
|
|
|
|
|
Question: any windows form or windows forms of a application you programmed? Do you want to control Computer A with the form copied to Computer B or do you want just to show the content?
Greetings,
Ingo
------------------------------
A bug in a Microsoft Product? No! It's not a bug it's an undocumented feature!
|
|
|
|
|
Copmuter A and B are running the same application written by me. Computer A wants to "send" the form and its contents to Computer B where it is displayed in its exact same state as it left Computer A
|
|
|
|
|
I need to embved a quote(") into a string i tried \" but that doesn't remove the \ on runtime. I am trying to make a reuseable RegEx statement.
Regex rxFind = new Regex(szQuery);
When I run the code, szQuery contains the \" instead of just the ".
How do I fix this, or what is the better way to do this?
|
|
|
|
|
Embedding a quote into a string with \" does remove the \ on runtime, unless you are accepting input from the user, in which case, you do not need to escape the quote.
If you are trying to make a reusable Regex statement, you will always want to do:
Regex rxFind = new Regex(Regex.Escape(szQuery));
This makes sure that all characters that are part of the syntax of reguar expressions are translated so that they do not effect the expression.
Seperately, you could add more slashes (\\\" instead of \"), because they are significant in Regexes.
|
|
|
|
|
Is it possible to attach ToolTips for individual tabs of a TabControl?
I've tried setting ToolTips to TabPage and TabControl, but both attemps failed.
This works in Mozilla browser for both selected and unselected tabs.
The only solution I thinked up was to catch MouseMove events of a TabControl and look which tab is currently under mouse cursor. There's still a problem of how to show ToolTip (or something similar) statically. But I believe there's some cleaner and easier way.
|
|
|
|
|
You have to set the 'ShowToolTips' Property of the Tabcontrol to true before the Tooltips of the tabpages are shown.
Greetings,
Ingo
------------------------------
A bug in a Microsoft Product? No! It's not a bug it's an undocumented feature!
|
|
|
|
|
This doesn't work:
<br />
tabControl1.ShowToolTips = true;<br />
<br />
ToolTip tt = new ToolTip();<br />
<br />
tt.ShowAlways = true;<br />
<br />
tt.SetToolTip(tabControl1.TabPages[0], "1");<br />
tt.SetToolTip(tabControl1.TabPages[1], "2");<br />
<br />
tt.SetToolTip(tabControl1, "tabcontrol");<br />
ToolTip is shown on the tabs, but its the "tabcontrol" ToolTip. The "1" and "2" will show only when user moves cursor on the surface of the selected tab
Still thanks.
|
|
|
|
|
No you have to set the Tooltip directly:
tabpage1.ToolTiptext = "1";
tabpage2.ToolTiptext = "2";
tabcontrol1.ShowTooltips = true;
Then it should work.
Greetings,
Ingo
------------------------------
A bug in a Microsoft Product? No! It's not a bug it's an undocumented feature!
|
|
|
|
|
I'm dummy, thanks a lot!
|
|
|
|
|
Can anyone tell me why this isn't animating the window? It was doing it earlier but then it stopped for some reason
[DllImport("user32.dll")]<br />
static extern bool AnimateWindow(IntPtr hwnd, uint dwTime, uint dwFlags);<br />
<br />
enum AnimateWindowFlags : uint<br />
{<br />
AW_HOR_POSITIVE = 0x00000001,<br />
AW_HOR_NEGATIVE = 0x00000002,<br />
AW_VER_POSITIVE = 0x00000004,<br />
AW_VER_NEGATIVE = 0x00000008,<br />
AW_CENTER = 0x00000010,<br />
AW_HIDE = 0x00010000,<br />
AW_ACTIVATE = 0x00020000,<br />
AW_SLIDE = 0x00040000,<br />
AW_BLEND = 0x00080000<br />
}<br />
<br />
...<br />
<br />
[STAThread]<br />
static void Main()<br />
{<br />
Application.EnableVisualStyles();<br />
Application.SetCompatibleTextRenderingDefault(false);<br />
<br />
Main_Form main = new Main_Form();<br />
<br />
AnimateWindow(main.Handle, 250, (uint)AnimateWindowFlags.AW_VER_NEGATIVE |<br />
(uint)AnimateWindowFlags.AW_CENTER);<br />
<br />
Application.Run(main);<br />
}
Any help is appreciated.
|
|
|
|
|
Try calling AnimateWindow from the constructor of Main_Form
[DllImport("user32.dll")]
static extern bool AnimateWindow(IntPtr hwnd, uint dwTime, uint dwFlags);
enum AnimateWindowFlags : uint
{
AW_HOR_POSITIVE = 0x00000001,
AW_HOR_NEGATIVE = 0x00000002,
AW_VER_POSITIVE = 0x00000004,
AW_VER_NEGATIVE = 0x00000008,
AW_CENTER = 0x00000010,
AW_HIDE = 0x00010000,
AW_ACTIVATE = 0x00020000,
AW_SLIDE = 0x00040000,
AW_BLEND = 0x00080000
}
public Main_Form ()
{
...
AnimateWindow(this.Handle, 250, (uint)AnimateWindowFlags.AW_VER_NEGATIVE | (uint)AnimateWindowFlags.AW_CENTER);
...
}
|
|
|
|
|
That works, but only if I put it before InitializeComponent();
Which makes it animate but the form doesn’t start in the proper position because InitializeComponent(); hasn't been called yet
It's not that big of a deal anyway. Just weird that it would work and then decide not to Probably something I did
Thanks anyway,
Sean
|
|
|
|
|
That is weird.
For me, it works both before and after InitializeComponent();
To get around it not starting in the proper position (at least in .net 2.0) you can do something like this:
public Form1()
{
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
AnimateWindow(this.Handle, 250, (uint)AnimateWindowFlags.AW_VER_NEGATIVE | (uint)AnimateWindowFlags.AW_CENTER);
InitializeComponent();
}
|
|
|
|
|
I am using RegEx to find a section of a html document. The document can change, but the format is always the same.
I need RegEx to pull out:
>Name:VisualStudio
Then pull out VisualStudio (VisualStudio is a part of the page that may change)
Is there a way I can do this by passing strings to a function?
Thanks for any, and all help!
|
|
|
|
|
Let's have a look at your code, then, and perhaps you can tell what's the problem with it?
---
b { font-weight: normal; }
|
|
|
|
|
I don't have any code yet as I haven't ever worked with RegEx. I have heard it is difficult, i want to learn but I don't even know the structure.
|
|
|
|
|
private static void InterpretData(string szProfile)
{
Regex rxFind = new Regex(@">Name <szcharname>)");
MatchCollection matches = rxFind.Matches(szProfile);
foreach (Match match in matches)
{
if (match.Length != 0)
{
Console.WriteLine("Character Name: {0}", match.Groups["szcharname"]);
}
}
Console.WriteLine("RegEx'ed'");
Console.ReadLine();
}
It isn't finding a match. See anything?
I think that matches assumes you know exaclty the formet of the string. How do I FIND the string, then match it? Is there a better way?
-- modified at 20:30 Tuesday 7th February, 2006
|
|
|
|
|
You have specified that you want to find a question mark. That will match exactly one occurance of that character, nothing else.
Use a period to match any character (except line break), use a plus sign to specify that it should occur one or more times, and add a question mark after the plus sign to specify that it should match as few times as possible.
Regex rxFind = new Regex(@">Name:</td><td>(.+?)</td>");
---
b { font-weight: normal; }
|
|
|
|
|
I need to find the data between where the ? was. How do I do that?
|
|
|
|
|
string text="";
Regex x = new Regex(">Name:</td><td>(.+?)</td>");
foreach (Match m in x.Matches(text))
{
if (m.Groups.Count > 1)
{
Console.WriteLine(m.Groups[1].Value);
}
}
|
|
|
|
|
string text = szText;
//Get text here
//Parse
Regex x = new Regex(">Name lt;charactername>)");
foreach (Match match in x.Matches(text))
{
if (match.Length != 0)
{
Console.WriteLine("Hello: {0}", match.Groups["charactername"]);
}
}
Console.WriteLine("RegEx'ed'");
Its not working!
|
|
|
|
|
Ok, I am pulling a page off the internet. I want to first grab this out of the HTML:
>Name:Whatcha
Then grab Whatcha out of that.
I will not know that the name will be Whatcha everytime, nor will i know the length. It will always be a string, and in the same spot.
Help please. I don't know how to do this at all. I learn by example. Thanks for your time.
|
|
|
|