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
H

hassanasp

@hassanasp
About
Posts
25
Topics
17
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • thread problem
    H hassanasp

    'i made class in seperate file Imports System.Threading Class program Private Class MessageInfo Private iteration As Integer Private message As String Public Sub New(ByVal iteration As Integer, ByVal message As String) Me.iteration = iteration Me.message = message End Sub Public ReadOnly Property Iterations() As Integer Get Return iteration End Get End Property Public ReadOnly Property Messages() As String Get Return message End Get End Property End Class Public Shared Sub DisplayMessage(ByVal state As Object) Dim config As MessageInfo = TryCast(state, MessageInfo) If config Is Nothing Then Dim count As Integer For count = 0 To 2 Step count + 1 Console.WriteLine("a thread pool example") Thread.Sleep(1000) Next Else Dim count As Integer For count = 0 To config.Iterations - 1 Step -1 Console.WriteLine(config.Messages) Thread.Sleep(1000) Next End If End Sub End Class 'and try to use it in sub Main Imports System.Threading Module Module1 Sub Main() ThreadPool.QueueUserWorkItem(MessageInfo.DisplayMessage) Dim info As New MessageInfo(5, "a thread pool example with arguments") ThreadPool.QueueUserWorkItem(MessageInfo.DisplayMessage, info) Console.WriteLine("Main method complete. press enter") Console.ReadLine() End Sub End Module error Error 1,2,3 Type 'MessageInfo' is not defined. C:\Documents and Settings\Sokar\My Documents\Visual Studio 2005\Projects\ConsoleApplication16\ConsoleApplication16\Module1.vb 7 25 ConsoleApplication16

    Ahmed hassan

    Visual Basic help csharp visual-studio tutorial

  • problem with thread program converting from c# to vb.net
    H hassanasp

    i tried to convert this code i made class in seperate file Imports System.Threading Class program Private Class MessageInfo Private iteration As Integer Private message As String Public Sub New(ByVal iteration As Integer, ByVal message As String) Me.iteration = iteration Me.message = message End Sub Public ReadOnly Property Iterations() As Integer Get Return iteration End Get End Property Public ReadOnly Property Messages() As String Get Return message End Get End Property End Class Public Shared Sub DisplayMessage(ByVal state As Object) Dim config As MessageInfo = TryCast(state, MessageInfo) If config Is Nothing Then Dim count As Integer For count = 0 To 2 Step count + 1 Console.WriteLine("a thread pool example") Thread.Sleep(1000) Next Else Dim count As Integer For count = 0 To config.Iterations - 1 Step -1 Console.WriteLine(config.Messages) Thread.Sleep(1000) Next End If End Sub End Class 'and try to use it in sub Main Imports System.Threading Module Module1 Sub Main() ThreadPool.QueueUserWorkItem(MessageInfo.DisplayMessage) Dim info As New MessageInfo(5, "a thread pool example with arguments") ThreadPool.QueueUserWorkItem(MessageInfo.DisplayMessage, info) Console.WriteLine("Main method complete. press enter") Console.ReadLine() End Sub End Module error Error 1,2,3 Type 'MessageInfo' is not defined. C:\Documents and Settings\Sokar\My Documents\Visual Studio 2005\Projects\ConsoleApplication16\ConsoleApplication16\Module1.vb 7 25 ConsoleApplication16

    Ahmed hassan

    Visual Basic csharp help tutorial

  • problem with thread program converting from c# to vb.net
    H hassanasp

    i try to convert c# code to vb.net code but i have probelm with execute displayMessage in Main sub .I am trying to covert the code at many websites which provide coverting service but most of it have the same error can any one concert it to vb.net code using System; using System.Collections.Generic; using System.Text; using System.Threading; namespace ConsoleApplication13 { class Program { private class Massegeinfo { private int iterations; private string massage; public Massegeinfo (int iterations,string massage) { this.iterations=iterations; this.massage=massage; } public int Iterations{get{return iterations;}} public string Massage{get{return massage;}} } public static void displayMessage(object state) { Massegeinfo config=state as Massegeinfo ; if (config==null) { for(int count=0;count<3;count++) { Console.WriteLine("a thread pool example"); Thread.Sleep(1000); } } else { for(int count=0;count < config.Iterations;count++) { Console.WriteLine(config.Massage); Thread.Sleep(1000); } } } static void Main(string[] args) { ThreadPool.QueueUserWorkItem(displayMessage); Massegeinfo info = new Massegeinfo(5, "A thread pool example with arguments"); ThreadPool.QueueUserWorkItem(displayMessage, info); Console.WriteLine("Main method complete. press enter"); Console.ReadLine(); } } }

    Ahmed hassan

    Visual Basic csharp help tutorial

  • Syntax error (missing operator) in query expression
    H hassanasp

    not working

    Ahmed hassan

    C# database help announcement career

  • Syntax error (missing operator) in query expression
    H hassanasp

    updatecom.CommandText="update test2 set name='" + textBox1.Text + "' job= '" + textBox2.Text +"' title='" + textBox3.Text + "'where id=" + textBox4.Text + "";

    Ahmed hassan

    C# database help announcement career

  • connectionstring "/"
    H hassanasp

    When T try to write connectionstring I have error with c# connectionstring: code C# con.ConnectionString="Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=Test;Data Source=HASSAN-2D6107E7\SQLEXPRESS"; error message :Error 1 Unrecognized escape sequence but when try to use the same connection string using vb.net no error why dose not c# support "/"?

    Ahmed hassan

    C# csharp security help question

  • Serial port
    H hassanasp

    I have simple project abaut serial port and I need to test it but i have only one computer .Is there any way to make a virtual serial port connection using one computer?

    Ahmed hassan

    C# question

  • help in OleDbDataReader
    H hassanasp

    the problem is when write(reader.)no property item found in C# but in vb is found label1.Text = reader.Item[0].ToString; Error 1 'System.Data.OleDb.OleDbDataReader' does not contain a definition for 'Item'

    Ahmed hassan

    C# csharp help

  • help in OleDbDataReader
    H hassanasp

    i want to convert this vb.net code to c# code but i have problem with oledbdatareader i have missing code or i cannot convert this line into C# Me.Label1.Text = reader.Item(0).ToString. code with vb is working code: Dim con As New OleDbConnection Dim scom As New OleDbCommand Dim reader As OleDbDataReader While reader.Read Me.Label1.Text = reader.Item(0).ToString End While code with c# is not working missing line scom.Parameters.AddWithValue("@A", textBox1.Text); scom.CommandText = "Select Name from Table1 where (id=@A)"; scom.CommandType = CommandType.Text; scom.Connection = conn; OleDbDataReader reader = scom.ExecuteReader(); while (reader.Read()=true) { label1.Text= reader.; //probem is here coannot found item() }; property item(0) not found in C# code can any one help me

    Ahmed hassan

    C# csharp help

  • (missing code} detect path service
    H hassanasp

    Imiss in this code detect path of servivce Sub ReadSvcs() 'of his old football Dim ListSvcs() As ServiceProcess.ServiceController 'games from back in the day, Dim SingleSvc As ServiceProcess.ServiceController 'when "your mother and I were dating." But the Dim LVW As ListViewItem 'warm fuzzy of nostalgia, ListSvcs = ServiceProcess.ServiceController.GetServices 'knowing that yes, you accomplished something, makes the world 'ListSvcs = SingleSvc.GetServices 'knowing that yes, you accomplished something, makes the world lvwServices.Items.Clear() 'feel a bit easier to deal with, and Try 'eventual death acceptable, almost as though we For Each SingleSvc In ListSvcs 'have made LVW = lvwServices.Items.Add(SingleSvc.DisplayName) 'indelible marks upon the history of whatever. LVW.SubItems.Add(SingleSvc.ServiceName) 'But a sigh usually caps off the standard cock- LVW.SubItems.Add(SingleSvc.Status.ToString) 'stroking session of the BBS-days bullshit, when we had LVW.SubItems.Add(SingleSvc.ServiceType.ToString) 'only 32 baud modems. Maybe it's that I need to know 'LVW.SubItems.Add(SingleSvc.Site.Name) Next 'how little I knew, how young I was, to re- Catch e As Exception 'assure myself of the growth that I have (?) experienced, MessageBox.Show("Could not initialize Windows Service engine. Restarting your computer may work", "Fatal Error: " & e.Source) End Try 'magic marker lines with my handle and the date, maybe End Sub 'a dial-i

    Ahmed hassan

    Visual Basic help question

  • Stop/Start a service
    H hassanasp

    that code diplay all current program installed on my computer, i need to control this programs ,when i select program from listbox1 and click button service stop(and anthor button to start)?anyone help me plseae code Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim key As Microsoft.Win32.RegistryKey Dim mainkey As Microsoft.Win32.RegistryKey Dim iLp As Integer mainkey = Microsoft.Win32.Registry.LocalMachine.OpenSubKey("SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall") Dim sKeys() As String = mainkey.GetSubKeyNames For iLp = 0 To sKeys.Length - 1 key = mainkey.OpenSubKey(sKeys(iLp), False) ListBox1.Items.Add(key.GetValue("DisplayName") & " - " & key.GetValue("Version")) Next iLp End Sub

    Ahmed hassan

    modified on Sunday, April 6, 2008 4:55 PM

    Visual Basic windows-admin help question announcement

  • How Can i start?
    H hassanasp

    I am working with vb.net 2005 so there are many function is not exsit in vb.net 2005 as stop() as and start

    Ahmed hassan

    Visual Basic question career

  • How can I ?????????????
    H hassanasp

    SELECT * from tablename where (@Month = month(Date) and @year = year(Date)) try this and give me feedback

    Ahmed hassan

    Database database question

  • how to add 7 days to my date filter
    H hassanasp

    how to add 7 days to my date filter i want to add 7 days to date the user will select select employee_Id from attendance where [date]='2005-01-10' + 07

    Ahmed hassan

    Database tutorial

  • add checkbox to listbox
    H hassanasp

    I want to insert checkbox in a listbox for selecting purpose

    Ahmed hassan

    Visual Basic

  • Export data from DataGridView to excel
    H hassanasp

    i wont code export data from DataGridView to excel

    Ahmed hassan

    Visual Basic

  • Arabic language
    H hassanasp

    thank you for this help

    Ahmed hassan

    Visual Basic question

  • Arabic language
    H hassanasp

    In a program in textbox

    Ahmed hassan

    Visual Basic question

  • Arabic language
    H hassanasp

    How can I change my language keyboard into Arabic only

    Ahmed hassan

    Visual Basic question

  • validation help
    H hassanasp

    please send to me code

    Ahmed hassan

    Visual Basic help
  • Login

  • Don't have an account? Register

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