|
This works for full screen mode for me:
private void Form1_Load(object sender, System.Windows.Forms.KeyEventArgs e)
{
this.Bounds = Screen.AllScreens[0].Bounds;
this.TopMost = true;
}
Does that help?
|
|
|
|
|
Yes, exactly, thank you
Do you maybe know how to get rid of window bounds and the upper strip with name of the form and min, max and close buttons?
|
|
|
|
|
Set the FormBorderStyle property of your form to "None".
That should do it
|
|
|
|
|
oh yee it does
thanx again
|
|
|
|
|
I am trying to move computers (n=450) from one OU to another by iterating through a list of computernames that I have stored in a SQL Server table. Accessing the data works fine. I cant seem to write a DirectoryEntry path as a combination of the data row and a string.
Is this impossible or does somebody know a workaround. Thanks!
Steve
*********************************************************************
using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using System.Data.SqlClient;
using System.DirectoryServices;
namespace MoMA
{
class ChangeOU
{
static void Main(string[] args)
{
//Connect to database and get list of PC names
string connectionString = "server=localhost; Trusted_Connection=yes; database=Users";
string commandString = "SELECT computername FROM vwFinalUserListTest";
SqlDataAdapter sda = new SqlDataAdapter(commandString, connectionString);
DataSet ds = new DataSet();
sda.Fill(ds);
DataTable dt = ds.Tables[0];
foreach (DataRow dr in dt.Rows)
{
string pc = (string)dr["computername"].ToString();
string movePath = "LDAP://CN="+pc+",OU=TestOU1,DC=MUSEUM,DC=MOMA,DC=ORG";
//Console.WriteLine(movePath);
// This writes out the path exactly as I want
// This works
DirectoryEntry deMoveFrom = new DirectoryEntry("LDAP://OU=TestOU2,DC=MUSEUM,DC=MOMA,DC=ORG");
DirectoryEntry deMoveTo = new DirectoryEntry(movePath);
// This is where it fails stating that the DirectoryEntry path is not valid
deMoveFrom.MoveTo(deMoveTo);
}
Console.WriteLine("Completed with success");
} //end Main
} //end class
} // end namespace
|
|
|
|
|
Hello,
I need to find sequence of number or alphabets using regular expression. Does anyone knows the required pattern.
Thanks in advance.
- ashish
|
|
|
|
|
|
Look at this pages and its will very useful for you:
http://java.sun.com/j2se/1.4.2/docs/api/java/util/regex/Pattern.html
http://www.devhood.com/tutorials/tutorial_details.aspx?tutorial_id=523
Enjoy,
Mosquets
|
|
|
|
|
Hi,
when I create some user scope or application scope settings in assembley which is used as windows library, xml document with settings is generated but I`m not sure what to do after that. Because application uses only default settings which where generated to properity class. When I change any setting in that xml file,they are ignored and app still uses its default values. Can anybody either help me, or point me to some article explaining how to set up windows library settings.
Thank you
|
|
|
|
|
The settings are in the app.config file? You have setup the databinding for these controls correct? Do you want the changes to show up as they are changed or when the app restarts?
|
|
|
|
|
App.config is generated for .exe file but what about if I create class library and reference it. Shoud I manualy copy settings for class library to app.config or is there any other way. I dont realy understand the point of settings designer for class library if those settings are not generated.
|
|
|
|
|
You can add an app.config to your library project. This will produce, as an example, mylib.dll.config. If your library has Windows controls though any settings would be stored in the app.config when you bind the control to the application settings.
I guess I'm not sure what is your having difficulties with.
|
|
|
|
|
I try to explain my problem. I add, say, string testString whith default value "abcd" in settings designer of class library test.dll. The string is accesible over Properities.Settings class.
It has its default value "abcd" which is generated as an atribute and compiled into library. Now the libary generates test.dll.config file and it includes the testString element. When I copy this test.dll.config to application directory with my class library and change value of testString element to "dcba" and restart application it still uses its default value "abcd". And although that Properties.Settings.testString property is writtable, when I change its value in program and call Save (or there is something like that)on Properties class it will not save it to the test.dll.config. Should this be working and there is some other mistake I'm doing or is this procedure wrong. Thank you
|
|
|
|
|
Ok I understand now.
I made a test library with a user control containing a label, textbox and button. Everything seems fine to me.
private void button1_Click(object sender, EventArgs e)<br />
{<br />
global::LibControls.Properties.Settings.Default.LabelText = textBox1.Text;<br />
global::LibControls.Properties.Settings.Default.Save();<br />
global::LibControls.Properties.Settings.Default.Reload();<br />
}
|
|
|
|
|
Ok, I will try to find out what I'm doing wrong. Thanks for help
|
|
|
|
|
I just want to know can i call a webservice directly from the c# application
through soap,without using the proxy class created when we add the web refernce to the
webservice.
The issue is that the proxy sometime take more time to invoke the webservice method and we have the time constraint in certain cases.
Thanks
Amit
|
|
|
|
|
You can always create a webrequest to the webservice yourself. But you have to manually create the text to send and parse the response by hand. I don't think that's going to be any faster.
Another way to 'speed things up' is to communicate with the webservice using asynchrone methods.
This doesn't make it faster, but the app stays more responsive.
WM.
What about weapons of mass-construction?
|
|
|
|
|
I doubt the proxy call is much overhead compared with the webrequest itself. If you have a very strict time frame considering doing a webservice callback.
A man said to the universe:
"Sir I exist!"
"However," replied the Universe, "The fact has not created in me A sense of obligation."
-- Stephen Crane
|
|
|
|
|
Do any of the XmlReader classes provide the ability to read comments from the file, or will I need to write a custom parser to do this?
I'm refering to this style of comment:
<-- Comment -->
|
|
|
|
|
Yes, every XmlReader can read XML comments. Take a look at the XmlReader.Read()[^] method. The node type will indicate that it's a comment and you only have to get the Value .
Logifusion[^]
|
|
|
|
|
Thats not a valid Xml comment, valid Xml comments have an exclamation mark after the opening brace
<!-- Comment -->
---
How to get answers to your questions[^]
-- modified at 11:10 Thursday 20th July, 2006
|
|
|
|
|
|
Hi, does anyone know how to create a password filter using C#? I've seen the SDK docs and looked at the sample, but I really need to create it in a managed environment (despite Microsofts recommendations).
Thanks in advance!
Kieron
|
|
|
|
|
What do you mean by password filter?
|
|
|
|
|
Hi,
Check: http://windowssdk.msdn.microsoft.com/en-us/library/ms721882.aspx
|
|
|
|