Click here to Skip to main content
15,892,746 members
Home / Discussions / C#
   

C#

 
GeneralRe: xds Pin
postonoh29-Sep-08 15:56
postonoh29-Sep-08 15:56 
QuestionZoom problem with a picture within picturebox.? Pin
maifs29-Sep-08 10:53
maifs29-Sep-08 10:53 
AnswerRe: Zoom problem with a picture within picturebox.? Pin
nelsonpaixao29-Sep-08 12:08
nelsonpaixao29-Sep-08 12:08 
GeneralRe: Zoom problem with a picture within picturebox.? Pin
maifs6-Oct-08 19:13
maifs6-Oct-08 19:13 
QuestionNeed Help with Encrypt/Decrypt Application.Config file.. examples needed Pin
Adam Cheeseman29-Sep-08 10:11
Adam Cheeseman29-Sep-08 10:11 
AnswerRe: Need Help with Encrypt/Decrypt Application.Config file.. examples needed Pin
Mycroft Holmes29-Sep-08 14:44
professionalMycroft Holmes29-Sep-08 14:44 
QuestionScrollableControl Pin
KEL329-Sep-08 9:31
KEL329-Sep-08 9:31 
QuestionRe: ScrollableControl Pin
KEL330-Sep-08 3:43
KEL330-Sep-08 3:43 
Here is the code (just in case you don't like downloading):
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace ScrollableControl_Bug
{
	public partial class Form1 : Form
	{
		ScrollableControl scrl = new ScrollableControl();

		public Form1()
		{
			InitializeComponent();
		}

		private void Form1_Load(object sender, EventArgs e)
		{
			this.Controls.Add(scrl);
			this.Resize += new EventHandler(Form1_Resize);

			scrl.Dock = DockStyle.Fill;
			scrl.AutoScroll = false; // We want to draw the contents of "scrl" based on the scrollbar position. (No controls inside it)
			scrl.Visible = true;

			scrl.HorizontalScroll.Minimum = 0;
			scrl.HorizontalScroll.Maximum = 400;
			scrl.HorizontalScroll.LargeChange = this.Height;
			scrl.HorizontalScroll.SmallChange = 10;
			scrl.HorizontalScroll.Value = 30;
			scrl.HorizontalScroll.Visible = true;

			scrl.VerticalScroll.Minimum = 0;
			scrl.VerticalScroll.Maximum = 400;
			scrl.VerticalScroll.LargeChange = this.Width;
			scrl.VerticalScroll.SmallChange = 10;
			scrl.VerticalScroll.Value = 30;
			scrl.VerticalScroll.Visible = true;

			scrl.Scroll += new ScrollEventHandler(scrl_Scroll);
			scrl.Paint += new PaintEventHandler(scrl_Paint);
		}

		void scrl_Paint(object sender, PaintEventArgs e)
		{
			Graphics gr = e.Graphics;
			string str = "Horiz. Scroll Value = " + scrl.HorizontalScroll.Value.ToString() +
						"\r\nVert. Scroll Value =  " + scrl.VerticalScroll.Value.ToString() +
						"\r\n\r\nTry to scroll...";
			gr.DrawString(str, new Font("Arial", 10.0f), new SolidBrush(Color.Black), 0.0f, 0.0f);
		}

		void Form1_Resize(object sender, EventArgs e)
		{
			scrl.VerticalScroll.LargeChange = this.Height;
			scrl.HorizontalScroll.LargeChange = this.Width;
			scrl.Refresh();
		}

		void scrl_Scroll(object sender, ScrollEventArgs e)
		{
			scrl.Refresh();
		}
	}
}


kostas KEL

AnswerRe: ScrollableControl - Solution in .NET 2.0 Pin
Erpizn_1310-Nov-08 21:40
Erpizn_1310-Nov-08 21:40 
NewsRe: ScrollableControl - Solution in .NET 2.0 Pin
CampwoodJim17-Nov-08 9:19
CampwoodJim17-Nov-08 9:19 
AnswerRe: ScrollableControl - Solution in .NET 2.0 Pin
Mike_Finch1-Apr-09 7:10
Mike_Finch1-Apr-09 7:10 
QuestionCreating Access DB Tables Pin
Planker29-Sep-08 8:54
Planker29-Sep-08 8:54 
AnswerRe: Creating Access DB Tables Pin
Mycroft Holmes29-Sep-08 14:47
professionalMycroft Holmes29-Sep-08 14:47 
GeneralRe: Creating Access DB Tables Pin
Planker30-Sep-08 7:48
Planker30-Sep-08 7:48 
Questionhow many characters is carriage return? [modified] Pin
nesfrank29-Sep-08 7:40
nesfrank29-Sep-08 7:40 
AnswerRe: how many characters is carriage return? Pin
Steven Jan29-Sep-08 8:01
Steven Jan29-Sep-08 8:01 
GeneralRe: how many characters is carriage return? Pin
nesfrank29-Sep-08 8:16
nesfrank29-Sep-08 8:16 
AnswerRe: how many characters is carriage return? Pin
Guffa29-Sep-08 8:27
Guffa29-Sep-08 8:27 
GeneralRe: how many characters is carriage return? Pin
leppie29-Sep-08 21:48
leppie29-Sep-08 21:48 
GeneralRe: how many characters is carriage return? Pin
Guffa30-Sep-08 8:24
Guffa30-Sep-08 8:24 
AnswerRe: how many characters is carriage return? Pin
leppie29-Sep-08 21:49
leppie29-Sep-08 21:49 
QuestionUsing C# and COM to connect to a Server Pin
SRogers8829-Sep-08 7:38
SRogers8829-Sep-08 7:38 
QuestionMessage Closed Pin
29-Sep-08 6:55
love_man00129-Sep-08 6:55 
AnswerADVERTISMENT! Pin
Dave Kreskowiak29-Sep-08 7:08
mveDave Kreskowiak29-Sep-08 7:08 
QuestionHow can I export a crystal report to an image object ? Pin
davebarkshire29-Sep-08 6:37
davebarkshire29-Sep-08 6:37 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.