Visual Basic Basit Bir Sorun

Fogger

Üye
3 Nis 2013
124
0
At Here Now
Arkadaşlar Bir Butona Şu Kodları Verdim
Kod:
Dim Oran As New Random
        Dim Yuzdelık As Integer = Oran.Next(70, 100)
        If Yuzdelık >= 90 Then
            MsgBox("1" + Yuzdelık + "a")
        ElseIf Yuzdelık < 90 Then
            MsgBox("2" + Yuzdelık + "b")
        End If
Mantıken şunu istiyorum; Random bir Sayı Atıcak 70-100 arası
sonra 90> veya = ise ("1" + Yuzdelık + "a") bunu yazdırıcak değilsede yine benzer bişey ama debug yaptığımda
Kod:
Message="a" dizesinden 'Double' türüne yapılan dönüştürme geçerli değil.
Bu hatayı veriyor.
Yeni Başladığım İçin "Double" Türü ne demek Hiçbir Fikrim Yok.
Hatanın Tamamı Şu
Kod:
System.InvalidCastException was unhandled
  HResult=-2147467262
  Message="a" dizesinden 'Double' türüne yapılan dönüştürme geçerli değil.
  Source=Microsoft.VisualBasic
  StackTrace:
       konum: Microsoft.VisualBasic.CompilerServices.Conversions.ToDouble(String Value, NumberFormatInfo NumberFormat)
       konum: Microsoft.VisualBasic.CompilerServices.Conversions.ToDouble(String Value)
       konum: WindowsApplication1.Form1.Button1_Click(Object sender, EventArgs e) C:\Users\Sarısoy\Desktop\Basic Keylogger\WindowsApplication1\Form1.vb içinde: satır 7
       konum: System.Windows.Forms.Control.OnClick(EventArgs e)
       konum: System.Windows.Forms.Button.OnClick(EventArgs e)
       konum: System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
       konum: System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
       konum: System.Windows.Forms.Control.WndProc(Message& m)
       konum: System.Windows.Forms.ButtonBase.WndProc(Message& m)
       konum: System.Windows.Forms.Button.WndProc(Message& m)
       konum: System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
       konum: System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
       konum: System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
       konum: System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
       konum: System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
       konum: System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
       konum: System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
       konum: System.Windows.Forms.Application.Run(ApplicationContext context)
       konum: Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()
       konum: Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()
       konum: Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] commandLine)
       konum: WindowsApplication1.My.MyApplication.Main(String[] Args) 17d14f5c-a337-4978-8281-53493378c1071.vb içinde: satır 81
       konum: System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
       konum: System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
       konum: Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
       konum: System.Threading.ThreadHelper.ThreadStart_Context(Object state)
       konum: System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
       konum: System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
       konum: System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       konum: System.Threading.ThreadHelper.ThreadStart()
  InnerException: System.FormatException
       HResult=-2146233033
       Message=Giriş dizesi doğru biçimde değildi.
       Source=Microsoft.VisualBasic
       StackTrace:
            konum: Microsoft.VisualBasic.CompilerServices.Conversions.ParseDouble(String Value, NumberFormatInfo NumberFormat)
            konum: Microsoft.VisualBasic.CompilerServices.Conversions.ToDouble(String Value, NumberFormatInfo NumberFormat)
       InnerException:
 
Üst

Turkhackteam.org internet sitesi 5651 sayılı kanun’un 2. maddesinin 1. fıkrasının m) bendi ile aynı kanunun 5. maddesi kapsamında "Yer Sağlayıcı" konumundadır. İçerikler ön onay olmaksızın tamamen kullanıcılar tarafından oluşturulmaktadır. Turkhackteam.org; Yer sağlayıcı olarak, kullanıcılar tarafından oluşturulan içeriği ya da hukuka aykırı paylaşımı kontrol etmekle ya da araştırmakla yükümlü değildir. Türkhackteam saldırı timleri Türk sitelerine hiçbir zararlı faaliyette bulunmaz. Türkhackteam üyelerinin yaptığı bireysel hack faaliyetlerinden Türkhackteam sorumlu değildir. Sitelerinize Türkhackteam ismi kullanılarak hack faaliyetinde bulunulursa, site-sunucu erişim loglarından bu faaliyeti gerçekleştiren ip adresini tespit edip diğer kanıtlarla birlikte savcılığa suç duyurusunda bulununuz.