|
But i want to write date manually in DataGridView how to do this???
|
|
|
|
|
There's a Format property in the DefaultCellStyle property in the GridViewColumn for setting the format.
|
|
|
|
|
|
I want to create custom picturebox in which i enter mouse i become inlage and as mouse leave in go in it previous size.
The problem did't want to big its size area.
I mean there are also other picturebox.
The example of my control that i what to create In mobile main menue.
In which which item you selected it will become large and over become over to nearest items.
rect.Inflate(2, 2);
is a technique but it not solving my problem.
Waiting for your comment ...
Thanks 
|
|
|
|
|
Have you come up with any good ideas?
"I guess it's what separates the professionals from the drag and drop, girly wirly, namby pamby, wishy washy, can't code for crap types." - Pete O'Hanlon
|
|
|
|
|
I get the answer form the msdn forms the link is
here]
|
|
|
|
|
Cool, and thanks for sharing
"I guess it's what separates the professionals from the drag and drop, girly wirly, namby pamby, wishy washy, can't code for crap types." - Pete O'Hanlon
|
|
|
|
|
I am using a property Grid with a check Box displayed as one of its item.
I am able to display Check Box and check/Uncheck Items.
But the problem is I am also getting a drop down List box with True/false along with check box. I need to get rid/hide this drop down List Box .
Can any pne please let me know for the soultion if possible ?
the code I am using for displying Check Box is:
[Editor(typeof(CheckBoxInPropertyGridEditorTwoPassCalc), typeof(System.Drawing.Design.UITypeEditor))]
public bool TwoPassCalculation
{
get { return twoPassCalculation; }
set { twoPassCalculation = value; }
}
public class CheckBoxInPropertyGridEditorTwoPassCalc : UITypeEditor
{
public override bool GetPaintValueSupported(ITypeDescriptorContext context)
{
return true;
}
public override void PaintValue(PaintValueEventArgs e)
{
ControlPaint.DrawCheckBox(e.Graphics, e.Bounds, ((GeneralDimensionClass)e.Context.Instance).twoPassCalculation ? ButtonState.Checked : ButtonState.Normal);
}
}
modified on Wednesday, January 23, 2008 4:28:13 AM
|
|
|
|
|
Are you still working on this?
"I guess it's what separates the professionals from the drag and drop, girly wirly, namby pamby, wishy washy, can't code for crap types." - Pete O'Hanlon
|
|
|
|
|
how do i delete the selected node programmatically in tree view?
|
|
|
|
|
<br />
treeview.Nodes.Remove(treeView.SelectedNode);
|
|
|
|
|
Hi All
Last Mounth I Creat BackUp DataBase From Microsoft SQl Server 2005 By C#.Net Code .
But Know I Wount To Restor This BackUp From Device To Microfoft SQL Server 2005 By C#.Net Code .
Who Can Hellp Me By Support me By C#.Net Code ?
Thanks For Any Body Hellp me
Thaer
|
|
|
|
|
using Microsoft.SqlServer.Management.Smo;<br />
private static Server srvSql;<br />
private static ServerConnection srvConn;<br />
Coeenction
<br />
servername = cmbServer.Text;<br />
srvConn = new ServerConnection(cmbServer.SelectedItem.ToString());<br />
srvConn.LoginSecure = true;<br />
<br />
srvSql = new Server(srvConn);<br />
//Restoring Database
void Restoring_data()<br />
{<br />
<br />
if (srvSql != null)<br />
{<br />
<br />
Restore rstDatabase = new Restore();<br />
rstDatabase.Action = RestoreActionType.Database;<br />
rstDatabase.Database = "DataBaseName"<br />
BackupDeviceItem bkpDevice = new BackupDeviceItem(txtbackup.Text.ToString(), DeviceType.File);<br />
rstDatabase.Devices.Add(bkpDevice);<br />
rstDatabase.ReplaceDatabase = true;<br />
<br />
rstDatabase.SqlRestore(srvSql);<br />
<br />
}<br />
else<br />
{<br />
MessageBox.Show("A connection to a SQL server was not established.", "Not Connected to Server", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);<br />
}
Hope this will help your
|
|
|
|
|
Thanks Mr Abhijit Jana
but this code have Exeption
Nicrosof.SqlServer.Management.smo.PropertyNotSetExeption,
Set Property Device to Accomplish this action
And this Exeption wount
RestData.script(server);
I Dont What is the Problem for this Problem if you can hellp me
Thaer
|
|
|
|
|
How to pass session value in javascript
help me with code
thanx in advance
|
|
|
|
|
post it on Asp.net Forum !!!
|
|
|
|
|
hi i want to add , delete an modify axml file directly from tree view
i have done some code to access it , but i am not getting how to add an modify n delete a node directy
.
code:
private void Form1_Load(object sender, System.EventArgs e)
{
// Initialize the controls and the form.
label1.Text = "File Path";
label1.SetBounds(8, 8, 50, 20);
textBox1.Text = Application.StartupPath + "\\Sample.xml";
textBox1.SetBounds(64, 8, 256, 20);
button1.Text = "Populate the TreeView with XML";
button1.SetBounds(8, 40, 200, 20);
this.Text = "TreeView control from XML";
this.Width = 336;
this.Height = 368;
treeView1.SetBounds(8, 72, 312, 264);
}
private void button1_Click(object sender, System.EventArgs e)
{
try
{
// SECTION 1. Create a DOM Document and load the XML data into it.
XmlDocument dom = new XmlDocument();
dom.Load(textBox1.Text);
// SECTION 2. Initialize the TreeView control.
treeView1.Nodes.Clear();
treeView1.Nodes.Add(new TreeNode(dom.DocumentElement.Name));
TreeNode tNode = new TreeNode();
tNode = treeView1.Nodes[0];
// SECTION 3. Populate the TreeView with the DOM nodes.
AddNode(dom.DocumentElement, tNode);
treeView1.ExpandAll();
}
catch(XmlException xmlEx)
{
MessageBox.Show(xmlEx.Message);
}
catch(Exception ex)
{
MessageBox.Show(ex.Message);
}
}
private void AddNode(XmlNode inXmlNode, TreeNode inTreeNode)
{
XmlNode xNode;
TreeNode tNode;
XmlNodeList nodeList;
int i;
// Loop through the XML nodes until the leaf is reached.
// Add the nodes to the TreeView during the looping process.
if (inXmlNode.HasChildNodes)
{
nodeList = inXmlNode.ChildNodes;
for(i = 0; i<=nodeList.Count - 1; i++)
{
xNode = inXmlNode.ChildNodes[i];
inTreeNode.Nodes.Add(new TreeNode(xNode.Name));
tNode = inTreeNode.Nodes[i];
AddNode(xNode, tNode);
}
}
else
{
// Here you need to pull the data from the XmlNode based on the
// type of node, whether attribute values are required, and so forth.
inTreeNode.Text = (inXmlNode.OuterXml).Trim();
}
}
plz help me . or send me an pprom on manasvi.s.s@gmail.com
|
|
|
|
|
Have you come up with any good ideas?
"I guess it's what separates the professionals from the drag and drop, girly wirly, namby pamby, wishy washy, can't code for crap types." - Pete O'Hanlon
|
|
|
|
|
I am getting an exception as System.InvalidOperationException,
Additional Info: It is invalid to start a second message loop on a single thread. Use application.RunDialog or Form.ShowDialog.
My code is:
class cINI
{
[STAThread]
static void Main()
{
InitApp();
}
private static void InitApp
{
frmFirst obj = new frmFirst();
obj.ShowDialog();
}
internal static void StartApp()
{
clsLogin = new cLogin(dbUtils);
if(clsLogin.ShowLogin() == DialogResult.Ok)
Application.Run(new frmMain());
}
}
Now the frmFirst :
Here On Button click event i want to call the StartApp method, so i write
cINI.StartApp();
|
|
|
|
|
Check out this article[^] and see how the form (splash screen) is run on a seperate thread.
|
|
|
|
|
HI
when we are refreshing the page previous value is going and new
value is assiging
for ex: a[0]=34;
a[1]=0;
a[2]=0;
when we are working and page is refreshed and assigned a[1]=23;
now a[0]=0;
a[1]=23;
a[2]=0;
can any one help how to store all the values like
a[0]=34;
a[1]=23;
................
Thanx in advance
suman.c
|
|
|
|
|
You need to realise that every time your page posts back the request is handled by a completely new instance of your page class. This means that your Hashtable field will be initialized every time.
Read up on the ASP.Net Page Lifecycle.
If you want to keep information between requests then you can store the data in a few places. Have a read up on the ViewState, Session and Application objects.
|
|
|
|
|
Hi every body , i want to Delete a .wav file from linux directory '/var/spool/asterisk/monitor/20080122-182544-1201006544.4.wav' from windows machine using c#.net, can any body write me some code related to this.
|
|
|
|
|
Unless you get your network admin to comprimise the entire security of the linux box, this is definately not possible from C#, neither will it be even if you are non-root on the linux box itself.
|
|
|
|
|
is it possible with any other developing way to delete file. e.g. telnet c#,ssh c#.net code or any other developing code.?
|
|
|
|