|
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...
|
|
|
|
|
hi folks.i fetched the data from the database and bind it to the datagridview.what i want now is when i hit button i have to capture the coresponding row value seperately in a datagridview.how to get? for ex,datagridview has 5 rows and 5 column means when i hit the button, i should get the 5 row values seperately.iam in the urgent need of it.how to do this.am new to the winforms.am waiing for ur reply.
|
|
|
|
|
hi.. i neeed u r help.. i m working on windows application ..i have 1 listbox ..so i want to bind data from database ..so wht 2 do now???
send me code..
thanks 2 all..
|
|
|
|
|
|
sir, how come an empty System::Windows::Forms::Form would need about 10MB memory when launched and then checking it out on task manager/processes?
i somehow find it inefficient? or maybe im just clueless...
now im making a simple app and it easily reached 45MB...
if i strip down all form resources it went down to 35MB...
so i wonder, what if, just the basic form? huh, like shocked 10MB...
kore wa 'normal' deshoo?
Chris Antonio
|
|
|
|
|
This is becase you don't understand who memory allocation works under the .NET Framework. YOu're looking in Task Manager for the size of your application (not your form!) Task Manager is showing you the memory reserved by the .NET runtime (called the Managed Heap), NOT how much memory your application is actually using. When you app gets around to allocating memory for objects, the allocation is made from the Managed Heap where it happens very quickly. If the Managed Heap runs dry (not very likely), the CLR has to go to Windows to get more memory for the Managed Heap, which takes more time.
If Windows start to run low on memory, it can go back to the .NET CLR and ask for memory to be returned, which the runtime will happily do if it's not being used.
If you want to see how much memory your app is actually using, use the Performance Monitor and the .NET CLR memory counters, not Task Manager.
|
|
|
|
|
i find a program as program PAIN in Window.if you have ,please share for me
leo
|
|
|
|
|
Not only does your post make no sense to me, it makes me want to mock you repeatedly.
|
|
|
|
|
he is in pain. or he needs more pain.
Google must know where the help is.
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
|
|
|
|
|
I think I need to add something to the forum guidelines that states that if posts don't make sense, or are generally inane then I will unleash the hounds of mockery. It's like a rockery only with humour.
|
|
|
|
|
Pete O`Hanlon wrote: It's like a rockery only with humour
I feel a shrubbery question coming up now, and again I ran out.
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
|
|
|
|
|
Oh come on, his post made perfect sense!
Obviously, he opened his window and found that the pane had been programmed-- Err... Wait...
Ok, so he's writing a program to cause pain in windows-- Err, isn't that redundant? Let me try again...
He found a program that runs in a window and can experience pain-- Ahhh, Skynet! Run!
Ok, I give up.
|
|
|
|
|
Ian Shlasko wrote: his post made perfect sense!
unlike some
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
|
|
|
|