|
Walk up the stack trace and have a look at the assemblies. If you do not find a call from your (signed) main executable, then throw an exception. Obviously won't stop anyone from decompiling, remove your check, then compiling again but it's a start.
|
|
|
|
|
I wrote a program to keep sending a string by using the "SendKeys.SendWait()" method. I also wrote another program with only a textbox.
These two program were running simultaneously. How can the textbox accept only real key-pressed string but not SendKeys string?
|
|
|
|
|
|
How do I loginto a remote machine from an ASPX page..
I have a few server IPs I need to loginto. The login information needs to be extracted from an XML file..
It should be as good as using MSTSC.EXE.. Depending on the button being clicked, the remote desktop Connection IP address should change..Additionally the logon credentials need to be extracted form an XML File..
|
|
|
|
|
Hi...
I have added a TabControl with a few tab pages.
In the properties menu I have sat the Alignment to Left.
My problem is when i debug my app there is no text on tab pages!
In the output folder I also have a .manifest file, when i delete the .manifest file there is text on the tab pages.
Can anyone tell me why?
Thanks QzRz
|
|
|
|
|
Hi
I wrote a simple program that should find a specific window and hide it.
Somehow the window is actually being close (Its process is killed) and the weirdest thing is that the taskbar is also hides.
Here is my code:
<br />
public const int SW_HIDE = 0; <br />
<br />
[DllImport("user32.dll")] <br />
public static extern int ShowWindow(IntPtr hwnd,int nCmdShow); <br />
<br />
private void button1_Click(object sender, System.EventArgs e) { <br />
string title=textBox1.Text;
Process[] plist =Process.GetProcesses(); <br />
foreach(Process p in plist){ <br />
if(title.IndexOf(p.MainWindowTitle)>=0){ <br />
ShowWindowAsync(p.MainWindowHandle,SW_HIDE); <br />
}<br />
} <br />
} <br />
Can you see the problem? what is it?
or how can i hide a window without closing it?
Thank a lot
Mamtz
|
|
|
|
|
You can try this:
[Flags]
public enum SWP
{
SWP_ASYNCWINDOWPOS = 0x4000,
SWP_DEFERERASE = 0x2000,
SWP_DRAWFRAME = 0x20,
SWP_FRAMECHANGED = 0x20,
SWP_HIDEWINDOW = 0x80,
SWP_NOACTIVATE = 0x10,
SWP_NOCOPYBITS = 0x100,
SWP_NOMOVE = 2,
SWP_NOOWNERZORDER = 0x200,
SWP_NOREDRAW = 8,
SWP_NOREPOSITION = 0x200,
SWP_NOSENDCHANGING = 0x400,
SWP_NOSIZE = 1,
SWP_NOZORDER = 4,
SWP_REDRAWONLY = 0x717,
SWP_SHOWWINDOW = 0x40
}
[DllImport("User32.dll", CharSet=CharSet.Auto)]
public static extern bool SetWindowPos(IntPtr hWnd, IntPtr hWndInsertAfter, int X, int Y, int cx, int cy, int uFlags);
private static SWP hideFlags = SWP_NOSIZE | SWP_NOMOVE | SWP_NOZORDER | SWP_NOREDRAW | SWP_HIDEWINDOW
SetWindowPos(p.MainWindowHandle, IntPtr.Zero, 0, 0, 0, 0, hideFlags); More info on MSDN[^].
Hope this works!
"..Commit yourself to quality from day one..it's better to do nothing at all than to do something badly.."
-- Mark McCormick
|
|
|
|
|
Hello All,
Can we dynamically generate the reports, say, like an user selecting the required fields across DB tables (through a front-end), specifying the criteria -us building the SQL query- and fetching the result from the DB.
Any help on this would be appreciated.
Thanks
|
|
|
|
|
Don't double post. If you really really think that you have to draw attention to your question in two separate message boards, keep the question in one and post a link to it in the other.
---
b { font-weight: normal; }
|
|
|
|
|
Hello All,
I dont know how to add buttons to DataGridColumn.Can u plz tell me??
Thanks
Amruta
|
|
|
|
|
Hello everybody!
I met a problem when I tried to insert a new record or update a record when it contains a date field. Which says the insert into syntax is not correct. I tried to insert a date format string using
DataTable atable = ds.Tables["Invoice"];
atable["date"] = Convert.ToDateTime(DateTime.Today.ToShortString);
atable["date"] = DateTime.Today.ToShortString();
or any kind of ways I can think about. But none of them works. Does anybody know a way to solve this problem please.
And also does anybody has any good idea to display information between two date please?
Asura
|
|
|
|
|
Why do you convert the date to a string at all?
atable["date"] = DateTime.Today;
---
b { font-weight: normal; }
|
|
|
|
|
I tried this way actually, but it gives the same error message. "Insert Into syntax error"
There is no problem to display date if I write some date in access. But it just can't write date back into access.
Asura
|
|
|
|
|
Have you specified the field as date in the database?
---
b { font-weight: normal; }
|
|
|
|
|
Yes, I defined the field as date/time in access. As long as I define a field as date, the insert and update can't work. If I delete the field, everything is OK.
Asura
|
|
|
|
|
How did you define the UpdateCommand for the OleDbDataAdapter? It's is not created by default unless you wrap the OleDbDataAdapter in an OleDbCommandBuilder, or create the UpdateCommand yourself.
Absolute faith corrupts as absolutely as absolute power
Eric Hoffer
All that is necessary for the triumph of evil is that good men do nothing.
Edmund Burke
|
|
|
|
|
The problem is (I have seen it so many times...) that you cannot use some field names in tables. I'm pretty sure 'date' is beteen them...
other names are 'username', 'password'...
|
|
|
|
|
Please reply to the original poster.
---
b { font-weight: normal; }
|
|
|
|
|
I want to make .msi file which includes meta data and information in the form of compression.
But i don't know how to make it self extract.
can any one let me know.
Thanks
Varun Jain
|
|
|
|
|
|
Hi
THanks for the reply.
I know about Deployment project.
But i want to create my own.
I want to know the logic if know please help me.
Varun Jain
|
|
|
|
|
|
Thanks for the reply.
But couldn't find useful informaton on this address.
Varun jain
|
|
|
|
|
|
Hello,
I'm trying to convert txt files containing some html tags and text in cyrillic to html. What I do is add the and tags at the beginning and at the end. Also I'm using regular expressions to replace a image name with tag to actually show the picture. The problem is that when I read the file with ReadToEnd() the cyrillic text is missing. If I read the file as byte array I don't know how to use regular expressions to insert the pictures. Could you please help with some advices?
Thanks
|
|
|
|