VB2010 Mechanism For Obtaining A Form's Handle?
Jun 7, 2011What is the VB2010 mechanism for obtaining a form's handle?
View 1 RepliesWhat is the VB2010 mechanism for obtaining a form's handle?
View 1 RepliesI have an ArrayList that is set to Friend. Once I click my button "abc" is added to the ArrayList and then the form MsgBoxes out the Count of 1 (Correct).When I use Threadpool to count the number of objects within the ArrayList it always returns 0.
Example:
Imports System.Threading
Public Class Form1
Friend Alphabet As New ArrayList
[code]....
I am obviously getting some sort of cross-thread issue here but have no idea how to correct this. I usually just setup single threads so this is my first time playing with ThreadPool & already lost at step 1!
I have a class in vb.net like
Public Class Customer
Private _Name As String
Public Overridable Property Name() As String
Get
[Code]...
the propINfo.canRead property is always false, shouldn't this be true since base class implements the getter of the property ?
I am trying to test if my synchronization mechanism is set well and so for debug purposes, inserting a deliberate deadlock as under
mtx.waitone(-1)
mtx.waitone(-1)
but when i step through the code in the debugger, it runs fine without getting stuck here. I am sure there is no other thread doing a release on the mutex mtx
I would like to make mechanism to prevent a logfile to grow bigger than 4 Mb. Therefore I compare the filesize, get with
[Code]...
With a string value saved in the registry. Now the thing is, that sometimes a backup of the logfile is made, while the actual size is 6 Kb, and the limit as saved in the registry is 4194304. ??
I just converted my project from vb6 to vb2010 and am getting this error
Error11Name 'cdPrintSettings' is not declared.C:\Users\IT\Desktop\trial\TETRAD_.NET_UPGRADE\TetradUpgrade.NET\frmInvestorStatementPrintDialog.vb278Tetrad upgrde
this is somewhat related to my previous issue which was solved: [URL] Now my problem is none of the affected controls are changing on the form. The form itself is not frozen as an elapsed time is going fine on it. when I "F8" thru the code the I see the controls contain the correct values and if I do a messagebox display of the control contents it displays the correct value. but the controls themselves do not change on the form. for example: label1.text will still show blank even though thru code it contains "test". what am I missing here?
View 9 Repliesim tried to make a vb creator to create account but how to show the captcha in my form?
View 3 RepliesIs it possible to make a program with visual basic 2010 that does not use the actual form but instead only uses other components (e.g. Message Box) to form a complete program?
View 2 RepliesI am new to this. am wrting a program that uses the parent forms data...
but i am not able to access the parent object and use it with the client data [code]...
I have two forms, "Customer Information Summary" and "Products Sold". They are shown as separate tabs in a MDI window. When the data in "Products Sold" gets updated, I would like an event to fire from that form which could be handled in the "Customer Information Summary" form.
View 1 RepliesIs there a way in VB to make something that will simulate an advanced command prompt inside of a Windows Form? For example, something like a greenscreen app?
View 1 RepliesDim hashfromMd5 As MD5 = MD5.Create()data = hashfromMd5.ComputeHash(input)How can I get the percent of progress, progress related to "reading" the (input) -- using "data"? -- to be displayed live
View 1 Repliesi have created some shareware applications. I implemented the following mechanism for piracy protection. Before Windows Vista and Windows 7 i did write a dll file to the System32 folder with an encrypted license key. Also in the Registry under HKEY_LOCAL_MACHINE i inserted a registry key.
The problem is that with Windows Vista and Windows 7 due to the User Account Control (UAC) this is denied.
I want to ask : what other mechanism can be implemented ? Where should i store the encrypted key file and the registry key.
I want that the application can be installed for all users of a computer only once.
If i stored the key in the user's application data directory then another user could easily just install it under another user account. Also i do not want to put the key file in the application directory because that would be too obvious.
note that i create the registry key with my application and not with the installer.
I had created a form(MDI Child) which have 3 to 4 dataset on it. They all are loaded from the database at the form load event and therefore takes too much time to load and show some part of form during that time. When it load completely it shows the whole form. Is there any way that user will see the complete form instead of some broken form.
View 4 RepliesIs there a way to handle form.maximumbox.click in .net 1.1?
View 4 RepliesI have the following code to handle keypresses on the form:
Private Sub Form1_KeyDown(ByVal sender As Object, _
ByVal e As System.Windows.Forms.KeyEventArgs) Handles Me.KeyDown
Debug.WriteLine(e.KeyCode)
[Code].....
The first time I press any of the arrow keys the code is not executed and a NumericUpDown(NUD) on the form gets the focus. The rest of the times the arrow keys are pressed everything is fine, until I click on a button. Then the problem repeats, focus NUD, then fine.
Do you mean, "opens a file" or "is opened with a file"?
View 1 RepliesI'm writting a class that needs the form handle but there is a way to use it without send it as argument in the class constructor or in a property?I know that the handler is not set until the form is completely loaded so that is another problem too.The basic idea is catch the form handle without pass it as argument and handle the wm messages.
View 2 RepliesOk i'm loading a webpage in the WebBrowser Control, but what i need to do is manipulate that webpage. Here is the webpage (you will probably need to take a look so you know what i'm talking about). [URL] Now i'm trying to remove the advert at the top of the webpage OR somehow get the handle of the Java applet and set it to an x and y co-ord on my form.
View 2 RepliesI'm trying to use a asynchronous UDP-Port to recieve data on a form.I manage to receive one message at a time(for each click of btnReadData), however if I do this receive in a loop (in order to continously receive new messages), my form seems to be locked.What am I doing wrong?
Public Class FPR2DIS
Delegate Sub dDataReceived(ByVal Data As String)
Dim UDPWorker As New Worker
[code].....
I have used the below code but its not showing the msgbox. What is wrong with this code ?
Private Sub frmSimple_Disposed(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Disposed
Dim result = MsgBox("Are you sure you want to Exit ?", vbYesNo)
If result = DialogResult.Yes Then
me.Close()
End If
End Sub
Base form baseForm generate an array of childForm (3 fo them). I have one event handler in baseForm which is called when user close each childForm. The problem is that this event handler is only called when the last childForm is closed. When other childForm is closed, the event handler doesn't do anything.
View 7 RepliesI want to achieve the following:
The user drags text from any open window not related to my application ( like firefox or word, for example) onto button1 on form1 in my application. when he/she does that, a new form (called form2 that contains a richtextbox) will open and the dragged text is directly copied (or inserted) into the richtextbox of the new form. button1 has allowdrop set to true. Beyond that I don't know how to proceed.
I tried:
e.effects = DragDropEffects.Copy
But it seems it is not enough.
I am trying to put a new face on an old C program. The C program is, of course, unmanaged code, designed smartly to separate the number crunching and the interface, and the interface I'm trying to replace is X windowing. The graphics part is where it gets a little hairy, because the C is going to need to continue to draw in my new interface, based on the data the program produces. Even if I want to duplicate that data in .NET so that the .NET side can handle all of the drawing, the fact remains I'm going to need to operate on the graphics window in some fashion from C.
I gather that handles have a lot to do with the bare Win32 graphic operations. Is such a similar handle provided to, say, a PictureBox element in .NET? And if so, is it the kind of handle I can use in the unmanaged code without an issue?
I have tried and tried and tried to google for the solution for weeks now, and all I come up with are either C++ solutions (using object-oriented GDI+) or some sort of extension to the C language.
Alternatively, is there a way I can have .NET create a handle specifically for this purpose of having C draw it?
To sum it up, I am using Visual Basic .NET 2008 and a C DLL (also compiled in VS2008), so far in the little testing I've done, I've been able to marshal complex structures to and fro, but I am not sure how exactly I'd let C do any drawing on the .NET form, if that was even possible.
What I am trying to do is have a button that will pop up a dialog to where you can select a directory. Then the path of the directory will be placed in a text field.Click Button > Dialog Pops Up > Select Directory > DirectoryField.Text will equal "C:Program FilesStuff"
View 3 RepliesHow do you provide an image to the program, so the program finds that image on the screen and tells its coordinates. So if I was to provide an image of the start button, the program would tell the coordinates like (2,1000) or something similar.
View 13 RepliesI try to transfer a vb6 application to vb2010. In the vb6 I start with a login panel that the user enter uid and password autenticate with the DBServer if ok show application main menu and close the login form. the order of the me.close() after the mainform.show() does not change, The application ends.
View 5 Replieshow to place a visible image in the splitcontainer so it would be obvious for users to see that the area is movable. Like the split container in SplitContainer Class(System.Windows.Forms) which has the gray with
View 6 RepliesI have a vb.net application in which there is a main form. There are around 10 classes each having their own functionalities like tcpactions, fileactions, serialport actions etc. The user interacts with the main form and does certain actions which will invoke the methods in these classes. Now I have a notifications textarea in the mainform and i want to show the current action being performed in those classes and their results in the notifications area.
for example when a user clicks a "Start Process" Button in the form i invoke the method "launchprocess" in a class "ProcessActions". Now this method tries to launch about 7 different process and after launching it sends notification such as "process 1 launched" or if it fails it sends notifications such as "process 1 launch failed".
I currently use event handlers and use them to show notifications but with the amount of events i have to handle it is getting cumbersome and i might have to add even more classes in the future. So is there a better way of handling notifications from other classes.