|
i am trying to run a process through that code
Process.Start("myApllication.exe");
but the command prompet window opens while starting of the process
i want to delete this effect
how ?
thx all
|
|
|
|
|
Maby this will do:
Make an instance of process and change the standard input,output,error streams.
The PROgrammer Niklas Ulvinge aka IDK
|
|
|
|
|
You need to use the ProcessStartInfo object. It has a CreateNoWindow property to prevent the console window from appearing. Your code will look like
ProcessStartInfo processStartInfo = new ProcessStartInfo("myApplication.exe")'
processStartInfo.CreateNoWindows = true;
Process.Start(processStartInfo);
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
I need to create a toolbar like photoshop's one.
I did it, but if i select the main form it goes in second level so became unfocused.
How can i show both selected if i enable the main form or the toolbar and make them in second level if i enable another application?
Hope to have explain good.
Thanks in advance.
|
|
|
|
|
You can focus only on one form and/or one control.
|
|
|
|
|
yes but how does much softwares to do it?
I think i need to override some windows message, but i don't know what.
Do someone know how?
|
|
|
|
|
|
Is it a joke?
|
|
|
|
|
It Contains methods on invoking the windows api methods .
You say you want something like this .
|
|
|
|
|
i can see just a full pink page with an email hyperlink.
I guess you are an idiot.
|
|
|
|
|
I think he made a mistake, the real address is http://www.pinvoke.net[^] (not .com ).
And he's just trying to help because he wants. He (or anyone for that matter) is in no way forced to help. So please don't insult him because he made a little mistake.
-- LuisR
Luis Alonso Ramos
Intelectix - Chihuahua, Mexico
Not much here: My CP Blog!
|
|
|
|
|
I assume your toolbar is a separate form. If yes try to set its Owner property to your main form (I think this must be done before showing the toolbar form but Im not sure in this point).
|
|
|
|
|
i've tried but it doesn't change the view.
|
|
|
|
|
Then please explain in more detail what you've done and what is not working.
I understood it like this:
You have a main form and another form which contains your own toolbar implementation. You want this toolbar form to fly always over the main form (also when the main form is clicked and normally would rise above everything else). If another app is clicked this one should come to front (well... the default behavior isnt it?).
This should work with the Owner property.
|
|
|
|
|
I have a windows application and in a form page are a datagrid and 2 labels.
I want to print them but I printed the label over the datagrid.
Can somebody to help me.
<<<<
private void printDocument1_PrintPage(object sender, System.Drawing.Printing.PrintPageEventArgs e)
{
PaintEventArgs myPaintArgs = new PaintEventArgs(e.Graphics, new Rectangle(new Point(230, 0), this.Size));
this.InvokePaint(grdExpenseSheet, myPaintArgs);
myPaintArgs = new PaintEventArgs(e.Graphics, new Rectangle(new Point(500, 300), this.Size));
this.InvokePaint(lbTSEmployeeContent, myPaintArgs);
}
>>>>>
|
|
|
|
|
Hello Folks,
I really wonder to know and unfortunately could not find any answer:
Is it possible to make a single row read-write enabled in a Windows forms datagrid?
I have a read-only datagrid and want to make a single-row editable with a button click.Is this really difficult????
PLEASE HELP
|
|
|
|
|
You could make a func that only permits that...
I don't know the datagrid class...
The PROgrammer Niklas Ulvinge aka IDK
|
|
|
|
|
Normally not.
But you could derive from DataGridTextBoxColumn, override the Edit event and only call the base implementation when the rownum is the desired value.
You would then have to define the column styles by yourself and not let the grid handle all the work for you
|
|
|
|
|
If you are using DataGridTextColumns then you have access to the TextBox that gets placed when user tries to edit values and since you have access to this TextBox then you can also place event handlers to handle keypresses and in your handler you can do anything you like.
I have the following code in VB but is same basic concept:
<br />
<br />
' Add column<br />
textCol = New DataGridTextBoxColumn<br />
textCol.MappingName = "Binary Value"<br />
textCol.HeaderText = "BinValue"<br />
textCol.Width = 160<br />
ts1.GridColumnStyles.Add(textCol)<br />
AddHandler textCol.TextBox.KeyPress, AddressOf grdBitfield_keypressHandler<br />
textCol.TextBox.BackColor = Color.Yellow 'show edit box in yellow color<br />
<br />
<br />
Private Sub grdBitfield_keypressHandler(ByVal sender As Object, ByVal e As KeyPressEventArgs)<br />
'handle backspace and delete keys<br />
If e.KeyChar = Convert.ToChar(Keys.Delete) Then Return<br />
If e.KeyChar = Convert.ToChar(Keys.Back) Then Return<br />
<br />
If grdBitfield.CurrentCell.ColumnNumber = 5 Then 'BinValue column<br />
If Not (e.KeyChar = "0" Or e.KeyChar = "1") Then<br />
e.Handled = True 'get out immeditely<br />
End If<br />
Else<br />
e.Handled = True<br />
End If<br />
<br />
End Sub<br />
Hope that helps.
|
|
|
|
|
Firstly I would like to thank you for your attention.You know the DataGrid in WebForms.I want to use the same functionality on Windows forms.
Do you have any other code samples or web links for this?
|
|
|
|
|
I haven't worked much with web form datagrids; however, main difference I remember is that you can place buttons on it. You should be able to do the same with the windows datagrid.
Following are some links to help you: Datagrid with Progressbar[^], How to add selection controls to datagrid[^], and Edit anything in a datagrid.[^].
The concept is basically the same, you can either add event handlers for the TextBox property of the DataGridColumnTextBox or you can create a new class derived from DataGridColumnStyle.
|
|
|
|
|
Hi everybody,
can any one of you guide me to solve the following problem.
I have a property 'Properties' returns 'Editor' type object, which is a read only property of LookupEdit Control. now I am overloading the LookUpEdit control as MyLookUpEdit Control. in MyLookUpEdit Control i want to override the property 'Properties' to return an object of 'MyEditor' class. MyEditor class is derived from 'Editor' class. obvously it extends functionality of Editor class. whenever the user of 'MyLookUpEdit' access the propety 'Properties' it has to return the 'MyEditor' object
the problem is i dont have a copyconstructor in Editor class.
I hope I have explained the problem as it is.
regards,
Mohamed Hasan.
Contact him at: hasansheik@hotmail.com
hasansheik@yahoo.co.in
hasansheik@lycos.com
|
|
|
|
|
You don't need to write a copy constructor (nor can you write one). Why do you want to write one? What exactly is the problem you're facing?
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
this is exactly my problem.
Class LookUpEdit {
private Editor editor;
public Editor Properties
{
get{
return editor;
}
}
}
I am deriving the above class
class MyLookUpedit :LookUpedit
{
public MyEditor Editor
{
get
{
/// I need something like this.
return (MyEditor)base.Properties;
}
}
}
here is the MyEditor's implementation
class MyEditor : Editor
{
MyEditor()
{
}
}
do you have an idea. please try this.
Contact him at: hasansheik@hotmail.com
hasansheik@yahoo.co.in
hasansheik@lycos.com
|
|
|
|
|
How you construct MyEditor is up to you. My guess is MyEditor will have additional data members, so you might want to fill them, in addition to Editor members, before returning it. Something like
class MyEditor : Editor
{
private additionMember;
public MyEditor(Editor d)
{
baseMember1 = d.baseMember1;
}
public int AdditionalMember
{
}
}
class MyLookUpedit :LookUpedit
{
public MyEditor Editor
{
get
{
MyEditor editor = new MyEditor(base.Properties);
editor.AdditionalMember = 20;
return editor;
}
}
}
Hope this helps.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|