|
I found out the solution.
private void button1_Click(object sender, System.EventArgs e)
{
SecondWindow frm = new SecondWindow();
frm.Owner = this;//'this' is the first window's handle.
frm.Show();
}
|
|
|
|
|
Can anyone tell me how can i update via GridView1_RowUpdating Event
regrads
|
|
|
|
|
I m using crystal Reports in C#. Every thing is working fine but when i run that program it gives me following message in a window
Main Report
Table Name ..........
Server Name ..........
DataBase ..........
Login ..........
Password ..........
why is it giving this message?
Day by Day Everyone is moving towards graveyard
|
|
|
|
|
you should test againt connection string, i think connection string database server not the same, you not permiss logon server or server name and database name not exist.
Good luck.
|
|
|
|
|
Connection string is working fine. I am using access database to create a crystal report in C#
when I run on my machine It is asking for database server
name and logon information. The problem which I understood from this
is that the path is hardcoded in the crystal report and the database
Day by Day Everyone is moving towards graveyard
|
|
|
|
|
Does anyone know how to create a tooltip popup when we point a mouse over a "text" for a period of time. This is normally seen in visual studio. When we point the mouse on a function name or so for a period of time, it will show its declaration in a small tooltip popup window. How can we customize this to show some tooltip information, upon pointing to some of the words for which we want some info. I want to create this as plugin/add-in in Visual Studio .NET so that on pointing to certain words I can get some information about those words. Coding in either VC++/C#(preferrably VC++). I need some help for this urgently...can anyone help me out???
Alan K. George
|
|
|
|
|
I need a method like
g.FillEllipse( pbImage.image , New Rectangle(100, 100, 10, 10))
This method will fill an ellipse with an image in picturebox named pbimage.
Thank you.
|
|
|
|
|
|
yes you r right, i am damn , how i forgotten it :S
Thanks a lot
|
|
|
|
|
Hi guys,
I have got a CD installing a C# project and copying an access database to the path.
The access file however is always read only - is there a way of chaging this at creating the set up project?
If not, has anyone has those same problems how have they tackled them?
Thanks,
|
|
|
|
|
If you mean what i think you mean, then add a folder to your solution in the Solution Explorer, and then access it by typing Application.StartupPath + Foldername
This will not work in debug mode, it will only work when you have actually published your file, so you will want to use some #if commands
|
|
|
|
|
|
When you add the .mdb file to the setup project, the ReadOnly property for the file in the setup project should get set to false.
If that does not work, then, as a previous poster wrote, you will need to write a custom action to set the file's read/write access.
<edit>
If you have not added the .mdb file to the setup project and are literatlly copying it from the CD, then you will need to do the custom action because the copying probably maintains the read-only-ness of the file on the CD.
</edit>
"we must lose precision to make significant statements about complex systems."
-deKorvin on uncertainty
-- modified at 13:49 Saturday 28th January, 2006
|
|
|
|
|
Hi,
I have a toolbar with toolbarbuttons on it. Some of the buttons are pictures only, the rest are text only. The problem is that on the text buttons VS leaves a space in the left side and the size of that empty space is exactly the width of the images from imagelist. Does anyone has any idea how could I get rid of that space? Is there any way to disable the imagelist just for a few buttons?
Thank you in advance,
Magda
|
|
|
|
|
If you go into the "Items" property of the toolbar you can change the display properties of each individual item.
there is a "DisplayStyle" property in there which changes the buttons to either "Image", "Text" or both
|
|
|
|
|
Thank you, but it seems I dont have any "Items" property on the toolbar. I am not sure why is that. Is it possible because I use VS.net 2003? And in "Buttons (Collection)" either
|
|
|
|
|
ok I am using VS2005 thats why you dont have the "items" property
|
|
|
|
|
thanks I will install vs.2005 maybe it will look better after all
|
|
|
|
|
Can you still build a comment webpage from XML comments in VS 2005. The 'build comment webpage' is no longer in the tools menu.
Is this hidden somewhere else?
|
|
|
|
|
problem while mapping XML to treeview
Hi.
Iam trying to show any XML file as a tree in winform treeview control.Iam using the following c# code. I need the following xml to be populated in the tree.The XML file has got attributes for many elements.but the attribute for the <Line>(eg: <Line Number="6">
)is not shown in the tree.Can anyone help me out.
private void mnuUpload_Click(object sender, System.EventArgs e)
{
OpenFileDialog openFileDialog1=new OpenFileDialog();
openFileDialog1.ShowDialog();
if(openFileDialog1.FileName!="")
{
file=openFileDialog1.FileName;
PreProcessXML();
lstHeader.Items.Clear();
lstAttribute.Items.Clear();
txtSelection.Text="";
try
{
// SECTION 1. Create a DOM Document and load the XML data into it.
XmlDocument dom = new XmlDocument();
dom.Load(file);
// SECTION 2. Initialize the TreeView control.
trvXML.Nodes.Clear();
trvXML.Nodes.Add(new TreeNode(dom.DocumentElement.Name));
TreeNode tNode = new TreeNode();
tNode = trvXML.Nodes[0];
// SECTION 3. Populate the TreeView with the DOM nodes.
AddNode(dom.DocumentElement, tNode);//
GetNameSpace();
}
catch(XmlException xmlEx)
{
MessageBox.Show(xmlEx.Message,"Bridge",MessageBoxButtons.OK,MessageBoxIcon.Warning);
}
catch(Exception ex){}
}
}
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();
}
}
XML file sample
<Line Number="5">
<ItemNumber Type="IN">2064676311</ItemNumber>
<ItemDescription>C297 DECK(R.H)</ItemDescription>
<ItemUnit>PCE</ItemUnit>
<ItemRevision>K0</ItemRevision>
<Colour></Colour>
<NewItem></NewItem>
<SupplierReference></SupplierReference>
<FreeText></FreeText>
<CumulativeQty Ordered="281" Received="381"/>
<LastReceipt Qty="5" DeliveryNote="KTX7562" Date="20051117"/>
<Plant>
<Identifier>KUK</Identifier>
<Location Code="1"/>
</Plant>
<Schedule>
<Qty Commit="10" Freq="Y" Week="200547" Date="20051127" New="1" Old="1"/>
<Qty Commit="1" Freq="W" Week="200548" Date="20051128" New="0" Old="0"/>
<Qty Commit="1" Freq="W" Week="200549" Date="20051205" New="0" Old="0"/>
<Qty Commit="1" Freq="W" Week="200550" Date="20051212" New="0" Old="0"/>
<Qty Commit="1" Freq="W" Week="200551" Date="20051219" New="0" Old="0"/>
<Qty Commit="1" Freq="W" Week="200601" Date="20060102" New="0" Old="0"/>
<Qty Commit="1" Freq="W" Week="200602" Date="20060109" New="0" Old="0"/>
<Qty Commit="1" Freq="W" Week="200603" Date="20060116" New="0" Old="0"/>
<Qty Commit="1" Freq="W" Week="200604" Date="20060123" New="0" Old="0"/>
<Qty Commit="1" Freq="W" Week="200605" Date="20060130" New="0" Old="0"/>
<Qty Commit="1" Freq="W" Week="200606" Date="20060206" New="0" Old="0"/>
<Qty Commit="1" Freq="W" Week="200607" Date="20060213" New="0" Old="0"/>
<Qty Commit="1" Freq="W" Week="200608" Date="20060220" New="0" Old="0"/>
<Qty Commit="1" Freq="W" Week="200609" Date="20060227" New="0" Old="0"/>
<Qty Commit="3" Freq="W" Week="200610" Date="20060306" New="0" Old="0"/>
<Qty Commit="3" Freq="W" Week="200611" Date="20060313" New="0" Old="0"/>
<Qty Commit="3" Freq="W" Week="200612" Date="20060320" New="0" Old="0"/>
<Qty Commit="3" Freq="W" Week="200613" Date="20060327" New="0" Old="0"/>
<Qty Commit="3" Freq="W" Week="200614" Date="20060403" New="0" Old="0"/>
<Qty Commit="3" Freq="W" Week="200615" Date="20060410" New="0" Old="0"/>
<Qty Commit="3" Freq="W" Week="200616" Date="20060417" New="0" Old="0"/>
<Qty Commit="3" Freq="T" Week="200617" Date="20060424" New="0" Old="0"/>
</Schedule>
</Line>
<Line Number="6">
<ItemNumber Type="IN">20646K3530</ItemNumber>
<ItemDescription>PLATE ASSY</ItemDescription>
<ItemUnit>PCE</ItemUnit>
<ItemRevision>00</ItemRevision>
<Colour></Colour>
<NewItem>Yes</NewItem>
<SupplierReference></SupplierReference>
<FreeText></FreeText>
<CumulativeQty Ordered="0" Received="0"/>
<LastReceipt Qty="0" DeliveryNote="" Date=""/>
<Plant>
<Identifier>KUK</Identifier>
<Location Code="1"/>
</Plant>
<Schedule>
<Qty Commit="10" Freq="Y" Week="200547" Date="20051127" New="0" Old="0"/>
<Qty Commit="1" Freq="W" Week="200548" Date="20051128" New="0" Old="0"/>
<Qty Commit="1" Freq="W" Week="200549" Date="20051205" New="0" Old="0"/>
<Qty Commit="1" Freq="W" Week="200550" Date="20051212" New="0" Old="0"/>
<Qty Commit="1" Freq="W" Week="200551" Date="20051219" New="0" Old="0"/>
<Qty Commit="1" Freq="W" Week="200601" Date="20060102" New="0" Old="0"/>
<Qty Commit="1" Freq="W" Week="200602" Date="20060109" New="0" Old="0"/>
<Qty Commit="1" Freq="W" Week="200603" Date="20060116" New="0" Old="0"/>
<Qty Commit="1" Freq="W" Week="200604" Date="20060123" New="0" Old="0"/>
<Qty Commit="1" Freq="W" Week="200605" Date="20060130" New="0" Old="0"/>
<Qty Commit="1" Freq="W" Week="200606" Date="20060206" New="2" Old="2"/>
<Qty Commit="1" Freq="W" Week="200607" Date="20060213" New="0" Old="0"/>
<Qty Commit="1" Freq="W" Week="200608" Date="20060220" New="0" Old="0"/>
<Qty Commit="1" Freq="W" Week="200609" Date="20060227" New="0" Old="0"/>
<Qty Commit="3" Freq="W" Week="200610" Date="20060306" New="0" Old="0"/>
<Qty Commit="3" Freq="W" Week="200611" Date="20060313" New="0" Old="0"/>
<Qty Commit="3" Freq="W" Week="200612" Date="20060320" New="14" Old="14"/>
<Qty Commit="3" Freq="W" Week="200613" Date="20060327" New="0" Old="0"/>
<Qty Commit="3" Freq="W" Week="200614" Date="20060403" New="0" Old="0"/>
<Qty Commit="3" Freq="W" Week="200615" Date="20060410" New="0" Old="0"/>
<Qty Commit="3" Freq="W" Week="200616" Date="20060417" New="11" Old="11"/>
<Qty Commit="3" Freq="T" Week="200617" Date="20060424" New="29" Old="17"/>
</Schedule>
</Line>
<Line Number="7">
<ItemNumber Type="IN">20646K3570</ItemNumber>
<ItemDescription>PLATE ASSY</ItemDescription>
<ItemUnit>PCE</ItemUnit>
<ItemRevision>00</ItemRevision>
<Colour></Colour>
<NewItem>Yes</NewItem>
<SupplierReference></SupplierReference>
<FreeText></FreeText>
<CumulativeQty Ordered="0" Received="0"/>
<LastReceipt Qty="0" DeliveryNote="" Date=""/>
<Plant>
<Identifier>KUK</Identifier>
<Location Code="1"/>
</Plant>
<Schedule>
<Qty Commit="10" Freq="Y" Week="200547" Date="20051127" New="0" Old="0"/>
<Qty Commit="1" Freq="W" Week="200548" Date="20051128" New="0" Old="0"/>
<Qty Commit="1" Freq="W" Week="200549" Date="20051205" New="0" Old="0"/>
<Qty Commit="1" Freq="W" Week="200550" Date="20051212" New="0" Old="0"/>
<Qty Commit="1" Freq="W" Week="200551" Date="20051219" New="0" Old="0"/>
<Qty Commit="1" Freq="W" Week="200601" Date="20060102" New="0" Old="0"/>
<Qty Commit="1" Freq="W" Week="200602" Date="20060109" New="0" Old="0"/>
<Qty Commit="1" Freq="W" Week="200603" Date="20060116" New="0" Old="0"/>
<Qty Commit="1" Freq="W" Week="200604" Date="20060123" New="0" Old="0"/>
<Qty Commit="1" Freq="W" Week="200605" Date="20060130" New="0" Old="0"/>
<Qty Commit="1" Freq="W" Week="200606" Date="20060206" New="2" Old="2"/>
<Qty Commit="1" Freq="W" Week="200607" Date="20060213" New="0" Old="0"/>
<Qty Commit="1" Freq="W" Week="200608" Date="20060220" New="0" Old="0"/>
<Qty Commit="1" Freq="W" Week="200609" Date="20060227" New="0" Old="0"/>
<Qty Commit="3" Freq="W" Week="200610" Date="20060306" New="0" Old="0"/>
<Qty Commit="3" Freq="W" Week="200611" Date="20060313" New="0" Old="0"/>
<Qty Commit="3" Freq="W" Week="200612" Date="20060320" New="14" Old="14"/>
<Qty Commit="3" Freq="W" Week="200613" Date="20060327" New="0" Old="0"/>
<Qty Commit="3" Freq="W" Week="200614" Date="20060403" New="0" Old="0"/>
<Qty Commit="3" Freq="W" Week="200615" Date="20060410" New="0" Old="0"/>
<Qty Commit="3" Freq="W" Week="200616" Date="20060417" New="11" Old="11"/>
<Qty Commit="3" Freq="T" Week="200617" Date="20060424" New="29" Old="17"/>
</Schedule>
</Line>
<Line Number="8">
<ItemNumber Type="IN">2073071171KA</ItemNumber>
<ItemDescription>BRACKET(R.H)</ItemDescription>
<ItemUnit>PCE</ItemUnit>
<ItemRevision>K0</ItemRevision>
<Colour></Colour>
<NewItem></NewItem>
<SupplierReference></SupplierReference>
<FreeText></FreeText>
<CumulativeQty Ordered="320" Received="418"/>
<LastReceipt Qty="2" DeliveryNote="KTX7444A" Date="20051117"/>
<Plant>
<Identifier>KUK</Identifier>
<Location Code="1"/>
</Plant>
<Schedule>
<Qty Commit="10" Freq="Y" Week="200547" Date="20051127" New="2" Old="2"/>
<Qty Commit="1" Freq="W" Week="200548" Date="20051128" New="0" Old="0"/>
<Qty Commit="1" Freq="W" Week="200549" Date="20051205" New="0" Old="0"/>
<Qty Commit="1" Freq="W" Week="200550" Date="20051212" New="0" Old="0"/>
<Qty Commit="1" Freq="W" Week="200551" Date="20051219" New="0" Old="0"/>
<Qty Commit="1" Freq="W" Week="200601" Date="20060102" New="0" Old="0"/>
<Qty Commit="1" Freq="W" Week="200602" Date="20060109" New="0" Old="0"/>
<Qty Commit="1" Freq="W" Week="200603" Date="20060116" New="0" Old="0"/>
<Qty Commit="1" Freq="W" Week="200604" Date="20060123" New="0" Old="0"/>
<Qty Commit="1" Freq="W" Week="200605" Date="20060130" New="0" Old="0"/>
<Qty Commit="1" Freq="W" Week="200606" Date="20060206" New="0" Old="0"/>
<Qty Commit="1" Freq="W" Week="200607" Date="20060213" New="0" Old="0"/>
<Qty Commit="1" Freq="W" Week="200608" Date="20060220" New="0" Old="0"/>
<Qty Commit="1" Freq="W" Week="200609" Date="20060227" New="0" Old="0"/>
<Qty Commit="3" Freq="W" Week="200610" Date="20060306" New="0" Old="0"/>
<Qty Commit="3" Freq="W" Week="200611" Date="20060313" New="0" Old="0"/>
<Qty Commit="3" Freq="W" Week="200612" Date="20060320" New="0" Old="0"/>
<Qty Commit="3" Freq="W" Week="200613" Date="20060327" New="0" Old="0"/>
<Qty Commit="3" Freq="W" Week="200614" Date="20060403" New="0" Old="0"/>
<Qty Commit="3" Freq="W" Week="200615" Date="20060410" New="0" Old="0"/>
<Qty Commit="3" Freq="W" Week="200616" Date="20060417" New="0" Old="0"/>
<Qty Commit="3" Freq="T" Week="200617" Date="20060424" New="0" Old="0"/>
</Schedule>
</Line>
|
|
|
|
|
well th question is: How to hide TextBox cursor (carret), without disabling it?
thanx in advance
|
|
|
|
|
|
A long time ago i found a win32 function called HideCaret[^], you can try to import it. Then when the textbox has received focus (i think that is when it shows the caret, i'm not sure though...) you can call the HideCaret function with the handle of the textbox as the parameter.
Hope this helps!
"..Commit yourself to quality from day one..it's better to do nothing at all than to do something badly.."
-- Mark McCormick || Fold With Us! || Pensieve || VG.Net ||
|
|
|
|
|
using System.Runtime.InteropServices;
...
[DllImport("user32.dll")]
public static extern bool HideCaret(IntPtr hWnd);
[DllImport("user32.dll")]
public static extern bool ShowCaret(IntPtr hWnd);
public bool HideCaret()
{
return HideCaret(this.Handle);
}
public bool ShowCaret()
{
return ShowCaret(this.Handle);
} Note: As soon as any text is typed (at least in the RichTextBox), the caret is shown again automatically.
|
|
|
|
|