|
You need to set the FormborderStyle to None and then create your own title bar from scratch. It's actually easy.. Just drop some labels, buttons, whatsoever at the top of your form. Or perhaps create a panel just for the title bar.
Kristian Sixhoej
"Failure is not an option" - Gene Kranz
|
|
|
|
|
Hi Kristian Sixhoej
Thanks for quick response
That thing was also in my mind but i was thininking that is there any method to overide it.
the prolem is this when i hv about 25 forms then it will be a tedious task what u think?
i want some wrriten method just written one time any copy paste to toher forms. Possibely by overriding paint method or ........ but i hv no idea yet about overriding paint method (i mean what can i do with it. Is the thing i m saying is possible with this or not)
waiting for ur reply.
|
|
|
|
|
As far as I know, it isn't possible to change the title bar programmatically (except from changing the text, but that could just be done via the Text property). The easiest and most comfortable way would propably be to do it in this way. But then you also have 100% control over what the title bar will get to look like.
EDIT: By the way, if you're experienced in doing user controls, you could make the title bar as a user control and just drag and drop it onto each form.
-- modified at 15:36 Friday 23rd November, 2007
Kristian Sixhoej
"Failure is not an option" - Gene Kranz
|
|
|
|
|
Hi Kristian Sixhoej
Is there any method when i click on a button labeled as "Minimize" the form get Minimized (and for maximize also) i have not found that in inteliSense Popup with this handle
|
|
|
|
|
|
For Maximize and Minimize, use
this.WindowState = System.Windows.Forms.FormWindowState.Maximized;
this.WindowState = System.Windows.Forms.FormWindowState.Minimized;
Becoming Programmer...
|
|
|
|
|
Hi,iam in windows application.
sales module.
iam billing the products which are taken by the customer..
that billing iam doing in datagrid control.
now my problem is :
i want give print in different format..(invoive print format)
please suggest what type of procedure can i follow.
if u have any sample code related to this project please
send me..
thanking you,
murali krishna
|
|
|
|
|
Hi,
I have a datagridview and print button when i click the print button the datagridview data has to come on that pdf page and then i want to print.
so if i have 10rows in datagridview means in 10pdf pages it has to print means 1row in 1pdf page.
kirankumar
|
|
|
|
|
|
Hi all,
I try to create a custom form: border size - none.
I need to resize(by mouse)this form.
Can you give me any hint?
Thanx.
davena
|
|
|
|
|
The answer is you can't resize it.Better you try with Other properties in thr FormBorder
Regards,
Nags
bgfhrtydgfdhfghhdf
|
|
|
|
|
Hi, Nags
thanks for your reply,
I found formborderstyle property, it sets none.
When formborderstyle-none is set, I am not able to resize this form.
Does it exist any property which can do that or I have to do in the code?
daavena
|
|
|
|
|
You can modify the Form's size by setting its Size property to a new Size instance.
If your Form does not show a border, there is no default way to graphically control its size.
Luc Pattyn [Forum Guidelines] [My Articles]
this months 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
|
|
|
|
|
Hi Luc,
thank you for replay,
I need form without title bar, and no minimize, close etc buttons. I can use(I think) only FormBorderStyle-none. There is no border.
Am I able to do it by of another component - StatusStrip.
I think, it must exist a way how to do that - for example QuickTime Player
Thanx.
daavena
|
|
|
|
|
As I said before, there are two distinct things:
1. you CAN move and resize a form programmatically by assigning a new value to the
corresponding property (new sizes have to agree with MinimumSize and MaximumSize)
2. you probably need a way to let the interactive GUI user command these actions;
with a regular form, he can drag the title bar, or drag one of the edges.
You can have one of the sizeable border styles with a minimal border by setting a lot of
bool properties false (MinimizeBox e.a.), and assigning an empty string as title.
That way the user can still drag the border to resize.
Without any border, you should provide something else to grab and drag, or otherwise command
it, your fantasy is the only real limit, but it won't correspond to the normal
Windows behavior and the "good GUI" guidelines. So you will end up setting a new
Form.Size value somewhere in a keyboard, mouse or button handler.
Luc Pattyn [Forum Guidelines] [My Articles]
this months 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
|
|
|
|
|
Hi Luc,
I use no borders form. I created a PictureBox as a resizing point and with mousemove, mouseup, mousedown events it works fine.
Thank you for help.
daavena
|
|
|
|
|
You're welcome.
Luc Pattyn [Forum Guidelines] [My Articles]
this months 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
|
|
|
|
|
Hi, I am learning managed c++ in visual c++ 2005 express, the code below will find files starting on letter x, my question is how can I copy them to some directory ex. C:\\XXX\\y ?. Thx
<br />
DirectoryInfo^ directory = gcnew DirectoryInfo("C:\\Documents and Settings");<br />
array<FileInfo^>^files=directory->GetFiles("x*.txt",<br />
System::IO::SearchOption::AllDirectories);<br />
for (System::Int16 i=0; i<files->Length; i++)<br />
textBox1->AppendText(files[i]->Name + "- " + files[i]->Length + System::Environment::NewLine);<br />
|
|
|
|
|
YOu might have better luck asking this in the (Managed) C++ forum.
|
|
|
|
|
can somebody tell me the interface between c# and a usb device.
for example the interface between c# and and serial port look like this:
AxMscom.inbuffer
Axmscom.outbuffer
.....
plz i need a help?????
10x regards
dghdfghdfghdfghdgh
|
|
|
|
|
Hi,
there is no software interface to the USB bus, as far as your app is concerned you should
talk to the device (possibly connected to the USB), using its driver. That's either a general-
purpose driver (like the one that makes USB sticks and cameras look like a disk), or
a specific one, that comes with your hardware (such as a USB-to-serial or a USB-to-Ethernet
cable, which need a driver).
The above holds true for all kinds of busses: memory bus, IDE, SCSI, ... You ignore the
bus, and address the device that interests you.
Luc Pattyn [Forum Guidelines] [My Articles]
this months 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
|
|
|
|
|
is it a c# class that allow me to work with that port and manage it???
dghdfghdfghdfghdgh
|
|
|
|
|
When I bought my USB-to-serial cable, it came with a CD-ROM containing a driver.
When I installed it, it turned the port into a regular serial port, I could even choose
the port name (anything, including COMn with n a decimal number), so it shows up
in all serial port enumerations, and all serial apps should be able to use it,
whether HyperTerminal or some .NET based app using SerialPort class.
The app never is aware the USB-based serial port is connected in a different manner, all
the nasty details are hidden by Windows and the device drivers.
Luc Pattyn [Forum Guidelines] [My Articles]
this months 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
|
|
|
|
|
h.this is windows basd app. i have a one column and n rows in that database say column name is student id,row values are 1,2,3,4 ................n like that.in my frontend there is one textbox and one button.what i want is, when i hit the button,the textbox show 1 and again hiting button,textbox has to show 2,again iam hitting buton textbox has to show 3 and so on.....until my row value becomes null.how to do this.plz help me......
|
|
|
|
|
this is a part of the coding you want:
int id = Convert.ToInt32(textbox.Text);
id++;
dataCommand.CommandText = "Select count(*) from <<tablename>> where [student id] = " + id;
byte check = dataCommand.ExecuteScalar()
if (check > 0)
{
textbox.Text = id.ToString();
}
hope it will help
Becoming Programmer...
|
|
|
|