|
MyForm.FormBorderStyle=FormBorderStyle.FixedSingle;
MyForm.FormBorderStyle=FormBorderStyle.Fixed3D;
MyForm.FormBorderStyle=FormBorderStyle.FixedDialog;
Jerzy
|
|
|
|
|
Thanks,I don't know why I didn't see that property.
Mazy
"So,so you think you can tell,
Heaven from Hell,
Blue skies from pain,...
How I wish,how I wish you were here." Wish You Were Here-Pink Floyd-1975
|
|
|
|
|
when i choose project-new-c#-windows-app i only get one form and the corresponding class.
but when you look at the c#-scribble example in the msdn-lib, and especially the readme.txt-file there, you see that some wizzard created a "mainframe"- a "doc"- and a "view"-class. like in good old mfc-times
so where is that wizzard? does anyone know? of course i could just take the scribble-code and change it to fit my needs, but i want to know the ide i'm working with. so where is that thing hiding?
i'm working with vs.net
thx in advance
:wq
|
|
|
|
|
Sorry Rupel,C# does not have Doc/View artichecture up to now.
Mazy
"So,so you think you can tell,
Heaven from Hell,
Blue skies from pain,...
How I wish,how I wish you were here." Wish You Were Here-Pink Floyd-1975
|
|
|
|
|
so these redmontonians build there examples with some next version we get in 6 months? shame on them!
:wq
|
|
|
|
|
I overheard somewhere, sometimes, some people actually write code themselves...
|
|
|
|
|
sure? really?
what do you think i did that day? go and cry? i did code the thing myself - but if there is already a wheel invented, you don't have to do it again and again... right?
:wq
|
|
|
|
|
There isnt any doc/view implementation in the framework.
But chris sells is developing something new, check out his page
genghis
hope this helps.
cheers
Kannan
|
|
|
|
|
Hi,
How would i go about making an external application, disappear from the task bar in windows?
If anyone can help me with some code sample or maybe a pointer i would appreciate it.
|
|
|
|
|
app_form_name.ShowInTaskbar = false;
|
|
|
|
|
how i can make it when a user click on one checked box in the listview that
the other checked boxes are unvisible?
thx
Pawel
|
|
|
|
|
Is there any way to create a TabControl that look better than the default control in VS.Net.
As an example, I'd love to be able to use an image as the actual tab, wich could give me the flexibility to create any color, shape and form on the tabs....
Please, if you have any tips on how to do this, let me know....
|
|
|
|
|
check out these guys. http://www.dotnetmagic.com/TabControl.html . just re-write what you want... its a bit of work to factor out the other two parts of their library, but its worth it. solid code... light documentation.
|
|
|
|
|
hi!
I have a problem:
here I read the data from the ArrayList into the ListView
with a checkBox (displayCarListView.CheckBoxes = true;
)public void ShowCar(ListView objectDisplayCarListView){ListView displayCarListView;displayCarListView = objectDisplayCarListView;foreach (Car car in carArrayList){MessageBox.Show(Convert.ToString(carArrayList.IndexOf(car)));int carIndex = carArrayList.IndexOf(car);ListViewItem newItem = newListViewItem(((Car)carArrayList[carIndex]).Manufacturer);newItem.SubItems.Add(((Car)carArrayList[carIndex]).Model );displayCarListView.Items.Add(newItem);}}
now I would take this data that was checked in the ListView and put it in
an other GUI with TextBoxes
(it should the index of the car in the ArrayList must transfer also to the
other GUI (but I don´t really know how! ))
I try it so: (but without the index....thats work 100% .... but I need the
Index of the car...)
public void ChangeCar(ListView objectDisplayCarListView){ListView displayCarListView;displayCarListView = objectDisplayCarListView;Car currentCar = new Car();if (displayCarListView.CheckedItems[0].Checked){ChangeCarNow currentChangeCarNow = new ChangeCarNow(this);currentChangeCarNow.manufactoreTextBox.Text =displayCarListView.CheckedItems[0].Text;currentChangeCarNow.modelTextBox.Text =displayCarListView.CheckedItems[0].SubItems[1].Text;//here the other GUI is show......with the datacurrentChangeCarNow.Show();}}
in the GUI currentChangeCarNow(ChangeCarNow) it should be change the data of the car.
the changes data of the car I must put back exactly in the same place
where I take it out.
that's why I need the index of the car
have someone an idea how i can do this?
big thx!!
Pawel
|
|
|
|
|
I have written a C# windows application. However, when the program is running, and I want to shut down windows, every program closes except my C# program; and windows does not shut down. It just waits. When I close my program manually, windows shuts down without a problem. The cause is that I have overriden the Closing event of the main form like this:
private void WindowsCloserForm_Closing(object sender, System.ComponentModel.CancelEventArgs e)
{
e.Cancel = true;
OpenDialog(false);
}
I wanted this behaviour however: closing the form should not end the program, but just hide it. (Via an icon in the system tray you can close the program)
If I do not override the Closing event, this problem does not occur. Can this be a bug in the framework, or am I forgetting something?
Thanks!
|
|
|
|
|
Windows is just doing what you asked it to
You need to override the WndProc of the form and catch the WM_QUIT message, one of the parameters tells you what is telling the form to close; if its the user then you should continue as you do; otherwise let the program shutdown. Look up in MSDN what the values you need for WM_QUIT and what lParam and wParam are.
Almost had me stumped on this one, then I remembered I tried doing the same in an MFC program and that was what I had to do
James
Sonork ID: 100.11138 - Hasaki
"Smile your little smile, take some tea with me awhile.
And every day we'll turn another page.
Behind our glass we'll sit and look at our ever-open book,
One brown mouse sitting in a cage."
"One Brown Mouse" from Heavy Horses, Jethro Tull 1978
|
|
|
|
|
I hate it when I find things they have changed. VB used to have a nice event called QueryUnload, that told you why the form was closing (your code, user pressed X, windows shutting down etc.) and allowed to decide what to do.
Why does Microsoft insist on doing things? Changing the way it works I dont mind, but removing functionality altogether? Makes me angry sometimes.
</rant>
--
David Wengier
Sonork ID: 100.14177 - Ch00k
|
|
|
|
|
I use this code to create DataGrid at runtime but when I call this function nothing appeare on the form.
DataGrid filtergrid=new DataGrid();
filtergrid.Top=300;
filtergrid.Height=100;
filtergrid.Width=280;
filtergrid.Left=0;
filtergrid.HeaderForeColor = System.Drawing.SystemColors.ControlText;
filtergrid.Visible=true;
filtergrid.Show();
filtergrid.DataSource= myDataView.Table;
What I miss here?
Mazy
"So,so you think you can tell,
Heaven from Hell,
Blue skies from pain,...
How I wish,how I wish you were here." Wish You Were Here-Pink Floyd-1975
|
|
|
|
|
You need to add the control to its parent's Controls collection.
In WinForms and ASP.NET this.Controls.Add( filtergrid ); assuming this is the form or page class that the grid will be added to.
James
Sonork ID: 100.11138 - Hasaki
"Smile your little smile, take some tea with me awhile.
And every day we'll turn another page.
Behind our glass we'll sit and look at our ever-open book,
One brown mouse sitting in a cage."
"One Brown Mouse" from Heavy Horses, Jethro Tull 1978
|
|
|
|
|
I need to use ActiveX Document in my application. But I want to use C#. Can I do that?
Thank in advance.
8-)
|
|
|
|
|
Yes, you should be able to.
I assume an ActiveX Document is just a COM object with some standard interfaces implemented.
You can use COM interop to expose your C# class as a COM object, however clients will need the .NET framework installed in order to use your "COM" object.
James
Sonork ID: 100.11138 - Hasaki
"Smile your little smile, take some tea with me awhile.
And every day we'll turn another page.
Behind our glass we'll sit and look at our ever-open book,
One brown mouse sitting in a cage."
"One Brown Mouse" from Heavy Horses, Jethro Tull 1978
|
|
|
|
|
Hi,
why does this code produce a rectangle 6x6 (seen by zooming on a screen capture) ?
Pen pen = new Pen(Color.FromArgb(255,0,0),1);
pen.Alignment = PenAlignment.Inset; // Same with center
graphics.DrawRectangle(pen,10,10,5,5);
It gives :
******
*====*
*====*
*====*
*====*
******
(* means a red pixel, = means a background pixel)
If I give a width of 2, then the red rectangle is correctly drawn in a 5x5 pixels rectangle.
Thanks
Nicolas
|
|
|
|
|
Charles Petzold pointed this out in his Programming Microsoft Windows with C# book so I assume it is a known issue.
I don't think anything will be done about it though because to change it would break a lot of code at the source level (side by side versioning protects already built binaries but alas, it doesn't protect source level breaking).
I'm not sure why a pen with width of 2 would change that, unless the alignment is what is causing it.
BTW if you want a red pen of width 1 you could just use Pen pen = Pens.Red;
James
Sonork ID: 100.11138 - Hasaki
"Smile your little smile, take some tea with me awhile.
And every day we'll turn another page.
Behind our glass we'll sit and look at our ever-open book,
One brown mouse sitting in a cage."
"One Brown Mouse" from Heavy Horses, Jethro Tull 1978
|
|
|
|
|
Thanks a lot for the useful information.
I find incredible that such a bug exists and it won't be corrected.
Nicolas
|
|
|
|
|
I want to type cast the text in text box to integer?
Another guestion is that how to set text box tht the user can only type numbers
into it?
Mazy
"So,so you think you can tell,
Heaven from Hell,
Blue skies from pain,...
How I wish,how I wish you were here." Wish You Were Here-Pink Floyd-1975
|
|
|
|