Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
A

ayeleteric

@ayeleteric
About
Posts
86
Topics
25
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • DateTimePicker
    A ayeleteric

    I will try to be clearer. When you click the DateTimePicker control, at run time, the calendar is popping-up, doesn't it? What I needed, instead of clicking the DateTimePicker control to get this popup window, is to click on a button and to get the same screen. My target was to put on a button an icon of calendar and when the user click the button he will get the popup screen. I hope it was clear now.

    Eric H.

    Visual Basic help question

  • DateTimePicker
    A ayeleteric

    Thank you, I will solve the problem by writting the following DateTimePicker1.Select() SendKeys.Send("%{DOWN}") If other suggestion, please advise

    Eric H.

    Visual Basic help question

  • DateTimePicker
    A ayeleteric

    Is it possible to show the calendar screen of a DateTimePicker control by clicking an image instead of clicking the control's downward triangle? I cannot find a property from the class for showing the calender screen. please help. Thanks.

    Eric H.

    Visual Basic help question

  • ASP.NET configuration
    A ayeleteric

    Thank you for your precious help, it works

    Eric H.

    ASP.NET asp-net database csharp sql-server sysadmin

  • ASP.NET configuration
    A ayeleteric

    Hello, I am working with ASP.net 2008. I am using Users, Membership, roles through Website->ASP.NET configuration menu. I would like to use it while is pointing to an external database not the local one. How do I tell him to use external SQL server database. I have already add the database through aspnet_regsql.exe. Thank you

    Eric H.

    ASP.NET asp-net database csharp sql-server sysadmin

  • preview a picture from my hard disk before upload it
    A ayeleteric

    As I wrote upstair, I simplify the problem to a short code. Can you try to help me on this code. I think it will help me to the big one too. The problem is that I do not see the picture. // <!CDATA[ function Button1_onclick() { document.getElementById("img1").src="C:\Documents and Settings\All Users\Documents\My Pictures\Sample Pictures\Water lilies.jpg" } // ]]>

    Thank you, Eric H.

    ASP.NET help sysadmin question

  • preview a picture from my hard disk before upload it
    A ayeleteric

    Thank you Guffa, Here is my code: <%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %> // width to resize large images to var maxWidth=100; // height to resize large images to var maxHeight=100; // valid file types var fileTypes=["bmp","gif","png","jpg","jpeg"]; // the id of the preview image tag var outImage="previewField"; // what to display when the image is not valid var defaultPic="box_icons.jpg"; /***** DO NOT EDIT BELOW *****/ function preview(what) { var source=what.value; var ext=source.substring(source.lastIndexOf(".")+1,source.length).toLowerCase(); for (var i=0; i<fileTypes.length; i++) if (fileTypes[i]==ext) break; globalPic=new Image(); if (i<fileTypes.length) globalPic.src=source; else { globalPic.src=defaultPic; alert("THAT IS NOT A VALID IMAGE\nPlease load an image with an extention of one of the following:\n\n"+fileTypes.join(", ")); } setTimeout("applyChanges()",200); } var globalPic; function applyChanges() { var field=document.getElementById(outImage); var x=parseInt(globalPic.width); var y=parseInt(globalPic.height); if (x>maxWidth) { y*=maxWidth/x; x=maxWidth; } if (y>maxHeight) { x*=maxHeight/y; y=maxHeight; } field.style.display=(x<1 || y<1)?"none":""; field.src=globalPic.src; field.width=x; field.height=y; } // End -->

    Test it by locating a valid file on your hard drive:

    Eric H.

    ASP.NET help sysadmin question

  • preview a picture from my hard disk before upload it
    A ayeleteric

    Thank you for your help, You can copy the code from my first post

    Eric H.

    ASP.NET help sysadmin question

  • preview a picture from my hard disk before upload it
    A ayeleteric
    1. What is FF 2) I do not get any error but when I am selecting a picture from my hard disk using the dialog box, no picture is previewed Thank you

    Eric H.

    ASP.NET help sysadmin question

  • preview a picture from my hard disk before upload it
    A ayeleteric

    Thank you but this is the source that make me problem (see my first post)

    Eric H.

    ASP.NET help sysadmin question

  • preview a picture from my hard disk before upload it
    A ayeleteric

    Thank you but it doesn't work too.

    Eric H.

    ASP.NET help sysadmin question

  • preview a picture from my hard disk before upload it
    A ayeleteric

    Hello, I simplify the problem, please see the following code: // <!CDATA[ function Button1_onclick() { document.getElementById("img1").src="C:\Documents and Settings\All Users\Documents\My Pictures\Sample Pictures\Water lilies.jpg" } // ]]>

    Thank you much

    Eric H.

    ASP.NET help sysadmin question

  • preview a picture from my hard disk before upload it
    A ayeleteric

    Hello, I am trying to preview a picture from my hard disk before upload it to the server but I didn't success, no error occured but no picture is shown. Please help here is the code Thank you. // width to resize large images to var maxWidth=100; // height to resize large images to var maxHeight=100; // valid file types var fileTypes=["bmp","gif","png","jpg","jpeg"]; // the id of the preview image tag var outImage="previewField"; // what to display when the image is not valid var defaultPic="box_icons.jpg"; function preview(what) { var source=what.value; var ext=source.substring(source.lastIndexOf(".")+1,source.length).toLowerCase(); for (var i=0; i<fileTypes.length; i++) if (fileTypes[i]==ext) break; globalPic=new Image(); if (i<fileTypes.length) globalPic.src=source; else { globalPic.src=defaultPic; alert("THAT IS NOT A VALID IMAGE\nPlease load an image with an extention of one of the following:\n\n"+fileTypes.join(", ")); } setTimeout("applyChanges()",200); } var globalPic; function applyChanges() { var field=document.getElementById(outImage); var x=parseInt(globalPic.width); var y=parseInt(globalPic.height); if (x>maxWidth) { y*=maxWidth/x; x=maxWidth; } if (y>maxHeight) { x*=maxHeight/y; y=maxHeight; } field.style.display=(x<1 || y<1)?"none":""; field.src=globalPic.src; field.width=x; field.height=y; } // End -->

    Test it by locating a valid file on your hard drive:

    Eric H.

    ASP.NET help sysadmin question

  • Module problem
    A ayeleteric

    Hi, In my application I have: 1 MDI (MDIParent1) 2 Forms (frm1 and frm2) 1 Module (module1) In MDIParent1 I have the foolowing code: Sub New() InitializeComponent() Dim f1 As New frm1: f1.MdiParent = Me : f1.Close() Dim f2 As New frm2: f2.MdiParent = Me : f2.Close() end sub I would like to init module1 too like I done for frm1 and frm2 because when I am calling a function that is in the module I get an error: "The type initializer for 'ApplicationName.Module1' threw an exception." In addition (in the add watch during debug): "reference to a non-shared member requires an object" Please help

    Eric H.

    Visual Basic help debugging

  • The this reference in VB.NET
    A ayeleteric

    Hi, You can use a convertor from C# to VB.NET: http://www.developerfusion.co.uk/utilities/convertcsharptovb.aspx[^]

    Eric H.

    Visual Basic csharp question career

  • ProgressBar Thread
    A ayeleteric

    If it is so easy for you to do this why don't you show me the solution like that I will be able to appropriate this easy example to my difficult application? In my side, I will continue to learn VB.NET in my rythm. Thank you

    Eric H.

    Visual Basic help

  • ProgressBar Thread
    A ayeleteric

    the listbox is fullfilled but the progressbar doesn't progress in parallel while the listbox is adding items. First the listbox add items second the progressbar =100% Isn't it? Thank you

    Eric H.

    Visual Basic help

  • ProgressBar Thread
    A ayeleteric

    You right, when I am saying doesn't work, it means in this case that first the listbox fullfilled and then the progressbar get to 100%. I don't see any thread working. I am sorry my english is not mother tongue, I hope you understand Thanks

    Eric H.

    Visual Basic help

  • ProgressBar Thread
    A ayeleteric

    Thak you, I try this as following, but it doen't work Public Class Form1 Sub New() ' This call is required by the Windows Form Designer. InitializeComponent() ' Add any initialization after the InitializeComponent() call. Control.CheckForIllegalCrossThreadCalls = False End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim ind As Integer Button1.Enabled = False ProgressBar1.Step = 5000 ProgressBar1.Value = 0 Dim trd As Threading.Thread = New Threading.Thread(AddressOf ThreadDo) trd.Start() ListBox1.Items.Clear() For ind = 0 To 5000 ListBox1.Items.Add(ind) ListBox1.SelectedIndex = ind Next Button1.Enabled = True End Sub Private Sub ThreadDo() ProgressBar1.PerformStep() If ProgressBar1.Value >= ProgressBar1.Maximum Then Timer1.Enabled = False End If End Sub End Class

    Eric H.

    Visual Basic help

  • ProgressBar Thread
    A ayeleteric

    Thank you, but I already saw it before and it is a litle complicated (I am beginner). I found exactly what I need. Beginners, see following code: Option Explicit On Imports System.ComponentModel Public Class Form1 Private worker As BackgroundWorker Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load worker = New BackgroundWorker() worker.WorkerReportsProgress = True AddHandler worker.DoWork, New DoWorkEventHandler(AddressOf OnWork) AddHandler worker.ProgressChanged, New ProgressChangedEventHandler(AddressOf OnProgressChanged) End Sub Private Sub OnWork(ByVal sender As Object, ByVal e As DoWorkEventArgs) Dim i As Integer For i = 1 To 100 System.Threading.Thread.Sleep(10) worker.ReportProgress(i) Next End Sub Private Sub OnProgressChanged(ByVal sender As Object, ByVal e As ProgressChangedEventArgs) Invoke(New ChangeProgressBarHandler(AddressOf ChangeProgressBar), e.ProgressPercentage) End Sub Private Delegate Sub ChangeProgressBarHandler(ByVal percentage As Integer) Private Sub ChangeProgressBar(ByVal percentage As Integer) ProgressBar1.Value = percentage End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click worker.RunWorkerAsync() End Sub End Class

    Eric H.

    Visual Basic help
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups