Create A Pointer To A Form?

Feb 10, 2010

In VB6 I have several child forms that have Subs and Controls with the same names.I need to access these Subs and Controls from public subs (in a module) that have a reference to the Active Form.[code]...

View 1 Replies


ADVERTISEMENT

Create Pointer To Value Types?

Nov 12, 2010

I'm by no means a good programmer and I'm just trying to wrap my head around some of this stuff, so please forgive me if this is a dumb question.I want the following to produce a message box that says "2", not "5":

Public Class SomeClass
Private SomeInt As Integer = 5
Private SomeListOfInts As New List(Of Integer)

[code].....

View 1 Replies

[2008] Create A Pointer To A String?

Feb 3, 2009

I have just started to try to duplicate what I have done in Autohotkeys language.

What I need to do is point to a string variable - I will explain.

I'm reading from my own asci font files that contain big letters made up of characters, used for chat forums: EG.

[a_ch]
___oo___
__o__o__
_oooooo_

[Code]....

What I then want to say is a_ch=letter. But it is in a loop, so I can't do it directly. I want to point to lettername which contains the string of the variable name.

How can I point to the address of lettername?

In autohotkey language, it would be easy:

%lettername%:=letter

View 23 Replies

VS 2008 Pointer - Error32'System.Reflection.Pointer' Has No Type Parameters And So Cannot Have Type Arguments

Jul 15, 2010

I have an open source project I converted to vb.net. I solved all the errors, except for one. This is the C# line

[Code]....

View 4 Replies

Mouse Pointer At Form Border Style?

Apr 19, 2010

I have a problem in a vb.net windows application.I have a form with Sizable form border style. but i want to resize it only from TOP & BOTTOM. I have done the code for this.

But when i move the mouse on form's RIGHT & LEFT border, the mouse pointer gets changed to resize mode. When i drag it form size does not change. but when i try to resize it from LEFT whole form moved to LEFT. I do not need it.

View 1 Replies

VS 2008 Assigning Form Pointer To Variable?

Aug 31, 2010

What I want to do is either trivial, or likely impossible in the .NET framework.

I have a number of forms, with various pictureboxes, labels, etc. in each. Same names for the same items on each form. Only one form is visible at a time. What I need is some way to assign to a variable in the code which form is currently in use, such that I can reference the control on that form in a single statement.

That is, I have set up (already) references to the individual forms (call them frmForm1, frmForm2, etc.). So I can write to a textbox as:

frmForm1.textbox1.text="Hi there."
frmForm2.textbox1.text="Hello world."

What I need to be able to do is something like:

currentform = frmForm2
currentform.textbox1.text="Display on visible box"

Is such a thing even possible? Obviously, the way .Net normally wants to work is to verify everything at compile, and there is (of course) no way for it to know if whatever "currentform" points to even has a "textbox1" control.

save me a LOT of long-winded IF-THEN-ELSE to see which form is currently displayed for each and every time I want to display something. [FWIW, I *could* right everything out to every form, but I feel that would waste to much CPU time.]

View 6 Replies

Visual Studio 2010 - Find The Coordinates Of The Pointer (mouse) When It Is Clicked On The Form

Jan 27, 2010

I have a vb.net application, and I want to know how to find the coordinates of the pointer (mouse) when it is clicked on the form. Not much else to say, so I'll leave it like that.

View 3 Replies

C++ - Declare Pointer To Pointer In COM/ATL?

Dec 29, 2010

How can I declare pointer to pointer in ATL. Actually I have a handle which I want to pass by address to function. As shown below

STDMETHODIMP Function(HANDLE* hHC) //HANDLE declared as void * so actual type is void **

OR

STDMETHODIMP Function(LONG **hHC)

And want to access this function from the VB client.

View 1 Replies

C++ - In What Form An Void Pointer Can Be Sent Via Pipe To Another Process In A Different Process Address Space

Mar 23, 2012

I want my vb.net dll to get the data sent from c++ project(exe).Can any body help on in what form this void pointer can be sent via pipe. The void pointer corresponds to enums or structures. I have to get this structures/enums on the vb.net dll end. I have mentioned about using pipe. My question is as what type the pointed to data can be send over the pipe so that I can easily handle the received data at the vb.net dll end.

View 1 Replies

Create A Windows Form Application Program That Can Create Games Something Like Gamemaker Or Klik?

Aug 4, 2010

Hello I want to create a windows form application program that can create games something like Gamemaker or Klik & Play (butt less advanced) with D&D "Drag and Drop" events and actions.

View 7 Replies

Create A Create A New Connection To Database And Produce A New Dataset For Form?

Apr 17, 2009

I have produced an application which works with datasets but I now wish to provide the user the ability to add and admend records within the database.But i wish to do this in a seperate form.My current dataset instanciates classes onLoad.Should i try passing the Dataset to the new form class? although I have the problem where by when i pass the dataset to the form class using code below i get this problem:[code]Should i just create a create a new connection to the database and produce a new dataset for this form? or is there a better way to do this?

View 2 Replies

VS 2005 What Can Use Instead Of A Pointer

May 1, 2010

I understand there are no pointers in VB.Net. I need to use something similar.The issue is that I have a structure that represent a deck of cards, with elements showing how many of each type of card there is. So I have my_deck.ace, my_deck.two, and so on.What I want to do is set a pointer called current_element that refers to any element in the structure. It may one time point to my_deck.three, and another time to my_deck.nine, and so on. It could point to any element.What I want to do is, for instance to set current_element to point to my_deck.ace, then decrementing current_element would reduce the count of aces by one.[code]that would work, but it's inelegant, I have about 30 different operations to perform, some of them using several lines of code. I'd like to avoid this if at all possible. I could tolerate doing it 2 or 3 times, but not 30.

View 8 Replies

SQL Data Access: VB2008 / VB2010 - WinForms - Create A Datasourse And Drag / Drop Fields Or Tables On A Form To Create A Grid

Oct 22, 2010

I have used VB (versions 2 - 6) through many years; however, I am crash-course training myself into the VB2008 / VB2010 world kicking a screaming. I would like suggestions as to what SQL database access method should I focus more on in my learning process without making me feel that I'm a million years behind. I know I have WinForms where I can create a datasourse and drag / drop fields or tables on a form to create a grid (not really what I'm looking for).

My trouble isn't so much designing the form but in how I access the database. Theres XML, LINQ to SQL, ADO.NET, and many other methods. Not only do I need to grasp these methods quickly but I also need to know what type of projects I should create. What I mean is...I was thinking that I would design a WinForm app; however, I see that there are WPF apps and others to chose from. This is getting deep. I know it depends on the project that I'm working on. My plans are to write an app based off of either an SQL Express 2008 or SQL Server 2008 database. This first app will be standalone for now but may later become multi-user. I know I'm far behind on my learning curve coming from VB6. I have read a bit on VB2005 / 2008 / 2010. I own
both VB2008 and VB2010. I use VB2008 at work. I know ADO.NET is still alive but by what I read online, it's a dying method and is only kept for backward compatibility. XML and LINQ to SQL and other methods are all pretty new to me.

View 1 Replies

Change The Pointer To Custom?

Oct 11, 2009

I need to change the default windows pointer to this: not generally, just in my program. (Form1) There's a Pointer Control But I Dont Know What That Does.

View 7 Replies

Compiled C Dll Can't Set Pointer When Called From ASP.NET App?

Dec 10, 2009

I've got a 3rd party C application that's compiled to a non-.NET non-COM DLL. It has one simple function declared like so: Declare Function CapiTaxRoutine Lib "taxcommono.dll" (ByVal sInData As String, ByVal OutputData As String, ByVal intINPutLength As Long) As Integer

If I place the taxcommono.dll in my path (C:WindowsSystem32 is what I'm using because it's what the vendor recommends),I can wire up a call to the function and it works just fine.It returns a 1 or 0 for success/failure, but it also sets the value of the OutputData string parameter (using some C pointer magic I'm not familiar with) to a huge fixed width format return record that has the data I need.When I call it from a .NET .exe application, it works just fine.When I try to call it from an ASP.NET application via a referenced compiled .NET wrapper DLL, it runs but can't set that string.In order to get it to run, I can't have taxcommono.dll in my path, but rather have to place it in my Bin directory of the web project.Does anyone know of a reason it can set the pointer when called from an .exe application but not when called from a web app?The .NET wrapper DLL I'm using works when called from our ERP software, which is not web based. But when I add a reference to that same DLL in the web app, it won't give me that output value.am used to just getting a return value instead of a function setting the value of one of my input parameters.

View 1 Replies

How To Change The Cursor Pointer

Mar 30, 2009

im in a project using drag and drop events and.. , when i drag a label image, i need to change te cursor pointer from an image that is on a labelike the SO windows when you drag a file appears like a mirror with alfa minimun so its like the image but more transparent when i drag i need to change the cursor pointer from an image that i'm dragging by the way im, using visual studio .net and im programming in visual basic

View 6 Replies

How To Get The Function Pointer From Class

Nov 5, 2011

Public Class Form1 Public Declare Function GetModuleHandle Lib "kernel32" Alias "GetModuleHandleA" (ByVal lpModuleName As String) As IntPtr Public Declare Function GetProcAddress Lib "kernel32" Alias "GetProcAddress" (ByVal hModule As IntPtr, ByVal lpProcName As String) As IntPtr

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

Dim hmod As IntPtr = GetModuleHandle(Nothing) 'Work Dim addrs As IntPtr = GetProcAddress(hmod , "TestFunction") 'Not work, always NULL why??

View 3 Replies

Mouse Pointer As Icon?

Feb 20, 2012

How do I change my mouse cursor/icon to use a image or icon. I want to make a simple "wack a mole" type game but I dont know how to change the pointer to a icon or at least get a image to follow the pointer.

View 7 Replies

Object Properties Via Pointer?

Feb 23, 2010

I have a form that has 100 text boxes with 100 coinciding labels. I want them hidden until another function populates the text boxes with data gathered elsewhere. The data could be between 1 and 100.

I would like one loop where I can assign the data to the correct text box, set it visible and set the label visible. I can not figure out how to do this in VB, or know if it is even possible.

Here is an example of what I would like to do

Dim i As Long = 1
Dim textbox As String = "textbox"

[code]....

I would also like to do this to hide all the items on the form in the on load event.

View 16 Replies

Passing A Pointer To A Structure To A C DLL?

Sep 28, 2010

Private Declare Function src_simple Lib "libsamplerate.dll" (ByVal data As IntPtr, ByVal converter_type As Integer, ByVal channels As Integer) As Integer<br/>
Private Declare Function src_strerror Lib "libsamplerate.dll" (ByVal err As Integer) As IntPtr<br/>
<br/>
<StructLayout(LayoutKind.Sequential, Pack:=1)> _

[code]....

View 1 Replies

Pointer - Rewrite A C++ Library

Jan 4, 2012

I'm trying to rewrite a C++ library. But I have an issue. I'm not extremely pointer-savvy. In the C++ class there is a std::vector that holds unsigned int pointers (vector<unsigned int*>), and the int pointer just points to an array of integer data.

Here is the C++ code I'm a bit unsure about:

unsigned int* relocation = m_relocations.front();
m_relocations.pop();
unsigned int* reloc = *(unsigned int **)relocation;

View 3 Replies

Reading A Structure Using A Pointer?

May 3, 2011

I am trying to use VirtualQueryEx to read the memory of a process (first instance of notepad in this case). This function returns a pointer to the MEMORY_BASIC_INFORMATION structure. I am trying to read this structure.But everytime I try to access a member of the structure, I get a zero, which indicates I am messing something up.I am copying my code here.

-Coder_in_distress
Imports System.Runtime.InteropServices
Module Module1[code].....

View 4 Replies

Set Null Pointer In Program?

Sep 17, 2009

I am using a DLL written in C#, and one of its API's wants to be used as such, (this is the sample useage they give, but it is also written in C#)[code]...

View 18 Replies

Show The Pointer In The TextBox2

Apr 23, 2009

I have three TextBoxes, how can I let the pointer show in the TextBox2 when I load the Form I treid this but didn't succeed

Me.TextBox2.Focus()

View 15 Replies

Using Pointer To Type In Dictionary Value?

Feb 23, 2011

This small snippet of code is to increment a count value (integer) which is stored in a dictionary using my referenced object as a key. When the dictionary is small, multiple lookups aren't a big deal but this particular dictionary can get quite large.

Private RefCount As IDictionary(Of ILifeTimeManaged, Integer)
......... CODE HERE.....
Private Sub IncrementRefCount(ByVal entity As ILifeTimeManaged)
Dim prevCount As Integer
''# if we have no reference entry, add one and set its count to 1
[Code] .....

I find a corresponding dictionary entry then increment the int stored in the value, or add a new dictionary entry. Is it a bad idea to use a pointer to the dictionary value? Then I can avoid the second key lookup when I already have gotten the value. How would you implement it? Is this even possible in .NET4? Can I do it using IntPtr do you think? [URL]
RefCount.Item(entity) = prevCount + 1

View 2 Replies

VS 2008 - What Is Different From A Delegate To A Pointer

Feb 2, 2010

I have been looking into delegates today, have come across them a few times but haven't understood them. I started thinking today that a Delegate is like a Pointer (for those who don't know a pointer is a reference to a location used in C++ and other languages than VB) So how much of a pointer is a delegate? what can a delegate do that a pointer/pointers cant?

Similarly does anyone else agree with me that all .NET languages should be able to do the same things, why cant i use pointers or logical shift operators in VB.NET? Would you guys think that being able to use code from any .net language within your code would be advantageous?

View 16 Replies

VS 2008 API String Pointer?

Aug 28, 2010

I'm calling an API that returns a string pointer but I can't find anyway to return the string it points to.

Is it possible in VB.Net, I see VB6 had a STRPTR function but I can see a .net alternative.

View 3 Replies

Which Mouse Pointer Is Selected

Aug 25, 2010

I want to know which mouse pointer is selected anywhere in windows (so also outside my application).

I've looked into Cursor.Current but I can't figure it out. Perhaps someone here can tell me how it's done?

View 2 Replies

Wpf :: Hide Mouse Pointer?

May 13, 2011

I am attempting to hide the mouse pointer when there has been a few seconds of inactivity and then re-show the pointer again when the user moves the mouse. I have been able to get the mouse pointer to hide and re-show as I require it, however when I execute grid.Children.Clear() and grid.Children.Add() the mouse pointer re-appears (but again hides after a few seconds of inactivity).

My code is as below:
Private Sub Window1_MouseMoved(ByVal sender As Object, ByVal e As MouseEventArgs) Handles MyBase.MouseMove

[code]....

View 1 Replies

Change Mouse Pointer On Timer_Tick?

Feb 26, 2009

Change mouse pointer on Timer_Tick? [code]...

View 6 Replies







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