|
|
You're in the wrong forum since C# cannot make any use of ATL.
You're looking for the Visual C++ forum, right above the C# forum in the left-side navigation of this page.
|
|
|
|
|
|
I'd like to be able to see the instant a legal banner appears in a remote desktop window and send an enter key to it to dismiss it during logon.
Does anyone know how to read the windows of a remote desktop window? Are they encrypted?
|
|
|
|
|
I'm pretty sure that what I'd try won't work, but I can't try it until I get back to work on Tuesday.
|
|
|
|
|
Is it complicated or can you post something here?
I'm wondering if the remote desktop session is encrypted or not? If it is encrypted, I should be able to figure out the key since I am the initiator of the session? At least I would think so?
|
|
|
|
|
It looks like it is indeed encrypted
Using Encryption
You can use encryption to protect the data that travels between the terminal server and the terminal services client. If you fear unauthorized interception of the data as it travels between the two, you should enable encryption. RSA RC4 encryption is used; encryption can be set to one of the following three levels:
* High: encrypts both the data sent from client to server and the data sent from server to client using a 128 bit key.
* Medium: encrypts both the data sent from client to server and the data sent from server to client using a 56 bit key if the client is a Windows 2000 or above client, or a 40 bit key if the client is an earlier version.
* Low: encrypts only the data sent from client to server, using either a 56 or 40 bit key, depending on the client version. Useful to protect usernames and passwords sent from client to server.
To change the encryption level, you must be an administrator. In Programs | Administrative Tools, select Terminal Services Configuration and perform these steps:
1. In the left console pane, select Connections.
2. In the right details pane, right click RDP-TCP and select Properties.
3. Click the General tab.
4. Under Encryption level, select the desired level in the drop down box and click OK.
|
|
|
|
|
Hi Experts,
I have an issue with the GridView for wich I want to set a column htmlencode property to false.
Here is the data source. I have no databound columns because I'm not using SQLDataSource.
public void LoadStories()
{
SqlConnection con = new SqlConnection("Data Source=dpeta-ro;Initial Catalog=MINTPRINT;Integrated Security=True");
SqlCommand cmdSelect = new SqlCommand("select news_id \"id\", title \"title\", news_text \"story\", created_date \"created on\", active from news", con);
SqlDataReader rd;
try
{
con.Open();
rd = cmdSelect.ExecuteReader();
gwNews.DataSource = rd;
gwNews.DataBind();
con.Close();
}
catch (Exception err)
{
lblError.Text = err.Message;
con.Close();
}
}
The news_text column has HTML code that i want the GridView to render as HTML code, without encoding it. Because the GW has the Encode set to true by default i need to change it dynamically.
Any ideas?
Thank you,
Alex
“Be the change you want to see in the world.”
|
|
|
|
|
Hi,
in my project I use:
command = new SqlCommand(SQLStatement, DataBase.SqlDataReader
reader = command.ExecuteReader();
to query "part_ID" from large table. Each part_ID can have more subparts up to n level.
They are all stored in same table. At the moment I use foreach statement to recursivly query
parts from table until they have no sub parts. As there are up to 10000 subparts for some of parts
it takes up to almost a minute to get all subparts (each query takes app. 15 ms).
Is there a faster (more efficient) way to get the same job done?
|
|
|
|
|
|
Use a DataSet and fill it with each table and set a DataRelationship. Although it may use more memory depending on how much data you have it beats 10000 individual queries.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Could you show some of the schema?
|
|
|
|
|
All queries are done from the same table (lets call it "parts_table").
Let say I start with "part_ID" = 1001 --> query returns 120 "subpart_id" (1002, 1004, 2030 ...)
then i execute same query 120 times and get n subparts for each of 120 subpart_ID from first query and so on
until there are no subparts left. As you can see the number of queries can increase very fast ...
Table: "parts_table"
id part_id subpart_id
1 1001 1002
2 1001 1004
3 1002 2150
4 1002 3250
5 1004 1250
.
Part description for "part_id" is in separate table "part_info". I use join to get info for "part_id" ...
|
|
|
|
|
I'm still thinking about it, and one way (with SQL Server 2008) to reduce the number of queries/trips to the database is with a Table Valued Parameter.
|
|
|
|
|
This is the reason we implemented the hierarchy id, using the partid in the hierarchy id has made a tremendous difference. So much so that I am taking the concept to an Oracle database.
I would craft a stored proc that takes a part and returns all the children in one table, using a CTE to do the recursive loop (and I hate CTEs). Then to the presentation formatting in the business layer.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
I am working with "SQL Server 2000 SP3 2000.80.760.0" and as I understand it does not support CTE.
Are there any examples for recursive query for "SQL Server 2000" ?
|
|
|
|
|
hi guys, i'm looking for all over the internet i a just cant find it, i am almost giving up... So, how can i desable a menustrip item from another form. ex: i have a form1(mdi) and i open inside it a form2, and from this form2, i wanna desable a form1 menustrip item. thanks
sorry for the bad english.
|
|
|
|
|
Rather than trying to do this directly, you may which to look into using an application level state engine to which both forms can subscribe. Then whenever a form receives focus it can update its UI state to the configuration contained in the state engine.
I wasn't, now I am, then I won't be anymore.
|
|
|
|
|
|
Sorry. I should have been clearer.
You can create a static class (public static class ClassName) where you store the values. If you place this class in your UI project, you can use it to store properties relating to the visibility of controls. (ie. public static bool thisControlIsVisible{ get; set; }). In your forms, you can use the appropriate event handler for gaining focus to coordinate the visibility or enabled states of controls on a given form.
Example. In Form1, an action taken by the user requires that menustrip item in Form2 be disabled. Form1 will set a variable in the static state class indicating this. When Form2 receives focus, it will automatically check these values and update itself appropriately.
Some people may suggest that you use the App.Config file for this purpose, but I would strongly suggest you not do that because the changes you effect to the app.config at runtime will be maintained and used the next time the application is run again.
I wasn't, now I am, then I won't be anymore.
|
|
|
|
|
ok, thank you very much!!! it was a very good answer
|
|
|
|
|
You can setup a method in your Form1 that would enable/disable your MenuItem. I.e. :
public Form1 : Form
{
...
public void SetMenuItemState(bool enabled)
{
myMenuItem.Enabled = enabled;
}
...
}
Then, in your Form2, you just have to call this method using the MdiParent property :
public Form2 : Form
{
...
public void AnyMethod()
{
((Form1)this.MdiParent).SetMenuItemState(true);
}
...
}
|
|
|
|
|
thank you vary much... works great!!!
|
|
|
|
|
You're welcome. Don't forget to vote if you found the answer useful.
|
|
|
|
|
I have a problem with this as Form2 is far to tightly coupled to Form1. This is a good solution for a beginner to use as it is simple, but when a project scales up, I would suggest against this tight coupling method.
I wasn't, now I am, then I won't be anymore.
|
|
|
|