Private Declare Function BlockInput Lib "user32" (ByVal FBlock As Long) As Long?

Dec 26, 2009

In Visual Studio 2008 I am using :Private Declare Function BlockInput Lib "user32" (ByVal fBlock As Long) As Long To stop input from occuring during a search-replace operation.

BlockInput(True) ' do not allow input during search and destroy
Dim cursorIcon As Cursor
cursorIcon = Cursor
Cursor.Current = Cursors.WaitCursor

Then setting it to false at the end of the operation. It did not work, so I thought maybe it was because I was calling it from a child window, so I created a function in the mainwindow, and ran it like this:

FrmMain.BlockFrmMainInput()With these functions is the Main window:

[Code]...

It did not solve the problem. I thought maybe it was because I was running under the debugger, so I tried compiling and running it debugger-free, but that did not do any better. I am still getting input when I double-click the mouse on either form.

View 2 Replies


ADVERTISEMENT

VS 2008 Way Of Coding In Stead Of Writting Long Long Paragraphs

Sep 18, 2011

Is there a easer way of coding in stead of wrighting long long paragraphs like this in one line [code]All of this is on one line and i got lots of info to put down.."The game will begin on your 16th birthday with your mother waking you up. Today you are to go to the castle for the first time. Leave your bed and open your dresser for a Strength Seed. "

View 2 Replies

Progressbar With Long Function

Mar 10, 2009

I have a situation like this:[code]This function takes several minutes. I do not have access to any kind of loop counter because the function is a big loop, but I do not want it to be done in the click event, I want the click event to call the function, as it does here. Is there any way to report the progress in a progress bar on the form with the button that called this function?

View 2 Replies

Private Sub Page_Load(ByVal S As Object, ByVal E As EventArgs)?

Jun 12, 2009

<script runat ="server" >
Dim objDT As New System.Data.DataTable
Dim objDR As System.Data.DataRow

[code]......

View 2 Replies

Sql - Function Takes Long Time For Execution?

Jun 13, 2012

Actually, I am trying to find out whether the partno is existing in the database table or not and it takes long time in count = checkCommand.ExecuteReader statement

Public Function CheckProductNo(ByVal Partno As String) As Boolean
Dim count As SqlDataReader
Dim valid As Boolean = False
Using connection As New SqlConnection

[code]....

View 4 Replies

ASP.NET (VB) Performing A Long Function Asynchronously Without Blocking The Page Thread?

Jan 15, 2012

I've been reading up on asynchronous function / web pages for ASP.NET 3.5 (we're not using v4 yet) but the ones I've seen all focus on performing a background task but then still coming back to finish up and send the response, after the task is complete.

What I want to do is simply kick off the background task (in this case a call to a web service) but then return a response to the browser immediately - ie. without waiting for the asynchronous task to complete. I don't even need to know if it succeeds or not.What is the best way to do that? I can't seem to find examples of kicking off what you might call an "orphan" background task in ASP.NET.

I thought of doing it via a javascript Ajax call on the page I show to the user, but the information passed to the web service is sensitive, so that's out of the question. But that kind of illustrates what I want to do.

[ed] Another idea: Is there an event in the ASP.NET model I can use which occurs after the response has been sent to the browser and the connection closed? ie. So more processing can occur without the user waiting for it?

View 2 Replies

IDE :: Private Sub TextBox1_TextChanged(ByVal Sender As System.Object, ByVal E As System.EventArgs) Handles TextBox1.TextChanged

Jun 10, 2011

Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged

Textbox1 how the text box by real-time data monitoring?

View 1 Replies

E.HasMorePages - Written A Function That Will Plot Long Texts Onto Printer And Should Insert A New Page Everytime

Apr 30, 2011

I'm having issues with e.HasMorePages.. I've written a function that will plot long texts onto the printer and should insert a new page everytime yPos > PrintHeight

e.g.

Module Scope var i is the count

PrintPage
if i<=10

[CODE]...

I can certainly add pages from the printpage, but my function will plot characters individually onto the printer and will increase ypos at the end of the printers width.

View 10 Replies

Private Sub Cv7import_Load(ByVal Sender As System.Object, ByVal E As System.EventArgs)

Jan 5, 2012

I'm making this program that opens the same forder in every pc but it identifies the pc name to do it.

Public Class cv7import Private Sub cv7import_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

[Code]...

but I want it to do it with the pc's name and I'm not sure how the environment.systemdirectory works, or even if it's the right one to use. Is it the right thing to use or is there a better solution.

View 12 Replies

API Function - How To Get Rid Of BlockInput

Jan 21, 2012

I am trying to rid my application of API functions, and I have only one left to get rid of, and that is:
Declare Function BlockInput Lib "User32" (ByVal fBlockIt As Boolean) As Boolean
It is used to prevent the user from entering any type of input while the program is working. I am using Visual Studio 2010, Windows 7.

View 1 Replies

VS 2008 - Using Function In Order To Get Item Code From Database Long.Parse(myReader(0)).ToString("2200000000000")

Oct 26, 2009

I would like to ask some questions related some functions i want to make in my program:

1. I am using this function in order to get a the item code from the database Long.Parse(myReader(0)).ToString("2200000000000") the result i get is: 2200000059091. The form that i want the resultset is
22 (fix value) + item code (6 characters right justified) + 00000 (fix value) 2205909100000 how should i change my code to obtain this result?

2. The programs every time it runs creates a text file which i also attached it plu1.txt, when i try to open it with notepad i see all the lines justified, on the other hand when i open the text file with Wordpad or ConTEXT the lines are not fixed, others are longer others are shorter? What should i change in my code in order to have every line fixed lenght... The code i am using is the following

Dim myReader As SqlDataReader = myCMD.ExecuteReader()

Dim fNextResult As Boolean = True

Using myWriter As IO.StreamWriter = New IO.StreamWriter("c:everest

[CODE]...

3. third and last question is that my program every time it ends show up a pop up menu which says "Text is created." Instead of this i would like to create a file lets say log.txt and every time the program runs, it will overwrite on the log.txt file a line like this: system date + Text is created + with X lines (where X are the lines of the text plu1.txt) ex. 26-10-2009 14:56 Text file created with 15 lines

View 4 Replies

Private Sub Txtbval_KeyPress(ByVal Sender As Object?

Jul 20, 2009

my code as follows

[code]...

result i get here is =0.7937005259841017310542661502

where as windows calculator figure is 0.79370052598409973737585281963615

View 16 Replies

Private Sub Btnedit_Click(ByVal Sender As System.Object?

Feb 15, 2012

Private Sub btnedit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnedit.Click

[Code]...

View 2 Replies

Private Sub Button1_Click(ByVal Sender As System.Object?

Jan 19, 2009

I have a little VB 2005 Express app that acts as a gui for an application that normally runs in a cli (cmd-like) window, as follows: Code:Public Class Form1

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim Server_Exe As String = "C:Documents and SettingsColinDesktopin 7302OpenSim.Grid.UserServer.exe"

[Code]...

1. The cmd window normally shows various status messages in colour, whereas the RichTextBox shows all messages in Black (on a white background). How can I get the RichTextBox to show the messages in the same colours that the cmd window displays?

2. As the RichTextBox fills with data, filling the box, and beyond, and the scrollbar starts to shrink, I notice that the data at the top of the RichTextBox stays there, and you would have to scroll down to see the last status message, whereas I would like it to do the reverse, i.e the last status message is at the bottom of the visible RichTextBox, and if I wanted to see the earlier messages I would have to scroll up. How can this be achieved?

View 6 Replies

Private Sub FontToolStripMenuItem_Click(ByVal Sender As System.Object ?

Dec 26, 2010

Private Sub FontToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles FontToolStripMenuItem.Click Or Button1.Click

Is it possible to make a or?

View 1 Replies

Private Sub Form1_Shown(ByVal Sender As System.Object?

Feb 25, 2011

Private Sub Form1_Shown(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Shown

View 1 Replies

Private Sub XExitButton_Click(ByVal Sender As System.Object?

Mar 19, 2010

it just gives me zero for my anwser.Can someone please make corrections?Public Class Form1 Private Sub xExitButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles xExitButton.Click

[Code]...

View 1 Replies

ByVal Src Error Any Is Not Supported In Declare Statements?

Aug 5, 2009

Code:
Option Explicit
Private Const No_ERROR = 0
Private Declare Function inet_addr Lib "wsock32.dll" (ByVal s As String) As Long

[code]...

ByVal dst As Any, ByVal src As Any-->Error: Any is not supported in declare statements i am currently using visual studio 2005.

View 3 Replies

Communications :: Private Sub Form1_Load(ByVal Sender As System.Object?

Jul 13, 2010

Why isn't this seemingly simple piece of code working?

Code: Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
For Each sp As String In My.Computer.Ports.SerialPortNames
ListBox1.Items.Add(sp)
Next
End Sub

View 9 Replies

User32.dll SendMessageA Function

Sep 20, 2009

Im working on the Hyvar.NET project, and I've just started sandboxing browser tabs. Im using the sendmessage function of win32 to manipulate each tab, but i need to send things like Webbrowser.Navigate(URL) in the sendmessage function.

So far i have this:

<DllImport("user32.dll", SetLastError:=True, CharSet:=CharSet.Auto)> _
Public Shared Function SetParent(ByVal hWndChild As IntPtr, ByVal hWndNewParent As IntPtr) As IntPtr
End Function

[CODE]................

I somehow need to send the navigation methods etc using sendmessage....

View 15 Replies

How Long Can A Stopwatch Run

Jul 27, 2011

I have a VB.NET app in which I'd like to use the Stopwatch class. The stopwatch will get reset every time it enters a particular method, which may be in less than a second, or not for hours. Is there a limit to how long you can let a stopwatch run before something bad happens? i.e. an error, or performance degradation?

View 2 Replies

Int64 The Same With Long?

Apr 4, 2011

Be it in 32 or 64 bit system?

View 3 Replies

Put A Long Description In About Box?

May 8, 2009

How do i put a long description in my about box? I can't put it through Assembly Information because it cannot fit.

View 8 Replies

Difference Between Public Sub And Private Sub And Private Function And Public Function And Sub And Shared Function?

May 31, 2011

explain me the difference between them? I'm new to visual basic, and I need to know the very basic things in Visual Basic allowing me to become a professional User

View 8 Replies

ASP.NET Feedback During Long Submit

Dec 23, 2011

This is probably a really simple thing. Basically, the user clicks a button and a potentially long running task happens. I'd like to do a few things like toggle the button's enabled state, show a spinner, etc. In VB.NET Winforms I'd just do Application.DoEvents() and the updates would happen and the code can continue. How can I do this in ASP.NET? (preferable serverside or minimal javascript)

View 2 Replies

Asp.net Run Long Task Separately?

Dec 29, 2011

I am developing a web application in asp.net vb. My current situation is,I have a main site say [URL] and another site for generating reports depending on certain user ids say [URL].If I click a button on [URL] I have to switch on the generate report page on [URL] and return to[URL]. [URL] should generate report and set a flag in database of [URL].Currently I am redirecting to the page in xyz.com and add the long running task to queue as follows and redirect back to [URL].

If ThreadPool.QueueUserWorkItem(New WaitCallback(AddressOf LongTimeTask), New Object) Then
Response.Redirect(returnURL)
End If

But the problem is its not dependable. Means some times the queue is executing correctly but some times not. There are no errors in long time task. Just the queue is not executing.

View 1 Replies

C# - Converting NAD83 UTM To Lat And Long

Feb 22, 2012

Edit So the solution I posted from Jenner at VBforums was, obviously, in VB, and I used an online converter to port it to C#. Something was lost in translations, and that's why it was 10 miles off. I'm guessing I am just misunderstanding what the algorithms at the Proj.Net discussion boards are for and that's why they weren't doing what I wanted them to.

[Code]...

View 3 Replies

Calculate Distance Between Lat And Long?

Apr 7, 2009

How i can calculate the distance between two coordinates[code]...

View 6 Replies

Conversion From Long To Byte?

Oct 7, 2010

I m new to this forum and also to VB.net programming. In an application Modbus protocol is used and I have generate LRC checksum for that. But I am stuck at conversion of a Long type data to Byte type. The long type data is for example : 4294967197. I tried all the following functions:

1.b = Byte.Parse(4294967197)
2.b = CByte(4294967197)
3.b = Convert.ToByte(4294967197)

[code].....

View 4 Replies

Count How Long Someone Is Idle?

Jul 29, 2009

Is there a way in which I can detect how long someone has been idle using a form (ie. Not clicking or entering any information into any fields/textboxes). Or would I have to implement a timer which counts this and reset it in the event handler for any entry?

View 3 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved