Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  HOME    TRACKER    Visual Basic

Unable To Unload Within This Context

why im seeing this error when i unload all the Pictures which were created at run time using control array.

this is the code im using

For P = 1 To Picture1.UBound Step 1
Unload Picture1(P)

View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Er '365': Unable To Unload Within This Context
Private Sub Form_Resize()
If ResizeSuspend = True Then Exit Sub
If Me.WindowState = 1 Then Unload Me: Exit Sub
lvwShortcut.Height = Me.Height - 1620 + (1 + ToolbarLarge) * 240
lvwShortcut.Width = Me.Width - 330
End Sub
Why is it choking on the Unload Me?

Unable To Unload Within This Context??
Hi All!

I'm trying to unload a webbrowser controll created at runtime.
But I get "run-time error '365', unable to unload within this context" all the time. Anybody got any idea why?

Unable To Unload In This Context Error
i have a combo box controlling serial input.... it has the values 1-4 to select the com port upon the Click event. when i select an invalid com port, i have an error pop up, then it returns to the main screen. if i try to exit, the program closes fine.

however, if i select a valid port and the program starts reading in the serial data, and i click exit, i get a runtime error 365... unable to unload within this context.

i never got this error when i used a textbox to get the port number. what do i need to change?

RunTime '365' Unable To Unload In This Context.
Hello all.
I am getting a 'RunTime '365' Unable to unload in this context.' error. I looked at some of the forums on here and in the msdn but neither could describe exactly the code I have. I do have an unload me in a data control but it is not a validate event. It is an event called Completed which means the data control has finished the call to the DB.
Are there any other causes for this error besides what is in the msdn? Or is the unload me call a problem in all data controls?

Thanks for any answers....


Unable To Unload Within This Context (Error 365)
Ok, i get this error, and its because i attempt `Unload Me` from a sub called from a Validate event.

I`ve solved the problem in what i consider to be a horrible way (set a boolean, check for that boolean in the forms activate event, and unload the form from there instead).

What would the pleasant solution be? Say you want to go to a form, and on that form you enter a number in a text box, tab off the text invoking the validate event, which does some work, then unload the form.

Nothing fires after a validate event, so how would you solve this?


Runtime Error 365 Unable To Unload Within This Context , Help, Please
I add a bunch of controls at runtime, and finally I want to remove one of it, but I got a error

Run time error: 365 Unable to unload within this context

Could any one tell me what's the possible reason, and how could it figure it out?



Unable To Unload Within This Context... Refreshing Problems
I have been making a sheet music program (prints and saves sheet music for the ocarina, a wind instrument) and one of the problems i have with it, is that i cant refresh the notes, which are pictureboxes created at runtime in a larger picturebox (which i use to move ALL the notes up and down, aka, scroll)

So if you resize the program, the notes will stay in the same position and any new notes you put in there will be on the next line...

the code i had to fix this, was set up so that every time you added a note, its value would be passed to a variable array, and when the form was resized, it would delete all the notes on the form, and reload it (probably time consuming) anyway, it never got around to that stage. I got this error message: Unable to unload within this context (Error 365) I didnt know what that ment, and spent an hour revising code (found some other mistakes though, lol) anyway, i searched the internet, and whadaya know, i cant unload things from the paint function, the resize code, object move event, or reposition event of a form.

i need help refreshing these pictures, i have included code in the attachment, please dont distribute it.

oh, i commented out the old refresh command, if you needed to find it..

"unable To Unload Within This Context"- Run Time Error 365
Hi all,

the code given below is giving above error..


Private Sub cmb_Project_Click()
Dim conn As New ADODB.Connection
Dim rs_Param As New ADODB.Recordset
Dim txtbx As TextBox

If conn.State = 1 Then conn.Close
conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "New.mdb;Persist Security Info=False"

If rs_Param.State = 1 Then rs_Param.Close
rs_Param.CursorLocation = adUseClient
rs_Param.Open "Select * from tbl_Parameter where project='" & cmb_Project & "'", conn, adOpenDynamic, adLockReadOnly

If Text1().Count > 1 Then
For i = 1 To Text1().Count - 1
Unload Text1(i)

For i = 1 To Label16().Count - 1
Unload Label16(i)

For i = 1 To Combo1().Count - 1
Unload Combo1(i)

End If

tot_Params = rs_Param.RecordCount

Dim NextVal As Integer
For i = 1 To tot_Params - 1
NextVal = Text1().Count
Load Text1(NextVal)
Text1(NextVal).Top = Text1(NextVal - 1).Top + Text1(NextVal - 1).Height + 50
Text1(NextVal).Visible = True
Text1(NextVal).Text = ""
Next i

For i = 1 To tot_Params
NextVal = Label16().Count
Load Label16(NextVal)
Label16(NextVal).Visible = True
Label16(NextVal - 1).Caption = rs_Param(1)
Label16(NextVal - 1).Top = Text1(i - 1).Top
Next i

For i = 1 To tot_Params
NextVal = Combo1().Count
Load Combo1(NextVal)
Combo1(NextVal).Visible = True
Combo1(NextVal - 1).Top = Text1(i - 1).Top
Combo1(NextVal).AddItem "Typo"
Combo1(NextVal).AddItem "Knowledge"
Combo1(NextVal).AddItem "Partially Keyed"
Next i

End Sub

Unable to unload dynamic controls on Combo Click event.

Please suggest me an alternative.

"Unable To Unload Within This Context" Error
I am developing a server browser which uses control arrays. It worked fine under Windows Me, but I recently upgraded to XP and I now get the error "Unable to unload within this context". (Err. 265).

This happens under the Winsock1_DataArrival event.

If Not CurrentPacket(Index) = List11.ListCount Then
Timer24(Index).Enabled = True
Exit Sub
Timer24(Index).Enabled = False
If Not Index = 0 Then Unload Timer24(Index) '<< affected line
End If

I checked the MSDN library and it said that this sort of error occurs in events that affect the object in question (i.e. Unload Me in Form_Resize or Unload Combo1(1) in Combo1_Click, etc.), but this involves a completely different control.

Is it because the timer, at that moment, is currently executing its code? I also get the error sometimes with the Timer code which closes and then unloads the Winsock item.


BTW, the Index variable applies to the subroutine parameter Index (i.e. Timer24_Timer (Index As Integer)). The Timer and Winsock indicies are identical.

Unable To Unload A Form Using Unload
This problem is a strange one....atleast for me.I have used the following code in a form called frmSubScreen:

Function show_mgr(emp_id As String)
frmMgrScreen.mgr_id = emp_id
unload frmSubScreen
End Function

This works fine.The new form is shown & frmsubscreen gets unloaded.The problem is in the next snippet of code:
Private Sub cmbViewChoice_Click()
txt = "40001"

If cmbViewChoice.ListIndex = 0 Then
frmFirstProcessScreen.emp_id = txt
unload frmSubScreen
ElseIf cmbViewChoice.ListIndex = 1 Then
frmFirstCtqScreen.emp_id = txt
unload frmSubScreen
ElseIf cmbViewChoice.ListIndex = 2 Then
frmFirstClientScreen.emp_id = txt
unload frmSubScreen
End If
End Sub

When this code placed in the same form is executed the new form is shown depending on the right if case but the frmSubScreen form is not unloaded.What i mean is the new form is displayed but then i get an error message - "unable to unload within this context" run time error 365.

Can anyone figure this out?Any help will be appreciated.
Thanks a lot

Unable To Unload A Form Using Unload
This problem is a strange one....atleast for me.I have used the following code in a form called frmSubScreen:

Function show_mgr(emp_id As String)
frmMgrScreen.mgr_id = emp_id
unload frmSubScreen
End Function

This works fine.The new form is shown & frmsubscreen gets unloaded.The problem is in the next snippet of code:
Private Sub cmbViewChoice_Click()
txt = "40001"

If cmbViewChoice.ListIndex = 0 Then
frmFirstProcessScreen.emp_id = txt
unload frmSubScreen
ElseIf cmbViewChoice.ListIndex = 1 Then
frmFirstCtqScreen.emp_id = txt
unload frmSubScreen
ElseIf cmbViewChoice.ListIndex = 2 Then
frmFirstClientScreen.emp_id = txt
unload frmSubScreen
End If
End Sub

when this code placed in the same form is executed the new form is shown depending on the right if case but the frmSubScreen form is not unloaded.What i mean is the new form is displayed but then i get an error message - "unable to unload within this context" run time error 365.

Can anyone figure this out?Any help will be appreciated.
Thanks a lot

Unload Not Within Context
I am aware that you cannot unload a control array from within a change event. However, why is it I cannot unload the control when it is not that control I am changing?

I have a filelist control, a combo and an optionbutton array. At runtime the optionbutton array gets populated with a thumbnail picture from the list of images in the filelist control. The combo contains a bunch of patterns (e.g. *.jpg, *.bmp etc.). When I first load the form it works fine, I change directory and the optionbutton array gets unloaded and loaded fine. But whenever I change the dropdown and select a different pattern, it fires the filelist pattern change event which refreshes the filelist then calls my createthumbs procedure. It is here the unload optionbutton fails with "Cannot unload array within current context" which is stupid because I'm not trying to unload it from within iteself.


Unable To Show Modal Form Within This Context
Private Sub cmdImportDwgs_Click()
Dim dbs As Database
Dim rst As Recordset
ProjectName = txtProjectName
If Len(ProjectName) = 0 Then
MsgBox "You must select a project or enter a Project Name."
Exit Sub
End If
Set dbs = OpenDatabase(App.Path & "PLCDB.jdb")
Set rst = dbs.OpenRecordset("Select * from Projects where Projects.Name = '" _
& ProjectName & "' and Projects.Type <> null;")
If rst.RecordCount > 0 Then
gProjectName = txtProjectName
gProjectType = rst.Fields("Type").Value
Set rst = Nothing
Set dbs = Nothing
'frmDwgToDB.Show 1
GoTo ShowForm
Exit Sub
End If
Set rst = Nothing
Set dbs = Nothing
If tbnCLogix.Value = False And tbnPLC5.Value = False Then
MsgBox "You are about to create a new Project." & vbCr & "Please Select A Project Type"
Exit Sub
If tbnCLogix.Value = True Then
gProjectType = "Clogix"
gProjectType = "PLC5"
End If
End If
AddProject (ProjectName)
gProjectName = txtProjectName
'frmDwgToDB.Show 1
frmDwgToDB.Show 1
End Sub

I am running this code from a button on my main form.
I keep getting the error with this code
any suggestions ??



Impossible To Unload In This Context
i have a form, and 4 bottons to move from current page to next and to previous one:

Private Sub Scorrimento_Pag_Click(Index As Integer)
Select Case Index
Case 0
MyPagina = 1
Case 1
MyPagina = MyPagina - 1
Case 2
MyPagina = MyPagina + 1
Case 3
MyPagina = MyElenco.Count
End Select
End Sub

Private Sub visualizza()
Dim i

For i = Me.MyControl.Count - 1 To 1 Step -1
Unload Me.MyControl(i)
Next i
end sub
this work correctly!

now i put a text box in the form to move to a specific page:

Private Sub pag_Validate(Cancel As Boolean)
If (Me.pag < 1) Or (Me.pag > MyElenco.Count) Or Not (IsNumeric(Me.pag)) Or (MyPagina = CInt(Me.pag)) Then
Me.pag = MyPagina
MyPagina = CInt(Me.pag)
End If
End Sub

if i use the text box to move to another page it generates error:
run-time error: 365
impossible to unload in this context

refered to bold line:

Private Sub visualizza()
Dim i

For i = Me.MyControl.Count - 1 To 1 Step -1
Unload Me.MyControl(i)
Next i
end sub

I suppose the two procedure are similar.... but why the second one don't work?

Unable To Unload
I'm currently getting the error "Unable to unload object in this context". It occurs in this code
Code:If intLoaded > 0 Then
  For i = 1 To intLoaded
    Unload lblName(i)
    Unload lblPrice(i)
    Unload lblType(i)
    Unload lblETA(i)
    Unload chkAvailable(i)
  Next i
End If
When the form loads, it loads all the information pertaining to the main meals in the database. This works fine. However, if the user then selects that they wish to view Drinks, it is supposed to unload all the labels there, and then create them afresh with the information from the database pertaining to drinks. however, it gives that error.

Strangely, on a form where I wrote the code the first time, it works.
Code:If intoptions > 0 Then
  For i = 1 To intoptions
    Unload optOption(i)
  Next i
  frmOption.Height = 1095
  cmdAccept.Top = optOption(0).Top + 400
End If

This code works, by unloading all of them correctly, and gives no error. i cannot see how it is different to the one above. Any help is definetely appreciated.

Unable To Unload
I ran into an error I had never heard of before.

Run-time error '365'
Unable to unload within this context.

MSDN says this is because I have an Unload within the Change, Click or Drop-Down event of a combobox. I admit I do have an unload in the click event of a combobox, but what is so wrong with that?!?!?! I am trying to make a fairly intuitive UI that allows a user to make a series of choices in a combo box. Whenever the final decision is made, a msgbox pops up to confirm the choice. If they click "OK", then the form needs to unload. So where the heck else am I supposed to put the Unload event?

To get the functionality I want I don't see any way to have my Unload outside of the scope of the combobox_click event...

Anyone ever run into this before? Or any suggestions on how to minimize the changes to my UI and be able to Unload the form?

Thanks for the help...


Unable To Unload Element
Little question,

I have made a ActiveX usercontrol with indexes which will load on request of the user. Every time the user selects a different option the controls have to be unloaded first before new can be loaded.

On the screenschot (attatched file) you can see what i mean with this control function.

My code is the follow:
'Erase code (first handle)
If PCVakantiePlanning.Count > 0 Then
For Runner = 1 To PCVakantiePlanning.Count - 1 Step 1
Unload PCVakantiePlanning(Runner)
Next Runner
End If

'Rebuild code
If Teller > 0 Then
Load PCVakantiePlanning(Teller)
PCVakantiePlanning(Teller).Left = PCVakantiePlanning(0).Left
PCVakantiePlanning(Teller).Top = Teller * 100
PCVakantiePlanning(Teller).Visible = True
End If
Loop until ...........

But the problem is how to unload the controls, VB gives me still errors when this code runs at the user commands. Does anyone know how to handle this problem?

Ps Index 0 have to be visible on all times for the other controls (scroll etc)

Unable To Unload Control
I have a pices of code which unload labels. It worked fine. I moved it to another program and I got
"Run time Error 365"
"Unable to unload within this context"

the code is
If n< myLabels.UBound Then
For i = myLabels.UBound To n + 1 Step -1
Unload myLabels(i)
End If

what's the problem?
Please help.

Unable To Unload And/or End Program Properly
I have tried so many things, and I have tried posting in DivX forums, and so far have been unable to obtain help. I am up against it on this one. I have tried everything I can think of. Visual Basic isn't my language of choice, but jobs are jobs, and you have to do them. Please help me in my problem.

Read the thread here. To see everything I have tried.

Basically I cannot get the program to end properly. I have tried many configurations! I am about to pull my hair out.

I would greatly appreciate any time and help someone can offer to assist me in this endeavor.


Form Does N't Unload Ompletly By Unload Method Then What Is Its Solution
Form does n't unload ompletly by unload method then what is its solution ...?

Do We Have To Unload The Controls In A Control Array Before We Unload The Form?
I load some controls in a control array in a form. When I unload the form, do I have to unload these controls explicityly using code, or will they be unloaded from the memory automatically?

Difference Between Unload And Query Unload Events?
What is the difference between the Query Unload and Unload events of the form?

Unload Doesn't Want To Unload
hi, i'm a newby here, and i've tried to search the site on this subject, but i couldn't find much, (even though it's a common one i think, so i guess i'm doing something fundamental wrong) so here i go:

i've got a mdi parent/child structure, with a module, where i've put some common things, and now i need to unload some mdi childs (but not all). since it's really only a few forms which need to be unloaded, i'v made myself a sub:

public sub unloadform()

'i just walk throug all forms which possibly can be loaded
on error resume next

unload formxx1
unload fromxx2

on error goto 0

end sub

according to my manuals, this should work, maybe i should add set form = nothing, but that is not the problem here: the code doesn't do ANYTHING!!, i can get there (i set some togglepointsthingies, and it arrives there just fine). also : is i remove the error stuff, it runs just fine! (which i think shouldn't)

does anybody have a clue?

Unload All Forms On One Unload
I have a main form and I want it so when you exit in unloads all the forms that you can see. Can this be done

Device Context VS Memory Device Context?
Hi. In my spare time ive been reading some sttuff on windows graphics programming
and it seems to be an important topic that of the DeviceContexts, well, what
i have read says that the DC is an object that let me work with devices like
printers, windows (((how is it a window is a device??))). Ok it is like a VB object
but what about the Printer object or the Screen object is that the same?
Also, i read about memory device contexts too, and that i really dont understand it...
im not saying go into deep explanation but what is the difference between MDC and DC... and do i need to worry about it?

Help Context Id
How do I define help context ID's? Im using HTML help workshop and I created all my help files. I can press F1 and it opens it...but I noticed each form has a propoerty HelpContextID. I assume this means which help page to open. Well how do I define the ID numbers in the HTML help pages ???


Help Context IDs

I need help on how to create Help context IDs. I tried using the Msgbox help button to start the htmlhelp. When I clicked on the help button I got the error that "HH_HELP_CONTEXT Called without a (Map) selection. But when I clicked OK, the Help file was loaded and the default page was shown. But what I really wanted was it to open a specific context.

The code looks like the one below:

Dim sHelpFile As String

sHelpFile = App.Path & "myhelp.chm"

'ShowHelp Me.hWnd, sHelpFile, "Introduction.htm"

Reply = MsgBox(prompt, vbOKCancel + vbMsgBoxHelpButton, "WWWWWWWWWWWWWWWWWWWW", sHelpFile, 1)

Any help will be appreciated.



Com Context
I have the following code:

Function oFunctionRS(ByRef oDbConnection) As ADODB.Recordset

some code

Set oTempRS = oDbConnection.Execute(sSQL)
Set oFunctionRS = oTempRS


Set oTempRS = Nothing
Set oContext = Nothing


Set oTempRS = Nothing
Set oContext = Nothing

Exit Function



some error logging code

' allow resume next after error
Resume ExitHandler

End Function

Should I clear oTempRS and oContext in exithandler and in a main code, or only in exithandler?
I also have seen a lot of examples in internet, where functions have only oContext.SetAbort
or oContext.SetComplete and there is no Set oContext = Nothing. Should I Set oContext = Nothing in a main function code, or after oContext.SetComplete or oContext.SetAbort it somehow clears automatically?

Thanks for any suggestions.

Out Of Context
Below is my code to play .wav file
f = mciSendString("open " & sWAV & " type waveaudio alias voice1", 0&, 0, 0)
f = mciSendString("play voice1", 0&, 0, 0)

I dont know why the VB complier says that the line' f = mciSendString("play voice1", 0&, 0, 0)' is out of context. What is meant by this & can it be solved?

What's A Device Context?

I'm trying to make a semi-transparent textbox. And I want a background image on it, so I am trying to understand this tutorial:

But It keeps talking about a DC, which is device context.

What is it?

And how to I link a class (or even make one???) and link it to a textbox??

Please help!

Thank you!

(cause I dunno the first thing about this)

Context Menus
many programs such as winzip use context menus to make use easier.., for those who do not know, a context menu is the pop-up menu that pops up when you right click....

I have been trying to find out how to add my own option in the context menu..., I know that the handelers are contained at: HKEY_CLASSES_ROOT[file type or ext.]shellexContextMenuHandlers

but I am lost where to go from there

thanx in advanced,

So What Actually Is A Device Context?
Can someone explain precisely what the terms device context, bitmap and handle mean, and how they relate to each other?

The background is, I'm trying to find the "best" way to load a bitmap file into memory and then blit it to a buffer and ultimately to a Form or PictureBox. I've used BitBlt before, but I've only really copied examples and haven't properly understood what is going on. I've read loads of things like "Select the bitmap into the DC" but don't really understand them fully.

Context Menus...
hi, im building my own type of recycling bin (something like the norton one), so i've created my own CLSID, now what i need to do is create a contet menu for it and give it the same kind of properties that the real recycle bin has. ok so is it possible for me to create an ENTIRE NEW right click menu for my bin?? or even if i use/call the same menu that the real bin has, that will do. and is there a way to get the same kind of properties (hidden in all kinds of browse menus, ect) so i can give it that nice touch??

thanks heaps

Context Menu
how do u make a right click menu on VB6

Device Context Help!
· hdc
Identifies the device context.

Where would I find a list of all of them?

Context Menu
How i can get my application name in system context menu when right click on a file and on click opens that file in my application? Like winzip.

Please give me some suggestions.


Out Of Context Question
Somebody knows where I can get the applet that many websites use...Sometimes, it is called Instant Pool, sometimes Quick survey. You have a frame containing a question and some choices of answers via radio buttons. You have the choice to Submit your vote or to view the results. I can however code it but I am trying to avoid ASP for now...

Help {what's This/context Sensitive Help}
after setting What's this button/help to true for a form, how to assign a text to be shown when user clicks on a button/object ?

Context Sesative Help
I have set up a progem to use context sensative help. All is working fine except I have an option from the menu to search the help file. Does anyone know how I can open up my HTML help file in the search mode rather than on a specific page.



Device Context
Hi, great job with the forums.I have been registered under a different account that I lost, for about 2 years now, and I have to admint I enjoy the searching facilities of the forums very much.I'm quite confused now, so any help greatly appreciated!

I'm making an application where the user initially loads an image using a CommonFileDialog box.Creating a DC I can paint this onto a picture control. Then the user using his mouse is clicking on the image to select the area he is interested in and I have it displayed onto the picture alone,then he can zoom it e.t.c. register control points e.t.c.
My problem is that once I have the selection I store everything into arrays and manipulate the pixels or their centers the user then will load another image.In the meantime when I ask to Get the pixel value let's say when the user has selected a region and I display it on the picture control alone, it isn't actually reading what is beeing displayed on the only does so when the image is loaded and remains intact.
I need to be able to update Device Context since I read the values using for example API calls like this one:

greyValue = GetPixel(lngDC, MousePixelPositionX, MousePixelPositionY) And &HFF

My problem is that let's say the picture shows a 20 x 20 face that the user selected and I have the rest all white.When I read the values though with the mouse movement, it will show all the positions, even in the selected area displayed on the picture, as 255 ( white in greyscale)
which means Im doing something wrong.

Part of the code within a sub i use to store the selection:

'trying to debug Device Context problem cause final output still displays orginal BMP transparent background or DC is not updated of the current display on screen

Set Picture1.Picture = LoadPicture ' clear its contents
Set stdPic = LoadPicture

'show selection
Call Array2Picture(1) 'ingore this bit,displays the array back to picture
ProgressBar1.Visible = False
statusText = "Ready"
Label9.Caption = statusText
ProgressBar1.Value = 0

'DC once I have new content i though I would update the DC like this
lngDC = CreateCompatibleDC(Picture1.hdc)
lngOrigBMP = SelectObject(lngDC, stdPic.Handle)'this is used when loading the original BMP too

Anyways, If I'm confusing you guys too much, i just need to know how to pass the current contents of a picture to a DC.
I imagine that I can't also pass arrays to DC directly.
Erm, I'm confused

Invalid Context
hi im so confuse hope u can help me. i have a MDI form and a button in MDI form and if i click a button the error appeared

The connection connot be use to Perform. its is ethier closed or invalid context

this is my VB code

Private Sub Form_Load()
Dim i As ListItem

LVfrmemployer = True

Set cn = New ADODB.Connection
cn.Open "provider=microsoft.Jet.OLEDB.4.0;Data source=C:Thesis FinalsThesis.mdb;Jet OLEDB:Database Password=000"

If cn.State = adStateOpen Then
End If

Set rs = New ADODB.Recordset

rs.Open "Select * from cordemployee", cn, adOpenKeyset, adLockOptimistic

While Not rs.EOF

Set i = ListView1.ListItems.Add(, , rs2!Eid)
i.SubItems(1) = rs!Name
i.SubItems(2) = rs!Surname
i.SubItems(3) = rs!Middlename
i.SubItems(4) = rs!Age
i.SubItems(5) = rs!PositioniDepartment
i.SubItems(6) = rs!DateEmployed


Set rs = Nothing

End Sub

Context Menu
I want to know how to invoke item in context-menu of another application.

Situation: I have an application which is a data window with “SysListView32” class. When I right click inside this window, the context menu pops-up and there is a option to copy the data, which basically gets copied to clipboard.

Problem: The problem is that the the ‘copy’ option of the context-menu doesn’t have ‘Ctrl+C’ option so sendkey doesn’t copy data from this window.

What I want? – I want to know if there is any other way where I can get menu handle or menu-id of one particular option within context menu. I want to send message to this window and achieve the result that would happened when ‘Copy’ option is selected within the context menu.

Thought – I know something like this is possible for normal menu options that are there on top of the window, like you can SendMessage to menu-id.

Can a similar this be achieved for auto selecting a particular option of context-menu of another application?

Would appreciate help on this one?

ATL+TAB Or Context-Switch Via VB
Hello there. (sorry i misplaced the Thread. it should have gone into API)

I got a realy good question.

Is it possible to bring my VB Application to background and let another Application come to foreground?

The reason:

My App is: allways on top
and it overlaps the tastbar
the user cannot move it by mousedrag
it hast no controlboxes

Goal: let it switch to another ap with the same behavior

it would be great to know how to do this.

afik this should be done by API, so i put this thread into the API section.

I made some atempt with minimize, but i cannot reopen the app, cause it is not possible to reach the tastbar, for reasons of the program. i want to prevent the user to click to the start button or something like that. also i locked the Taskmanger (CTRL+ALT+DEL does not work in both apps)

Any ideas how to solve this Problem??

greets Matze

Device Context Help
I have a program right now that looks at another program and searches for a particular child window. This window is like a status bar and is constantly changing it's color from green, yellow to red. I have the prgram so far where is goes and captures the window and gets the Device Context handle.

My question is, how do I go about getting the color that is being painted by the Device Content. I want to check the color and do certain thing based on the color.

I appreciate any help on this


Context Menu
Hi all,

I want to write an application in VB 6.0, it automatically calls a context menu item of a control in .net application (It looks like we right-click on that control and choose a menu item when the context menu appeared).
Everyone who know it, help me pls.

Thanks in advance,

Device Context...
What is a device context, and what does it is usefull for? i heard about taking screenshots, and so on?

Context Menu In The .exe
There are some programs that when you click on their .exe file, the context menu that is displayed has some uniqe options. For example WinZip has those: "Compress to Zip File" "Compress Ass..." etc.

How can i do that?


Context Sensitive Help
I have a .chm file and am using context sensitive help. Most of the controls work, but a few do not.
I am assigning the numbers in the ide. I know i am assigning valid numbers, 1 textbox will work and another will not etc.
How can i fix this?

Context Based Help In VB6
I have installed Visual Studio VB 6 on my pc but choose not to install MSND help at the time ..... silly me ops:
I have now installed it but the context based help from within Visual Studio VB is not working .. any ideas as how to activate it?

Copyright © 2005-08, All rights reserved