|
You can write a WindowsService and make this service start your processes whenever you want (in this case when the DateTime.Minute = 0)..
not an expert suggestion just an idea
.:: Something is Wrong ::.
|
|
|
|
|
i have datagrid it includes ID columne if i deleted the ID from the grid then i select the row to delete it i resived exeption
how can handle this excption???
fatma
|
|
|
|
|
btota wrote: how can handle this excption???
First by not causing it and second by saying WHAT exception you are getting.
only two letters away from being an asset
|
|
|
|
|
how to Reduce the width of datagrid colum in c# ??
sikandar
|
|
|
|
|
u have to use DataGridTextBoxColumn object which has width property
after setting width u have to add it to DataGridTableStyle object
and finally u have to add this DataGridTableStyle object to datgrids TableStyles
property.
rahul
|
|
|
|
|
I have a class named operator, please tell me, how do I get use it in the main program if I want to access it with a button with the name button1.
And also how do I get to show the results in a new window?
tony-yeyo
|
|
|
|
|
*sigh* buy a book, and work through it. You're never going to learn if you come to these forums without the slightest idea of how to apply the things people tell you.
If you double click on a button in the designer you will create an event for the click. What do you want the class to do ? You can have an instance as a member variable, or create a local instance in that class, and call it.
If you have results from the class and want to show them, the easiest way is a messagebox, otherwise you need to create a new form class. If you do this, unless the operator class instance is a member for some reason, I'd do the operation inside that form, so your event just shows the dialog and the form itself performs the operation and shows the result. Otherwise, I'd pass the result through the constructor.
And again, if you don't know what any of that means, buy a book and work through it.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
u can create instance of class on button1_click event
operator op = new operator();
and then can access public members and public methods of class operator
by its object op.
rahul
|
|
|
|
|
Hi All,
I am using MDI form, The first 20% of the form am displaying Treeview control and in the rest of the portion am displaying a mdiChild form. The mdiChild form has got few UI controls on which tab order is set.
Now the issues is, when we hit on tab, it revolves within the child form. How can i make it to go to treeview control once the last control on the child form is focus? ie. on being on the last control and hit tab, the focus should go to the treeview.
Any help is highly appreciated.
Thanks in advance for any guidance and suggestion
Regards
Kais
|
|
|
|
|
Hello
In that last control, handle the KeyUp event
private void MyLastControl_KeyUp(object sender, KeyEventArgs e)
{
if (e.KeyData == Keys.Tab)
MyTreeView.Focus();
}
Regards
|
|
|
|
|
Hi,
When i get data from a device which is attached to my serial port, its cutting it off after like 20 characters.
This is how it would look like:
afsdfagfsdgsdagf
asgdasdfdsafgafa
gasdfasdgadsfsdv
gasdffbzxxcvfads
But i don't want it to cut it off, how can i fix this so it would look like this:
afsdfagfsdgsdagfasgdasdfdsafgafagasdfasdgadsfsdvgasdffbzxxcvfads
Thanks in advance!
|
|
|
|
|
Replace System.Environment.NewLine with an empty string?
string x = stringFromSerialPort;
string modifiedString = x.Replace(Environment.NewLine, "");
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
Thank you Senthil,
I'll try that!
|
|
|
|
|
I will tell clearly my doubt here.When selecting the check box,i've to visible 2 text boxes.For that i need the code.Can any of you give me the code.
Babu
|
|
|
|
|
Hello
Handle the CheckedChanged event, then this:
private void MyCheckBox_CheckedChanged(object sender, EventsArgs e)
{
if(MyCheckBox.Checked)
{
MyTextBoxA.Visible = true;
MyTextBoxB.Visible = true;
}
else
{
MyTextBoxA.Visible = false;
MyTextBoxB.Visible = false;
}
}
That's it! So, where is the question now??:->
Regards
-- modified at 7:30 Wednesday 23rd August, 2006
|
|
|
|
|
or even simpler
<br />
private void MyCheckBox_CheckedChanged(object sender, EventsArgs e)<br />
{<br />
MyTextBoxB.Visible = MyTextBoxA.Visible = MyCheckBox.Checked;<br />
}<br />
|
|
|
|
|
Hey!!
I like fancy long codes!
Regards
|
|
|
|
|
I guess telling you to set the Visible property on a textbox wasn't clear enough for you ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Hello,
I call an external program over the instruction Process.Start (...).
Is there a possibility to modify the header line of the called program . I know the MainWindowHandle etc. but unfortunately i can only pick out and not change the title.
Does somebody have a proposal for my problem?
gitschi
|
|
|
|
|
You can use Win32's SendMessage(hWnd, WM_SETTEXT, 0, Text) through interop.
|
|
|
|
|
Hye,
thanks for your tipp.
I have solved my problem with the following code.
##################################################################
public class Win32
{
[DllImport("user32.dll")]
public static extern int SetWindowText(IntPtr hwnd , string str);
}
Win32.SetWindowText (hwnd,"new Windowtitle....");
##################################################################
|
|
|
|
|
Hi all,
I have added linkbutton to the datagrid in the template column.i have to display particular field of datasource to the lnkbutton text.My code is like this
this is a class file
public class DataGridTempla :System.Web.UI.Page,ITemplate
{
ListItemType templateType;
string columnName;
public DataGridTempla( ListItemType type,string colname)
{
templateType = type;
columnName = colname;
}
public void InstantiateIn(System.Web.UI.Control container)
{
Literal lc = new Literal();
LinkButton lb = new LinkButton();
lb.Click+=new EventHandler(lb_Click);
case ListItemType.Item:
lc.Text=columnName;
lc.Text = "Select " + columnName;
lb.CommandName = "EditButton";
lb.Text= "" + columnName + "";
//container.Controls.Add(chkb);
container.Controls.Add(lb);
container.Controls.Add(lc);
}
this is my webform coding
TemplateColumn tc=new TemplateColumn();
tc.ItemTemplate=new DataGridTempla(ListItemType.Item,"BrandId" );
BoundColumn bc=new BoundColumn();
bc.DataField="Brand_Name";
DataGrid1.Columns.AddAt(0,tc);
DataGrid1.Columns.AddAt(1,bc);
DataGrid1.DataBind();
please try this.
sivamyneni
|
|
|
|
|
Siva Myneni wrote: please try this.
Ok, I tried it, now what?
First, as this is related to ASP.NET you might get a better response by posting it to that forum.
Second, try using a template in the the aspx rather creating it in the code-behind
only two letters away from being an asset
|
|
|
|
|
Hi,
In my solution I have a project for the application and the installer project. The installer builds "Applicationname install.msi", and everything works great.
What I would like to do is this:
Simple solution:
Get the installer project to build "applicationname install <versionnumber> <debug|release>.msi" instead of just "applicationname install.msi" which I then have to rename manully afterwards. Is this possible ?
Optimal solution:
Checking files into subversion creates an assemblyinfo.cs with the number 1.0.0.<subversion_revision> or something. I know how to do this. I could also update the "installerprojectfile.vdproj" to reflect this, although this would change the status of the .vdproj file subversion-wise... ah well.. But that would allow me to automatically update the version in the installer - and if I could get that version reflected in the installer filename I would be home safe
Anyway - has anybody a clue regarding the simple solution ? Is it possible at all in the build-in deployment project ?
/Jan
Do you know why it's important to make fast decisions? Because you give yourself more time to correct your mistakes, when you find out that you made the wrong one. Chris Meech on deciding whether to go to his daughters graduation or a Neil Young concert
|
|
|
|
|
You can change the name by going to the properties of the setup project and changing the Output file name.
You can setup a postbuild event in the insall project to update the filename with version number.
only two letters away from being an asset
|
|
|
|