Click here to Skip to main content
       

.NET Framework

 
You must Sign In to use this message board.
Search this forum  
    Spacing  Noise  Layout  Per page  Show 
GeneralRe: [VB.NET 2008] Change form from separate thread (Windows CE)memberEddy Vluggen20-Nov-12 9:21 
steve_9496613 wrote:
About passing a parameter in an object when I start the thread, I can't do this because in the Compact Framework (not the full .NET) only the method Thread.Start() is supported, the method Thread.Start(Object) is not supported.

Aw, darn. Without that, it's not possible to pass the form as an argument.
 
Since AggiornaLabel is a method of the form (as should be), you'd need to have a reference to the form in order to invoke it. An ugly bypass would be to use a "shared" member, aka a static method. Works similar to the shared integer called 'iii'.
Imports System.Threading
 
Public Class Form1
    Dim MyNewThread As Thread
 
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click        
        'create the thread 
        MyNewThread = New Thread(AddressOf MyThread.MyThreadExecute)
        MyNewThread.Name = "NuovoThread"
        MyThread.ThatForm = Me
        'start the thread
        MyNewThread.Start()
    End Sub
 
    Public Sub AggiornaLabel(ByVal What As String)
        If InvokeRequired Then
            Invoke(New Action(Of String)(AddressOf AggiornaLabel), New Object() {What})
            Return
        End If
 
        Label1.Text = What
    End Sub
End Class
 
Public Class MyThread
    Private Shared miii As Int32 = 0
    Public Shared ThatForm As Form1
 
    Public Shared Property iii() As Int32
        Get
            Return miii
        End Get
        Set(ByVal value As Int32)
            miii = value
        End Set
    End Property
 
    Public Shared Sub MyThreadExecute()
        Do
            iii = iii + 1
            ThatForm.AggiornaLabel(iii.ToString)
            Thread.Sleep(100)
        Loop
    End Sub
End Class
That's abusing things a bit; a class that's never instantiated would be a module, eliminating the need to declare each member being 'shared';
Module MyThread
    Private miii As Int32 = 0
    Public ThatForm As Form1
 
    Public Property iii() As Int32
        Get
            Return miii
        End Get
        Set(ByVal value As Int32)
            miii = value
        End Set
    End Property
 
    Public Sub MyThreadExecute()
        Do
            iii = iii + 1
            ThatForm.AggiornaLabel(iii.ToString)
            Thread.Sleep(100)
        Loop
    End Sub
End Module
Bastard Programmer from Hell Suspicious | :suss:
If you can't read my code, try converting it here[^]
They hate us for our freedom![^]

GeneralRe: [VB.NET 2008] Change form from separate thread (Windows CE)membersteve_949661320-Nov-12 21:25 
Yessss! It works! Thumbs Up | :thumbsup:
 
Both with the class than with the module.
In my project I have used a class but, if it is a cleaner way, I can still use a module, the project is not so advanced so the changes will not be too painful.
 
Thank you very much Eddy, your help has been precious!
GeneralRe: [VB.NET 2008] Change form from separate thread (Windows CE)memberEddy Vluggen21-Nov-12 5:07 
You're welcome Smile | :)
QuestionBinding gridview from webservice using jquerymembersaravanan2509218-Nov-12 20:41 
Hi friends,
Now I want to bind gridview from webservice using jquery,ajax or javascript..
How can i achive that..
AnswerRe: Binding gridview from webservice using jquerymemberPhanindra26119-Nov-12 6:05 
The solution to your problem comes in three steps
1. Write [WebMethod] (service) to return data from the datatable. But before returning it to your ajax method call convert it to an array. This is because javascript does not understand things such as datatable,dataset,datarow etc...
 
2. In your aspx page header write an ajax call which should look something like this:-
$(document).ready(function() {
$.ajax({
type: "POST",
contentType: "application/json; charset=utf-8",
url: "Default.aspx/BindDatatable",
data: "{}",
dataType: "json",
success: function(data) {
for (var i = 0; i < data.d.length; i++) {
$("#gvDetails").append("<tr><td>" + data.d[i].UserId + "</td><td>" + data.d[i].UserName + "</td><td>" + data.d[i].Location + "</td></tr>");
}
},
error: function(result) {
alert("Error");
}
});
});
inside the script tags. UserName,UserId,Location are column names from the database.
3. Bind a dummy datatable to your gridview. It should look something like this:
private void BindColumnToGridview()
{
DataTable dt = new DataTable();
dt.Columns.Add("UserId");
dt.Columns.Add("UserName");
dt.Columns.Add("Location");
dt.Rows.Add();
gvDetails.DataSource = dt;
gvDetails.DataBind();
gvDetails.Rows[0].Visible = false;
}
 
this is done so that correct data is mapped to the correct columns in gridview.
All the best.
QuestionNlog for .Net compactmemberTalSt17-Nov-12 19:24 
Hello
 
Do you know of any example for Nlog for .Net compact 3.5?
 
Any help how to start working with Nlog for .Net compact?
 
Thanks!
AnswerRe: Nlog for .Net compactmvpRichard MacCutchan17-Nov-12 21:43 
TalSt wrote:
Do you know of any example for Nlog for .Net compact 3.5?
Try here[^].
One of these days I'm going to think of a really clever signature.

GeneralRe: Nlog for .Net compactmemberTalSt18-Nov-12 1:15 
Thanks, but I need specific information Wink | ;)
GeneralRe: Nlog for .Net compactmvpRichard MacCutchan18-Nov-12 1:36 
Then you need to post a specific question; we cannot guess what your problem may be.
One of these days I'm going to think of a really clever signature.

GeneralRe: Nlog for .Net compactmemberTalSt18-Nov-12 1:55 
I am looking for logging code for .Net compact, for example writing to log file, msgbox amd so.
 
thanks!
GeneralRe: Nlog for .Net compactmvpRichard MacCutchan18-Nov-12 2:06 
Did you try a Google search[^]?
One of these days I'm going to think of a really clever signature.

AnswerRe: Nlog for .Net compactmemberjschell19-Nov-12 9:11 
TalSt wrote:
Do you know of any example for Nlog for .Net compact 3.5?

 
You know that NLog source code is available right?
 
So if you do not find the current binary workable, get the source and modify it as you see fit.
News.NET projects in koramangala,bangalorememberraji.1138716-Nov-12 22:24 
Keywords
• Final year projects.
• Projects for Final year students.
• MCA Final year project Titles.
• MCA Final year project PPT.
• MCA Final year project Report.
• MCA Final year project ASP.NET.
• MCA Final year project Topics.
• MCA Final year project in companies.
• MCA Final year project in Bangalore.
• BCA Final year projects in Bangalore.
• Diploma Final year projects in Computer science.
• Diploma Final year projects.
• Diploma in final year projects in Bangalore.
• IEEE projects for computer science.
• IEEE projects list
• IEEE projects for ECE.
• IEEE projects on networking.
• IEEE project Titles.
• IEEE projects 2013.
• IEEE projects in Java.
• IEEE projects for J2ee.
• IEEE projects in Java 2011.
• IEEE projects in Java at Bangalore.
• IEEE projects in Bangalore.
• Live projects in Bangalore.
• Networking projects in Bangalore.
• projects for final year students.
• Final year projects for computer science in bangalore.
• Final year projects in JAVA at bangalore.
• Final year projects to pic bangalore.
• Final year projects 2013 or free projects.
• Final year projects in IT.
• B.Tech final year projects for cse JAVA.
• MCA projects.
• MCA final year projects in JAVA.
• Mca final year projects in PHP.
Content
 
Are you looking for a IEEE projects in Bangalore????We are there to help you....Projects in all the Streams such as BE/B.Tech,ME/M.Tech,Arts & Science.....
 
Dear students we offer final year IEEE projects in the following domain in Domlur
 

ABOUT DOMAIN at CEGONSOFT Pvt LTD
1. IEEE Projects
2. Web Based Application
3. Windows Based Application
4. Networking Application
 
ABOUT PROJECT TECHNOLOGIES at CEGONSOFT Pvt LTD
1. JAVA
2. J2EE
3. DOT NET
4. VB. NET
5. ASP.NET
6. ASP.NET + C#
7. VB.NET + C#
8. ASP.NET + VB
9. C# .NET
10. PHP/MYSQL
 

Projects for Final year students.
Smile | :) MCA Final year project ASP.NET.
MCA Final year project Topics.
MCA Final year project in companies.
MCA Final year project in Bangalore.
BCA Final year projects in Bangalore.
Diploma Final year projects in Computer science.
Diploma Final year projects.
Diploma in final year projects in Bangalore.
IEEE projects on networking.
IEEE project Titles.
IEEE projects 2013.
 
For more details
contact or walkin to
 
Aruna Devi T
7483065765
 
Cegonsoft Pvt.Ltd
#270,Sancia House,14th cross
Domulur Layout,
Bangalore-71.
www.cegonsoft.com/dotnet.php[]
News2013 final year IEEE projectsmemberraji.1138716-Nov-12 22:20 
Keywords
• Final year projects.
• Projects for Final year students.
• MCA Final year project Titles.
• MCA Final year project PPT.
• MCA Final year project Report.
• MCA Final year project ASP.NET.
• MCA Final year project Topics.
• MCA Final year project in companies.
• MCA Final year project in Bangalore.
• BCA Final year projects in Bangalore.
• Diploma Final year projects in Computer science.
• Diploma Final year projects.
• Diploma in final year projects in Bangalore.
• IEEE projects for computer science.
• IEEE projects list
• IEEE projects for ECE.
• IEEE projects on networking.
• IEEE project Titles.
• IEEE projects 2013.
• IEEE projects in Java.
• IEEE projects for J2ee.
• IEEE projects in Java 2011.
• IEEE projects in Java at Bangalore.
• IEEE projects in Bangalore.
• Live projects in Bangalore.
• Networking projects in Bangalore.
• projects for final year students.
• Final year projects for computer science in bangalore.
• Final year projects in JAVA at bangalore.
• Final year projects to pic bangalore.
• Final year projects 2013 or free projects.
• Final year projects in IT.
• B.Tech final year projects for cse JAVA.
• MCA projects.
• MCA final year projects in JAVA.
• Mca final year projects in PHP.
Content
 
Are you looking for a IEEE projects in Bangalore????We are there to help you....Projects in all the Streams such as BE/B.Tech,ME/M.Tech,Arts & Science.....
 
Dear students we offer final year IEEE projects in the following domain in Domlur
 

ABOUT DOMAIN at CEGONSOFT Pvt LTD
1. IEEE Projects
2. Web Based Application
3. Windows Based Application
4. Networking Application
 
ABOUT PROJECT TECHNOLOGIES at CEGONSOFT Pvt LTD
1. JAVA
2. J2EE
3. DOT NET
4. VB. NET
5. ASP.NET
6. ASP.NET + C#
7. VB.NET + C#
8. ASP.NET + VB
9. C# .NET
10. PHP/MYSQL
 

Projects for Final year students.
MCA Final year project Titles.
MCA Final year project PPT.
MCA Final year project Report.
MCA Final year paloreroject ASP.NET.
MCA Final year project Topics.
MCA Final year project in companies.
MCA Final year project in Bangalore.
BCA Final year projects in Bangalore.
Diploma Final year projects in Computer science.
Diploma Final year projects.
Diploma in final year projects in Bangalore.
IEEE projects for computer science.
IEEE projects list
IEEE projects for ECE.
IEEE projects on networking.
IEEE project Titles.
IEEE projects 2013.
IEEE projects in Java.
 
For more details
contact or walkin to
 
Aruna Devi T
7483065765
 
Cegonsoft Pvt.Ltd
#270,Sancia House,14th cross
Domulur Layout,
Bangalore-71.
www.cegonsoft.org
www.cegonsoft.net Smile | :)
QuestionWebsite Developemntmemberradha123 from Hyderabad15-Nov-12 1:39 
HI,
I am planning to develope a website using dotnet.
Let me the process of developing a website
From front end?
or back end?
how i have to plan
It is movie based website.
AnswerRe: Website DevelopemntmvpRichard MacCutchan15-Nov-12 2:41 
You need more than dotnet, take a look at http://www.asp.net/[^], where you will find lots of useful information.
One of these days I'm going to think of a really clever signature.

GeneralRe: Website DevelopemntprotectorPete O'Hanlon15-Nov-12 3:00 
Wow. Someone really has a hard on for your posts. Countered.

*pre-emptive celebratory nipple tassle jiggle* - Sean Ewington

"Mind bleach! Send me mind bleach!" - Nagy Vilmos

CodeStash - Online Snippet Management | My blog | MoXAML PowerToys | Mole 2010 - debugging made easier

GeneralRe: Website DevelopemntmvpRichard MacCutchan15-Nov-12 4:12 
Thanks again. I guess the answer "Please make an effort to learn", is not always appreciated.
One of these days I'm going to think of a really clever signature.

GeneralRe: Website DevelopemntmemberPaul Conrad15-Nov-12 10:37 
Richard MacCutchan wrote:
"Please make an effort to learn", is not always appreciated.

My thought is people these days want to have solutions already spoon fed to them.
"Any sort of work in VB6 is bound to provide several WTF moments." - Christian Graus

AnswerRe: Website Developemntmemberjschell15-Nov-12 8:07 
radha123 from Hyderabad wrote:
It is movie based website.

 
Which means what? That you want the user to be able to view a video of some sort that originated from your site?
 

radha123 from Hyderabad wrote:
how i have to plan

 
First step - requirements.
For example what is a realistic, not pie in the sky, estimate for the following
- Total number of users
- Average number of users
- Peak number of users
- Number of videos.
- Types of videos (30 seconds, 5 hours, HD, etc.)
- Number of videos
- How the content is managed (all users manage own videos, some users do, only company does.)
- How do the users interact with the system (is it watch one video a day, video editing, searching, etc.)
GeneralRe: Website Developemntmemberdojohansen20-Nov-12 6:02 
Wow. I'm amazed you bother to answer with what was actually asked for. Smile | :)
 
Personally I feel the responsible answer is something along the lines of "unless this is a pet project to learn, you aren't ready for it; either study and practice for a long time, or hire someone who can program to do the job".
 
The question betrays that we are dealing with an absolute beginner (by assuming that there is one way in which websites are or should be developed).
AnswerRe: Website DevelopemntmemberZaf Khan19-Nov-12 17:24 
I think given the options that you gave,
backend makes more sense.
 
Theres no point in having a pretty site if the links dont work correctly.
 
On the flip side, visitors dont mind an "average" or "not-so-flash" as long as they find the INFORMATION (movie in this case), then its more likely they will come back again.
Questionis Windows-8 can run Webservice that work with FrameWork3.5?membergoldsoft11-Nov-12 9:08 
hi
 
i build my Webservice on FrameWork 3.5 (C# Visual studio 2008)
 
it work excellent on Windows-7 and XP - and it work excellent if i run Through Visual-Studio.
 
i try to run on Windows-8 and i got error.
 
1. i try to setup the Application pool IIS on .NET v2.0 Classic
 
2. i try to check the .NET framework 3.5 (include .net 2 and 3) on Windows features on/off
 
the error:
 
Detailed Error Information:
Module StaticFileModule
Notification ExecuteRequestHandler
Handler StaticFile
Error Code 0x80070032
Requested URL http://localhost:80/WS_TEST_SETUP/Service1.asmx
Physical Path C:\inetpub\wwwroot\WS_TEST_SETUP\Service1.asmx
Logon Method Anonymous
Logon User
Anonymous
 
Before I go back to Windows-7 what i can do ?
AnswerRe: is Windows-8 can run Webservice that work with FrameWork3.5?membern.podbielski13-Nov-12 21:08 
This error does not say anything. What are you getting when you try to open service address?
No more Mister Nice Guy... >: |

QuestionSpeech Recognition (System.speech)membersaurabh orange vyas10-Nov-12 0:10 
I am facing many problems with .net framework's speech recognition technology
 
Here is my code it checks only for 2 choices black and white but when i say 1 it changes background color to white(this is really weird) I have already done computer training and even when i say 1 and it thinks it detected it right i get a confidence of 0.9 which blows my mind
 
Imports System.Speech.Synthesis
Imports System.Speech.Recognition
 

 
Public Class Form1
 

 

 
Dim speaker As New SpeechSynthesizer
Public WithEvents recog As New SpeechRecognitionEngine
 
Private Sub Form1_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing
recog.RecognizeAsyncStop()
recog.Dispose()
 
End Sub

 
Private Sub getcolorintoarray()
 

 

 
End Sub
 
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
speaker.SpeakAsync("Hello")
 
Dim grammarbuilder As New System.Speech.Recognition.GrammarBuilder
 
Dim choices As New System.Speech.Recognition.Choices({"Black", "White"})
 

grammarbuilder.Append(choices)
 

 
Dim grammar As New System.Speech.Recognition.Grammar(grammarbuilder)
 

recog.LoadGrammar(grammar)
 
recog.SetInputToDefaultAudioDevice()
 
recog.RecognizeAsync(RecognizeMode.Multiple)
 

End Sub
 
Private Sub recog_SpeechRecognized(ByVal sender As Object, ByVal e As System.Speech.Recognition.SpeechRecognizedEventArgs) Handles recog.SpeechRecognized
 

 

 
If e.Result.Confidence > 0.8 And e.Result.Text = "Black" Then
 
MsgBox(e.Result.Confidence)
Me.BackColor = Color.Black
 
ElseIf e.Result.Confidence > 0.8 And e.Result.Text = "White" Then
MsgBox(e.Result.Confidence)
Me.BackColor = Color.White
 
End If
 

 
End Sub
 
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
recog.RecognizeAsyncStop()
 
End Sub
 
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
 
recog.RecognizeAsync(RecognizeMode.Multiple)
 

End Sub
End Class

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   


Advertise | Privacy | Mobile
Web03 | 2.6.130617.1 | Last Updated 18 Jun 2013
Copyright © CodeProject, 1999-2013
All Rights Reserved. Terms of Use
Layout: fixed | fluid