|
do know how to trap the events in the datetime control when the up or down arrow is clicked. I mean when the up arrow is clicked i want to do something or when down is click, i want to do something different and want to do it before the value changes because the value change will depend on the what i do on those events.
|
|
|
|
|
Unfortunately there is no OnBeforeChanged event. Can't you handle the ValueChanged event and either revert to a previous value or allow the change?
OnValueChanged(...)
{
if( out of range )
dateTimePicker = OldValue;
else
do something
}
|
|
|
|
|
Hi there,
I'm coding a photo gallery desktop program and I'm planning to store the images in an MS Access DB (OLE field). The size of the images I got is around 600 MB... ~ 400 KB each.
What do think? Can MS Access handle it or I should look for an alternative?
Please advise. Your help would be greatly appreciated.
|
|
|
|
|
instead of storing the binary data in the access database store the location to the data. Either file names or URLs. I think such large amounts of data in access could cripple it.
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
|
|
|
|
|
hi
i want to know how should i make thise kind of Toolbars which can move around and when drag it out of the main Toolbar they become like a DialogBox.
|
|
|
|
|
Use ToolStrips in .Net 2.0
Rizwan
|
|
|
|
|
|
You can set the WindowState property to Maximized. Or do you want the black backgound with your app in the center?
|
|
|
|
|
Full screen and maximized window are 2 different things, the solution below is correct.
|
|
|
|
|
Perhaps I'm missing something I'm always looking to fill in the gaps in my knowledge. Both of these seem to produce the same results.
WindowState = FormWindowState.Maximized;
TopMost = true;
Bounds = Screen.AllScreens[0].Bounds;
TopMost = true;
|
|
|
|
|
First of all, u didnt said that I should used the line:
TopMost = true;
Second of all, the solution produced by that guy isn`t correct in 100% too. Maximization is an effect that u can achive by clicking appriopriate button on the top your window. Fullscreen gives ur application full screen, so no borders around, no start button, no the upper strip. U got every pixel on the screen up to u. Many computer games offer full screen, while many windows applications (form oriented) offers just a maximization.
cheers
|
|
|
|
|
-Yoyosh- wrote: First of all, u didnt said that I should used the line:
TopMost = true;
Nor did you ask for TopMost.
-Yoyosh- wrote: Maybe C# 2.0 has already FullScreen property in some class for I could use it?
You also didn't specify that you wanted no borders. We'll just say it was miscommunication and move on.
|
|
|
|
|
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
|
|
|
|