|
Yeah I just did that.
Do you know if GDI+ has a BitBlt'ing function?
1 line of code equals many bugs. So don't write any!!
|
|
|
|
|
|
Does anyone know of any obsfuscator for c#?
i tried finding in google but failed
Thanks
|
|
|
|
|
Well if you spell it correctly you'll probably get further
obfuscator[^]
|
|
|
|
|
Ok, I have this RichTextBox. I know that the underlying control has built-in handling of clipboard shortcut keys (CTRL+C/V/X). However, it doesn't paste images copied to the clipboard (using CTRL+V). I'm aware of using the Paste(DataFormats.Format) function to paste an image. When I try to use that (with a custom Paste button on a nearby toolbar) it works fine, with either images or text. However, the shortcut key doesn't do that. The shortcut key only pastes text. I've noticed that RichTextBox has no OnPaste to override, and there's no Paste event to handle. How can I get the RichTextBox to paste a copied image using the shortcut key ?
-Daniel
Typing too fast fro my owngood
|
|
|
|
|
I tried handling the keystrokes in KeyDown and setting the KeyEventArgs.Handled in the KeyPress handler to true, but it passed the keystrokes on to the underlying control anyway (basically pasted text twice).
...I suppose I could just check for the image dataformat, and igore the data otherwise (passing text to the underlying control to paste, considering the underlying control doesn't paste image data by iteself)... I'll give that a try...
-Daniel
Typing too fast fro my owngood
|
|
|
|
|
I got it to function almost completely perfectly (by setting the KeyEventArgs.SuppressKeyPress to true for CTRL+V and pasting manually). However, I've run into a different problem with copying. I'll start a different thread (since it's not really related).
-Daniel
Typing too fast fro my owngood
|
|
|
|
|
Hi guys I am getting an "Object reference not set to an instance of an object" error when I try to pass the value from a windows form to a class file.
Here is the code I have in my windows form:
public int validatecheckbox()
{
if(checkBoxPosted.Checked==true)
{
return 1;
}
else
{
return 0;
}
}
Here is the code in my class file:
Int32 nOne=1;
Process.ProcessFile obj=null;
obj=new Process.ProcessFile();
nOne=obj.validatecheckbox();
Please help!!
sasa
|
|
|
|
|
|
I am sorry I am a newbie in C#. If I try to call validatecheckbox function from another function in the windows form than it passes the value but it doesn't do so when I try to call it from the class file.
Please help.
sasa
|
|
|
|
|
mm i can't point out the err exactly until u post the code of ur winform class and the process class. either you would have called the validate function before winform designer code. so at the time check box might not intialized properply or there me problem in instantiation of ur process class. Please use F11 (step in) to debug the code.
|
|
|
|
|
Thank you for your help. Here is where my problem is/was:
In my windows form, I have two constructors. If I initializecomponents in both then I don't get the error but before I had initialize component in the first function below commented out and it wasn't working. My question is, is it ok to have InitializeComponents in both functions below?
public ProcessFile()
{
//
// Required for Windows Form Designer support
//
InitializeComponent();
//
// TODO: Add any constructor code after InitializeComponent call
//
}
public ProcessFile(string m_SourceFD,string m_TargetFD,string m_procedeCnn,string m_selectCnn)
{ //
// TODO: Add constructor logic here
//
m_sCnn=m_selectCnn;
m_ProcedeCnn=m_procedeCnn;
m_sSourceFD=m_SourceFD;
m_sTargetFD=m_TargetFD;
InitializeComponent();
}
sasa
|
|
|
|
|
Sorry to bug you buddy, I changed the object creation code to as follows and now I have only the second processfile function calling the initializecomponent function
ProcessFile obj=new ProcessFile("","","","");
I was calling the wrong constructor before.
sasa
|
|
|
|
|
IntializeComponents is required in each of your constructors unless InitializeComponents doesn't actually have any code within it.
This is required to create all the objects you have on your form, it stores all the settings you made in the designer view to replicate this view in the application during runtime.
There is no problem with having it in twice as only one of the constructors will be called at any time.
|
|
|
|
|
Many thanks for your help. I really appreciate you taking time on this. I learned something new .
sasa
|
|
|
|
|
Hi all,
One question for all of you!
How to set Shortcut keys for LinkLabels on TaskPane (also for infragistic task pane)?
Using Mnemonics is in vain ... please suggest some other ways or work arounds!
On task pane, only buttons and textboxes responds to the shortcut keys. But not the labels and LinkLabels.
Please suggest the way if you can do this. You can mail me on below specified id.
Manish.Jape@sos.sungard.com
Thanks & Regards
Manish.Jape@sos.sungard.com
|
|
|
|
|
Let's see, you want shortcut keys and are using Taskpane which does not respond to shortcut keys where you want it to? Don't use Taskpane.
|
|
|
|
|
I have few things to be done on TaskPane ... in that case I must put the Shortcuts for user to do perform the operations. TaskPane is must and Shortcuts also.
for some time forget the Taskpane ... and give me the solution for the normal form with LinkLabels. Try it and then let me know.
BY THE WAY "Dont use TaskPane is not helpful"
Thanks & Regards
Manish
|
|
|
|
|
In java you can use a glasspane which can intercept all events for the panes underneath. It is transparent to the user. I don't know if .net has that concept.
|
|
|
|
|
You only have one choice, to capture all key events.
|
|
|
|
|
I`m making a WCL (Windows Control Library), I`m deriving from Windows.Forms.Control. I`m setting the region of my control - that works fine. But when I`m trying to set the size of that control:
Size.Width = 10;
I`m getting this error:
Error 1 Cannot modify the return value of 'System.Windows.Forms.Control.Size' because it is not a variable D:\C# WORKSPACE\Field\Field\UserControl1.cs 17 13 Field
Could you please tell me why? And how to modify the size?
thank you in advance
|
|
|
|
|
Hi,
I think you have to create a new size-object to modify size:
Control.Size = new Size(10, Control.Size.Height);
Hope this helps
Regards
Sebastian
|
|
|
|
|
You're correct, I've ran into that before myself.
|
|
|
|
|
You can also use:
this.Width = 10;
All the best,
Martin
|
|
|
|
|
Hi. New guy here, with a question to y'all.
I'm working on a TAS* movie editor (supporting as many formats as I can get my head around ) and has a bit of a problem with presenting the data. The movie files contain data for as many frames as the movie is long, obviously, and for every frame there is controller data. I need to present it in a way that is easy to edit. The current way to do that is by loading every frame in as a DataRow in a DataTable and binding it to a DataGridView. The row contains a framenumber textbox cell and at least 8 boolean checkbox cells. The problem is that I will need to load a very large number of frames sooner or later (500k+)and for that, this method hogs way too much memory and time.Does anyone know of an alternative to this method that I could feasibly use? Thanks for reading at least.
*TAS: Tool-Assisted Speedrun[^]
-- modified at 8:24 Tuesday 18th July, 2006
|
|
|
|