IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Windows Forms Discussion :

[VB2005]Probleme de Variable


Sujet :

Windows Forms

  1. #1
    Nouveau membre du Club
    Profil pro
    Inscrit en
    Mars 2005
    Messages
    33
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mars 2005
    Messages : 33
    Points : 29
    Points
    29
    Par défaut [VB2005]Probleme de Variable
    Salut tout le monde.

    Je viens ici car j'ai un petit probleme avec une variable. Oui Oui lol

    En fait elle bloque au niveau de la taille.

    Et je voulais savoir s'il existe un moyne de contrer les problemes de taille pour les variables car cela est assez genant.

    J'ai essayé tout les type ULong, Object mais rien à faire

  2. #2
    Invité
    Invité(e)
    Par défaut
    salut

    Que veux tu mettre dans ta variable (il y'a le type Variant qui est prend tout mais à éviter)

    Starec

  3. #3
    Nouveau membre du Club
    Profil pro
    Inscrit en
    Mars 2005
    Messages
    33
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mars 2005
    Messages : 33
    Points : 29
    Points
    29
    Par défaut
    En faite dans la variable il y a un calcul

    avec des chiffres tres grand du style 3000000000 qui doivent etre manipuler et le probleme est que je me retrouve avec un depassement de capacité meme en Ulong
    Voici l'erreur

    L'exception System.OverflowException n'a pas été gérée
    Message="L'opération arithmétique a provoqué un dépassement de capacité."
    Source="Simulateur Ogame"
    StackTrace:
    à SimulateurOgame.Form1.nombregt_TextChanged(Object sender, EventArgs e) dans F:\Document_ChRom\Visual Studio 2005\Projects\WindowsApplication1\WindowsApplication1\Form1.vb:ligne 36
    à System.Windows.Forms.Control.OnTextChanged(EventArgs e)
    à System.Windows.Forms.TextBoxBase.OnTextChanged(EventArgs e)
    à System.Windows.Forms.TextBoxBase.WmReflectCommand(Message& m)
    à System.Windows.Forms.TextBoxBase.WndProc(Message& m)
    à System.Windows.Forms.TextBox.WndProc(Message& m)
    à System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
    à System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
    à System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
    à System.Windows.Forms.UnsafeNativeMethods.SendMessage(HandleRef hWnd, Int32 msg, IntPtr wParam, IntPtr lParam)
    à System.Windows.Forms.Control.SendMessage(Int32 msg, IntPtr wparam, IntPtr lparam)
    à System.Windows.Forms.Control.ReflectMessageInternal(IntPtr hWnd, Message& m)
    à System.Windows.Forms.Control.WmCommand(Message& m)
    à System.Windows.Forms.Control.WndProc(Message& m)
    à System.Windows.Forms.ScrollableControl.WndProc(Message& m)
    à System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
    à System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
    à System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
    à System.Windows.Forms.UnsafeNativeMethods.CallWindowProc(IntPtr wndProc, IntPtr hWnd, Int32 msg, IntPtr wParam, IntPtr lParam)
    à System.Windows.Forms.NativeWindow.DefWndProc(Message& m)
    à System.Windows.Forms.Control.DefWndProc(Message& m)
    à System.Windows.Forms.Control.WmKeyChar(Message& m)
    à System.Windows.Forms.Control.WndProc(Message& m)
    à System.Windows.Forms.TextBoxBase.WndProc(Message& m)
    à System.Windows.Forms.TextBox.WndProc(Message& m)
    à System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
    à System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
    à System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
    à System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
    à System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
    à System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
    à System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
    à System.Windows.Forms.Application.Run(ApplicationContext context)
    à Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()
    à Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()
    à Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] commandLine)
    à SimulateurOgame.My.MyApplication.Main(String[] Args) dans 17d14f5c-a337-4978-8281-53493378c1071.vb:ligne 81
    à System.AppDomain.nExecuteAssembly(Assembly assembly, String[] args)
    à System.Runtime.Hosting.ManifestRunner.Run(Boolean checkAptModel)
    à System.Runtime.Hosting.ManifestRunner.ExecuteAsAssembly()
    à System.Runtime.Hosting.ApplicationActivator.CreateInstance(ActivationContext activationContext, String[] activationCustomData)
    à System.Runtime.Hosting.ApplicationActivator.CreateInstance(ActivationContext activationContext)
    à Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssemblyDebugInZone()
    à System.Threading.ThreadHelper.ThreadStart_Context(Object state)
    à System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
    à System.Threading.ThreadHelper.ThreadStart()

    Edit :

    Je suis crois que j'ai resolu mon probleme petit inatention de ma part

    car dans mon programme principale j'étais en Ulong mais dans ma fonction j'etais en Integer donc, le probleme venait de là

    Désoler

+ Répondre à la discussion
Cette discussion est résolue.

Discussions similaires

  1. Probleme de variable entre SQL et Php
    Par copin dans le forum Langage SQL
    Réponses: 6
    Dernier message: 17/06/2005, 10h58
  2. Réponses: 10
    Dernier message: 03/05/2005, 21h57
  3. [langage] Probleme de variable transfert de contenu
    Par Ludo167 dans le forum Langage
    Réponses: 10
    Dernier message: 08/07/2004, 11h40
  4. [algo]probleme de variables hotes ds un insert
    Par omega dans le forum Langage SQL
    Réponses: 2
    Dernier message: 16/03/2004, 09h03
  5. Réponses: 2
    Dernier message: 04/01/2004, 15h14

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo