|
Simply set the FormBorderStyle property of your Form to a value of your liking.
Regards,
mav
|
|
|
|
|
|
Hi,
Thank you. Set the FormBorderStyle property to FixedSingle or Fixed3D and set MaximizeBox property to False.
Hope this will help you.
Regards
SGS
|
|
|
|
|
|
How to not allow user to resize my user control at design-time ? or allow only a particular dimension ? For example, the Textbox control. It allows only resize the control's width if and only if multiline is false; but both dimension if and only if multiline is true.
Thank you
|
|
|
|
|
put this attribute on the property which is used for size:
[Browsable(false)]
-spif2001
|
|
|
|
|
Also check this article out - it will help u out .
http://www.devhood.com/tutorials/tutorial_details.aspx?tutorial_id=319
-spif2001
|
|
|
|
|
Dear spif2001
I mean the user resize my user control at form designer, not from the propertygrid.
|
|
|
|
|
try this:
Size s;
public AButton()//derived from System.windows.forms.button
{
InitializeComponent();
s = base.Size;
}//constructor
protected override void OnSizeChanged(EventArgs e)
{
base.OnSizeChanged (e);
base.Size = s;
}
-spif2001
|
|
|
|
|
The ControlStyles[^] enumeration has some elements to specify fixed width or height.
You usually set these control styles in the constructor of your control using SetStyle() .
Furthermore, the actual sizing of the control can be influenced by overwriting Control.SetBoundsCore[^].
I think there are a few examples on MSDN for this, but the links above should get you started.
Regards,
mav
|
|
|
|
|
Even this method is not elegant as i expect, but yeah it works as i expect. Thank a lot. ^^
|
|
|
|
|
It is possible to do this from within a window.forms app, display some kind or message, and then cancel the action?
I need to prevent the user from inadvertly shutting down/logging off unless they are sure they wish to stop my app from running.
Thanks in advance.
|
|
|
|
|
Take a look at the Microsoft.Win32.SystemEvents class.
It has events for this.
Regards,
mav
|
|
|
|
|
That looks like the baby!
Many thanks
|
|
|
|
|
hi
I'm a Korean student.
I'm studing C# and image processing.
I am reading a book, the book's name is GDI+ Programming wrote by you.
I'm studnig 16bit RAW image file.
But I did'nt display on screen.
How can i do?
please help and detail information.
-----my programming source is here -----
FileStream fs = File.Open(strFileName, FileMode.Open, FileAccess.ReadWrite, FileShare.ReadWrite);
BufferedStream buf = new BufferedStream (fs);
BinaryReader r = new BinaryReader(buf);
Bitmap bitmaps = new Bitmap (_Define._ImageWidth, _Define._ImageHeight, PixelFormat.Format16bppGrayScale);// .Format48bppRgb);
BitmapData bmData = bitmaps.LockBits (new Rectangle(0, 0, _Define._ImageWidth, _Define._ImageHeight), ImageLockMode.ReadWrite, PixelFormat.Format16bppGrayScale);
bitmaps.UnlockBits (bmData);
UInt16 *p = (UInt16 *)(void *)bmData.Scan0.ToPointer();
UInt16 swap;
int nTotal = _Define._ImageHeight*_Define._ImageWidth;
byte [] data = new byte [nTotal];
try
{
int nPer = nTotal / 10;
int nCnt = 0;
for(int y = 0; y < nTotal; y++) // 원본을 로드하기위한 For문...
{
if (y%nPer == 0) {
pLoading._Percent = nCnt;
nCnt += 10;
pLoading.Refresh ();
}
swap = (UInt16)(r.ReadInt16 ());
*(p) = swap;
p++;
}
}
catch(Exception fo)
{
MessageBox.Show(fo.ToString());
}
// m_pPanel is View
MDProcess.ImageObject pImage = new ImageObject (m_pPanel);
pImage._ImageName= strFileName;
pImage._rcBound = InitImagePT (iFiles);
pLoading._Percent = 100;
pLoading.Refresh ();
m_alImageList.Add (pImage);
pLoading._Counter = i;
pLoading._Total = alFiles.Count;
pLoading.Refresh ();
bitmaps.Dispose ();
fs.Flush ();
buf.Close ();
fs .Close ();
r.Close ();
|
|
|
|
|
Hi everyone
In the .NET Compact Framework (C#) I have created a TCP server socket using BeginAccept. After the connection is established (EndAccept) I use BeginReceive for asynchronous data receive. When the program exits the socket will be closed, but the thread: System.Net.OSSOCK.recv is hanging and the program after the exit still exists and is locked.
How can I terminate the asynchronous reading before closing the socket?
Thank you for any help.
Joerg
|
|
|
|
|
Hi all
I have a custom usercontrol in my window form "frmsett.cs" .
"initializecomponents" of "frmsett.cs" initialises usercontrol
This usercontrol is derived from a base component class.
Usercontrol populates printer informations.
we populate default printer related informations to usercontrol through Pinfo() method (a function in base component class )
Pinfo() invokes getinfo()(another function in base component class ) using methodinvoker and asynccallback
My "basecomponent" class definition starts with
[ClassInterface(ClassInterfaceType.None), ComVisible(false)]
when i call frmsett.showdialog() Applcation is developed and works perfectly in .NET framework 1.1
Then I installed .NET framework 1.1 SP1
Here the problem begins. When application executes ShowDialog(Only at first call) It hangs for some minutes (5-15 mins) before showing the dialog "frmsett" . If we clicked second time it will display the screen immedialtely.
Anyone come across this type of issues???
Is there any problems asynccallback with methodinvoker in .NET fx1.1 SP1
What is the reason for this problem in .NET fx1.1 SP1???
Thanks a lot for any tips !!!!
Regards
Krishnan
If u can Dream... U can do it
|
|
|
|
|
Hi
This is mratyunjaya.I am working on a project,of which one
module is photo gallery.I am looking for source code of this module.Can anyone help me,required source code in
C#.net or asp.net.
U have already seen this functionality in yahoo photo album
or others photo galleries projects.
Regards
Mratyunjaya
|
|
|
|
|
Good! You've heard of Yahoo!
Now trying typing this in the "Search the web:" box:
photo album gallery source code c#
Happy hunting!
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi,
How to have the SetItemData and GetItemData property like in MFC listview in
C# Listview ???
Any help will be appreciated.
Saleem
|
|
|
|
|
Check the ListViewItem.Tag property. You can store anything in there, be it an int or a reference to a big object.
If you want to store more than one object, make a little class with public methods for each object, and then store a reference to that object in the Tag property of each item.
-- LuisR
Luis Alonso Ramos
Intelectix - Chihuahua, Mexico
Not much here: My CP Blog!
|
|
|
|
|
In C#, how to change/increase the size for a byte array buffer to be sent over a tcp stream?
on the server side, i have something like this:
while(i != 100)<br />
{<br />
streamWriter.writeline("data");<br />
}
Now, on the client side, i saved every data sent to me. However, only half or so of the data is being sent, the last line in my data.txt file says "unable to read data from the transport connection". And i think it has something to do with the buffer size. So i need to increase it...
THanks for the help.
|
|
|
|
|
hi,
what is the API or classes in c# which used to create a new folder ???
Thanks
|
|
|
|
|
Hi best_students,
We can use Directory class which is avaliabe in System.IO namespace for creating new folder. This class provide static methods for doing this.
string path =@"C:\Training\Test";
if(Directory.Exists(path))
{
}
else
{
DirectoryInfo drinfo = Directory.CreateDirectory(path);
}
Guess this will help you.
Thanks
SGS
|
|
|
|
|