|
Visual problems are difficult to diagnose in forums, becaused, obviously, we can't see what you mean by "on the same layer".
Did you set the FormBorderStyle to Fixed3D? Is the menu sitting in another container that is set for rendering Sunken or 3D?
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hi everyone!
Actually, I have two questions:
First: How can I change(in code) , in a VB report the properties of a shape (i.e. a square)? I have a form with check marks and I wish that, when a check mark is checked in an after report a square shape should become red and when unchecked the square should be unfilled.
Second: How can I, in a image toolbar, change the enable/disable property of an icon?
Thanks in advanced!
|
|
|
|
|
I want to use a button to change to another form, how do you call the other form?
|
|
|
|
|
You make a new instance of the second form (ore use an existing one) and call it's Show or ShowDialog method.
--------------------------------------------------------
My development blog
Q:What does the derived class in C# tell to it's parent?
A:All your base are belong to us!
|
|
|
|
|
Dim myForm As New MySecondForm
myForm.Show()
' or
Dim result as DialogResult
result = MyForm.ShowDialog()
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
use the following command on the click event of the button
formname.show
formname is the name of the form you want to open
|
|
|
|
|
please help me
why dont work it code?
i need explication of why this dont work
<br />
Private Declare Function GetProcAddress Lib "kernel32" (ByVal hModule As Long, ByVal lpProcName As String) As Long<br />
Private Declare Function GetModuleHandle Lib "kernel32" Alias "GetModuleHandleA" (ByVal lpModuleName As String) As Long<br />
Private Declare Function CreateThread Lib "kernel32" (lpThreadAttributes As Long, ByVal dwStackSize As Long, lpStartAddress As Long, lpParameter As Any, ByVal dwCreationFlags As Long, lpThreadId As Long) As Long<br />
Private Declare Function CloseHandle Lib "kernel32" (ByVal hObject As Long) As Long<br />
Private Declare Function WaitForSingleObject Lib "kernel32" (ByVal hHandle As Long, ByVal dwMilliseconds As Long) As Long<br />
Private Declare Function GetExitCodeThread Lib "kernel32" (ByVal hThread As Long, lpExitCode As Long) As Long<br />
Private Const INFINITE = &HFFFF ' Tiempo de espera infinito<br />
<br />
Private Sub Command1_Click()<br />
Dim var1 As Long, var2 As Long, var3 As Long, var4 As Long<br />
var1 = GetModuleHandle("msvbvm60.dll")<br />
var2 = GetProcAddress(var1, "rtcShell")<br />
If var2 <= 0 Then MsgBox "funcion no encontrada": Exit Sub<br />
var3 = CreateThread(ByVal 0&, 0&, ByVal var2, ByVal "notepad", 0&, ByVal 0&)<br />
Call WaitForSingleObject(var3, INFINITE)<br />
Call GetExitCodeThread(var3, var4)<br />
If var3 <= 0 Or var4 <= 0 Then<br />
MsgBox "POR QUE DIABLOS NO FUNCIONA ESTA PINGADA"<br />
End If<br />
CloseHandle var3<br />
End Sub
EOF
|
|
|
|
|
What do you want this code to do first? Just saying "why does this not work?" Doesn't help because we don't know what your want it to do.
It LOOKS like you're trying to launch Notepad on a seperate thread. If so, you're going about it the VERY hard way. All you need to do is:
Shell "Notepad"
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hi,
I've loaded gif image into Image object. Could you please give me an advice how to change frame delas? As someone is interested, I get them as follows:
Dim PropertyTagFrameDelay As Integer = &H5100
Dim propItem As System.Drawing.Imaging.PropertyItem = img.GetPropertyItem(PropertyTagFrameDelay)
Dim bytes() As Byte = propItem.Value
Dim delays(frame_cnt) As Integer
Dim i As Integer
For i = 0 To frame_cnt - 1
delays(i) = BitConverter.ToInt32(bytes, i * 4)
Next
Thanks,
Alex
|
|
|
|
|
Hi all, I want to write a string matching program that using boolean operator(AND,OR), can you give me an idea how to use that operator? Thank you.
|
|
|
|
|
You'll have to explain this a bit more. AND and OR are boolean operators and don't work if you put them between strings. You can't do:
If string1 And string2 Then
....
So what do you want to do with these strings?? How do you want to compare them?
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
I will explain more about it, I want to write a search engine program that will search input string and matching it with a file in a folder. If matching found, it will show you what file containt that string. The problem is this program can't search a string more than one word so I want to use boolean operator to find a string that we want. For example Google Desktop search engine can search with that operator. Can you help me? If you don't understand about my question you can ask it to me. Sorry for my english.
|
|
|
|
|
i dont need to write in note pade and the another application read from it. i need to use the sendwait() method but the problem what happed ? really i dont know maybe i shoudl add timer to the button action to slow down the transfer of data from vb.net to another application ..so i need the solution .. because i work with seminar project and i have a 1/5 as a dead date .. the problem is transfer a data from vb.net to another application without any changes of data..
please i send more than 12 to get the answer but still at this moment without a correct soluation...please help me.
in the subject example the first time will print 08052 and the second maybe 080052 and the third maybe 0855520 and th fourth maybe 08052 but why doesnt print the correct data in each time click on the button "080052"
kilany
|
|
|
|
|
If you ask the same question so many times, perhaps you should consider that there is something wrong with the way that you write your questions.
:: Use a descriptive subject.
:: Try to explain clearly what you are trying to do.
:: Show what you have tried to accomplish it.
---
b { font-weight: normal; }
|
|
|
|
|
Actually, he has. The problem is he's looking for a "sure-fire" solution to controlling another application using SendKeys...which we all know isn't that reliable to being with. I've already told him a few times to look for alternatives, but it doesn't look like there are any good ones, especially considering his time contraint.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
I don't know if this is going to help you, but I have used AutoIt a couple of times to automate other applications (it uses SendKeys() behind the scenes and you still need to build in 'delays').
I have no affiliation with these guys. Just a happy user
The website is: AutoIt[^]
Anyway FWIW here is the blurb from their website:
AutoIt v3 is a freeware BASIC-like scripting language designed for automating the Windows GUI and general scripting. It uses a combination of simulated keystrokes, mouse movement and window/control manipulation in order to automate tasks in a way not possible or reliable with other languages (e.g. VBScript and SendKeys). AutoIt is also very small, self-contained and will run on 95, 98, ME, NT4, 2000, XP, 2003 out of the box with no annoying "runtimes" required! You can even make compiled executable scripts that can run without AutoIt being installed!
AutoIt was initially designed for PC "roll out" situations to reliably configure thousands of PCs, but with the arrival of v3 it has become a powerful language able to cope with most scripting needs.
AutoIt can:
* Provide a general-purpose scripting language for all Windows versions
* Simulate keystrokes (supports most keyboard layouts)
* Simulate mouse movements and clicks
* Move, resize and manipulate windows
* Interact directly with "controls" on a window (set/get text from edit controls, check boxes and radio buttons, select items in drop-down lists, etc.)
* Create complex user interfaces (GUIs)
* Work with the clipboard to cut/paste text items
* Provide a scriptable RunAs function for Windows 2000/XP/2003
Unlike AutoIt2, the new AutoIt v3 language has a much more standard syntax -similar to VBScript and BASIC - and now supports complex expressions, user functions, looping and everything else that veteran scripters would expect.
As with previous versions, AutoIt has been designed to be as small as possible (~115KB) and stand-alone with no external .dll files or registry entries required. Scripts can also be compiled into stand-alone executables with Aut2Exe.
There will also be updates to the ActiveX and DLL versions of AutoIt called AutoItX - unlike v2 this will be a combined control (COM and standard DLL functions in the same DLL). AutoItX will allow you to add the unique features of AutoIt to your own favourite scripting or programming languages!
Best of all, AutoIt continues to be FREE - but if you want to support the time, money and effort spent on the project and web hosting then you may donate using the link to your left in the menu.
...Steve
1. quod erat demonstrandum
2. "Give a man a fish and you've fed him for a day. Teach him how to fish and you've fed him for life." I read that somewhere once
|
|
|
|
|
crystalreport-Invalid TLV Record
hi,
For some time i m using crystalreport in vb.net and it worked fine.but, after some time when i re-opened my crystalreport, then i got the error : Invalid TLV Record. and then my report could not be opened even in design mode.
if u hv some concrete solution then Plz help me out....it's very urgent!
Thanx in Advance,
Sweety Shah.
|
|
|
|
|
If it's that urgent, ask the people who wrote Crystal Reports.
A 10 second Google search for "crystal reports invalid tlv record" came up with lots of possibilities. This[^] result list even limits the search to BusinessObjects own site, the people who wrote Crystal Reports.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hi all,
I have a requirement where I need to create a scheduler, which will do
1) Browse and select a DLL (ActiveX DLL) from the file system.
2) Show all the classes from the DLL on a drop down.
3) if we selected a particular class from the drop down then show another drop down with all the public methods in that class
4) If we select a method from the drop down then show all the parameters.
Now allow the user to input the values for the parameters. and set a time a date to run.
All these stuff goes to an XML.
UP TO THIS I HAVE MANAGED TO DO
And the scheduler will read this and run the selected method for the selected class for the selected dll using the given values for the method parameters.
Basically I would like to know how to run a DLL method dynamically from a VB6 code. Remember I am getting DLL name, Class name, Method name, parameters and the respective values from an XML as strings. How we can execute this in VB6? if not possible in VB6, is it possible in VB.NET? how?
Following are the sample code I used to read Tlb stuff from the given dll to form the xml for my scheduler... Please help me thanks!
-----------------------------------------------------------
Dim objtlb As New TLI.TLIApplication
Dim objTlbInf As TLI.TypeLibInfo
Dim objSearch As TLI.SearchResults
Dim objMemberInfo As TLI.MemberInfo
Dim Ob As Object
Dim tliApp As TLI.TLIApplication
Dim tliIrf As TLI.InterfaceInfo
Dim tliMI As TLI.MemberInfo
Dim sDLLFileName As String
Private Sub cmbDLLCoClassesList_Click()
On Error GoTo err:
Set tliApp = New TLI.TLIApplication
Dim tliMI As TLI.MemberInfo
Set Ob = CreateObject("MYTEST." & cmbDLLCoClassesList.Text)
Set tliIrf = tliApp.InterfaceInfoFromObject(Ob)
cmbDLLMethodsList.Clear
lstParam.Clear
For i = 1 To tliIrf.Members.Count
cmbDLLMethodsList.AddItem tliIrf.Members(i).Name
Next i
cmbDLLMethodsList.ListIndex = 0
lstParam.Clear
For j = 1 To tliIrf.Members(1).Parameters.Count
lstParam.AddItem tliIrf.Members(1).Parameters.Item(j).Name
Next j
lstParam.ListIndex = 0
Set Ob = Nothing
Exit Sub
err:
cmbDLLMethodsList.Clear
lstParam.Clear
End Sub
Private Sub cmbDLLMethodsList_Click()
lstParam.Clear
For j = 1 To tliIrf.Members(cmbDLLMethodsList.ListIndex + 1).Parameters.Count
lstParam.AddItem tliIrf.Members(cmbDLLMethodsList.ListIndex + 1).Parameters.Item(j).Name
Next j
End Sub
Private Sub cmdLoad_Click()
sDLLFileName = "D:\MYTEST.dll"
Set objTlbInf = objtlb.TypeLibInfoFromFile(sDLLFileName)
Set objSearch = objTlbInf.GetMembersWithSubString("")
cmbDLLCoClassesList.Clear
For i = 1 To objTlbInf.CoClasses.Count
cmbDLLCoClassesList.AddItem objTlbInf.CoClasses.Item(i)
Next
cmbDLLCoClassesList.ListIndex = 0
End Sub
-----------------------------------------------------------------------------------
Davis
|
|
|
|
|
Do all your dll's implement an interface? I am not sure a way of doing this in VB 6.0
In VB.NET you can use reflection.
Mike Lasseter
|
|
|
|
|
Thanks. I found how to do this. we can use the "CallByName" in VB6. the Method Signature is as follows.
-----------------------------------------------------------------------------------------
CallByName(Object as Object,ProcName as String,CallType as VbCallType,Args() as Variant)
where CallType can be
VbLet
VbGet
VbMethod
VbSet
-----------------------------------------------------------------------------------------
-Davis
|
|
|
|
|
hi,
how to set hyperlink on database field in crystalreport, so when i click on that,respected new report will be generated from that field clicked.
or
how to give hyperlink for whole row (all the fields are included in that row,like yahoo mail).so, whole row is getting selected when clicked anywhere in row.
It's urgent.so, Plz give me reply.
Thanx in advance,
Regards,
Sweety Shah.
sgshah
|
|
|
|
|
How can i build mail receiving and mail sending application in VB. what components will b needed pls suggest?
thanx
|
|
|
|
|
|
hi everybody
I want to add a combobox as one of the column in datagrid.if anybody know how to add combobox in datagrid please help me its urgent
Thanks
|
|
|
|