|
Hi,
every time you execute new something() you create something new.
creating a Form is not the same as showing a Form; your new Form would be invisible until
you do something to it, such as _form.Show().
creating or showing a Form does not alter any other Form.
Luc Pattyn [Forum Guidelines] [My Articles]
This month's tips:
- before you ask a question here, search CodeProject, then Google;
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get;
- use PRE tags to preserve formatting when showing multi-line code snippets.
|
|
|
|
|
Any time that you are accessing something from the base class library, you are accessing code that lives in another namespace. For an explicit example, create a console application and observe the default namespace assigned to your code. Now, add a call to Console.WriteLine and output some text. If you place your mouse pointer over the word Console , you'll notice that it is a class defined in the System namespace. Thus, you have just accessed a class defined in another namespace.
I get the feeling, however, that this is not the question that you meant to ask. You may wish to try rephrasing so that your intended question is a bit more clear.
Hope that helps.
--Jesse "... the internet's just a big porn library with some useful articles stuck in." - Rob Rodi
|
|
|
|
|
The below unhandled Exception occur at application level, when 1000 records added in datatable which is bound to DatagridView and when click on scrollbar of Datagridview (The 1000 rows was added through code using while loop)
How can I handle or resolve the same.
System.ArgumentException occured
Message="InvalidArgument=Value of '5448' is not valid for 'rowIndex'."
Source="System.Windows.Forms"
StackTrace:
at System.Windows.Forms.DataGridViewRow.GetStte(Int32 rowIndex)
at System.Windows.Forms.DataGridViewRowCollection.GetRowState(Int32 rowIndex)
at System.Windows.Forms.DataGridView.ComputeHeightOfFittingTrailingScrollingRows(Int32 totalVisibleFrozenHeight)
at System.Windows.Forms.DataGridView.set_VerticalOffset(Int32 value)
at System.Windows.Forms.DataGridView.DataGridViewVScrolled(Object sender, ScrollEventArgs se)
at System.Windows.Forms.ScriollBar.OnScroll(ScrollEventArgs se)
at ....................
|
|
|
|
|
Hi. I need to convert Word documents into image files using .NET, Jpeg, Gif, Bmp anything is fine. I searched through articles and message boards but couldn't find anything about this. There're word2image command line utilities but they're not free and I'd like to find any .NET and/or free solutions. Any ideas about how to do this?
Thanks.
|
|
|
|
|
There's nothing built in, your best bet is probably to control word to open the file and do a screen capture.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
You could always use something like Ghostscript to print to an image printer. There is an example here[^].
|
|
|
|
|
Could someone pse tell me how I may pass the following between forms:
I have a form with about 50 buttons and each opens a new form displaying a jpg picture (imported into Resources) in a PictureBox. When I close the form I'm back on the original form with the many buttons. It works pretty well but I think having just one extra form is more elegant - and less work!
I need to pass Image data like MyProject.Properties.Resources._142 (the pic is 142.jpg) to the form and then open it. Somewhere I saw that one can use Form dispForm = new dispForm(yProject.Properties.Resources._142) but the method does not accept a parameter.
I'm starting to like this language
Many thanks for any help.
Hannes
|
|
|
|
|
hbez wrote: Could someone pse tell me how I may pass the following between forms:
I have a form with about 50 buttons and each opens a new form displaying a jpg picture (imported into Resources) in a PictureBox. When I close the form I'm back on the original form with the many buttons. It works pretty well but I think having just one extra form is more elegant - and less work!
I need to pass Image data like MyProject.Properties.Resources._142 (the pic is 142.jpg) to the form and then open it. Somewhere I saw that one can use Form dispForm = new dispForm(yProject.Properties.Resources._142) but the method does not accept a parameter.
You can change the constructor in the form to accept the parameter. By default it's created without one, but there's no requirement that you have to leave it that way.
Alternatively, you could expose a property on the form that accepted the appropriate value and set it before calling Show().
|
|
|
|
|
hbez wrote: but the method does not accept a parameter.
You need to write the method that takes the parameter.
Or you can create the image as a property that is lazy initialised on a static class, making it load the first time it's accessed, and accessible from your entire project.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
How to form regexp for ommiting hidden folders? I tried something like this:
^[A-Za-z]*
or
^\w*
but this doesn`t seem to work.
Thanks for help
|
|
|
|
|
Yoyosch wrote: How to form regexp for ommiting hidden folders?
That question makes no sense at all. What does a regex have to do with hidden folders ?
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Yoyosch wrote: How to form regexp for ommiting hidden folders? I tried something like this:
^[A-Za-z]*
or
^\w*
What on earth is this? You don't string test to see if a folder is hidden or not?
|
|
|
|
|
No, WE don't do that. Apparently, HE does.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Suppose I don`t want any folders that have names started with dot "."
|
|
|
|
|
You don't need a regex for this. A simple test to exclude strings that StartWith('.') should do the job.
|
|
|
|
|
So how does the folder name starting with a "." make the folder "hidden"??
You might want to spell stuff like this out the next time you ask a question.
|
|
|
|
|
I remember it usually does on UN*X, although my UNIX days are long gone...
Regards,
mav
--
Black holes are the places where God divided by 0...
|
|
|
|
|
Yeah, I've since found out that you can't even name a folder starting with a period. An extension is optional, but not the filename.
|
|
|
|
|
Hi
Is there a way to turn off the edit functionality in excel when the user selects the export to excel funtionality from the report viewer?
Please let me know.
Thanks
J9
|
|
|
|
|
Hi coders.
At runtime i add textboxes and labels to the form. I want all selectable and can be aligned by user at runtime as .net UI does.
Any experience,source or idea???
|
|
|
|
|
You need to write code that captures mouse events, moves the controls and stores their position for next time.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi
You can use drag and drop facility to thus
|
|
|
|
|
Hi,
Can i somehow detect (and obtain handle to) windows dynamicaly created from withing a window? (by calling (new Form()).Show())
It must be done from the outside, knowing only the handle to the main window.
Thanks
|
|
|
|
|
Hi All,
I have a scenario where i need to print a large windows form design in the runtime with all the values entered in it by the user. I searched for many articles, where they have given way to print the screenshot of the form. In my case as the Form size is bigger i cant get the entire form in one screenshot.
Is there any way to acheive this ??
Thanks in advance
Cheers
Mani.
|
|
|
|
|
I have a windows application which uses webservice. So when a web reference is added, VS will add the webservice URL in the app.config file. Is there anyway to overcome this behavior ? Problem here is, when the application is deployed, users can open the configuration file and take the webservice URL. My webservice is secure and users can't make any harm to that, but I am just wondering any method available to change this URL storage location. Any ideas ?
|
|
|
|