|
Set CauseValidation property of the "Close" Button to False
Tirtha
Miles to go before I sleep
|
|
|
|
|
Hello ,
I have three forms FOrm1 , Form2, Form3 , i want to be able to go back to previous forms from current form .
I have called Form1 using Form1->show(); method from Form2, i get error messages stating form1 is an undeclared identifier. If i try to include form1 on form2 , i get series of errors .
I'm using the VC++ 2005 can someone help with this?
de
|
|
|
|
|
Hi,
If you are referring to Windows Forms, you have to create an object of the form before calling it.
Example: Create an object of Form1 in Form2 and call objForm1.Show();
But you will get a new instance of that form. If you want to go back and forth like in a web browser, you got to use usercontrols. Just use one form, and load the other forms inside this form. For this you need to have a master form and make usercontrols for other forms. There is a UserControl Class available in .NET controls, you can find it when you try to add a new component from with in a Project.
Regards,
Blumen
|
|
|
|
|
I want to trigger a behavior for which a third party component provides a keyboard shortcut. The user can trigger this behavior with CTRL+SHIFT+V, but I want to do it automatically in certain circumstances.
Any ideas?
|
|
|
|
|
I am not sure it is a great idea, but you can do keystrokes with the SendKeys. I think a better solution would be when you want to call the same method if you can see the event that is getting called I would try to call it. Or if there is a button that can be clicked you can always do button.PerformClick()
Hope that helps.
Ben
|
|
|
|
|
I’m working in a big MFC application. I now have Several Forms to add into this application. The original developer says there is no reason to stick with MFC. So I need to convert this MFC application. I’m looking for websites and/or books on converting. Both the old and new application will need to be written in C++.
Any advice would help.
Thanks
Programmer
Glenn Earl Graham
Austin, TX
|
|
|
|
|
earlgraham wrote: new application will need to be written in C++
How come?
|
|
|
|
|
Hello
how can drag a row from a datagrid and drop it into a panel
plz help me
regards
etretyertyery
|
|
|
|
|
I've never had a need to write code like that but you can probably do it this way:
Set your panel's AllowDrop property to True
Trap the OnDrop event for the panel and inside the handler check the SelectedRows property of the datagrid.
You would then use that property to display the data any way you chose.
Again, I don't know if that example alone will do it bit it will be very close.
You might even do a google search on DragDrop operations.
|
|
|
|
|
I want one datagrid with checkbox column. I use Windows Forms C# .net 2003.
Then i want 3 columns from one data table and one checkbox column extra.
Plz help me.
|
|
|
|
|
go to devexpress site and download the xtragrid component
in this u can have a powerfull grid with checkbox and others
etretyertyery
|
|
|
|
|
Why not use the built-on DataGrid?
|
|
|
|
|
Hi,
You can add checkbox to a DataGrid.
Please refer this article:
http://www.codeproject.com/aspnet/datagridcheckbox.asp
Blumen
|
|
|
|
|
I'm working on a game API which uses potentially transparent controls for basic layering effects (I don't want anything too fancy just yet). My first problem was enabling transparency, but that was easily solved using SetStyle(). Unfortunately, when I then tried placing a transparent layer over another layer, it shows the form's background color (here, black) through the transparency, instead of the layer beneath.
I was finally able to get the proper effect by making the top-layer control a child of the bottom-layer control, but doing it that way makes some other effects nigh impossible. Is there a way to get transparent controls to display the other controls beneath them? Any help is appreciated.
A little learning is a dangerous thing;
Drink deep, or taste not, the Pierian Spring.
—Alexander Pope
|
|
|
|
|
I would advise you to create you own class for layered effects. Its not as hard as it sounds! My method for creating your app would be to draw all my layers from my custom classes.
|
|
|
|
|
CompMan44 wrote: Unfortunately, when I then tried placing a transparent layer over another layer, it shows the form's background color (here, black) through the transparency, instead of the layer beneath.
This is exactly what it's supposed to do. The color Transparent is anything but. Transparent tells the control's background properties to match those of the parent container. It does NOT make the control Transparent. As you've found out, control-over-control transparency doesn't work the way the term "Transparent" would lead you to believe.
The way around this is to not use controls to draw your graphics. Instead, you should be drawing your graphics to an off-screen buffer and "flip pages" between what's being drawn on and what the user sees, or use DirectX, where you'll have FAR more control over your graphics.
Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic 2006, 2007
|
|
|
|
|
Dave Kreskowiak wrote: Transparent tells the control's background properties to match those of the parent container. It does NOT make the control Transparent.
I was afraid of that. Actually, I'm using a custom OnPaint handler, so I guess FillRectangle() et al. is where that "feature" lies?
Thanks for your suggestions. I'd rather not get into DirectX just yet, but if that's what it takes....
P.S. Are there ANY functions (preferably GDI) that handle transparent and semi-transparent colors properly?
A little learning is a dangerous thing;
Drink deep, or taste not, the Pierian Spring.
—Alexander Pope
|
|
|
|
|
Since Windows Forms is based on GDI+, no, there isn't.
Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic 2006, 2007
|
|
|
|
|
hello every body
can anyone help me to get how to generate the a c# code from the rationalrose programm
and if it is necessary to have a special version or some requirement
regards
etretyertyery
|
|
|
|
|
Doesn't Rational have something like this built in?
"Any sort of work in VB6 is bound to provide several WTF moments." - Christian Graus
|
|
|
|
|
Hi,
I have a progress bar in my MDI application in the parent form and I want it to perform step when a condition that depends on a loop variable in the child form is satisfied. What is the simplist way to do that?
In my child form:
<br />
for (i =0 ; i<NUM ; i++)<br />
I have tried to check at regular intervals if the conditions is satisfied or not using a timer in the parent form:
if ( (child->i%1000) == 0 )<br />
this->progressbar->PerformStep();
the problem here is that the steps are all performed at once when the loop is finished!
any ideas?
thanks,
|
|
|
|
|
First, why not have the child form itself update the progress bar? Then you don't have to do all that polling.
Or if you must do polling, make sure to call Application.DoEvents() and Thread.Sleep() in your wait loop; not doing this is probably what causes the steps to "all [be] performed at once."
A little learning is a dangerous thing;
Drink deep, or taste not, the Pierian Spring.
—Alexander Pope
|
|
|
|
|
CompMan44 wrote: First, why not have the child form itself update the progress bar?
Because I don't know how to access a control (progress bar in my case) that is located on a parent form FROM a child one.
The progress bar must be in the parent form because the loop that I'm using is in the (onload event) of the child form.
So the whole idea of this progress bar is to indicate how long the child form will take to be completely load.
|
|
|
|
|
If I were you, I would investigate the BackgroundWorker class. There are many examples scattered over the net that show you how to use this with the progressbar to show progress.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Hi
You can used the Threading and Give the interval
|
|
|
|