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;
}
}
}