|
Is there anything that you want to do, that you cannot do in unsafe C#? (excluding tail calls).
xacc.ide - now with TabsToSpaces support IronScheme - 1.0 beta 1 - out now! ((lambda (x) `((lambda (x) ,x) ',x)) '`((lambda (x) ,x) ',x))
|
|
|
|
|
leppie wrote: Is there anything that you want to do, that you cannot do in unsafe C#? (excluding tail calls).
Yup - make the code almost unmaintainable by anybody but the author.
|
|
|
|
|
|
I have an existing Excel workbook, it has three sheets on it, ( Totals, Performance, Breakdown )
I have written the C# program to work as an external performance, but the values still need to populate the actual worksheet Performance.
I have printed of many sheets of paper with snippets of code showing how to create a workbook/sheet and populate it. but I cannot find anything that will allow me to open an existing work book and the cells (which are all over the place on the worksheets then save the work book as (textbox1.text).
That is my priority
the secondary task is to have c# look at the Breakdown sheet and any row between A,40 and A,560 if the value is 0 then hide that row. then I need to be able to print all three sheets from c#.
I hope some body can help me please.
Steve
|
|
|
|
|
Often when I see code that references a file, I see an @ prefixing the string.
Such as @"C:\my file.txt"
Why is this? Is it required? What benefits does it have?
|
|
|
|
|
When you want to set a path, you have to write "C:\\text.txt" (for example), because \t in a string means indenting; there's much more formatting in strings like \n ... . With @ symbol you remove all these formats, actually "C:\\text.txt" is equal to @"C:\text.txt" .
Sometimes you want to write your strings in two or more lines, with @ you can do this.
@"Hello<br />
World<br />
!"
For more details search MSDN for "@ symbol".
When you're alone in the Dark, Fear will protect you...
|
|
|
|
|
|
Yeah, It's much better
When you're alone in the Dark, Fear will protect you...
|
|
|
|
|
Glad to help you
|
|
|
|
|
Hello,
I have searched the internet but I haven't found what I was looking for, and maybe someone can guide me here.
I want a control for c# .net that should work similar to the CHAPTERS MENU from this site
(http://www.codeproject.com)
I want a similar menu where I can set the categories, and when someone will click on teh category, it will enlarge it and reveal the items. I want to be possible that all categories can be opened at the same time.
Hope you can help, thank you
|
|
|
|
|
Why don't you try creating that BY YOUR HANDS?!!
When you're alone in the Dark, Fear will protect you...
|
|
|
|
|
Hello,
I am just starting out with C#, and I don't really know where to start to create that.
I would be more than happy to make this by myself, but I would appreciate if you could give me some tips
|
|
|
|
|
Flowlayoutpanels, custom controls with your own propertys and events, toggle visibility.
Those 3 key things right there will be what you need to get that done.
|
|
|
|
|
Thank you very much for the quick replyes. I am looking in to this right now.
|
|
|
|
|
I found something similar to what I want, I just need to find out how to implement it in my "software" :
http://www.codeproject.com/KB/miscctrl/XPTaskBar.aspx
Thanx again
|
|
|
|
|
Is there a straightforward and clean way to get the Delete key to function correctly in a textbox entry in a PropertyGrid? Right now I have code that intercepts the Delete key on the parent form, checks to see if the property grid has focus, and then tries to mimic the delete functionality but it is all very kludgy and it doesn't support Undo.
|
|
|
|
|
To reproduce:
1. Run code.
2. Enter some data to grid
3. Click other form caption
4. Click original form caption
5. Enter some characters
Observed: entered characters are ignored
Expected: entered characters must appear in last active textbox
How to fix ?
Andrus.
using System.Windows.Forms;<br />
using System.Collections.Generic;<br />
using System;<br />
<br />
public class Test<br />
{<br />
static void Main()<br />
{<br />
Application.Run(new MainForm());<br />
}<br />
}<br />
<br />
class MainForm : Form<br />
{<br />
public MainForm()<br />
{<br />
WindowState = FormWindowState.Maximized;<br />
IsMdiContainer = true;<br />
Form frm = new Childform();<br />
frm.MdiParent = this;<br />
frm.Show();<br />
Form frm2 = new Childform();<br />
frm2.MdiParent = this;<br />
frm2.Show();<br />
frm2.Left = 2000;<br />
}<br />
}<br />
<br />
class Childform : Form<br />
{<br />
DataGridView grid;<br />
Control LastFocus = null;<br />
<br />
public Childform()<br />
{<br />
ToolStripContainer tc = new ToolStripContainer();<br />
<br />
grid = new DataGridView();<br />
grid.Columns.Add(new DataGridViewTextBoxColumn());<br />
grid.EditMode = DataGridViewEditMode.EditOnEnter;<br />
grid.Top = 120;<br />
grid.Height = 300;<br />
Controls.Add(tc);<br />
tc.ContentPanel.Controls.Add(new MyUserControl());<br />
<br />
tc.ContentPanel.Controls.Add(grid);<br />
this.Activated += new EventHandler(Childform_Activated);<br />
this.Deactivate += new EventHandler(Childform_Deactivate);<br />
}<br />
<br />
void Childform_Activated(object sender, EventArgs e)<br />
{<br />
if (this.LastFocus != null)<br />
this.LastFocus.Focus();<br />
}<br />
<br />
void Childform_Deactivate(object sender, EventArgs e)<br />
{<br />
this.LastFocus = this.ActiveControl;<br />
while (LastFocus is IContainerControl)<br />
LastFocus = ((IContainerControl)LastFocus).ActiveControl;<br />
}<br />
}<br />
<br />
class MyUserControl : UserControl<br />
{<br />
internal MyUserControl()<br />
{<br />
Height = 100;<br />
Controls.Add(new TextBox());<br />
}<br />
}
Andrus
|
|
|
|
|
Dear All,
I think i have simple problem using c#. I develop an application in where i need to browse for folder in windows.
I have a browse button and i like to load the "Browse For Folder" Dialog box where folders are only displayed with New Folder button.
I made such control using my own logic but its very slow like it takes 1-3 minutes to load all directory of hard drive.
your aid is really appreciated.
|
|
|
|
|
|
Then don't load the entire directory structure of the drive. You load only what you're showing the user. When the user "opens" one of the folders, you go get the contents of only that folder and populate that node with the new information.
|
|
|
|
|
Hi All,
Is there any free RSS Feed Reader that can be incorporated in .NET Windows based applications?
Either you love IT or leave IT...
|
|
|
|
|
|
It helps a bit. Thanks so much for your reply.
Either you love IT or leave IT...
|
|
|
|
|
HI:
i want to check the dymatic checkbox in TableLayoutPanel
each column only can choose one checkbox.
but, i don't know how to write the code.
help me....thank you^^
public partial class Form1 : Form
{
private MyTableLayoutPanelObj myTbObj = new MyTableLayoutPanelObj();
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
myTbObj.SetTableLayoutPanel();
this.splitContainer1.Panel2.Controls.Add(myTbObj.Satisfy_TableLayoutPanel);
}
}
public class MyTableLayoutPanelObj
{
public enum ControlType { Checked };
private TableLayoutPanel tableLayoutPanel = new TableLayoutPanel();
public int count = 0;
public TableLayoutPanel Satisfy_TableLayoutPanel
{
get { return this.tableLayoutPanel; }
}
public void SetTableLayoutPanel()
{
for (int subject_x = 0; subject_x < 6; subject_x++)
{
CheckBox control = new CheckBox();
control.CheckedChanged += new EventHandler(control_CheckedChanged);
control.Name = subject_x + count.ToString();
control.Text = control.Name.ToString();
control.Dock = DockStyle.Bottom;
this.tableLayoutPanel.Controls.Add(control, subject_x, count);
this.tableLayoutPanel.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 100f / 5));
}
}
void control_CheckedChanged(object sender, EventArgs e)
{
:confused::confused:
}
}
|
|
|
|
|
Hi to all,
for start let me say I'm new to c# but I have some experience in VC++. This is one of my first app in c# and off course I bumped into a small problem.
I wont to display contextmenustrip when user press right mouse button, I'm having trouble with coordinates, they are funny out of form. Of course I've tried with clienttoscreen or screentoclient but nothing changes. Here is my code
private void treeView_NodeMouseClick(object sender, TreeNodeMouseClickEventArgs e)
{
if (e.Button != MouseButtons.Right) return;
TreeNode curNode = e.Node;
treeView.SelectedNode = curNode;
ContextMenuStrip menuStrip = this.cmsState;
Point cPt = new Point(e.X, e.Y);
PointToScreen(cPt);
menuStrip.Show(cPt);
}
menu appears OK but on wild coordinates, where am I wrong?
Thanks!
|
|
|
|