i have found the Hwnd for a window and i now wish to get information about this window, the location on the screen of the window and its width and height. Problem is the values i get are not anything near right.
vb.Net
<DllImport("User32.dll")> _
Private Shared Function GetWindowRect(ByVal hWnd As IntPtr, ByRef lpRect As Rect) As Boolean
[Code].....
this returns 0 for height and width and the remaining figures are nearly 0 (1.68E-311) what am i missing and how can i get this information?
I'm making a photo editor and the size of the image depends on the size of the window, like the Zoom mode in the BackgroundImageLayout property of a form. It works sometimes: when resized only a small amount, it does nothing, but when the image is resized more than that, it jumps to the right position.
vb.net Private Function GetImageRect() As Rectangle Dim r As New Rectangle() If Me.ClientSize.Width > Me.ClientSize.Height Then
I am writting a program that aims at filling up bookmarks of a template with data retrieved from a sql server db. The form opens a Word document but I can't control the position and dimensions of the word document. It seems that I can't manage to overwrite MS Word default settings for position and dimensions. I want to be able to display the word document close to the form.Here is the code that I have tried and doesn't work:
I'm upgrading my VB6 project to VB.NET and I found one of the problem below relating to dimensional array.Here's my VB6 coding :
Private Function ConvertMatrixToBase0(ByVal MyMat() As Double) As Double() Dim i, j As Long Dim ConvMat() As Double[code.]...
When i port it over to VB.NET, i encountered error message 'ReDim' cannot change the number of dimensions of an array. for the line highlighted in red. And I suspect that VB.NET need to always define the exact dimension of the array during the declaration. But for the function above, for the array of 'MyMat()', I do not know what is the exact dimension every time it runs, and that is why i need to check the dimension of the array.My question is do we have any solution in dealing unknown dimension array in VB.NET? As in VB6, we can just define Array() instead of Array (,) in VB.NET.
I am creating a ribbon for an Office application using VB.NET in Visual Studio2010. I drag an edit box onto the ribbon but am unable to resize it. How would I do that? I want the user to be able to enter and see up to about 20 characters. StringSize does not do the trick.
I'm trying to design cathodic protection for offshore pipelines using visual basics. However, I'm not very familiar with vb. I'm hoping I can start with basic calculations like finding pipe surface area etc. how I can design a dialog box to input pipe dimensions like length and diameter to enable me calculate the surface area?
Excuse me for posting this, but I have searched both Google along with this forum before asking this question, maybe I'm not using the right keywords but I apologize if it's easy to find.I would like to know how one could close a third-party window (application) if a specified string was found in the window title.
I am trouble in sorting 2 dimensions array in vb.net. One row has 5 columns. Original array have 3000 rows.How can I get the effective sorting with pdtId. I tried to find googling, cannot get the right answer to me.
(0, 0) = pdtId "string" (0, 1) = brand name (0, 2) = category Id (0, 3) = url (0, 4) = date
I am trying to compare two arrays that always have different dimensions. e.g. arr1 -> {1,2,3} and arr2->{1,2}
I did try and able to get the matching items to new array. But I am expecting to get the unmatched items only. I am expecting to compare both arrays and put only the item '3' to a new array which is in arr1 and not in arr2 e.g. arr1 -> {1,2,3} and arr2->{1,2} should result a new array with 3 arr1 -> {1,2,3,4} and arr2->{1,2} should result a array with 3,4 Is there any way of doing this for older version of .net framework without using Enumerable.Except
I'm uploading a flv / swf file and I need to capture the dimensions of those files so I could later retrieve it from a database and embed it into a page.
I would like to get the screen dimensions so I can programatically change the size of a form upto these values. I'm new to .Net and things are little different then they used to be in earlier version of VB. How do I do it?
I wounder if there is a way to get the values from array's dimensions, without knowing how many dimensions the array has.I know how to do if I know the array's dimensions, but not a clue if I don't know the array's dimensions.
Public Sub LoadFromFile() Dim sr As New StreamReader("CoverageArea.dat") Dim strAreaLine As String[code].....
I have a question about that strAreaInfo()...I left the () with no number in it so that it wouldn't have a set # of values, and then I tried to give it 3 values, but I get the error in the title. Am I doing something wrong when I declare it?
I'm reading in an image (jpg) using the code below and I need to check that the image is no bigger than 150 pixels by 150 pixels and is less than 25k, how should I do this?
I wanted to know if u define a dimension in a function or subroutine and that func/sub is called say 5 times, does the memory new block of memory get assigned to it every time the func/sub is run or does it use the one it got assigned the first time?
Is there an easy way to get the dimensions in real time of the area of a mdi parent form that is used to display the child forms (i.e. without the tool bars or title bar).
the user will pick an image on their hardrive and i will put it on a pdf file using itextsharp with vb.net. how do i manually set the dimensions of the picture?
I define 3 arrays: ID(n), Hour(n), Showed(n). If Hour(i) = actual time, I get the data pointed by ID(i), if not Showed(i).
BUT... I can add new hours or modify some existent, but I need to have the Hour array sorted. If I sort this array, the ID and Showed will point to different data.
So I though some different solutions:
1 - To make a string array with all inside (a 7 characters ID, a 5 characters Hour and 1 char for showed (T or F)). It could work, but, how can I sort the middle part of the array (Hour)? So, this don't work.
2 - A 3 dimensions "multitype" matrix (1 dimension of type Integer, the second of type Date and the third of type Boolean). I have no idea about how this can be done.
3 - A 3 dimensions string matrix, some like the "all inside" array: ID converted to a fixed size string, hour converted to a 5 chars string (hh:mm) and Showed converted to T or F. And sort the second dimension.
4 - Sell my copy of Visual Studio and drive a taxi cab
I need to create bitmaps of characters depending on a specified font. When they specify a font, they are specifying:
[Code]....
Knowing this, is it possible to determine the size that a character will be exactly if I know the character and all the information above? I have to draw them to bitmaps that are the same size as the character and no bigger.
After user entered a value into textbox (for example 4), datargidview must be create automatically(number of datargidview's columns and rows must be textbox value). And, user enter some values that among 0 and 1 into datagridview's cells. So i want to assing these values (values that are written in datgridview cells). For example, if user enter 0.25 in datagridview's cell 1, and 0.34 cell 2, 0.67 cell 3, and etc, in this instance array(1,1)=0.25, array(1,2)=0.34, array(1,3)=0.67 must be assigned. i hope, i could understand :) i illustrate this example below. i want to assign such as indexs that is written into following example table.
I'm reading a folder to assess the width x height of jpeg's, to classify them in various ways. Opening each as a bitmap and reading the bitmap width and height works but of course is laborious and very slow .... I've read various JPEG file format papers but retrieving the image pixel width and height seems none too obvious. Is there a logical way in VB to get this info quickly? My jpeg's are bog-standard ones made using VB's "Bmap.Save(Fname, ImageFormat.Jpeg)".
I have this recently converted application from vb6 to vb.net 2008. One of the errors stated is:'Point' is not a member of 'System. Windows. Forms. PictureBox'.I have searched and not found an alternative to this.Also, it says ReDim cannot change the number of dimensions in an array.
I'm making a game where the main character is a white blood cell. Right now I have a circle. 360 points. I want my character to squish against walls, jiggle while moving, etc... but I'm just at a loss as to how to even start doing this. What's the best way to implement that kind of 2-d physics?
I'm trying to write some of my own linear algebra methods, and I'd like them to work independent of the number of dimensions of the array. However, there doesn't seem to be any generic method, that I can see, for looking up a particular element in an array of arbitrary size. I mean I could write code to find the rank and then use (), (,), (,,), (,,,), etc, but that seems rather cumbersome.