VS 2005 : BitBlt From Windows That Aren't Visible

Mar 9, 2010

I'm using BitBlt and GetDC to capture windows and save them to a bitmap, but a window that is covered or overlapped by another window appears with that window showing over top of it. Is there a way to stop this from happening? I have the window handle available, the graphics context, and a Process object.

View 5 Replies


ADVERTISEMENT

[2005] BitBlt Memory Leak

Feb 24, 2009

It's several years since I last used BitBlt and the like in VB6, and I'm just refreshing my memory with a little sample app before using it on the current project I'm working on in VB2005. I've come up with the following:

[Code]...

View 6 Replies

ASP Files On Windows 7 Aren't Loaded Even Though Installed IIS?

Jun 5, 2011

I don't know how to get my asp code to work on windows 7. I ran my project, it works correctly.

But for some pages I'm getting an HTTP 401.5 error.

View 1 Replies

VS 2005 Set Currently Visible Worksheet Of Excel?

Jun 13, 2010

I am exporting data to the "Sheet2" of excel using late binding. when i make excel visible to true, how to make sure that the current sheet displayed is sheet2

View 1 Replies

VS 2005 Set Panel Visible As True?

Aug 25, 2010

I have set the panel on visible as false, so it would not show up when I run the form. I am trying to set the visible as true when I enter my mouse on panel location, but it doesn't show anything....

Private Sub Panel1_Enter(ByVal sender As Object, ByVal e As System.EventArgs) Handles Panel1.Enter
Panel1.Visible = True
End Sub

How to set the panel visible as true when I enter my mouse on panel location while the visible are false?

View 33 Replies

Application Data File Not Visible With Windows Explorer?

Jan 23, 2010

An application data file, created by my own VB program, is visible to read and save from that application, but is not visible from Windows Explorer or Notepad. The icon, visible from my VB program, shows a lock. How can I remove the lock and see the program with Windows Explorer. (I need to copy to a another computer to use in a workshop next week.)

View 2 Replies

Com-visible Dll Don't Show Version Number In Windows Explorer

Sep 29, 2009

I have created a com dll in vb 2005 and used in vb6. It's working fine.

I have a question why Windows Explorer does not show it�s version number? I have properly set both the Assembly version and File version.

Again I did create a test com dll - windows explorer does show it's version number properly.

View 2 Replies

Detecting If Windows Login Screen Is Visible To User?

Apr 26, 2011

After running the following code (which locks the computer), what code must I be applying to see if the user has successfully logged into the computer and that "Lock Screen" I'd so called has disappeared?

Private Declare Function LockWorkStation Lib "user32.dll" () As Long
Private Function LockComputer()
LockWorkStation()
End Function

I will call "LockComputer", after that what do I do to see if the Lock screen so called by this function (after say 2 minutes) has disappeared or is still there asking for the password from the user.

View 2 Replies

Syntax For BitBlt That Same From Vb6 And .net?

Jun 15, 2010

i am already mad at the fact that control arrays are gone..Is the syntax for BitBlt that same from vb6 and vb.net? Can i still use the vbSrcAnd, vbSrcCopy, and vbSrcPaint?I have seen some things on going around control arrays, but how would i do some control arrays for bitblt? i tried

Dim picPicture(0) as picturebox
Dim i
for i = 0 to 10
redim preserve picPicture(i)
picPicture(i).Image = Application.Startuppath & "img" & i & ".bmp"
next

View 30 Replies

Adding A Visible Drag Handle For Splitcontainer In Windows Form?

Mar 22, 2010

how 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 Replies

Print A Windows Form Which Occupies More Than The Visible Screen And Contains Controls?

Jan 14, 2010

I need to print a windows form which contains radio buttons, checkboxes, and other controls.

Printform doesn't work - even with the scrollable option it only prints the visible screen.

The PrintDocument doesn't work, because I can't add controls to it.

I can't capture the screen image, because the form occupies more than the visible screen.

View 6 Replies

BitBlt Drawing One Image On Another?

Dec 21, 2009

I am trying to use Bitblt for drawing one image on another. but when i try to get HDC From first image it gives Negative pointer value, so BitBlt returns 0 value. is it possible to get device context from bitmap directly?

[Code]...

View 6 Replies

Bitblt To Crop An Image?

May 18, 2010

I was told to use bitblt to crop my image. But i am new to vb and am really confused as to how to do it. I am making a board game. The player chooses its colour of player (a pawn),this image is then placed on the board. I want just the pawn to show and not the box around it.

View 6 Replies

BitBlt Copy Bitmap To Screen?

Mar 7, 2012

Edit: Fixed, I created a compatibleDC for the graphics object, and a handle for the bitmap (using b.gethbitmap), then used the SelectObject function inside GDI to select those two, and used the compatibleDC instead of hDc in the BitBlt function I've been trying to draw a bitmap to the screen (device 0), however I have encountered a problem copying the graphics using BitBlt.

Initially, I was drawing directly to the desktop using SetPixel (gdi32), but it was slow, so now I am setting the pixels of a bitmap object and then creating graphics from that object, and copying the hdc of the graphics to the screen.My guess is that I am adding the HDC of the graphics object to an intptr, which essentially gives me the HDC of the container of the graphics object, which is not what I need. However even so, I have not found any information on how I could copy a bitmap to a device other than using BitBlt.

This is my current code (Windows forms app, textbox, button) The textbox is the device to copy to, and the button starts it. For testing purposes, set the textbox text to 0, and press the button. You should see a black box (50x50px) in the top left corner of your screen. The colour should be blue if it is working correctly:

Public Class Form1
Declare Function GetDC Lib "user32.dll" (ByVal hwnd As Int32) As Int32
Declare Function ReleaseDC Lib "user32.dll" (ByVal hwnd As Int32, ByVal hdc As Int32) As Int32

[code]....

The way it works is it calls the function setpx, given a location and color from within a loop iterating through all of the pixels in a box (50x50 in my code). The setpx function will then call the setpixel fuction on a bitmap b. This part is working fine.Next, it will define a graphics object g from the bitmap, and I use BitBlt to copy g's hdc (g.gethdc) to the screen. This is not working correctly?

View 1 Replies

Finding A BitBLT Equivalent As In XOR Or OR Mapping?

Oct 13, 2009

I use vb.net 2005.I want to take one image and place it on top of another image, I want to blend the images using various techniques such as OR or XOR od AND functions.I understand BitBlt does this.1) Is this the technique i should use in .net? Or is there some complicated parameters burried deep in the graphics.drawimage method?2) How do i declare the BitBlt function and what are the values of the ROP parameters?

View 9 Replies

VS 2008 - NotifyIcon And Windows 7 - Creates An Icon In The Taskbar That Is Visible To The User Upon Creation

Jan 2, 2010

I've create a VB2008 app that upon clicking the applications Start button it creates an icon in the taskbar that is visible to the user upon creation, it also shows a balloon tip at the time of creation. This all works great when the program starts but once the balloon tip timeout value has elaped, the icon, in Windows 7, disappears from the visible portion of the taskbar and becomes hidden, which is only visible if the user shows the hidden icons.

My question is this...... In the VB2008 program is there any way to set the behavior of the icon so that it remains visible on the taskbar instead of allowing the icon to become hidden?

The original design of the program was to get an environmental variable, display the value of that variable in the balloontip, hide the form and then check every 10 minutes for a change in that environmental variable. Once the form was hidden the user could see that the program was running by the presence of the icon in the taskbar and if they hovered over the icon it would display the current value of the external variable. Also if the user wanted to return the form to it's full size all they had to do was click on the taskbar icon. With Windows 7 if I hide the form and the icon is not visible in the taskbar because it too is also hiddem this may create a problem for the user as they may not even be aware that Windows 7 hides the icon. So....Is there anyway to insure that the icon remains in the Windows 7 taskbar or is this a case where I need to re-evaluate my program design?

View 2 Replies

Desktop Screenshot To Picturebox Not Working Using Bitblt?

Jul 29, 2010

[URL]

Finally "upgraded" to vbnet and got no idea how to do this! What I'm doing is using bitblt to take a screenshot of the desktop and put it in a picturebox. What I really need is just the raw data from the picture, not the picture showing on a picturebox.

Only problem is that it is not working at all!

Here is the entire sourcecode. How is it not working??

Module1
Module Module1
Public Declare Function GetDesktopWindow Lib "user32" () As Long
Public Declare Function BitBlt Lib "gdi32" (ByVal hDCDest As Long, _

[Code].....

View 15 Replies

Big Panel Visible And Not Visible Based On Selections Made By User

Jan 28, 2009

I've got a panel - that's in a group box. All of this - with lots of other textboxes on labels - is in another panel (the big panel).I make the big panel visible and not visible based on selections made by the user.This small panel - that's in the group box. I cannot seem to make it appear.Even if I leave it VISIBLE at design time - the objects in it will not appear.Is there some kind of nesting problem that I'm not aware of!

View 9 Replies

Making Menu Item Visible Or Not Visible In Master Page

Jan 25, 2011

I have five menu items that i have created as a user control and placed on the master page. Now i want one of the menu items to be visible only for particular user role and not visible for others. Here is what I did. Its not working though.

[Code]...

View 6 Replies

BitBlt Function Produces Empty Bitmap When Compiled For X86 In .NET 2.0 VB App

Oct 4, 2010

I have a BitBlt wrapper function in my VB project. It works just fine when compiled as Any CPU, but when I aim it at x86 it creates an empty bitmap. I must use x86 as other parts of the app require it. Here is the code:

Imports System.Drawing.Imaging
''' <summary>
''' Provides the static method ControlCapture used to
''' take screenshots of the specified control.

[Code].....

View 1 Replies

Jumping Between Forms - Making A Form Visible And Not Visible

Jul 17, 2009

I'm having an odd problem when making a form visible and not visible and it not continuing to function. Here is what I have happening. I have a main form (frmMain) that is an MDIParent. On this form I have a menu to open a second form (frmCalculate) and populate a listview from Items in the database.

As I click or select items in the listview on frmCalculate the tag is read and data is pulled based on the id stored in that tag and fills in various fields on the form. This works great. However, I also have a context menu attached to the listview that allows me to perform a "what if" scenerio on the items I am calculating. When I select this menu, I hide the frmCalculate and open the frmWhatIf form where I can mess around with values on the item I had hilighted in the listview on frmCalculate. Nothing is pulled from or written back to the database here, all the information is filled in from fields on frmCalculate. It just allows me to look at rising costs and how they will affect my margins.... anyway.

If I then close frmWhatIf, it brings my frmCalculate back by setting its visible propery to true (never closed frmCalculate, just hid it). At this point if I click an item in the listview I get an exception for a null reference. IF however I never hide frmCalculate, I can open and close frmWhatIF without ever having an issue. Why do I lose the functionality to select items just by hiding and unhiding the form? As a test I added two menus to the toolbar on frmMain one called hide and one called show. I then opened frmCalculate with original menu item to populate the listview and selected a few items to test that it was working and then using the hide menu I made the form invisible and the show button to bring it back. This yielded the same exception so without even opening frmWhatIf the problem still occurs.

View 3 Replies

Delete Some Files But Only If They Aren't In Use?

Nov 23, 2009

i want to delete some files but only if they aren't in use. What i did was a try/catch:

Try
My.Computer.FileSystem.DeleteFile(fileInfo.FullName)
Catch ex As Exception
End Try

but it seems that this method is very slow if i try to delete some files over network.

Is there an faster way to delete files? Is it faster to check first if an file is open? If yes, how can i check if an file is open?

View 5 Replies

Settings AREN'T Saved?

Apr 9, 2010

I have about 10 settings in my app which are set during coding, but the user can change them during the running of the app. They should then be saved so the same settings are there the next time the program is run.

View 1 Replies

Compare 2 Datasets That Aren't Identical?

Jun 5, 2011

I've just about scrambled my brain on this, searching and trying things, so I'm hoping someone sees something that I'm missing or can explain it to me. I'm new to .NET, used to do a lot of programming in VB but that was many years ago.

[Code]...

View 1 Replies

Way To Select From A List - Aren't The Two Listboxes Getting A Little Old?

Dec 22, 2009

How many times have we seen this type of selector:

I was just about to start creating this in a WinForms app, when I thought that others may have some ideas for doing this better. We need it to sort - so the right hand list will need up/down buttons. But this seems so old school. I love devexpress components, and was thinking of asking them if they would consider adding a component that handles this functionality with a slick UI.

I am thinking that a graphical representation of the objects, and a graphical representation of the listboxes - that would be a more intuitive way to move items around. Has anyone seen an open source project like this?

View 4 Replies

Excel AddIn - Keeping Windows Form Always Visible While Within Excel

Feb 29, 2012

I'm trying to upgrade an Excel VBA workbook to a VSTO Excel Add-in in VB.NET using VS 2010. In the original (i.e.- VBA) version I have a modeless UserForm (called frmMain) that floats on top and is visible at all times while the user is still within the Excel application, but is not visible if the user moves to another window outside of Excel.

For example, within Excel the user can click on any worksheet tab, select any cell, etc. and the UserForm is still visible. This is exactly how I'd like it. The problem is, that in the new VSTO add-in, I can not get the Windows form to mimic this same behavior. I use frmMain.Show() to show the form as a modeless form, but the moment the user clicks an Excel worksheet (i.e.- activates a worksheet) the form becomes hidden behind the worksheet.

[Code]....

View 1 Replies

Make Several PictureBox Images Randomly Visible = False And Then Back To Visible = True Giving The Appearance Of Flashing Or Blinking Images?

Jun 28, 2010

I have placed several PictureBox Images of different colored dots(which represent lights) on an image of a Christmas Tree. I can make the lights randomly flash using a randomGenerator and a Select case statement. However, the code is very long. There are 67 lights on this tree and the code is 71 pages long. There has to be an easier way to do this. So far I have tried the following with two images of lights just to see if it would work and it does not work:

Dim picLight(2) As
Boolean
For intX

[code]....

View 8 Replies

Will An Program Built On Windows 7 Using Vs 2008 Or 2005 Have The Compatibility With Windows Xp Or Vista

Nov 15, 2009

will an program built on windows 7 using vs 2008 or 2005 have the compatibility with windows xp or vista

View 5 Replies

VS 2005 Piracy Protection Mechanism And Windows Vista Or Windows 7

Apr 19, 2010

i 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.

View 2 Replies

C# - Aren't Short Circuited Operators The Default?

Feb 5, 2012

Given that a typical coding mantra is "Don't induce side effects in method calls." and that the only reason (that I know off - please enlighten me if I'm wrong) to not use short circuited operators is when you depend on the side effects of a method call in subsequent code. Why isn't the default operator in languages like C# and VB.NET not a short circuited version?

[Code]...

View 1 Replies







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