 |
|
|
 |
|
|
 |
|
 |
hi there, first of all thanks for your control,but i need to know how can i make the size of pictureBox to be Long type than to be integer type. thx in advance, salam.
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
 |
|
|
 |
|
 |
hi, this is a great control. there are other samples on the net that have flicker problems and the scroll bars are poorly done. this is exactly what i wanted. cheers.
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
 |
|
 |
Salut,
J'ai besoin de l'aide pour pouvoir scroller une jpg en Visual FoxPro. Merci à l'avance Baba Kh.
Baba Kh
|
| Sign In·View Thread·PermaLink | 1.00/5 (1 vote) |
|
|
|
 |
|
|
 |
|
 |
I believe the events will not work when over the image, only on the space around the image. This is why I actually had to rewrite my own using a panels paint method instead, but for some reason, it seems to be very slow when dragging dialogs over the images.
|
| Sign In·View Thread·PermaLink | 2.00/5 (1 vote) |
|
|
|
 |
|
|
 |
|
 |
I tried building the design time control for PictureViewer to place it in my ToolBox so I could drag it onto a Windows CE project form, but got an error. It's saying that it expects a different protection level on 'System.Windows.Forms.Control.ControlCollection.AddRange(System.Windows.Forms.Control[])' which doesn't make sense since all properties and methods are public for this up and down the object hierarchy.
Below is the command I ran and the error.
C:\Documents and Settings\Rob\My Documents\Visual Studio Projects\ratioStretchpi ctureBox1>csc /noconfig /define:NETCFDESIGNTIME /target:library /out:design.View er.dll Viewer.cs /r:"C:\Program Files\Microsoft Visual Studio .NET 2003\CompactF rameworkSDK\v1.0.5000\Windows CE\Designer\System.CF.Design.dll" /r:"C:\Program F iles\Microsoft Visual Studio .NET 2003\CompactFrameworkSDK\v1.0.5000\Windows CE\ Designer\System.CF.Windows.Forms.dll" /r:"C:\Program Files\Microsoft Visual Stud io .NET 2003\CompactFrameworkSDK\v1.0.5000\Windows CE\Designer\System.CF.Drawing .dll" /r:System.Windows.Forms.dll /r:System.Drawing.dll /r:System.dll /r:System. XML.dll /r:System.Web.Services.dll /r:System.Data.dll /nowarn:1595 Microsoft (R) Visual C# .NET Compiler version 7.10.3052.4 for Microsoft (R) .NET Framework version 1.1.4322 Copyright (C) Microsoft Corporation 2001-2002. All rights reserved.
Viewer.cs(176,4): error CS0122: 'System.Windows.Forms.Control.ControlCollection.AddRange(System.Windows. Forms.Control[])' is inaccessible due to its protection level
C:\Documents and Settings\Rob\My Documents\Visual Studio Projects\ratioStretchpi ctureBox1>
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
I took the code and made it into a class library. Everything seemed fine except for the fact that events did not work when I clicked on the image in the component. Events will work find if you click around your image. Any suggestions on how to fix this? Is there a way where we can redirect the events so that maybe we can put a panel on top of the control so the events go to the panel instead of the user control?
|
| Sign In·View Thread·PermaLink | 2.00/5 (1 vote) |
|
|
|
 |
|
 |
I was wondering if this control is slower than it should be as it is a picturebox hosted inside a usercontrol.
The method I've used to create a similar control is to derive a control from ScrollableControl (for scrolling) and then use GDI+ to draw directly onto the surface of the control.
I belive that creating the control this way would lead to an increase in performance.
|
| Sign In·View Thread·PermaLink | 5.00/5 (3 votes) |
|
|
|
 |
|
 |
i notice that if i take your example and add anything in the design view (like adding another menu item for example) it will make it to where the control is no longer on the form and no longer works..
im having the same problem in my code using your control.. it works fine until i modify the form in the design window, then it changes the generated code and screws it all up.. is there any way to add this control properly such that the form can be edited after its added?
thanks!
still a newb.. cut me some slack :P -dz
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
I am using visulStudio.net and in the desgin view I dont have any problem regarding this control.
if you want , you can send me your code to look at.

|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
it may be how i added it to my program.. i didnt use the design view, but rather just added the code to the initializecomponents section manually.. it works fine until i go to the design view and modify the modify something (like adding another menu option).. then it removes my hand added section in the initializecomponents section.. is there a way to add the control to the toolbox so that i can add it to my form using the design view?
i can send you my code, but its just the source that is on here, all im doing is going to design view and adding another menu option then rerunning it..
thanks for the response, id really like to use this control, its just what i need.
still a newb.. cut me some slack :P -dz
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
In my experience, VS.NET adds all UserControls in the solution to their own tab in the toolbox.
Alternatively, you can right-click the toolbox, select 'Add/Remove items...' and browse for your compiled assembly.
Dragging the control from the toolbox should help, though I've seen the problem you're explaining before -- even when added from the toolbox.
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
A panel will perform automatic scrolling when child controls exceed the panel's dimensions. Seems like an easier solution.
Marc
Help! I'm an AI running around in someone's f*cked up universe simulator. Sensitivity and ethnic diversity means celebrating difference, not hiding from it. - Christian Graus Every line of code is a liability - Taka Muraoka Microsoft deliberately adds arbitrary layers of complexity to make it difficult to deliver Windows features on non-Windows platforms--Microsoft's "Halloween files"
|
| Sign In·View Thread·PermaLink | 5.00/5 (2 votes) |
|
|
|
 |
|
 |
do you have an example of this? im having problems with user controls.. i have tried putting a panel, then putting an image on top of it.. setting the panel to autoscroll.. then setting the panel's width and height to the width and height of the image.. unfortunately i still dont have scrollbars
still a newb.. cut me some slack :P -dz
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
One of the things I keep forgetting is to make the controls inside the panel children of the panel, not the form. For example, Panel.Controls.Add(...). That's an off the cuff answer, let me know if that gets you anywhere.
Marc
Help! I'm an AI running around in someone's f*cked up universe simulator. Sensitivity and ethnic diversity means celebrating difference, not hiding from it. - Christian Graus Every line of code is a liability - Taka Muraoka Microsoft deliberately adds arbitrary layers of complexity to make it difficult to deliver Windows features on non-Windows platforms--Microsoft's "Halloween files"
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
Make sure your pictureBox Dock is set to None and the Location is set to 0,0. The designer will make the pictureBox a child of the panel automaticaly when you drag the pictureBox into a panel (you'll have a visual feedback). Set the panel Autoscroll to true and that's it.
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
i set anchor of my picture box to Top, Left and SizeMode to Normal it works fine thanks for that great tip!
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
I'm doing all of the above (setting Dock to None, Location to 0,0 , AutoScroll on the Panel to true, resetting Panel's width and height to that of the picture box, Anchor set to Top, Left, SizeMode to Normal, adding the picturebox as a child to the panel) and I still don't get scrollbars
What am I doing wrong?
Claire
-- modified at 6:31 Wednesday 1st February, 2006
|
| Sign In·View Thread·PermaLink | 5.00/5 (1 vote) |
|
|
|
 |
|
 |
ok, what I was doing wrong was resetting the panel's width and height, not the picturebox's. Once I did this:
this.pictureBox1.Width = this.pictureBox1.Image.Width; this.pictureBox1.Height = this.pictureBox1.Image.Height;
all worked splendidly!!
|
| Sign In·View Thread·PermaLink | 2.86/5 (4 votes) |
|
|
|
 |