|
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
|
|
|
|
|
Load it to a database, then you can read just certain records 5 or 10 at a time to be put into the datagridview.
|
|
|
|
|
Thanks for the fast response.
I probably wrote too much to be clear, but the problem is not really displaying but loading. Creating 500k datarows (times X for multiple controllers or other inputs) is one hell of a task. Loading a movie of that size takes ~30 minutes but after that, displaying the data in the dgv is as smooth as anything (unless you try to bind it to another controller/input).
|
|
|
|
|
Where is your data coming from? From a database or are you reading a file, etc.?
Obviously if it coming from a database you can use paging to only get a limited amount of data to display. If its from a file you could set up some sort of file pointer to keep the current location and page through it.
|
|
|
|
|
It's coming from a file. Yeah, that could work for at least some of the formats. *goes off to attempt it* Thanks!
|
|
|
|
|
Hi.i am C# beginner,i have created two folders for my project so other folder is for classes and the other one is for my forms so i am trying to use my classes from another folder but i can't see them.
|
|
|
|
|
You have to devine your namespaces.
using xxx.Yourfoldername;
All the best,
Martin
|
|
|
|
|
What do you mean you can't see them? Make sure of the the namespace for the classes.
|
|
|
|
|
|
When you create a folder and then create a class inside it, Studio appends the folder to the default namespace i.e. Project.Folder . That's why they likely have different namespaces. Change the namespaces or use using statements as mentioned above.
Try code model generation tools at BoneSoft.com.
|
|
|
|
|
I'm really piggybacking on what everyone else has said, but I had this issue when I started coding as well, and a visual image helped me out.
Basically, think of it as a tree. Unless you provide links across the branches(using *), all you can reference is what's above you.
--Project1
--Class1
--Class2
--Project2
--Form1
--Form2
You need to do one of two things:
Edit the namespace for each project (can be done through project->properties). Chaning it this way should recursively edit the namespaces of your files. (It does in VS.Net 2005)
or
add "using Project2;" to Project1's classes, and "using Project1;" to Project2's classes.
|
|
|
|