1. 在eclipse上写一个图片浏览器,求大佬
用QQ浏览器挺好的
2. VB做一个简单的图片浏览器,谁有代码
楼上那个是很不错的载入图片的代码,健壮性很强
楼主要放大缩小其实只要控制图片框的大小就可以了
至于上一张下一张的花要读取一个路径序列,然后一个个前移或者后移
3. flash制作图片查看器的问题
好久不用了,试试帧跳转或者场景跳转的按钮as。
4. 怎样用VB做一个图片浏览器
Public Class Form1
Dim i As Integer
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
i = i - 1
If (i < 0) Then
i = 4
End If
'pic.Image = imgl.Images(i)
pic.Image = Image.FromFile(imgNames(i).FullName)
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
i = i + 1
If (i >= 4) Then
i = 0
End If
'pic.Image = imgl.Images(i)
pic.Image = Image.FromFile(imgNames(i).FullName)
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
If Button3.Text Is "播放" Then
Timer1.Start()
Button3.Text = "暂停"
Else
Timer1.Stop()
Button3.Text = "播放"
End If
End Sub
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
i = i + 1
If (i >= 4) Then
i = 0
End If
'pic.Image = imgl.Images(i)
pic.Image = Image.FromFile(imgNames(i).FullName)
End Sub
Dim imgNames As IO.FileInfo()
Private Sub test2_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim _Url As String
_Url = Application.StartupPath & "\Imager" '获取程序文件信息所在的文件夹
Dim _ImgUrl As New System.IO.DirectoryInfo(_Url) '新建文件夹对象
imgNames = _ImgUrl.GetFiles("*.jpg") '从文件信息中获取文件对象的类型
End Sub
Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
FolderBrowserDialog1.ShowDialog()
Dim _Url As String
_Url = FolderBrowserDialog1.SelectedPath
Dim _ImgUrl As New System.IO.DirectoryInfo(_Url) '新建文件夹对象
imgNames = _ImgUrl.GetFiles("*.jpg") '从文件信息中获取文件对象的类型
End Sub
Dim form As New Form2
Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles form2Click.Click
Form.Show() '*************显示窗体
End Sub
Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button6.Click
Me.Close()
End Sub
Private Sub Button7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button7.Click
form.Close()
End Sub
Private Sub Button8_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button8.Click
Dim clockF As New clock
clockF.ShowDialog()
End Sub
End Class
显示张数的用text显示出来就可以了
其实我也是初学者这些代码有些小BUG请包涵我会修改的
大家可以加个QQ交流交流
5. 用AS3来实现单张图片加载浏览代码如何
用Loader对象来加载啊,你留下邮箱地址,我做个实例给你。
6. 用AS3能否做浏览器
用AIR,flash.html包里面有HTMLLoader类可以实现网页的加载,历史记录的堆栈储存,再配合UIScrollBar和TextInput即可实现浏览器。
7. 在vb.net下怎么制作一个图片浏览器,根据用户选择的文件夹,程序自动搜索改文件夹下的图片文件。
微软MSDN官方示例代码(VB2010.net):
http://msdn.microsoft.com/zh-cn/library/dd492135(VS.100).aspx
8. android图片浏览器 代码
/*
* Copyright (C) 2007 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/package android.apps;import android.app.Activity;
import android.content.Context;
import android.content.res.TypedArray;
import android.net.Uri;
import android.os.Bundle;
import android.view.View;
import android.view.ViewGroup;
import android.view.Window;
import android.view.WindowManager;
import android.widget.BaseAdapter;
import android.widget.Gallery;
import android.widget.ImageView;public class Gallery1 extends Activity {
private Context mContext;
private Uri[] uri =GetImagesFromSDCard.uriArray;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
//影藏顶部程序名称 写在setContentView(R.layout.gallery_1);之前,不然报错
requestWindowFeature(Window.FEATURE_NO_TITLE);
setContentView(R.layout.gallery_1);
//影藏顶部电量等图标
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FULLSCREEN);
Gallery g = (Gallery) findViewById(R.id.gallery);
g.setAdapter(new ImageAdapter(this));
//设置显示第几张图片 参数是GetImagesFromSDCard中的静态变量
g.setSelection(GetImagesFromSDCard.imagePosition);
}
public class ImageAdapter extends BaseAdapter {
int mGalleryItemBackground;
public ImageAdapter(Context c) {
mContext = c;
/*
* 使用在res/values/attrs.xml中的<declare-styleable>定义 的Gallery属性.
*/
TypedArray a = obtainStyledAttributes(R.styleable.Gallery1);
/* 取得Gallery属性的Index id */
mGalleryItemBackground = a.getResourceId(
R.styleable.Gallery1_android_galleryItemBackground, 0);
/* 让对象的styleable属性能够反复使用 */
a.recycle();
} /* 重写的方法getCount,返回图片数目 */
public int getCount() {
return uri.length;
} /* 重写的方法getItemId,返回图像的数组id */ public Object getItem(int position) {
return position;
} public long getItemId(int position) {
return position;
} /* 重写的方法getView,返回一View对象 */
public View getView(int position, View convertView, ViewGroup parent){
ImageView view = new ImageView(Gallery1.this);
//设置所有图片的资源地址
view.setImageURI(uri[position]);
view.setScaleType(ImageView.ScaleType.FIT_XY);
view.setLayoutParams(new Gallery.LayoutParams(240, 320));
/* 设置Gallery背景图 */
view.setBackgroundResource(mGalleryItemBackground);
return view;
}
}
}