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
M

MohammadAmiry

@MohammadAmiry
About
Posts
275
Topics
76
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • How to serialize static members of a class?
    M MohammadAmiry

    Thank you both... I removed the message.

    C# help tutorial question

  • How to serialize shared members of a class?
    M MohammadAmiry

    I want to binary serialize a class, which has only shared items (variables & objects of different types) which I use globally in my code. When I want to serialize it, I get the error "'EmailAccount' is a type and cannot be used as an expression" : binformatter.Serialize(filstream, EmailAccount) I even tried to create an object from the class and serialize it. But it seems to only save the instance variables and not the shared ones. Is there a way to serialize them?

    Visual Basic help tutorial question

  • How to serialize static members of a class?
    M MohammadAmiry

    I want to binary serialize a class, which has only static items (variables & objects of different types) which I use globally in my code. When I want to serialize it, I get the error "'EmailAccount' is a type and cannot be used as an expression" : binformatter.Serialize(filstream, EmailAccount); I even tried to create an object from the class and serialize it. But it seems to only save the instance variables and not the static ones. Is there a way to serialize them?

    C# help tutorial question

  • Connecting to SQL Server 2008 over the internet using Management Studio problem
    M MohammadAmiry

    I want to connect to my full SQL Server 2008 SP1 on a remote server over the internet using both VS.NET server explorer and MSSQLServer Management, and in both I failed! I tried all the steps described in http://msdn.microsoft.com/en-us/library/ms345343.aspx[^] but I still cannot even telnet the remote server on the ports (1433 or the one I assigned as in the tutorial: 49172) ... BUT I can ping it and it replies. I even closed the firewall application (NOD) on the server as I have full administrative remote desktop access to the server, and still no progress. (And I easily can connect to server using remote desktop) I really need to connect to the server using SQL Server Management. Thank you all

    Database csharp database sql-server visual-studio com

  • Large Folder Vanished to System Volume Information [modified]
    M MohammadAmiry

    Hi, I had a large folder on drive E:, which suddenly I found missing (today 08/25/2009, I had a security update, but I am not sure whether my folder was missing before or after the update). I am sure that I have not accidentally deleted the folder because the free space of my drive has not changed. On the other hand, System Volume Information now, is the same size as my folder was (i.e. 19GB). I am pretty sure that my folder is in SIV though. By the way, My OS is Windows 7 RC Build 7100. Is there any way I can recover my folder? (I am not sure whether this is the right forum to ask my question, but if not, I hope you can lead me to the correct spot) THANKS

    modified on Tuesday, August 25, 2009 3:21 AM

    IT & Infrastructure question security announcement

  • Run application on windows start up
    M MohammadAmiry

    Try making a windows service instead of a windows application.

    Visual Basic csharp windows-admin question learning

  • How to use third party dll at runtime with help of (dll) file path and procedure name
    M MohammadAmiry

    The method you are using (and was suggested in my link) works for ActiveX Dlls and OCX objects. First, have your class library a module not a class:

    Public Module TestDll
    Public Sub Test()
    MsgBox("Hi")
    End Sub
    End Module

    Then use LoadLibrary to load the dll.

    Delegate Sub Tst()
    .
    .
    .
    Static dll_loaded As Boolean, dll_handle As Int32, fn As tst
    dll_handle = LoadLibrary("Testdll.dll")
    msgfn = GetProcAddress(dll_handle, "Test")
    msgfn.Invoke()

    By the way, why do you want to late-bind? Try using

    Declare

    which makes it much faster and more reliable!

    Visual Basic tutorial help question

  • How to pass a parameter to windows application form the way we can do in a web form
    M MohammadAmiry

    If I have understood you correctly, you might use commandline parameters to run your application, or as mentioned by crudeCodeYogi, by using parametrized constructors.

    Visual Basic csharp tutorial

  • How to determine if it is a file or directory for an item under a folder? [modified]
    M MohammadAmiry

    The equivalent vb code is:

      Dim info as New FileInfo(fileName)
      Dim isFolder As Boolean = info.Attributes And FileAttributes.Directory
    
    Visual Basic csharp tutorial question

  • How to determine if it is a file or directory for an item under a folder? [modified]
    M MohammadAmiry
    If IO.File.Exists(Path) Then
       'It is a file
    ElseIf IO.Directory.Exists(Path) Then
       'It is a folder
    End If
    
    Visual Basic csharp tutorial question

  • How to use third party dll at runtime with help of (dll) file path and procedure name
    M MohammadAmiry

    see http://www.omegajunior.net/code/vbnet_unmanaged.html[^]

    Visual Basic tutorial help question

  • clear variables
    M MohammadAmiry

    Could you be more specific? You may use .Dispose method to delete objects.

    Visual Basic question learning

  • Remove a Public property from base class?!
    M MohammadAmiry

    Found the solution:

    <bindable(false), EditorBrowsable(EditorBrowsableState.Never), Browsable(False)> _
        Public Shadows Property GridType() As GridTypes
            Get
    
            End Get
            Set(ByVal value As GridTypes)
    
            End Set
        End Property
    
    Visual Basic help question

  • Remove a Public property from base class?!
    M MohammadAmiry

    Hi I have a Base class which exposes some public properties, and I derive a second class. I want the second class, not to have some of the public properties of its parent. (I don't want to use Shadows statement to create a new empty property, I want to hide it completely) Could you please help me?

    Visual Basic help question

  • Not sure if RichTextBox can do this?
    M MohammadAmiry

    No, a richtextbox (as it is) cannot be split. But you may have a control, which consists of two richtextboxes and a seperator between them. You may program different interactions between these two controls to give the user the feel that they are one split richtextbox (if you need such thing).

    C# html tutorial question

  • VB 6 Shows extraneous modules at startup
    M MohammadAmiry

    In the path that you save your project, delete all files whose extension is not as the known formats, e.g. if you have Form1.frm, then (if I remember correctly) Form1.frk or something like that is also created. Also one extra file is created with the name of your project, but without .vbw extension. I can remember that if you delete these files, you would get what you want.

    Visual Basic visual-studio tutorial question

  • LineInput LineFeed problem
    M MohammadAmiry

    Hi I have a very large file in whose format is like this: KEYWORD SomeInformationLines KEYWORD SomeInformationLines I need to pass through the file and save the position of each keyword, so that when later, user wants me to read the keyword data from the file, I can seek to the position of the keyword and read the data. The problem is some files are unix format (i.e. their lines end with linefeed, Chr(10), only rather than CR-LF, Chr(13)+Chr(10)). This is My Code:

    	FileOpen(1,FileName)
    	
    	Do Until EOF(1)
    		strLine = LineInput(1)
    		If IsKeyword(strLine) Then
    			SaveKeywordPosition( strLine, Seek(1) )
    			' The above line is where the bug comes from:
    			' e.g if the line is empty, and only an LF is in it, Seek(1) returns 2!!
    			' i.e. it virtually adds a CR and this is done for all further lines too.
    			' But whem I use Seek(1, aPreviouslySavedPosition) it goes exactly to where
    			' it should go, without accounting for extra CRs which it added while reading
                            ' the file.
    		End If
    	Loop
    	
    	FileClose(1)
    

    I also have tried to with InputString function, StreamReader and FileStream classes and check the last character of the line manually, but the IO was raises from 800KB/s to 18MB/s and runtime from 15sec to 2min. Could someone please tell me how should I handle this?!

    Visual Basic help question

  • hi
    M MohammadAmiry

    My.Computer.Scree.MousePointer=Cursors.WaitCursor

    Visual Basic csharp

  • Error Handler
    M MohammadAmiry

    Why are you still using this totally abandoned way of error handling?!!! Use Try...Catch instead: Try . _YourCodeHere_ . Catch ex1 As DataException Catch ex2 As IOException Catch ex3 As Exception Finally . . . End Try

    Visual Basic help database question

  • Reading ASCII file from the end?!
    M MohammadAmiry

    Thank you! This looks so fine!

    C# help tutorial question
  • Login

  • Don't have an account? Register

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