|
Thanks
|
|
|
|
|
There is a built-in FileNameEditor which you can use as well.
<br />
[EditorAttribute(typeof(System.Windows.Forms.Design.FileNameEditor), typeof(System.Drawing.Design.UITypeEditor))]<br />
public string FileName<br />
{<br />
get<br />
{<br />
return _FileName;<br />
}<br />
set<br />
{<br />
_FileName = value;<br />
}<br />
}<br />
|
|
|
|
|
Hey guys,
I have a Form1 with a text box in it. When user clicks inside the text box it will pop up Form2 which has a MonthCalendar in it.
Now after the user selects a date and click OK on Form2, i want that selected date string to be displayed in the Form1 text box.
How can i get the Form2 date string to be displayed in Form1 text box?
Thanks in advance.
|
|
|
|
|
The way I do it :
On Form1 I listen for the Form2.FormClosed event like this
Form2 myForm2;
private void textBox1_TextChanged(object sender, EventArgs e)
{
myForm2 = new Form2();
myForm2.FormClosed += new FormClosedEventHandler(myForm2_FormClosed);
myForm2.Show();
}
Then when the event happens :
void myForm2_FormClosed(object sender, FormClosedEventArgs e)
{
this.TextBox1.Text = myForm2.TheDate;
}
On Form2 you need to have a Public property TheDate which you set when they click on your calendar
OnOkClick you just close the form.
hope that makes sense.
|
|
|
|
|
|
Hello Experts,
an application creates an instance of Form1 on startup. During Form1_Load(), an instance of Form2 is created and shown:
private void Form1_Load(object sender, EventArgs e)
{
Form2 form2 = new Form2();
DialogResult dialogResult = form2.ShowDialog(this);
if (dialogResult == DialogResult.Cancel)
{
this.Close();
return;
}
} While user sits in front of his notebook and thinks about pressing "OK" or "Cancel" (both are buttons on form2), there is no icon for Form1 in the taskbar. Neither is there for Form2.
I suppose that Form1's icon is not there because Form1 initialization is not complete at the time form2 is displayed. And Form2 doesn't show an icon since it's modal and leaves taskbar icons to parent. Right?
I'd like to have one icon in the taskbar. Two would be acceptable. How could I achive this?
Ciao,
luker
|
|
|
|
|
All you should need to do is set the ShowInTaskbar property to true in the second form.
|
|
|
|
|
Now this one is weird:
I tried changing ShowInTaskbar without any hope it could help because I had already tried that yesterday in the evening. But I had tried to set it from the calling class. This time I set it in Form2's constructor after InitializeComponent . No luck.
Then I suspected it could relate to Form2 being set to FormBorderStyle = None (Forgot to mention that in the original post, sorry). I tried Sizeable and FixedToolWindow and both lead to the desired result: Icon was present in the taskbar.
But Form2 needs to look exactly like FormBorderStyle = None . So I changed that back and (you're sensing that already, aren't you?) it still works.
What am I supposed to learn herefrom? "If something doesn't work, change a property that could be related to the problem but rather shouldn't get changed. Change it back and hope that it does work now"?
Ciao,
luker
|
|
|
|
|
ShowInTaskbar actually causes the window handle to be recreated, so it has some non-intuitive behaviour. I didn't have any problems with doing in on a FormBorderStyle:None form, but I did have problems trying to change it on a form that was already showing.
|
|
|
|
|
Hi all,
I want to create a setup of my project,i have created on setup and deployment application in which i have included my project and some merge module files.
Setup is build successfully but after running the set up i am getting an error as "The installer has encountered an unexpected error installing this package.This may indicate a problem with this package.The error code is 2705.".
Please any one can u provide me a solution for it.
Thanks in advance.
|
|
|
|
|
sarang_k wrote: Please any one can u provide me a solution for it.
Only you can provide the solution. It's your code, and your setup, so we can't see what's going on there. What I can do though, is tell you how to find out where the problem is.
Instead of launching your MSI from the icon, launch a command shell (cmd.exe) and navigate to the directory containing your MSI. Now type in the following (replacing myinstaller.msi with the name of your msi):
msiexec /i myinstaller.msi /l*v installer_output.txt Once the installer fails, read through the installer output.
|
|
|
|
|
Hello Everybody,
I have some query regarding to find out the location from google map or Images. So I want some help from your site.
Q1 : How to get the Road Area From an Image?
Q2 : Is this any Component to Import the data from AutoCad File and Export to AutoCad File.
Q3 : Is this any component for Window Based Control for Get the control from ArcGis.
Q4 : How Can i convert the Road to Line Form?
Your suggestions and help is required.
Thanks
If you can think then I Can.
|
|
|
|
|
Before anybody could offer any help, you might want to explain what you are trying to achieve so we can offer you some alternatives. There are no easy ways to extract roads from images because roads are not 2 dimensional items - they are represented internally as having X, Y and Z axes.
As far as the conversion of AutoCAD data, you need to specify what you are trying to convert it into/from. If it's a well known type, it might be supported by OGR which has a .NET version here[^].
|
|
|
|
|
Based on the assumption that you do GIS project.
Q1: normally, the road name for GIS project does not from image, it is from vector map data, the map data format could be shape file (.shp) or some other format. If you really want to get the road name from image, you need do image processing.
Q3: ArcGIS has a development SDK and you can uses in windows application, it supports C++, C# and so on. You can check on ESRI website.
Q4: If you have map data and in vector format, you don't need convert to line and you just read from the file. If you want to exact the road from a image, then again, you have to use image processing.
Hope it help.
From Athena Solution (www.athena-solution.com)
|
|
|
|
|
So Today I was going trough some old projects of mine and found a project i tried to make a couple of years ago. It's a client for any flash game on the web. But the problem I have with it is that i never was able to find out how to record something that happend in the form. I am asking your help because I really want to finish this project so that I can make movies of some of the flash games I play and I dont feel like use camtasia or something.
I am not asking for you guys to write my code but some help in the right direction may be helpful
Kind regards
Yves Cambré
|
|
|
|
|
|
Yes I searched google before and the only things you find there are to take screenshots of your screen I have implemented a screenshot tool in the verry beginning already
But i cant seem to find anything to make it record a movie of the form.
And thanks for the reply btw
|
|
|
|
|
|
I will explore it the moment I get home from work
|
|
|
|
|
Good hope it will help you, otherwise I guess exists libraries which you can use to accomplish your task.
I Love T-SQL
"Don't torture yourself,let the life to do it for you."
If my post helps you kindly save my time by voting my post.
www.cacttus.com
|
|
|
|
|
It didn't work out for me
It doesn't seem to work for windows 7 vs 2010 ultimate
|
|
|
|
|
Maybe try to work with Microsoft Expression Encoder Screen Capture
|
|
|
|
|
I checked it out and the free version has a 10minute recording limite + I don't know if can embed it in my program
The best thing should be a library i could call to
Because i would like to write the recorder myself
|
|
|
|
|
You can try camstudio, it is a screen capture software. If the frame/sec is not fast enough, I remember Microsoft has a SDK (Direct show or ?) for this screen capture.
from Athena Solution (www.athena-solution.com)
|
|
|
|
|
If you're using XP, I think Windows Media Encoder may be an option.
I believe that it can be automated.
Not supported under Windows 7 though...
replace by Expression Encoder which doesn't seem to be free.
|
|
|
|