Thank you both... I removed the message.
MohammadAmiry
Posts
-
How to serialize static members of a class? -
How to serialize shared members of a class?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? -
How to serialize static members of a class?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? -
Connecting to SQL Server 2008 over the internet using Management Studio problemI 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
-
Large Folder Vanished to System Volume Information [modified]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
-
Run application on windows start upTry making a windows service instead of a windows application.
-
How to use third party dll at runtime with help of (dll) file path and procedure nameThe 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 ModuleThen 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!
-
How to pass a parameter to windows application form the way we can do in a web formIf I have understood you correctly, you might use commandline parameters to run your application, or as mentioned by crudeCodeYogi, by using parametrized constructors.
-
How to determine if it is a file or directory for an item under a folder? [modified]The equivalent vb code is:
Dim info as New FileInfo(fileName) Dim isFolder As Boolean = info.Attributes And FileAttributes.Directory
-
How to determine if it is a file or directory for an item under a folder? [modified]If IO.File.Exists(Path) Then 'It is a file ElseIf IO.Directory.Exists(Path) Then 'It is a folder End If
-
How to use third party dll at runtime with help of (dll) file path and procedure name -
clear variablesCould you be more specific? You may use .Dispose method to delete objects.
-
Remove a Public property from base class?!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
-
Remove a Public property from base class?!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?
-
Not sure if RichTextBox can do this?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).
-
VB 6 Shows extraneous modules at startupIn 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.
-
LineInput LineFeed problemHi 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?!
-
hiMy.Computer.Scree.MousePointer=Cursors.WaitCursor
-
Error HandlerWhy 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
-
Reading ASCII file from the end?!Thank you! This looks so fine!