|
It's almost correct, but when you write keyascii = a it thinks that a is a variable. You have to write keyascii = vbKeyA.
-----------------------------------------------------
Private Sub Form_Load()
KeyPreview = True
End Sub
Private Sub Form_KeyPress(keyascii As Integer)
If (keyascii = vbKeyA) Then
Form2.Show
Else
Form3.Show
End If
End Sub
------------------------------------------------
/Kurt
|
|
|
|
|
If anyone need to buy the VB Code for IE Toolbars like google or yahoo then can see them at http://www.chadhaajay.net
Contact me for prices..!!
|
|
|
|
|
I can't receive event for the third keystroke when pressing more than two keys simultaneously.
For example, if I press Left-Key and Up-Key in the same time(to move a sprite), I can't have the information on Space-Key if it is down or up (to shoot) ?
Has someone got an idea ?
|
|
|
|
|
hi,
i am passing a array of string from VB to VC++ DLL's.
i am not able to manipulate with the the argumets received inside the DLL.
i pass the string arry "by ref" from VB to VC++
i receive it in a char** in the VC++
when i move the pointer location an illegal operation error occurs .
|
|
|
|
|
Its been a while since I worked with VB -> C++ dlls, but I think you need to pass ByVal because of the way that strings (COM VT_BSTR's) are handled.
Not sure on array's of them, but I remember this for regular strings.
James
Sonork ID: 100.11138 - Hasaki
and a digital cookie (not chocolate chip, its computer chip) goes to whoever can be the first to tell me what Hasaki means. I know someone registered on here can tell me
|
|
|
|
|
can anyone tell me how to load a skinned mesh using the Direct3DX Utility Library (helpers)?
|
|
|
|
|
The PUT statement can be used to write a UDT to a file and GET can recover the UDT, or an array of UDTs. I see that GET can flatten out (write as a series of byte values) the contents and structure of a UDT.
Is there a way that I could perform that same flatting and reconstituion function without actually writing a file?
Is there a way to discover the structure of a UDT without knowing it advance?
I would like to accept a UDT, any UDT or an array of UDTs as a parameter to a OCX, without knowing in advance the caller's UDT structure. Be able to receive a UDT, examine it's structure, manuipulate the contents as a string or byte array, and then return the (changed) UDT to the caller.
Is this possible?
|
|
|
|
|
I am using the following code to add two textboxes to the from
option explicit
private withevent objText as textbox
private sub AddTextBox
dim i as integer
for i = 1 to 2
set objText = controls.add("vb.textbox", "text" & i)
next i
end sub
private sub objText_Gotfocus()
objtext.selstart = 0
objtext.sellengh = len(objtext.text)
end sub
I add two textboxes to the form using the controls.add method
first time
set objText = controls.add("vb.textbox", "text1")
second time
set objText = controls.add("vb.textbox", "text2")
the first one losses the referenct to objtext events when the second one is set. there must be a way to preserve the setting???
can someone please help!!!!
Confusios say "Man who run in front of car get tired, Man who run behind car get exhausted."
|
|
|
|
|
My VB skills are a little dusty but I think you need to declare two seperate variables objText and objText2, otherwise you only really have one "control".
Michael
|
|
|
|
|
|
I've never used this method befor, but it seems cool.
Try this code it may help you:
private sub text1_Gotfocus()
text1.selstart = 0
text1.sellengh = len(text1.text)
end sub
private sub text2_Gotfocus()
text2.selstart = 0
text2.sellengh = len(text2.text)
end sub
|
|
|
|
|
Is there a function in vb where i can open a url (http://whatever.com) and have the content of that site come into a variable so I can proceed to parse it?
I know there are nice classes for it in C++ here but I haven't found anything for it in VB.
Thanks
|
|
|
|
|
Simple, add a Inet Control to the form
Code :
Dim str1 as string
str1=Inet1.OpenURL("http://www.chadhaajay.net")
Now the entire html page is in string "str1"
Contact for any kind of website design, softare development, custom IE Toolbars at www.chadhaajay.net
|
|
|
|
|
I am constructing a graph that plots distance on the x axis and resistivity on the y-axis. There is an extra data series that plots an arrow at various distances to denote a feature, e.g. tree, but to get the arrow in the right place I have to give each point in the series the value 2000. I am able to turn on the data labels and change the orientation, but I can't change the value in the data label from 2000 to "tree".
The code from the help files doesn't seem to work:
With myChart
With .SeriesCollection(1).Points(2)
.HasDataLabel = True
.DataLabel.Text = "Saturday"
End With
End With
The following code I have written after reading the help file and this doesn't work either:
Set chartpath = subGraph!uofGraph.Object.Application.Chart
With chartpath.SeriesCollection(6)
.HasDataLabels = True
.DataLabels.Orientation = 90
End With
Set FeatRs = CurrentDb().OpenRecordset(Me!ItemSQL, DB_OPEN_DYNASET)
Counter = FeatRs.RecordCount
featCount = 1
For X = 1 To Counter
If (IsNull(FeatRs.Fields(6).Value)) Then
MsgBox "No Feature"
FeatRs.MoveNext
Else
With chartpath.SeriesCollection(6).DataLabels(featCount)
.text = "test"
End With
MsgBox "Some Feature"
FeatRs.MoveNext
featCount = featCount + 1
End If
Next X
FeatRs.Fields(6) contains null fields and the value 2000, series 6 is the arrows and has the data labels I want to change.
Thanks in advance
Marc Robinson
|
|
|
|
|
I'm upgrading my VB6 usercontrols to VB.Net and everythink is OK but what can replace :
- Me.Cls '//Used each time I refresh my control
And how can I create a container control ?
Thanks
Makyana
|
|
|
|
|
I have a VB6 app that manages a bunch of stuff in a database. From a listctrl, I want to drag "one of those objects" onto the Windows desktop and intercept the drop within the shell so I can create a special file that holds some reference info about the item. I'm trying to roughly emulate what happens when you drag a message, appointment, etc. from Outlook onto the desktop. I've looked into Shell Extensions some and can't seem to find what I need. Does anybody know how to do this type of thing?
|
|
|
|
|
Hi,
I have a Public Function defined in a form (eg: Form-Func() ) and,
a Public Function in Class Module (eg: Class-Func() ).
I have a global instance of the class.
Now, in Form-Func() , I am calling Class-Func()
If any error occurs in Class-Func(),
I want it to be handled in the Form-Func().
But the call stack unwinding does not pass the unhandled error to Form-Func().
It pops the Runtime Error.
Please some one suggest a proper way to handle the Class-Module error
from within the caller Function outside the class context..
Thanks
Firoz
|
|
|
|
|
how can i logoff windows 9x using vb codes
|
|
|
|
|
Public Declare Function ExitWindowsEx Lib "User32" Alias "ExitWindowsEx"(ByVal uFlags as Long,ByVal dwReserved as Long) as Long
Inside your form where you want to log off the user include:
Call ExitWindowsEx(EWX_LOGOFF,0)
The first arguement has several options:
EWX_FORCE = 4
Force any applications to quit instead of prompting the user to close them.
EWX_LOGOFF = 0
Log off the network.
EWX_POWEROFF = 8
Shut down the system and, if possible, turn the computer off.
EWX_REBOOT = 2
Perform a full reboot of the system.
EWX_SHUTDOWN = 1
Shut down the system.
Hope this helps
Nick Parker
|
|
|
|
|
I've got this ActiveX Object (made w/ VC++6.0), it creates a thread (so i can have multiple running at the same time), but it also fires events to my Visual Basic App. With me creating threads cause problems for those events trying to get back to the application?
It seems that way. VB seems to crash when i Fire an event. When i use an activex control, does it have its own thread? Can i redirect the thread ID or something like that? It's just being flat out weird. Has anyone had the same trouble before? I set up connection points at the beginning when i made the obj., is there any other settings that i need to have? Even a little bit of help will go a long way for me...Thanks Y'all.
~TIM!
SHABBA!!
|
|
|
|
|
You can not fire the event from another thread directly, you must use PostMessage notify the main thread in the OCX. True multithread programming in VB6 here:
http://www.banasoft.com/Comm.htm
|
|
|
|
|
I'm looking from a simple Date/Time picker control, I'm unable to find it...
Something like a Text box, formatted, where you can only add a valid date.
Any idéa?
Remi Morin
Rmorin@Operamail.com
Remi.Morin@Lyrtech.com
|
|
|
|
|
In the Microsoft windows Common controls-2 6.0 (mscomct2.ocx) you have the dtpiker
Best Regards
Carlos Antollini.
Sonork ID 100.10529 cantollini
|
|
|
|
|
Thanks!!! It was what I'm looking for!!
sorry to ask for so "beginner info" but usualsy I don't program VB.
Remi Morin
Rmorin@Operamail.com
Remi.Morin@Lyrtech.com
|
|
|
|
|
Lucky for me I work every day in VC++ but sometimes I work in something called VB.
Cheers!!!
and for ever in CP
Carlos Antollini.
Sonork ID 100.10529 cantollini
|
|
|
|