| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 1884 人关注过本帖
标题:怎么调整滚动条?急!!
取消只看楼主 加入收藏
aubblove
Rank: 1
等 级:新手上路
帖 子:117
专家分:0
注 册:2007-8-18
收藏
 问题点数:0 回复次数:6 
怎么调整滚动条?急!!
下面这段代码是自动打开D:\\pdfandRTF\\TEST1目录下PDF文件和RTF文件,现在要求使自动打开动的PDF文件的滚动条在打开时就已经拉到最下面,怎么添加代码,请教各位了.
private void MDIParent1_Load(object sender, EventArgs e)
{
DirectoryInfo dir = new DirectoryInfo("D:\\pdfandRTF\\TEST1");
FileInfo[] files = dir.GetFiles();
foreach (FileInfo file in files)
{
string[] strArray = file.FullName.Split('.');
switch (strArray[1])
{
case "rtf": ShowRtfForm(file.FullName); break;
case "pdf": ShowPdfForm(file.FullName); break;
}
}
LayoutMdi(MdiLayout.TileHorizontal); //上下显示

}
搜索更多相关主题的帖子: 滚动 调整 
2007-09-25 10:29
aubblove
Rank: 1
等 级:新手上路
帖 子:117
专家分:0
注 册:2007-8-18
收藏
得分:0 

有没有会的,帮我一下哦!

2007-09-25 11:55
aubblove
Rank: 1
等 级:新手上路
帖 子:117
专家分:0
注 册:2007-8-18
收藏
得分:0 

private void ShowPdfForm(string strFileName)
{
Form3 frm = new Form3(strFileName);
frm.MdiParent = this;
frm.Text = "PDF文件路径:" +

strFileName;

frm.Show();
//frm.ScrollTop();
}

PDF文件是在Form3中直接显示的,Form3中没有控件.

2007-09-25 13:21
aubblove
Rank: 1
等 级:新手上路
帖 子:117
专家分:0
注 册:2007-8-18
收藏
得分:0 

楼上的兄弟,中秋快乐哦

2007-09-25 13:22
aubblove
Rank: 1
等 级:新手上路
帖 子:117
专家分:0
注 册:2007-8-18
收藏
得分:0 

不好意思 ,刚才没看清程序.这是Form3中的代码
public partial class Form3 : Form
{
public Form3(string strfilename)
{
InitializeComponent();
str = strfilename;
}
string str;
private void Form3_Load(object sender,EventArgs e)
{
CreateMyPdfBrowser(str);
}
AxAcroPDFLib.AxAcroPDF axAcroPDF1 = new AxAcroPDFLib.AxAcroPDF();
private void CreateMyPdfBrowser(string strFileName)
{

((System.ComponentModel.ISupportInitialize)(this.axAcroPDF1)).BeginInit();
this.axAcroPDF1.Dock = System.Windows.Forms.DockStyle.Fill;
this.axAcroPDF1.Enabled = true;
this.axAcroPDF1.Location = new System.Drawing.Point(0, 0);
this.axAcroPDF1.Name = "axAcroPDF1";
this.axAcroPDF1.Size = new System.Drawing.Size(292, 273);
this.axAcroPDF1.TabIndex = 0;
this.Controls.Add(axAcroPDF1);
((System.ComponentModel.ISupportInitialize)(this.axAcroPDF1)).EndInit();
axAcroPDF1.LoadFile(strFileName);

}
}

2007-09-25 14:10
aubblove
Rank: 1
等 级:新手上路
帖 子:117
专家分:0
注 册:2007-8-18
收藏
得分:0 

通過控制光標到最下面來控制ScrollBar,能给出代码吗?谢了

2007-09-25 15:24
aubblove
Rank: 1
等 级:新手上路
帖 子:117
专家分:0
注 册:2007-8-18
收藏
得分:0 
谢了,老兄,我在看一下吧,再次感谢!
愿大家过一个快乐的中秋!!
2007-09-25 16:44
快速回复:怎么调整滚动条?急!!
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.012429 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved