|
I'm already using SMTP !!
|
|
|
|
|
In my application,i have changed the color of text(SyntaxHighLighting), it is working fine,But whenever any one press Ctrl+Z, it undo-operations on my highlighting operations(The most recent operation).
For the solution of this problem:
I have used ClearUndo() but it clears whole undo stack while in the description of this function wrote,clear most recently undo operation.
If you have any solution of this problem,Please suggest().
Can we suspend/Disable/Off Undo or any other way to do the things?
|
|
|
|
|
khaleek wrote: Can we suspend/Disable/Off Undo or any other way to do the things?
Nope - you can't suspend it. What you could do is roll your own undo manager, but this would not be trivial. Alternatively, you can always reapply the syntax highlighting immediately following the undo operation.
|
|
|
|
|
If I have to Undo the Text that was typed just before Syntax Highlight, than we will never able to do the same.
|
|
|
|
|
You will have to re-syntaxhighlight the line, and possibly lines before that. Have fun
|
|
|
|
|
Thanks for your answer.
If we re-Syntaxhighlight the text again than it will gain filled into Undo stack and when any one press
Ctrl+Z it will again undone the operation.
|
|
|
|
|
The point is, that you reapply the highlighting after each undo operation.
|
|
|
|
|
Hi All,
I have set paper size for printer. so i am setting as follows:
e.PageSettings.PaperSize.Height = 850;
e.PageSettings.PaperSize.Width = 1100;
but when i run my application and try to take print out, it gives an Exception like "Paper Size can not be change unless the kind property is set to custom"
can any body please tell how can set this kind property to custom.OR any other method to set page size.
please share your knowledge.
thanks
Bankey
|
|
|
|
|
e.PageSettings.PaperSize.Kind = PaperKind.Custom
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
thanks for quick reply,
e.PageSettings.PaperSize.Kind = PaperKind.Custom;
but it giving an error, because it read only property....
can not be assign, can you please tell me what i have to do for that...
thanks
|
|
|
|
|
|
Hi,
Is there a way to set the size of the form (in a Windows application) to the same size as the screen's resolution?
Thanks.
|
|
|
|
|
|
|
|
|
You could always use the following code:
Height = Screen.PrimaryScreen.Bounds.Height;
Width = Screen.PrimaryScreen.Bounds.Width;
|
|
|
|
|
Thanks,
This is a good answer but it doesn't substract the task bar size.
Is there a possibility to perform like the maximize fuction?
|
|
|
|
|
Ahh - so you want it to look like it's maximized. If you want it to fill the screen, but don't want it to be maximized (i.e. you want to emulate the way office works) change Bounds to WorkingArea .
|
|
|
|
|
Hi,
C# VS2005
Im using web services to return custom objects. I want the database connection from the gui to remain persistent.
(The gui creates a connection and the idea is that the web service always uses this connection)
If I pass the connection object (Type System.Data.OleDb.OleDbConnection) to the web service as a parameter I get the error:
Cannot serialize member System.ComponentModel.Component.Site of type System.ComponentModel.ISite because it is an interface
Is it possible to pass database connections to web services or how can I ensure the web service uses a persistent connection??
Thanks,
Chas
|
|
|
|
|
You should never try to make a connection persistent with web services. You're totally defeating the benefits that you get with a disconnected architecture. Please - think this through, and then change your architecture to fit the n-tier model, so you acquire your connection as late as possible and release it as early as possible afterwards.
|
|
|
|
|
Instead of trying to pass a connection to the web service, how about just declaring a new connection in the web service class iteself. Lets say, in its constructor would be a good practice.
Try it before its too late coz it works inline with time.
Morg.....
|
|
|
|
|
Hi everybody,
it's probably a stupid question but i hope someone can help me .
I have the following situation:
A TAPIClass which gets an eventhandler (which himself gets events from the phone)
I created a class CPhone which should store the instance of the TAPIClass.
In the constructor i create the TAPIClass instance and initialize it.
The CPhone instances are created into a thread which is created this way:
new Thread(new ParameterizedThreadStart(TelSignalThread));
where TelSignalThread is a static function of the Main-Form which creates
an instance of the CPhone class
public static void TelSignalThread(object param)
{
MainForm Win = (MainForm)param;
CPhone tel = new CPhone(Win);
while(Win->Running)
{
Threading.Sleep(10);
}
}
My question is, how is it possible to call a function from CPhone from out the MainForm?
Call the GUI from out the Thread works with Invoke.
Edit: Or is it the best way to derive my CPhone-Class from the class Thread and to add class-members<br />
to the CPhone class? Does exists a PhoneThreadInst->Invoke(...); ?
Before i created this thread and the CPhone-Class, i had the TAPIClass into the MainForm, without a special thread and it worked great.
Then i needed to open a new window from a button-click during a phone call.
This provokes sometimes a event-lost from the TAPIClass , and a missing "hang-up Event" disturbes my whole appliction
Big thanks for any help
|
|
|
|
|
If you just want to call a function in CPhone form outside the class,
you can expose the fucntion by making it static.
Why do you want to use a thread to create the TAPICalss??
Did you try to use the BackgroundWorker threads ??
Missing of the event is very uncertain , dont know why it occures .
Vikas Amin
My First Article on CP" Virtual Serial Port "[^]
modified on Thursday, July 24, 2008 5:33 PM
|
|
|
|
|
Thanks for your answer,
i create it in the thread for the reason that the instance is executed in another thread than the
GUI-Thread.
Probably there is a timeout or a "black hole" where the Hang-Up-Signal disappears if i open a new Window.
Actually it works with the Telefony-API into the thread.
But it worked also without a thread, but sometimes it makes problems
Now i need to test if this error occurs also with threading ...
|
|
|
|