473,320 Members | 1,746 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

On back form

How can I make a form to stay on back in vb6? On desktop level, or someting like this?
Aug 23 '06 #1
2 1404
sashi
1,754 Expert 1GB
Hi Arapila,

pls refer to below attache code segment, take care my fren..

the code..
Expand|Select|Wrap|Line Numbers
  1. '**************************************
  2. 'Windows API/Global Declarations for :Always On Top
  3. '**************************************
  4. Declare Function SetWindowPos Lib "user32" _
  5.     (ByVal hwnd As Long, _
  6.     ByVal hWndInsertAfter As Long, _
  7.     ByVal X As Long, _
  8.     ByVal Y As Long, _
  9.     ByVal cx As Long, _
  10.     ByVal cy As Long, _
  11.     ByVal wFlags As Long) As Long
  12.  
  13. Public Sub AlwaysOnTop(myfrm As Form, SetOnTop As Boolean)
  14.  
  15.  
  16.     If SetOnTop Then
  17.         lFlag = HWND_TOPMOST
  18.     Else
  19.         lFlag = HWND_NOTOPMOST
  20.     End If
  21.     SetWindowPos myfrm.hwnd, lFlag, _
  22.     myfrm.Left / Screen.TwipsPerPixelX, _
  23.     myfrm.Top / Screen.TwipsPerPixelY, _
  24.     myfrm.Width / Screen.TwipsPerPixelX, _
  25.     myfrm.Height / Screen.TwipsPerPixelY, _
  26.     SWP_NOACTIVATE Or SWP_SHOWWINDOW
  27. End Sub
  28.  
the usage..
Expand|Select|Wrap|Line Numbers
  1. AlwaysOnTop Form1, True
  2.  
Aug 23 '06 #2
thanks, but i have this function. I search for the oposite of on top. I want to make a form to stay on back. I saw this function at desktopx, i think...
Aug 23 '06 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

8
by: Ralph Freshour | last post by:
Is it possible to inhibit the browser Back/Fwd buttons via PHP? Thanks...
2
by: Mike Brearley | last post by:
I was wondering if there was an easy way to have a form set up so that when the submit button is pressed, it goes to a confirmation page that contains a back button that goes back to the page that...
8
by: Galina | last post by:
Hello I have 6 dependent list boxes on my ASP page:  Faculty;  Lecturer;  Course;  Course occurrence;  Group;  Week commencing date. When faculty is selected, lists of lecturers and...
29
by: Tom wilson | last post by:
I can't believe this is such an impossibility... I have an asp.net page. It accepts data through on form fields and includes a submit button. The page loads up and you fill out some stuff. ...
6
by: guoqi zheng | last post by:
In a regular html form, when user press "enter" key, the form will be submitted. However, in ASP.NET web form, a form will only be submitted (post back) when a special button is clicked. Many...
7
by: Sridhar | last post by:
Hi, I have a question regarding the Page_Load method and Back Button of Internet explorer. I have created a webform. In that webform I have several Text Boxes. Also I have two buttons. When I...
0
by: John Phelan-Cummings | last post by:
Goal: To improve an application's performance by basing sub forms on queries: The application has a front and back-end. There is no SQL server back-end involved. I use a module file for,...
4
by: Rolf Rosenquist | last post by:
From a page with a form I collect the fields in the next page. The fields are compared with a database and if a certain condition does not fit, I want to go back to the first page with the form,...
8
by: Harvey Schmidlapp | last post by:
I have a fairly complex form (generated by means of an ASP 3 page). The form is used to define a query against a database. After running a query, the user hits their browser's back button and goes...
25
by: zmickle | last post by:
Excuse my noobness. I am managing an access database that is shared by 4 users. Management does not want to use any technologies outside of access for this application (no SQL Server, etc). I...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.