|
This is very odd. I have never noticed this behaviour before.
I had thought that there might be a problem if SizeMode was set to AutoSize , because of some strange conflict between it and the Dock.Fill property.
But, as you say, it happens with SizeMode.Normal too. I even tried Dock.None with Anchor set to Top, Left, Bottom, Right , but it was exactly the same.
I am at a loss.
There are two Articles here on CP that (supposedly) have PictureBox functionality without actually using a PictureBox. In case they are of help in your situation, they are:
C# Scrollable Picturebox Custom Control[^]
and
A Zoomable and Scrollable PictureBox[^].
When people post here asking for advice on PictureBox problems, I usually tell them not to use a PictureBox, as it is an awful control. You have given me an extra bullet to use.
Between the PictureBox and ImageList, Microsoft don't seem to be very good with images, do they?
Sorry not to be able to offer more help.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Don't mind please. It's OK.
Anyway thank you very very much for your concern. I will surely check the controls you mentioned.
Thank you again.
|
|
|
|
|
I'm not sure that you are correct.
Simple Form, PictureBox.
public Form1()
{
InitializeComponent();
this.Form1_ResizeEnd(null, EventArgs.Empty);
}
private void Form1_ResizeEnd(object sender, EventArgs e)
{
this.Text = string.Format("Form1 [{0}, {1}] - {2}", this.pictureBox1.Width, this.pictureBox1.Height, this.pictureBox1.Dock);
}
Connect the ResizeEnd event of the Form to the handler above.
All now appears to be hunky-dory.
What do you think?
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
I've tried your example. I have one form and put one picture box inside. I've only set Dock property of the picture box to "Fill" and everything was working fine. Forget about showing picture box size, in the text property of the form. Set Dock = Fill, and just to see that it is resizing, set BackgroundColor of the picture box to some color and test it.
|
|
|
|
|
Yes, you are right; if you set the BackgroundColor and make the Form smaller, you notice no difference because there is only one solid color, BUT imagine a situation where you have a picture or something being displayed in the picture box, if you make the Form smaller and the picture box isn't resized accordingly, some parts of the image would not be visible.
|
|
|
|
|
Hey there,
if you change the form's or any controll's size to smaller, i guess it won't repaint, but there is a possibility to tell the form/controll to do so:
public ExampleForm()
{
this.SetStyle(ControlStyles.ControlStyles, true);
}
hope this helps!
hack the planet
|
|
|
|
|
Thanks, I will try that and let you know.
|
|
|
|
|
Hello,
How to show Message/Notification from windows service.
When i use MsgBox("Hi") it is throwing below error ->
Showing a modal dialog box or form when the application is not running in UserInteractive mode is not a valid operation. Specify the ServiceNotification or DefaultDesktopOnly style to display a notification from a service application.
Please Help.
Thanks,
Sh
|
|
|
|
|
Well the diagnostic information seems to have given you the answer. Showing a MessageBox, or any kind of Modal Dialog from a service is a bad idea as it means the service is stalled until someone answers the message. Most services are designed to post their messages to some form of log file unless they encounter a catastrophic error.
|
|
|
|
|
Thanks Richard,
I am developing custom MessageBox. When i call it from winservice it is thrwoing error. It says set servicenotification.
Richard, How to set "ServiceNotification" propert of custom messagebox.
Thanks
|
|
|
|
|
Try here for information on how this may be achieved.
|
|
|
|
|
Thanks Richard.
But the article is for standerd message box. I have created my own message box (Form), for which i need to set either "ServiceNotification" or "DefaultDesktopOnly".
I am not able to find, how to set those properties. Please help me.
Thanks
|
|
|
|
|
Your custom MessageBox should inherit from System.Windows.Forms.MessageBox and will then have access to the standard properties and messages. This may help.
|
|
|
|
|
Hi,
Any anybody help me how to send emegency message to all the systems connected in network.
(rather then "net send" command).
My idea is : When a user clicks a special key, windows application(t + # or ...) sends a file to server(crates a XML file).Other systems will keep watch the server file, if file exist then read the file and show the message. Is this a good practice? If any any other ideas please help.
Thanks,
Sh
|
|
|
|
|
|
Richard,
I want solution or logic to send emegency message from one system to other using windows application.
Thanks,
Sh
|
|
|
|
|
Your problem concerns how to send messages between networked computers.
This has nothing to do with Windows Forms specifically. You may implement your solution within a Windows Forms application, but that is not the question you are asking.
|
|
|
|
|
Hello,
I have tried PureComponents and DevExpress. The PureComponents has an excellent filtering feature, but I ran into some bugs, like horizontal scrolling stopped working. The DevExpress is excellent and is reasonably priced.
Thanks for any feedback.
Tom
|
|
|
|
|
Hi,
Please could any one tell me any free recommended library to skin UI in my WinForm application. I am developing application C#, .netFramework 3.5 and Visual studio 2008.
thanks,
Umrahi
If you have faith in the cause and
the means and in God, the hot
Sun will be cool for you.
|
|
|
|
|
Take a look at RCM v1.2 - Theming library: Customize the Appearance of Forms and Common Controls[^] from here on CP, this is just the most recent article that I could find, there are loads more just search the articles for skinning form.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Objective: Modify a dll(binary) to either
1. Call another exe
2. Call another dll (function)
3. Modify the Dll binary by inserting code(Asm/Binary) and generate a shell(cmd.exe)
I know it sounds stupid but I hope you guys got the idea. Please feel free if you need more clarification...I have been trying to do this but no info is available. Now Im wondering is it even possible?
Dll injection/hooking/tampering...any(all) concept is ok, just want to know whats the roadblock to achieve something like this.
Eg:
I have a 3rd part dll called Game.dll. now I want to modify it somehow/anyhow and make it call calc.exe....alrite you guys can laugh !!!!
|
|
|
|
|
This is the second repost of this question and has nothing to do with Windows Forms (or managed C++). Please read Forum Guidelines PLEASE READ[^] before asking questions.
|
|
|
|
|
Newbie!!
I am developing a database-oriented windows application in a certain stand alone machine and would like to deploy it in another machine that is also a stand alone computer.
Do I have to copy the entire database in the second machine (I would think "YES" because of the database dependancy) or is this brought forward from the dlls that I would be copying by way of OneClickDeployment?
Also, is this any different in ASP apps?
Thanks
|
|
|
|
|
which db r u using at backend can u xplain a little
Best Of Regards,
SOFTDEV
Sad like books with torn pages, sad like unfinished stories ...
|
|
|
|
|
Hi.. I have one link(URL) in my win form. When i click on that one window(in 1 tab) will open in IE7. But when i click on same link on win form instead of showing same form which is opened previously it opens in different tab of browser. It continues as per the number of clicks. How to avoid this problem?
Here i have used System.Diagnostics.Process.Start(["Link"]) in win form link. Please help me in regarding this..
Thank you..
|
|
|
|