
Madz
Avatar/Signature-
Posts
173 -
Joined
-
Last visited
Content Type
Profiles
Forums
Blogs
Events
Articles
Resources
Downloads
Gallery
Everything posted by Madz
-
Thats a Registry Value well i forgot about it, there is also a software name "TWEAKUI" it's from MS just download this and it will do many things for you its very little sized.
-
This might help for Session Ending Event SystemEvents.SessionEnding Event Occurs when the user is trying to log off or shutdown the system This is a cancellable event. Setting the Cancel property to false will request that the session continues to run. It provides no guarantee that the session will not end. If you are using SessionEnding in a Windows form to detect a system logoff or reboot, there is no deterministic way to decide whether the System.Windows.Forms.Form.Closing event will fire before this event. If you want to perform some special tasks before System.Windows.Forms.Form.Closing is fired, you need to ensure that SessionEnding fires before System.Windows.Forms.Form.Closing. To do this, you need to trap the WM_QUERYENDSESSION in the form by overriding the WndProc function. The following example demonstrates how to do this in a deterministic way, [Visual Basic Code] Private Shared WM_QUERYENDSESSION As Integer = &H11 Private Shared systemShutdown As Boolean = False Protected Overrides Sub WndProc(ByRef m As System.Windows.Forms.Message) If m.Msg = WM_QUERYENDSESSION Then MessageBox.Show("queryendsession: this is a logoff, shutdown, or reboot") systemShutdown = True End If ' If this is WM_QUERYENDSESSION, the closing event should be fired in the base WndProc MyBase.WndProc(m) End Sub 'WndProc Private Sub Form1_Closing(ByVal sender As System.Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles MyBase.Closing If (systemShutdown) Then ' reset the variable since they may cancel the shutdown systemShutdown = False If (DialogResult.Yes = _ MessageBox.Show("My application", "Would you care to save your work before logging off?", MessageBoxButtons.YesNo)) Then e.Cancel = True Else e.Cancel = False End If End If End Sub
-
NO you dont need to do that once you fill your dataset with some dataadapter it will automaticaly creates tables with in dataset and theri names are as like (table1), (table2) etc. and if you want to show result in datagrid just Datagrid.datasource = dataset.table("tabale1")
-
validate characters just like the minutes in MSN options
Madz replied to Winston's topic in Windows Forms
Might be by uing some GDI, coz Microsoft had not given any control for that. -
according to my openion it depends on project scenario and coding. ASP.NET is a robust techonology through which we can use the .NET Framework. well PHP is also a very good techonolgy. both contains the same situation about the coding and methods being called with in applications the remaining thing is Server where it is hosted
-
I have faced this problem while i renamed some project then i realized that both projects are using the same GUID. then i copied the entire project to some other computer and then it made the deployment package successfully.
-
I m not sure abou it , but some where i found this code please check it in this it has converted from String to Byte. Imports System Imports System.IO Imports System.Security.Cryptography Imports System.Text Class FileEncrypt Public Shared Function ConvertStringToByteArray(s As [string]) As [byte]() Return (New UnicodeEncoding()).GetBytes(s) End Function 'ConvertStringToByteArray Public Shared Sub Main() Dim fs As New FileStream("EncryptedFile.txt", FileMode.Create, FileAccess.Write) 'Creating a file stream Console.WriteLine("Enter Some Text to be stored in encrypted file:") Dim strinput As [string] = Console.ReadLine() Dim bytearrayinput As [byte]() = ConvertStringToByteArray(strinput) 'DES instance with random key Dim des As New DESCryptoServiceProvider() 'create DES Encryptor from this instance Dim desencrypt As ICryptoTransform = des.CreateEncryptor() 'Create Crypto Stream that transforms file stream using des encryption Dim cryptostream As New CryptoStream(fs, desencrypt, CryptoStreamMode.Write) 'write out DES encrypted file cryptostream.Write(bytearrayinput, 0, bytearrayinput.Length) cryptostream.Close() 'create file stream to read encrypted file back Dim fsread As New FileStream("EncryptedFile.txt", FileMode.Open, FileAccess.Read) 'create DES Decryptor from our des instance Dim desdecrypt As ICryptoTransform = des.CreateDecryptor() 'create crypto stream set to read and do a des decryption transform on incoming bytes Dim cryptostreamDecr As New CryptoStream(fsread, desdecrypt, CryptoStreamMode.Read) 'print out the contents of the decrypted file Console.WriteLine(New StreamReader(cryptostreamDecr, New UnicodeEncoding()).ReadToEnd()) Console.WriteLine () Console.WriteLine ("Press Enter to continue...") Console.ReadLine() End Sub 'Main End Class 'FileEncrypt [edit]Funny looking C#[/edit]
-
Hi , i want to add MSDE in my Setup program, is there any way to do so ??????
-
Why dont you try to save all these in a Database.
-
How To Copy A File To The HardDrive?
Madz replied to Simcoder's topic in Directory / File IO / Registry
Oh Dear, some where i have searched about C# Resources Editor code in which you might get some good example of how to extract resources from EXE files and so on -
This link might help you getting some thing .NET Redustributing .NET Framework
-
You can get this information from MSDN site which provide you the exect location of Registry from which you can determince which thing is installed or not.
-
Me too have seen this error V2Key.DLL although the key was entered correctly, just i was doing one thing wrong i removed [ - ] from key and it started gave me this error. now it has been solved using the correct lisence key.
-
How To Copy A File To The HardDrive?
Madz replied to Simcoder's topic in Directory / File IO / Registry
there are several methods for this. images and other strings are stored in EXE Resources Section. An EXE File has severel parts , The analysis of the managed EXE file structure employs the following common definitions: File pointer The location of an item within the file itself, before it is processed by the loader. This location is a position (an offset) within the file as it is stored on disk. Relative virtual address (RVA) The address of an item once it has been loaded into memory, with the base address of the image file subtracted from it�in other words, the offset of an item within the image file loaded into memory. The RVA of an item almost always differs from its position within the file on disk (the file pointer). Virtual address (VA) The same as the RVA except that the base address of the image file is not subtracted. The address is referred to as virtual because the operating system creates a distinct virtual address space for each process, independent of physical memory. For almost all purposes, a virtual address should be considered as simply an address. A virtual address is not as predictable as an RVA because the loader might not load the image at its preferred location if a conflict exists with any image file already loaded�a so-called base address conflict. Section The basic unit of code or data within a PE/COFF file. In addition to code and data sections, an image file can contain a number of sections, such as .tls (thread local storage) or .reloc (relocations), that have special purposes. All the raw data in a section must be loaded contiguously You need to work with SYSTEM.REFLECTION namespace which provide access to almost all things in this . If you want to get some resources from EXE files please just open that exe file in Visual Studio IDE it will show you all resources located in that PE File ( we use PE for Portable Executeable ) Please Check This Link Dot net Reflection -
How To Copy A File To The HardDrive?
Madz replied to Simcoder's topic in Directory / File IO / Registry
Hello this might help you while copying file Imports System Imports System.IO Public Class Test Public Shared Sub Main() ' Specify the directories you want to manipulate. Dim path As String = "c:\Program Files\MyTest.txt" Dim path2 As String = path + "temp" Try Dim fs As FileStream = File.Create(path) fs.Close() ' Ensure that the target does not exist. File.Delete(path2) ' Copy the file. File.Copy(path, path2) Console.WriteLine("{0} copied to {1}", path, path2) ' Try to copy the same file again, which should succeed. File.Copy(path, path2, True) Console.WriteLine("The second Copy operation succeeded, which was expected.") Catch Console.WriteLine("Double copying is not allowed, which was not expected.") End Try End Sub End Class -
but i heard that when 4 demanded for more the other killed him and remainng devided his jewls. and lived happily ever after
-
have you tried to develop a new class by inheriting that base class,
-
I have VISIO 2002 Professional . last night i was watching a video about UML in Visual Studio. in that he quoted that only VISUAL STUDIO .NET ENTERPRISE ARCHITECT supports UML Development so we can not add nay datatypes ot Visio 2002 its just for modeling and it will not generate any type of code.
-
This is the code to read file from disk or from some where else System.Xml.XmlTextReader reader = new System.Xml.XmlTextReader("c:\\IntroToVCS.xml"); string contents = ""; while (reader.Read()) { reader.MoveToContent(); if (reader.NodeType == System.Xml.XmlNodeType.Element) contents += "<"+reader.Name + ">\n"; if (reader.NodeType == System.Xml.XmlNodeType.Text) contents += reader.Value + "\n"; } Console.Write(contents); Please check you might be doing some thing worng while accessing the WEB Service or Parsing XML data.
-
access to registry key denied
Madz replied to a_ahmed's topic in Interoperation / Office Integration
Do you have ADMINISTRATIVE ACCESS to System. otherwise you might not be able to write any thing to registry -
My Dear I think , installer which is integerated with VS IDE is best and much much easier to use. i have Install Shied Developer 8. and when first time i run it i was unable to understand where to go and where to not to go. I have used ghost installer since long time ago its realy very nice but it requires some work.
-
But some one told me about that " FrmMDI.IsMDIContainer = TRUE Client.MDIPARENT = SOMEFORM there would be some memory leackage and this is not an appropriate method of displaying forms ? can any one explain it please about it.
-
How to: Using Cryptograpic Services ?
Madz replied to Madz's topic in Directory / File IO / Registry
Thanks, last night i was trying to encrypt one file this is the code but i was unable to decrypt it. public static void Main(string[] args) { string sFile = "madz.txt"; FileStream fso = File.Create(sFile); RijndaelManaged rm = new RijndaelManaged(); CryptoStream cs = new CryptoStream ( fso, rm.CreateEncryptor(), CryptoStreamMode.Write); StreamWriter swo = new StreamWriter(cs); swo.WriteLine("I Love you my Sweet Heart !"); swo.Close(); cs.Close(); fso.Close(); } -
I use MSSQL Server ,and still not touched orcle. with cross platform development i like MYSQL the best.